A service-oriented energy assessment system based on BPMN and machine learning

Increasing energy cost and environmental problems push forward research on energy saving and emission reduction strategy in the manufacturing industry. Energy assessment of machining, as the basis for energy saving and emission reduction, plays an irreplaceable role in engineering service and maintenance for manufacturing enterprises. Due to the complex energy nature and relationships between machine tools, machining parts, and machining processes, there is still a lack of practical energy evaluation methods and tools for manufacturing enterprises. To fill this gap, a serviced-oriented energy assessment system is designed and developed to assist managers in clarifying the energy consumption of machining in this paper. Firstly, the operational requirements of the serviced-oriented energy assessment system are analyzed from the perspective of enterprises. Then, based on the establishment of system architecture, three key technologies, namely data integration, process integration, and energy evaluation, are studied in this paper. In this section, the energy characteristics of machine tools and the energy relationships are studied through the working states of machine tools, machining features of parts and process activities of processes, and the relational database, BPMN 2.0 specification, and machine learning approach are employed to implement the above function respectively. Finally, a case study of machine tool center stand base machining in a manufacturing enterprise was applied to verify the effectiveness and practicality of the proposed approach and system.


Introduction
The continuous aggravation of the greenhouse effect and the depletion of energy have pressurized the manufacturing industry towards sustainable development [1]. According to the International Energy Agency (IEA) statistics, the manufacturing industry consumes about 33% of the global total energy and produces over 30% of the CO 2 emissions [2]. Facing this situation, energy saving and emission reduction in the manufacturing industry has become a common consensus. Machining systems, responsible for 74.7% of the total energy consumption [3], are regarded as the core and largest energy consumer in the manufacturing in-studies show that the working states are important elements for the energy nature of machine tools. Considering this issue, some scholars have studied the specific energy characteristics of working status. Timo et al. [9] classified the working states of a machine tool into four main aspects, namely start-up, standby, ready, and processing. Luan et al. [10] studied the energy modeling of a machine tool during non-cutting status. Lv et al. [11] focused on the energy characteristics of acceleration and deceleration of the main drive system. Avram and Xirouchakis [12] analyzed the energy requirements in the processing working state and established an energy evaluation model. The above research provided an excellent complement to the energy characteristics of machine tools, and it should be considered comprehensively in energy assessment of machining.
It is noted that the machining parts and machining processes have a huge influence on machining energy consumption. Sutherland et al. [13] studied the machining energy consumption of different materials (aluminum, cast iron, steel, etc.) and processes (refining, casting, remanufacturing, etc.), and evaluated the environmental benefits of manufacturing and remanufacturing systems. Zhang et al. [14] studied the energy consumption from the perspective of material removal and established an energy evaluation model for machining. Dietmar and Verl [15] analyzed the energy characteristics of various parts in cutting and grinding and proposed an energy assessment approach considering the working status of machine tools. Ghosh et al. [16] focused on the energy consumption of grinding and analyzed the specific energy consumption for high-efficiency deep grinding. The above studies examine the influence law between parts, processes, and machining energy consumption. It will provide important support for an energy assessment.
To sum up, there have been many studies on energy characteristics of machining tools, and energy relevance with machining parts and processes, which may provide support for an energy assessment of machining. From the perspective of a manufacturing enterprise, there is still a lack of practical methods and tools for machining energy evaluation. A service-oriented energy assessment system is an effective tool for manufacturing enterprises. Many scholars studied the implementation framework of manufacturing services systems [17], machining data management for services systems [18], system design [19], etc. With the development of information technology, cloud manufacturing, and artificial intelligence, more and more machining data could be collected and stored in manufacturing enterprises, and the AI technologies are employed in energy monitoring [20], maintenance [21], and service support [22]. These works show the great potential of AI for an energy assessment of machining, and it provides good support for serviced-oriented system development. Due to the energy dynamics and complexity of machining, the energy consumption of machine tools working states, and the influencing relationships with machining parts and machining processes, the current serviced-oriented systems do not fully define them. To this end, this paper designs and develops a service-oriented energy evaluation system for machining, and studies the key technologies.
The rest of this paper is organized as follows. Section 2 introduces the requirements and architecture of the proposed service-oriented system. Section 3 analyzes the key technologies and implementation process by using machine learning. A case study is studied to demonstrate the effectiveness and practicability of this system in Sect. 4. Section 5 concludes with a summary of our work.

