Modeling Method for Flexible Energy Behaviors in CNC Machining Systems

CNC machining systems are inevitably confronted with frequent changes in energy behaviors because they are widely used to perform various machining tasks. It is a challenge to understand and analyze the flexible energy behaviors in CNC machining systems. A method to model flexible energy behaviors in CNC machining systems based on hierarchical objected-oriented Petri net (HOONet) is proposed. The structure of the HOONet is constructed of a high-level model and detail models. The former is used to model operational states for CNC machining systems, and the latter is used to analyze the component models for operational states. The machining parameters having great impacts on energy behaviors in CNC machining systems are declared with the data dictionary in HOONet models. A case study based on a CNC lathe is presented to demonstrate the proposed modeling method. The results show that it is effective for modeling flexible energy behaviors and providing a fine-grained description to quantitatively analyze the energy consumption of CNC machining systems.


Introduction
Presently, manufacturing companies are not only facing strong economic pressure due to complex and diverse economic trends of shorter product life cycles, increased diversity in customer demand, and the globalization of production activities but are also seeking to meet emerging industrial criterions including sustainability for environmental benefits [1,2]. According to a report by Schipper [3], manufacturing is responsible for 84% of energy-related industrial CO 2 emissions and 90% of industrial energy consumption. Sustainable manufacturing has been hailed for manufacturing enterprises to achieve sustainable production and improve their sustainable competitive advantage [4]. Computer Numerical Control (CNC) machining systems are the key players for metal cutting in manufacturing activities. Approximately 95% of the environmental impact of CNC machining systems is attributed to electrical energy consumption during the utilization phase [5]. Therefore, a thorough analysis of energy consumption in CNC machining systems is of utmost importance, to implement sustainable manufacturing [6].
As a prerequisite, it is important to understand and analyze how electrical energy use or power demanded is consumed in CNC machining processes. Most studies have been based on machining parameters to analyze energy consumption for CNC machining systems. Draganescu et al. [7] statistically modeled the relationship between energy consumption and machining parameters using the Response Surface Method. Diaz et al. [8] and Velchev et al. [9] characterized the specific energy of machine tools as a function of material removal rate. Li et al. [10] established an empirical model of energy consumption based on power measurements under various cutting conditions with different machining parameters. Lv et al. [11] investigated the energy characteristics related to machining parameters and proposed the power models of CNC machining systems through an experimental method. Camposeco-Negrete [12] modeled energy consumption of machining parameters for a specific lathe machine tool with the Response Surface Method. Liu et al. [13] characterized the energy consumption of machining parameters for a specific milling

