{'fraction_non_alphanumeric': 0.020992686058846518, 'fraction_numerical': 0.0036290547708112335, 'mean_word_length': 4.809925397340253, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Toolpath strategies and management to optimize energy consumption on 3-axis CNC milling machine

CNC milling machine is a production machine which widely used to manufacture many kinds of products. In the process of milling machining, the time needed to produce a component must be as minimum as possible to minimize the costs and its impacts on the environment. One of energy consumptions used in CNC milling machines is to supply electric motors for each axis of motions. Cutting energy consumption can be minimized by optimizing the cutting parameters, such as the cutting toolpath. Modelling and comparing the total energy consumption of the cutting process from different cutting toolpaths and strategies are important in selecting the right toolpath that has the smallest energy consumption. To achieve this goal, this study models the energy consumption during the cutting process. The model is then used to evaluate and compare different cutting toolpaths from different cutting strategies. Three prismatic and one sculptured part were used to examine the model of cutting energy consumption. A Graphical User Interface is also developed to simplify the comparison and evaluation process. Through this process it will be possible to predict energy consumption in the cutting toolpath and hence enable the selection of the right toolpath to reduce energy consumption in machining.


Introduction
The industrial world today has an important evaluation to reduce energy consumption. According to Fang et al. [1] industrial sector today covers about one-half of the world's energy consumption, and has almost doubled over the last 60 years. Manufacturing industry is one of the sectors responsible for this, due to the use of machinery equipment that consumes energy in the manufacturing process of a component. In the process of converting raw materials into finished components or parts, manufacturing industries are one of the major consumers for electricity usage and hence contribute to a large amount of carbon emissions, since electrical energy used today is generated by burning fossil fuels as their source of energy. Balogun et al. [2] reported that CO2 emission in the manufacturing process is the one of the contributing factors to global warming potentials and pollution.
Machining is a manufacturing process that involves removing unwanted materials using cutting tools from some workpiece and converting it into the demanded geometry. The reduction of energy usage in machining is an essential consideration to improve the environmental performance and reducing manufacturing cost, since machining is widely used in manufacturing and represents a major energy consumption. Li et al [3] stated that more than 99% of the environmental impact was caused by the use of electrical energy consumed by machinery equipment in the process of discrete part manufacturing such as milling or turning machine.
Understanding and estimating the energy consumed by machining process are a serious matter to optimize and improve its efficiency. Therefore, it can be concluded that improving the efficiency in machining processes contributes a significant part to reduce the energy consumption rates, environmental burden, and help to create a lean and sustainable manufacturing [4].
Milling is one of the process of removing material which occurs because of the contact between the cutting tool that rotates on the spindle with the workpiece gripped on the machine table. As technology advances, manufacturing industries continues to develop. In the digital era, there are many automated machines that are increasingly facilitating the production process, including milling machines. Many large industries have switched to CNC (Computer Numerical Control), but not a few manufacturers are still utilizing manual milling machines for production activities. Although it still operating on the same basic principles, modern CNC milling machines are significantly different from older milling machines. CNC machining plays an important role in current mass manufacturing because of its ability to achieve high accuracy and precision as well as its ability to accept computer commands for motion control [5].
Despite of its higher productivity and accuracy, the use phase of a CNC milling machine tool causes CO2 emissions varying from 60% to 90% [6]. Hence, in order to achieve a sustainable state, reduction of the environmental impact and overall energy consumption on a CNC milling machine may be obtained by further research focused on reducing operational time. Improving energy efficiency in CNC milling machine requires the knowledge about the energy consumption as a function of the machine tool and the cutting process itself [3]. He et al. [7] reported that machine tools efficiency is less than 30% and proposed that since machine tool can be controlled through NC codes, therefore it is possible to estimate the energy consumption using the related NC codes that controls the movement of the machine tools. For a NC machine tool, the energy consuming component generally consist of spindle, axis feed, servos system, tool change system and other auxiliary equipment such as coolant pump, fans, light, computers, air pump, lubricating pumps etc [2].
Electrical motors account for approximately three quarters of electricity use in milling industry. The electrical motors used in CNC milling machine is the spindle and axis feed motor. The spindle in CNC milling machine is driven by the spindle motor. While axis feed motors consume energy to control the motion of the workpiece table or the cutting tool in either direction at various speeds. The number of the feed motors equipped on an NC machine tool equals the number of NC controlled axes. Three-axis CNC milling machine is equipped with three axis feed motors including x-axis feed motor, y-axis feed motor, and z-axis feed motor. The energy required in a machining operation can be vary based on the machining activities in the operation. Because of this, the amount of energy consumed by spindle and axis feed motor can be determined by the NC codes generated from a cutting toolpath. This is because of different cutting toolpath will have an impact on the total time used by each axis feed motor and the spindle motor to operate. Selection of cutting toolpath parameter is a very critical step to further reduce machining time and suppressing the energy consumption during the cutting process of a workpiece.
The aim of this research is to evaluate and compare the energy consumption required for the spindle motor, x-axis, y-axis, and z-axis feed motor on a 3-axis milling machine by using the correlation between the NC codes generated from the different types of cutting toolpath, since a part may be manufactured by various methods with each method having different machining time and energy per component. The NC codes were generated from Siemens NX CAM software. Energy consumption on the spindle motor and each axis feed motor is then processed using a Graphical User Interface, by computing the energy consumption as a summation of the energy on all the lines of the NC code. This research was used to develop a NC code-based software to predict the lowest energy consumption in machining a certain workpiece.

Proposed energy model
According to Pavanaskar and McMain's work about energy consumption analysis for CNC-milling toolpaths, a generalized representation of most existing models can be made in the form of: where E is the total energy, and PowerStatei is the power state the machine at and timei is the corresponding time intervals when the action takes place [8]. While according to He et al.'s work on analysis and estimation of energy consumption for numerical control machining, the energy total has been expanded to: where Etotal is the total energy consumption of NC machining, Espindle, Efeed, Etool, Ecool, and Efix are the energy consumption of spindle, axis feed, tool change system, coolant pump, and the fixed energy consumption, respectively [7]. In this study, energy consumption of tool change system, coolant pump, and the fixed energy consumption components i.e. servos systems and fan motors are ignored. The energy estimations to machine parts are only based on energy consumption of spindle and axis feed.

Modelling energy estimation of spindle
Energy estimation of spindle can be divided into two sections, loaded and unloaded. For this study, energy estimation when loaded is ignored, hence no cutting force is added to the equations. The energy modelling of spindle is calculated as: where PS is the power of motor spindle and a function of the spindle speed ns. and is respectively the time machining starts and time machining ends.

Modelling energy estimation of axis feed
In the 3-axis CNC milling machine, three feed motors are equipped. These motors are x-axis feed motor, y-axis feed motor, and z-axis feed motor. The energy modelling of axis feed is calculated as: where , , and are respectively the power of xaxis feed motor, y-axis feed motor, and z-axis feed motor, , , and are respectively time when xaxis, y-axis, and z-axis feed motor starts running, , , and are respectively time when each motor stops running.
The total running time for each axis feed motors can be calculated as below: where: -= feed rate -= total distance travelled by motor X -= total distance travelled by motor Y -= total distance travelled by motor Z.

Estimation of energy consumption
With proposed modelling equations from previous section, time consumed by each axis motors can be calculated. The energy from the spindle motor will also be calculated and hence the energy consumed can be estimated. The process of estimating energy consumption can be seen in Fig. 1 below.

Designing parts
To compare energy consumed by each toolpath, three prismatic parts and one sculptured-surface part will be used. These are the size of the part in Fig. 2

Machining strategies
Each designed part will be assigned to three toolpaths or cutting patterns available in software Siemens NX 11.0: follow part, follow periphery, and zig zag. In creating the operations, cutting tool properties, i.e. diameter, lower radius, length, flutes, and flute length are selected based on the optimum values proposed by the tool manufacturer. The cutting tool for every operation on every workpiece is the same throughout this study. The cutting parameters, i.e. cutting speed, width per cut, spindle speed, feed rate, etc. are also selected based on their optimum values. The specific values of cutting tool and parameters can be seen in Table 1 for all parts.

Post processing
NC files are generated from each machining operations. These NC files are made by the references from the previous section and programmed to machine each workpiece with 3-axis milling machine. The machine used to estimate energy consumption is EMCO VMC 200, which is used in Department of Mechanical Engineering, Universitas Indonesia.

Output
The Graphic User Interface (GUI), as seen in Fig. 3, is developed to assist the estimation of the energy consumption. User's input is required to calculate and estimate the energy consumption, e.g. motor axis X, Y, and Z power, spindle power, etc. These motor powers are given based on EMCO VMC 200 machine specifications. The detailed machine specs can be seen in Table 2.

Fig. 3. Estimation of Energy Consumption Software
In designing the GUI, the decisions to estimate the energy consumption are as follows: -GUI will read the NC Files that user chose. It will sort and filter NC codes based on every motion on each axis direction (X, Y, and Z), then opening it into excel file.
-The sorted and filtered NC codes are put into different sheets to make calculations easier. -User then give essential inputs into GUI before running the calculation, i.e. power of motor spindle, power of motor X, Y, and Z, feed rate, etc.
-The calculations to determine the time and energy is based on the proposed energy model. A graph showing estimated total running time of each motor will show up on the excel file.

Limitations
In this study, several limitations are made as follow: -The calculations as proposed to estimate energy consumption of spindle are ignoring the cutting force.
-The calculations as proposed to estimate energy consumption of axis feed motors are assumed to have constant speed throughout the machining operations.
-Both cutting tool and cutting parameters are made constants for every workpieces and machining operations. The only variations made are designed parts and toolpaths.
-The machining operations in this study are limited to roughing process.
-The toolpath strategies used to estimate the energy consumption of each parts are follow part, follow periphery, and zig zag.

Results and discussion
The outputs of the Graphical User Interface used to estimate and predict the energy consumption based on input of NC codes in process of face milling three prismatic parts and contour milling a sculptured part are shown and discussed below. Results of total energy consumption on each workpiece can be seen in Table 3 and

Total energy consumption on prismatic parts
It can be seen that in the experiment with prismatic parts I, II, and III, the toolpath strategy that has the least total energy consumption is zig zag. The total energy consumption savings in the cutting process by zigzag toolpath compared to the other two toolpath strategy for the three prismatic components are 15.48%, 20.64% and 18.73%, respectively. In prismatic I, prismatic II, and prismatic III parts, the cutting toolpath follow part and periphery have more changes in cutting direction. Cutting process is done from the center of the cut area and then moves to the edge of the cut workpiece area. Lifting and repositioning of the cutting tool from the middle of the cut area to the edge, causes a higher cycle time and energy requirements. Whereas for the zigzag toolpath on the prismatic component II, the cutting starts from the edge and only changes the cutting direction when the cutting tool has reached the end of the cut area, energy savings in machining are also caused because there are no obstacles on the cut area, hence this zigzag toolpath strategy eliminates much of the wasted motion, making it does not need extra time to lift and reposition the cutting tool.
The zigzag toolpath is designed to optimize the amount of straight line motion of the cutter, it always cut in the same direction and then move all the way back to start the next cut along the equally spaced straight lines. But if there is an obstacle on the cutting path, the zigzag toolpath will cut on the side before the obstacle, and then retract and reposition the cutting tool on the side after the obstacle that will result in additional machining time. Hence, in order to form a continuous cutting path, we require zigzag segments with less retractions of cutting tool. In the three prismatic models used, the cut area is generally shaped like a box and does not have hole or obstacle in the cut area. Therefore, it can be suggested that the zigzag toolpath is effective for pocket machining boxy shapes geometry, and zigzag toolpath can do a great job of material removal as long as there are no obstacles along its cutting path.

Total energy consumption on sculptured part
While for sculptured parts, the best toolpath strategy that has the lowest total energy consumption during the cutting process is the follow part pattern. It has a difference of 1,23% compared to follow periphery toolpath and a difference of 0,6% with the zigzag toolpath. The follow part toolpath in this sculptured part performs the cutting process in turn by following the shape of the part, starting from the center of the cutting area to the outer part of the cutting area, then making a cutting movement back towards to the center of the cutting area. This will reduce the additional time needed to relocate and lift the cutting tool. Hence it has an impact on reducing the total energy consumption used. While the zigzag toolpath consume lowest energy for cutting the three prismatic parts, it consumes the second largest energy for cutting the sculptured surface part. This is because the cutting geometry used will form an obstacle for zigzag cutting strategy along with the cutting process. Therefore, there is a lot of movement to lift and move the cutting tool to the other side of the cutting area. Whereas the follow periphery toolpath has the most total energy consumption because the cutting process is carried out starting from the center of the cut area to the outside of the cut area, and constantly repeating. The cutting tool transfer process from the end to the center of the cut area that occurs repeatedly will cause additional time in the machining process.

Acknowledgement
The GUI we developed referred to the GUI of F. Edem and Paul T. Mativenga. This research is funded by PITTA Research Grant 2018 -Universitas Indonesia.

Conclusion
This paper has estimated and predict the roughing processes energy consumption in a 3-axis milling machine using using the correlation between the NC codes generated from the different types of cutting toolpath. The findings include the following: -Zigzag toolpath strategy has the least energy consumption in machining the three prismatic parts.
-Follow Part toolpath strategy has the least energy consumption in machining the sculptured part.
-Different toolpath strategy on the cutting process of a workpiece will result in different energy consumption in machining.
-Choosing the right toolpath strategy will have an impact on the efficiency of the milling process.
-With greater understanding on toolpaths strategy, NC codes generated from CAM software with a energy consumption prediction software can be use to predict the lowest energy consumption in machining a certain workpiece.