Requirements analysis of the service-oriented system
In machining, numerous kinds of raw materials were converted into products and/or semi-finished products with machine tools, and processes have a huge impact on their energy consumption [23]. It should be noted that energy consumption has a complex relationship with each other. Even the same product may cause different energy consumption in different machine tools and machining parameters. Therefore, the purpose of energy evaluation of machining systems is to understand the energy nature of machine tools, machining parts, and machining processes respectively, and clarify their special energy consumption of them during machining. Based on the above analysis, this paper sorts out the requirements of the service-oriented system for machining energy evaluation, which mainly includes the following aspects: 1) The fundamental purpose of energy evaluation is to reflect the energy consumption of machine tools, machining parts, and machining processes. Therefore, the proposed service-oriented system needs to be able to calculate the energy consumption of machine tools with different working states. And, it is necessary to be aware of which of these energy consumptions are involved in part machining. Furthermore, the energy consumption influence from machining process parameters should also be reflected to find the energy-intensive aspects of machining.
2) Due to the dynamicity of machining, advanced technologies should be employed to analyze the machining data and relationships to reveal the energy consumption, such as machine learning. Then, a visual interface should be provided for enterprise staff to show the energy consumption of machine tools, machining parts, and machining processes respectively.
3) Operation convenience and compatibility requirements, the proposed service-oriented system cannot only realize plug-and-play for various manufacturing resources in an effective way but also needs to be able to communicate with other systems.

Figure 1
The architecture of the service-oriented energy assessment system 3 Architecture and key technologies of the service-oriented system

System architecture
As mentioned before, the energy consumption of machining mainly comes from machine tools, which mainly depend on their working state [24]. When a part is machined, the working states of machine tools and machining parameters are constantly changing. The energy nature of machining presents high uncertainty, strong dynamic correlation, and nonlinear time-varying [25]. Therefore, the service-oriented energy evaluation system should be able to reflect these characteristics and allow for accurate energy consumption calculations.
To address this objective, the machining data is integrated using a relational database, and machine learning approaches are employed to calculate the working states' energy consumption of machine tools. Then, the ma-chining process, including the relationship between machine tools, machining parts, and machining processes, is described with the BPMN2.0 specification to evaluate their energy consumption of them. Based on it, a serviceoriented system for machining energy evaluation is developed with B/S architecture. The proposed system mainly includes four layers, namely the user interface layer, web server layer, application server layer, and database server layer, as shown in Fig. 1.
The specific description of the layers is as follows: 1) The user interface layer mainly provides energy assessment services for machine tool operation, part machining, and machining processes with an interactive graphical interface. And the user rights management function is also included in this layer for user account adding, deleting, and setting usage limits to the system module.
2) The web server layer is mainly used to deal with the service requests of the client browser, such as working state energy consumption analysis of machine tools, machining energy consumption analysis of parts, and so on, then returns the results to the client.
3) The application server layer is the most important part of the system. In this layer, BPMN modules, machine learning modules, and relationship database modules are established to calculate and evaluate the energy consumption of machine tools, machining parts, and machining processes respectively. Among them, relationship database modules are used to establish the relationship of the machining data from machine tools, machining parts, and machining processes. Then, the machine learning modules are employed to calculate the working state energy consumption of machine tools. Finally, the BPMN modules are used to describe the machining process, and evaluate the energy consumption of machine tools, parts, and processes respectively.
4) The data server layer mainly provides functions such as collection, storage, and transmission of energy-related data. In general, the data includes the machining features and material of parts, working states of machine tools, machining parameters, current, and voltage, etc., and it could be collected from machining equipment, parts, and processing technology with IoT technology, machine tool manuals and so on. Then, the data is transmitted to the application server to support its calculation and operation for energy evaluation.