Open Access
Chinese Journal of Mechanical Engineering *Correspondence: liyufengcqu@cqu.edu.cn 1 Economics and Business Administration, Chongqing University, Chongqing 400030, China Full list of author information is available at the end of the article machine tool. Sun et al. [14] described the relationship between the specific energy consumption and the production rate for ball milling. Shin et al. [15] presented a component-based energy-modeling methodology to implement online optimization. These studies mainly focused on identifying critical machining parameters for analyzing energy consumption, and energy consumption was modeled as a function of certain machining parameters. Some researchers have focused on modeling the energy consumption of components to analyze the energy consumption in CNC machining system. Gutowski and Kordnowy broke down the energy consumption of machining systems according to functional components such as computer and fans, servos, coolant pump, spindle, tool changer, and so on [16][17][18]. He et al. [19] modeled the total energy consumption of CNC machining by summing up the energy consumed by the spindle, feed, tool, coolant pump, fan motor and servo system. Avram et al. [20] concentrated on the energy requirements of the spindle and feed axes by considering the steady-state and transient regimes to analyze the energy consumption of a machine tool system. Lee et al. [21] proposed a method to simulate the energy consumption of the spindle, feed, controller, and auxiliary units for analyzing the energy use of the machine tool.
Operational states (i.e., standby, idle, and processing), as an important issue impacting energy use, have been considered to understand energy use in CNC machining systems. Balogun et al. [22] developed a mathematical model for energy use under various operational states. Mori et al. [23] modeled the energy consumption of machining systems by summation of the energy demands for different operational states. Pavanaskar et al. [24] and Rajemi et al. [25] developed analytical models for CNC machining that correlated various operational states with the energy consumed in the process. Dietmair et al. [26] modeled the energy consumption of machines associated with their operational states using a statistical discrete event formulation. Xie et al. [27] proposed modeling the energy consumption of a turning machine tool by characterizing the energy consumption under various operational states. Peng et al. [28] proposed a universal hybrid energy consumption model for CNC machines, which is comprised of operational state transition model at the higher level and detailed theoretical or empirical component energy models at the lower level. However, these energy models are used to analyze energy use in specific operational states in CNC machining systems. CNC machining systems are inevitably confronted with frequent changes in energy behaviors because they are widely used to produce various machining tasks. These methodologies require constructing totally new energy models for the changed machining tasks. Therefore, these methodologies are not effective to understand and analyze the flexible energy behaviors in CNC machining systems. To this end, this paper proposes a method to model the flexible energy behaviors in CNC machining systems based on a HOONet.
The outline of this paper is as follows. Flexible energy behaviors in CNC machining systems are described in Section 2. In Section 3, a modeling method based on HOONet is illustrated to model the flexible energy behaviors. The structure of a HOONet is constructed with a high-level model and detail models, and the corresponding data dictionaries are declared in the HOONet models. In Section 4, a case study based on a CNC lathe is presented to demonstrate the proposed modeling method. The conclusions are presented in Section 5.

Energy Behavior Descriptions in CNC Machining Systems
To effectively model the energy consumption of CNC machining systems in this environment, flexible energy behaviors in CNC machining systems should be understood and analyzed. The energy consumption of CNC machining systems is divided into the energy consumed by the operational states of the machine tools (e.g., standby and processing) [5]. Further, the energy consumed in each operational state is decomposed into the energy consumption of multiple components (e.g., the spindle, feed axis, and coolant pump motors) in use. Figure 1 depicts an example of a power profile of a CNC machining process. This machining process consists of three operational states: standby state, idle state, and processing state. The energy consumption of this machining process includes the energy consumed in the standby state, idle state, and processing state. Furthermore, the machine tool components include the spindle motor, feed motors, fan and servo systems, and so on. Component modes are the different designed modes in which a component can stay or operate, i.e., ON, OFF, and HOLD [5]. The changes in component modes result in shifts of the operational state. As shown in Figure 1, in the standby state, the component mode of the fan motor and servo systems is ON, while the spindle motor and feed motors are OFF. Energy in the standby state is consumed by the fan motor and server systems. Comparing to the energy consumption in the standby state, the energy consumption in the idle state includes the energy consumed by the fan motor and server systems and the energy used to maintain the motion of the spindle axes. Therefore, as shown in Figure 1, the shift of operational states results in the flexible energy behaviors in CNC machining systems.
Master-slave control is widely employed in robot manipulation. In most cases, the joystick or the keyboard is the routine input device for the robot master-slave control system. The system presented in this paper is shown in Figure 1.
Additionally, a different series of operational states are needed to produce various machining tasks. Also, energy consumption in CNC machining systems is affected by various machining parameters. For producing the same workpieces, different machining parameters can cause different energy consumption. According to the experiments conducted by Draganescu et al. [7] for face milling the same amount of aluminum alloy using the FV-32 machine tool with two different machining parameters, a 137316.3 kW·h energy difference was observed. Therefore, the energy behaviors are flexible in CNC machining systems.

