# An Accuracy-Efficiency-Power Consumption Hybrid Optimization Method for CNC Milling Process
## 2 Algorithm and Method
### Optimization of Power Consumption  
The cutting speed in the cutting process is proportional to the spindle motor speed, and the cutting feedrate is proportional to the servo motor speed. To shorten the machining time for improving machining efficiency, the feedrate of the servo motor needs to be increased. However, increasing the feedrate of the servo motor will increase the chip load and cutting resistance, hence, it will affect the tool life and machining accuracy. To avoid this effect, the spindle speed needs to be increased at the same time, so the chip load is kept maintained. However, the increasing of spindle speed and feedrate cause an increase in power consumption. In this study, power consumption is measured for different  
Figure 1: Flowchart of research. CNC: Computer Numerical Control; NC: Numerical Control. spindle speeds, then the influence of machining parameters on machine power consumption is created for the establishment of an optimized design algorithm. According to the spindle speed-motor power consumption characteristic curve and feedrate-motor power consumption characteristic curve, the model of the relationship between machining parameters and power consumption can be established by the polynomial curve fitting method, then analyzed to determine the influence of each parameter on machine power consumption and the influence of the combination of parameters on machine power consumption. To reduce machining time by increasing the servo feedrate (i.e., increasing the servo motor speed) without affecting the tool life and machining accuracy, it is necessary to maintain the cutting load per tooth (chip load), so the spindle speed needs to be increased. In the optimization procedure, first of all, the user needs to roughly define the expected increase of feedrate for better machining efficiency, and the system will then search the optimal feedrate close to the expected feedrate, which has lower electrical power consumption for the related servo motors, based on the pre-built empirical model. After the optimal feedrate is selected, the spindle speed is calculated to remain the same chip load for the cutter to avoid deteriorating the cutter life. Since the optimal feedrate was selected based on the goal of efficiency improvement, the optimal combination of parameters can provide better efficiency, better electrical power consumption, and almost the same tool life. The relationship of chip load, spindle speed, and feedrate is expressed in Equation (1). \[C_{p}=F/(N\times z) \tag{1}\]  
where \(C_{P}\) is the chip load (mm/tooth), \(F\) is the feedrate (mm/min), \(N\) is the spindle speed (rpm), and \(z\) is the number of teeth. When optimizing machining, the required spindle speed is entered to the machining parameters-power consumption module to calculate the power consumption change. To make the power saving and machining cost of production easy to understand for industry, the machine power consumption is converted into electricity cost. The machining efficiency can be determined as machining cost saving, which can be obtained by multiply the machining time saving and machining cost as shown in Equation (2). \[\mathrm{M}_{cr}=\mathrm{M}_{\mathrm{t}}\ \times\ \mathrm{hr} \tag{2}\]  
where \(\mathrm{M}_{cr}\) is machining cost saving, \(\mathrm{M}_{\mathrm{t}}\) is machining time saving (hr), and hr is machining cost (NTD/hr). Figure 2 shows the optimization algorithm of machining and power consumption. If the electricity cost of the shortened machining time exceeds the basic electricity cost, the system re-finds the machining parameters to obtain optimal machining efficiency and power consumption based on Equation (1) and the spindle speed-motor power consumption module and the feedrate-motor power consumption module. The final machining time must be less than the initial machining time to achieve lower cost. After establishing the empirical models the for relationship between machining parameters and power consumption, an optimization system was developed in visual C# language.