Data integration technology
In order to evaluate the energy consumption of machining using machine learning, the related data from machine tools, machining parts, and machining processes should be collected first. In general, machining can be considered as a series of process activities around the feature machining of parts, in each activity, the working states of machine tools are constantly changing to complete the processing tasks [26,27]. The machining features of parts can be regarded as the carrier of machining knowledge and experience, and inherit the machining processes and working states of machine tools [28,29]. Therefore, the machining feature of parts is chosen to integrate the machining data for an energy assessment. The relationship between machining features of parts, process activities, and the working states of machine tools can be described in Fig. 2.
As shown in Fig. 2, the machining features of parts are divided into main features and auxiliary features. In each machining feature, some processing activities are implemented, such as rough turning, semi-finishing turning, finishing turning, etc. Then, each process activity should be accomplished by changing the working states of machine tools. Based on the analysis above, the data on working states of machine tools, machining features of parts, and parameters of machining processes should be collected. For instance, the related data of machining features (e.g., blank length, blank diameter) can be obtained with the CAD model of parts. The data relating to machine tools, such as standby power, air cutting power, and material cutting power can be captured with the power analyzer.
Then the collected raw data should be preprocessed, including data cleaning, data normalization, and so on. The k-means algorithm is a simple iterative clustering algorithm, which uses the distance as the metric and given the k classes in the data set, calculates the distance mean, giving the initial centroid, with each class described by the centroid [30]. Compared with the traditional Euclidean distance calculation method, k-means can ignore the magnitude limitation in the calculation process [31]. Thus, in this paper, the k-means is employed to preprocess the raw data, as shown in Eq. (1).
where k represents K cluster centers, x i and u k represent the ith point in the data set and the kth center, respectively. The normalization approach in this paper is shown in Eq. (2).
where, x min is the smallest sample value, and x max is the largest sample value. The database is the basis of the proposed servicedoriented system and is the key to energy consumption calculation. In order to improve the operating efficiency and increase the stability and robustness of the serviceoriented energy assessment system, the relationship of these data sheets should be determined firstly [32]. With the data relationships revealed in Fig. 2, the correlation between these data sheets is shown in Fig. 3.
The correlation is to make each data sheet associated with a unique subject so that the operation on any data will become the overall operation on the database [33]. Thus, the important implication to establish the correlation of data sheets can ensure the integrity and consistency of the data, and improve the operation efficiency of the serviceoriented system.

Process integration technology
To further describe the energy consumption in machining, and the relations between the working states of machine tools, parts, and processes, the Business Process Model and Notation (BPMN) is used to integrate the machining elements in this paper. The BPMN is a practical and Figure 2 Relationship between machining features, process activities, and working states normalized tool in business process management to establish the process models and reveal the relationship between process elements, the newest version is BPMN2.0 [34,35]. The remarkable penetration of BPMN2.0, both as a description of processes and as notation for process automation, has inevitably led to extension proposals, as the de-facto standard for business process modeling to maximize their potential utility [36]. The main steps for process integration with BPMN 2.0 are described in Fig. 4 and as follows.
Step 1: Determine the participants and activities at all levels of the energy consumption behavior in machining. According to the analysis of the energy nature of machining above, the parts and machine tools are regarded as the first-level participants of the model; the machining features of parts and the working states of machine tools are regarded as the second-level model of the model. The process and step sequence under the machining feature are regarded as the activities of the level 2 participants, and the working state execution process of the energy consumption is regarded as the activity of the level 2 participants.
Step 2: Determine the BPMN representation elements for participants and activities. Combined with the analysis of the working states of machine tools, machining parts, and machining processes. Then, the participants and ac-tivities at all levels of the model are represented according to the BPMN symbols.
Step 3: Establish the BPMN energy framework model of machining. List the activities in step 1 into the corresponding level 2 participant swimming lanes, and list each swimming lane in the corresponding level 1 participant pools; Various relations in activities are represented by sequence flow symbols and message flow symbols of BPMN, and the dynamic change behavior of energy consumption during the machining is described.
Step 4: Identify the correlation of energy consumption data. Combined with the energy consumption analysis model of the equipment layer and process layer of machining, the energy consumption data is associated with each working state and coupling relationship with machining parts and machining processes. Then, the processing parameters are associated with the corresponding process activities, and the data association symbols assign values to the energy consumption framework model.
Step 5: Generate the dynamic characteristic model of machining. Combined with the process activity sequence in the framework model and the working state flow and coupling relationship of the energy consumption unit, the similar parts are grouped into one group, represented by the grouping symbol of BPMN, and the number of repetitions is marked in the group. The text annotation and Figure 3 The correlation of data sheets text association symbols add necessary annotations to the model to enhance its readability.