HOONet Model for Flexible Energy Behaviors of CNC Machining Systems
Based on the characteristics of the flexible energy behaviors in CNC machining systems mentioned above, the energy consumption of CNC machining systems is divided into the energy consumed by the operational states of the machine tools (e.g., standby and processing). It can be conceived as a set of discrete events triggered by the operational state change during the machining process. Simultaneously, CNC machining systems are inevitably confronted with frequent changes in energy behaviors because they are widely used to perform various machining tasks. To effectively model the energy consumption, the approaches need to support the concepts of object-orientation including modularization and encapsulation. Since a hierarchical object-oriented Petri Net (HOONet) is a kind of discrete event modeling method and integrates the merits of object-oriented programming and Petri nets, it offers more flexibility for adapting to variances in CNC machining systems. Therefore, a HOONet is used to model the flexible energy behaviors of CNC machining systems. The structure of a HOONet is constructed with a high-level model and detail models. The former is used to model the operational states of CNC machining systems, and the latter is used to analyze the component modes of the operational states. The machining parameters are declared with the data dictionary (DD) in HOONet models.

General Structure of a HOONet Model
Petri nets are a well-established process modeling technique that has formal semantics. A Petri net is a directed, connected, and bipartite graph in which each node is either a place or a transition. When there is at least one token in every place connected to a transition, the transition is enabled. Any enabled transition may fire by removing one token from every input place and depositing one token in each output place [29]. Considering its simplicity and flexibility in depicting dynamic system behaviors, the Petri net is widely used in various application domains, such as manufacturing systems and business processes.
To complement the weakness of Petri nets in terms of naturalness, modularity, and reusability, high-level Petri nets with object concepts have been suggested [30]. The HOONet is a high-level Petri net that corresponds to a class in an object-oriented paradigm, which can bridge the gap between the formal treatment of Petri nets and the object-oriented approach. A HOONet will support modularization and encapsulation without violating the basic philosophy of the Petri nets. The HOONet is a 3-tuple; HOONet = (OIP, ION, DD). An object identification place (OIP) is a unique identifier of a class; an internal object net (ION) is a set that depicts the behaviors (methods) of a class; and the data dictionary declares the attributes of a class. The general structure of a HOONet is shown in Figure 2.
A set of places in a HOONet is defined as P = {PIP, ABP}, where a primitive place (PIP) is a basic place to represent the local states of a system, the same as in basic Petri nets [31]. The abstract place (ABP) represents abstract information (state) and can be refined in further modeling steps. The abstract place is depicted with a bold-lined circle in the HOONet model.
A set of transitions in a HOONet is defined as T = {PIT, ABT, COT}, where the primitive transition (PIT) is a basic transition, the same as in basic Petri nets [31]. ABT is an abstract transition, and a communicative transition (COT) is a transition representing a method call. In a HOONet model, ABT and COT are represented with a bold-lined rectangle and double-lined rectangle, respectively [32].

HOONet Modeling Procedure
The detailed procedure for modeling flexible energy behaviors in CNC machining systems includes two steps: 1) high-level specification and modeling and 2) detailed specifications and modeling.

High-level Specifications and Modeling
The energy consumption of machining systems is the combination of the energy consumption in operational states (e.g., standby state, idle state, and processing state) [5]. The high-level HOONet model of energy consumption in CNC machining systems ("MATO") is depicted in Figure 3. The operational states of CNC machining systems are encapsulated as ABP "OffSta" (machine is OFF), ABP "StaSta" (machine is on standby waiting for the machining tasks), ABP "ReaSta" (machine is ready to perform the task), ABP "IdlSta" (machine is idle where the spindle motor is ON without material removal), and ABP "ProSta" (machine is removing the material). The different operational states in a high-level HOONet model are fired according to the machining processes of the tasks. If the machining task is arrival and the current state of the machine tool is OFF, the transition M1_t1 is fired, and the machine tool starts to perform the task. When the machining task is arrival, and the current state of the machine tool is standby, the transition M1_t2 is fired. The machine tool starts to clamp the workpiece. While the workpiece is clamped, the transition M1_t4 is fired, and then the operational state of the machine tool is changed to the ready state. After the machining task is performed, there are two ways to exit the HOONet model. One is that the transition M1_t11 is fired; then the CNC machining system is turned off. Another is that the transition M1_t12 is fired; then the CNC machining system stays on standby waiting for another task.
The DD in a high-level model of MATO is expressed by the CPN ML's syntax and semantics shown in Figure 3. The token type M in the MATO was defined with the complex type, and detailed attributes are described by the refined token types in DD at the next level. Detailed information in the token includes the machining parameters and operating mode (i.e., ON, OFF, and HOLD). This information is obtained from the CNC code and history data. Additionally, to describe the current state of the machine tool, a global variable "MX" is applied. For example, when the current state of the machine tool is standby, the MX is equal to "StaSta. "