Energy evaluation based on PSO-BPNN
With the process integration technology, the whole machining flow and the relationship between machining equipment, machining parts, and machining processes can be described clearly with BPMN symbols, as shown in Fig. 5.
In Fig. 5, the working status flow of machine tools is recorded, which could be used to calculate the energy consumption of different working states. Here, S represents the working state of machine tools respectively, namely start-up, standby, acceleration/deceleration, air cutting, and cutting. It can be determined with the switch signal of the cooling pump, lubrication pump, and so on.
As mentioned above, the energy consumption nature of machine tools shows complex dynamic properties, the power curve of a machine tool is described in Fig. 6. The traditional energy evaluation approaches for machine tools usually include a theoretical modeling approach [37] and an experimental modeling approach [38]. However, the theory-based models may not be feasible to obtain accurate results due to the complex dynamic energy consumption nature of working states [39], and the experiment-based models are effective within specified, limited, and experimental conditions [40]. Therefore, a PSO-BPNN approach was proposed to evaluate the energy consumption of machine tool working states. The PSO-BPNN is a common approach in machine learning, the main ideas of this approach are using BPNN (Back Propagation Neural Network) to establish the energy assessment model, and using PSO (Particle Swarm Optimization) algorithm to optimize the parameters of BPNN to improve the accuracy of energy assessment model [41,42]. Therefore, a machine learning approach, PSO-BPNN, is employed to evaluate the energy consumption of machine tools. The overall framework of the PSO-BPNN approach is shown in Fig. 7.
Firstly, the machining data of machine tools, machining parts, and machining processes are collected from the proposed database. Then, a PSO-BPNN-based model is established to evaluate the energy consumption of working states respectively. Finally, the energy consumption of machine tools is assessed with the sum of them. It is noted that the energy consumption of the acceleration and deceleration working states is usually small due to their extremely short duration [43,44]. In this paper, the working states of acceleration and deceleration are ignored, and four working states, namely start-up, standby, air cutting, and cutting are considered for the energy assessment.
When the energy consumption of each working state is obtained with the machine learning approach, the energy consumption of machine tools could be evaluated with Eq. (3) as follows: where E M is the energy evaluation function for machine tools, and E s i represents the energy consumption of the working state i. From the perspective of machining parts and machining processes, the features groups and process group (the dashed part in Fig. 4) expresses the correlation between machining features of parts, process activities, and the working states of machine tools. Here, P represents the process activities, and F represents the machining features of parts. Then, the energy consumption for machining parts and machining processes could be evaluated with where E Part and E process are the energy evaluation function for machining parts and machining processes, respectively, E Fj and E Pk represent the energy consumption of machining feature j and process activity k.

Case study
According to the above architecture and implementation key technologies, a service-oriented energy assessment prototype system was developed and verified in a manufacturing enterprise. The main business of this enterprise is mechanical parts production and sales. Under the increasing pressure of energy saving and emission reduction, how assess the energy consumption in machining and then carrying out energy saving strategies is the key challenge that this enterprise needs to address at the moment. With this issue, the proposed service-oriented prototype system was implemented in a machining workshop of this enterprise to understand the energy consumption conditions and find the bottleneck processes in machining.
In this case, a part named machine tool center stand base was produced with an XK713 milling machine tool. The part had seven machining features, including 6 planes (a-f ) and 1 through-slot (g). Among them, planes (a, b, e, f ) were machined with one tool feed, and planes c, d require two tool feeds, and the through-slot g requires six tool feeds. In each tool feed, the process parameters are different. Thus, each tool feed should be considered a process activity. To sum up, the machining included 7 machining features and 14 process activities, as listed in Table 1.
The milling machine tool XK713 and the part are considered the level 1 participants of the energy consumption model and included in different pools with the BPMN symbols. The seven machining features of the part are regarded as the level 2 participants and included in different lanes of the pools. The 14 process activities are considered as the activities of the machining features and the working states of XK713 and included in the corresponding lanes. Then, the PSO-BPNN could be used to evaluate the energy consumption of machine tools, machining parts and machining processes, respectively.
Firstly, enterprise managers should register a user account first, and set the system usage rights, such as administrators or regular users, etc.
Secondly, the machining features of the machine tool center stand base, the process activities and process parameters, and the working states of XK713 are analyzed according to the data sheet shown in Table 1. Then, the users can use the BPMN module to describe the machining process and the relationship between machine tools, machining features, and process activities.
Thirdly, the PSO-BPNN module was employed to calculate the working state energy consumption of XK713 and obtained the energy consumption values of start-up, standby, air cutting, cutting, and so on.
Fourthly, the energy consumption results of machine tools, part, and process are assessed according to the relationships embedded in the BPMN model. In this serviceoriented energy assessment system, three evaluation results, e.g., energy evaluation results of machine tool XK713, machining part, and machining processes are provided in visualization form. The energy evaluation results of machine tool XK713 are shown in Fig. 8. It can be seen that the energy consumption change trend reflected by measured results in each process activity is the same as by assessed results, and the errors of measure values and assessment values are within an acceptable range. It illustrates the effectiveness of the proposed PSO-BPNN approach. In addition, the BPMN can also show a graphical result for the energy consumption of working states, it can provide a systematic and effective means to analyze the energy nature of machine tools, and facilitate exploring the energy-saving potential of machining. It should be noted that the assessed values in the time dimension are generally smaller than the measured values from the trendline diagram. It is because the acceleration and deceleration working states are ignored in this work, and the duration of these two working states is not calculated in the energy assessment.
Figs. 9-10 show the energy evaluation results of machining parts and machining processes. From Fig. 9, the processing time and energy consumption of the machining features (a-g) are displayed. It is clear that the machining feature a, f and g are the three most energy-intensive aspects, as well as the time-consuming. The Fig. 10 shows the processing time and energy consumption of process activities (PA1-PA14). In this figure, the PA1, PA7 and PA8 are the three greatest energy consumption aspects, as well as the time-consuming. It coincides with the measurement of the actual machining. With these results, the users can clearly find the energy consumption of each process activity and machining feature, and thus identify the bottlenecks with high energy consumption. It will give an impor-  tant basis for the implementation of energy-saving strategies in the enterprise, such as process parameters optimization, energy efficiency improvement and so on.
Finally, the energy evaluation results will be stored in the database for future use.
To sum up, the proposed data integration and process integration approach with the PSO-BPNN and BPMN can reveal the energy nature of machining and the relationship between machine tools, machining parts, and machining processes. Then their energy consumption of them can be evaluated accurately. Furthermore, the system can provide the users with a practical tool for comprehensive decision analysis of energy consumption influencing factors such as machining equipment, machining process, and process parameters, and guide them to improve the energy efficiency of machining.

Conclusions
In this paper, a service-oriented energy assessment system for manufacturing enterprises was developed, and it could provide a practical tool to managers for comprehensive decision-making analysis of energy consumption influencing factors, such as machining equipment, machining technology, and process parameters. The system may have a significant convenience for technology managers in manufacturing enterprises, as it captured the current needs regarding energy-saving and emission reduction. Meanwhile, the key technologies, such as data integration with associated database, process integration with BPMN symbols, and energy evaluation with PSO-BPNN were also studied, and the graphical interaction interfaces reflected the energy consumption condition in machining, which made the bottleneck processes with high energy consumption was easily identified. Hence the implementation method of the service-oriented energy assessment system could offer valuable support for both decisionmakers and development teams.
Considering the complexity of machining, the proposed system was mainly used in single-machine processing. If the application of the system is extended to evaluate the energy consumption of multi-machine processing or shop floor, the process integration with BPMN will be more complicated. Therefore, the more effective data and process integration approach and energy evaluation algorithm for machining characterization and energy consumption calculation will become a focus of future studies.