Detailed Specifications and Modeling
The energy consumption in the operational states of the machine tool can be further decomposed into the energy consumption of the components in use. Each component works in only one of its component modes (i.e., ON, OFF, and HOLD) [5]. Therefore, the abstract places in Level 1 are refined into a more detailed model at Level 2. The DD in this level is the refined declaration of the DD in the "MATO. " The complex-type token M in the "MATO" is recorded by two types of tokens, MI and MS. Token MI declares the machining parameters (e.g., cutting speed, feed rate, and cutting depth), and token MS records the component mode (e.g., ON, HOLD, or OFF) for the different operational states, expressed as a TT MS = complex with OffSta │ StaSta │ ReaSta │ IdlSta │ ProSta. The detailed information in tokens MI and MS is shown as in Figure 4.
For illustration, the detailed HOONet model of StaSta is specified in Level 2, as shown in Figure 5. This model has two primitive places, two primitive transitions, and two communicative transitions. The COT "FSSY" calls the method to adjust the component mode of the fan motor and servo system, while the COT "COSY" is applied to adjust the component mode of the coolant system. If the global variable MX equals "OffSta, " COT "FSSY" is fired. Then, the fan motor and servo system are turned ON (denoted as FSOn). If MX is equal to "ReaSta, " COT "COSY" is fired to turn off the coolant system for unloading the workpiece. In this operational state (MS = "StaSta"), the fan motor and servo system are kept in the "ON" state, while the spindle motors, feed motors, and coolant system are inactivated. Accordingly, the MS is recorded by {(bs, on), (ss, off ), (fs, off ), (cs, off )}, as shown in the DD in Figure 5. Similarly, other operational states can be modeled with different combinations of component modes.
Communicative transitions are detailed in Level 3 to describe the energy behaviors of the components. Taking the COT FSSY as an example, the HOONet model of FSSY is detailed in Figure 6. In the data dictionary of FSSY, the token FS declares the component mode of the fan motor and servo system (depicted as "bs") and the power of the fan motor and servo system (depicted as "baspow"). The property "bs" inherits the common property of the token MS in Level 2. If the value of "bs" is ON, the transition M3_t1 is fired, and then the component modes of the fan motor and servo system are changed to ON. When "bs" is equal to OFF, the transition M3_t2 is fired to turn off the fan motor and servo system.
Machining tasks are changeable in the flexible manufacturing environment. When the manufacturing task is changed, a new energy model can be efficiently derived from an existing energy model, just by adjusting the corresponding data dictionary. The energy model for the new manufacturing task is built automatically to estimate the energy consumption of the new task.

Case Study
A case study based on a CNC lathe is performed to demonstrate the effectiveness of the proposed modeling method and to quantitatively analyze the energy consumption of CNC machining systems. A CNC lathe C2-6136HK, which was made by Chongqing No. 2   Table 1. For the CNC lathe, a workpiece with two operations, rough machining (donated F1r) and finish machining (donated F1f ), is considered in this case, as shown in Figure 7. The workpiece is designed as a circle of Φ28.44 mm over 80 mm and the material of this workpiece is #45 steel; the corresponding machining parameters are listed in Table 2.
Based on the modeling procedure of the proposed modeling method introduced in Section 3, a specific HOONet model was constructed to analyze the energy consumption of the C2-6136HK, as shown in Figure 8. This CNC machining system operates in five distinct states, i.e., the off state (OffSta), standby state (StaSta), ready state (ReaSta), idle state (IdlSta), and processing state (ProSta), which are modeled in the five ABPs in Level 1 and detailed in the next level. A HOONet model for the C2-6136HK at level 2 is shown in Figure 9. There are four communication transitions, including COT "FSSY, " COT "COSY, " COT "SPMO" and COT "FEMO, " which are used to call the method to adjust the component mode of the fan motor and servo system, coolant system, spindle motor and feed motor, respectively. Based on the machining parameters of the example workpiece, the corresponding associated tokens in the HOONet model are shown in Table 3.
The proposed method was implemented using Simulink, and the energy consumption of the workpiece was obtained, as shown in Table 4. 21.3 W·h of energy is consumed for the rough machining of the workpiece, while the energy consumption for finish machining is 22.6 W·h. The completion time for the rough machining is less than that of the finish machining due to the greater cutting depth. Also, it can be seen that the total energy consumed for the workpiece is 43.9 W·h, and the total completion time is 182 s. These results can be used by process planners to evaluate energy-efficient process planning.
Further, the detailed energy consumption of the machine components for these two operations was also estimated by the model, as shown in Figure 10. For the rough machining, the energy consumption of the spindle motor, feed motors, and coolant pump motor are 14.9 W·h, 0.8 W·h, and 1.1 W·h, respectively, and the energy consumption for the fan motor and servos is 5.7 W·h. In the finish machining process, the energy consumption of spindle motor, feed motors, and coolant pump motor are 15.0 W·h, 0.9 W·h, and 1.4 W·h, respectively, and the fixed energy consumption of the C2-6136HK, including the fan motor and servos is 6.8 W·h. Additionally, it can be seen that the largest amount of energy is consumed by the spindle motor. Besides it, the energy consumption of the fan motor and servos also takes a large proportion. These results provide energy transparency for machine components, and the detailed energy consumption can effectively support   equipment designers to make decisions about design improvements. Furthermore, the results obtained by the model are compared with the ones measured in experiments. The experimental results were measured using a HIOKI 3390 power analyzer. The energy comparison between the model and experiment is shown in Figure 11. The results obtained by the model are less than the experimental results. There is a 5.3% difference for the rough machining and a 6.2% difference for the finish machining. There are several reasons for this comparison result. For example, in the actual machining process, there are some energy usages for changing the operational state of the CNC machining systems, such as the start-up process of the spindle motor. The energy consumed for these energy usages is not included in the proposed model.
Machining parameter variance is considered in the case. New machining parameters for performing this experimental workpiece are listed in Table 5. The new HOONet model can be rapidly constructed by adjusting the data dictionary of the constructed HOONet model, instead of reconstructing a totally new one. In this way, the energy consumption for the workpiece with the changed machining parameters is estimated using the new HOONet model. In this scenario, the energy consumed for the rough machining is 20.2 W·h, and the energy consumed for the finish machining is 19.8 W·h. Table 6 presents the comparison of the results between the original machining parameters in Table 2 and the changed machining parameters in Table 5. It can be seen that the energy consumption for the workpiece with the changed machining parameters is 6.6 W·h less than using the original ones. Comparing the energy consumption of the components, the spindle motor saved the largest proportion of saved energy. In detail, 1.6 W·h of energy and 3.3 W·h of energy were saved by the spindle motor in the rough machining process and finish machining process, respectively.  rt=0.385} TT MS = record with {bs = with "off" |"on"; ss = with "off" | "hold" | "on"; fs = with "off" | "hold" | "on";} } Finish machining (F1f) TT M = record with {TT MI = record with {machining task = 2; sp = 800; fp = 80; ap=0.125; clt=0; ut=6; ct=60; rt=3.86} TT MS = record with {bs = with "off" |"on"; ss = with "off" | "hold" | "on"; fs = with "off" | "hold" | "on";} }  Figure 10 Energy consumption of energy-consuming components for two operations Authors' contributions YFL has made substantial contributions to conception and design, acquisition of data, analysis and interpretation of data and wrote the manuscript; SLL has made substantial contributions to acquisition of data, analysis and interpretation of data. YLW, YH, YW made substantial contributions to conception and design and was involved in revising the manuscript critically for important intellectual content. All authors have read and approved the final manuscript.

Figure 11
Comparison results of energy consumption of rough machining and finish machining