Digital twin–based dynamic prediction and simulation model of carbon efficiency in gear hobbing process

The transformation of manufacturing industry to green manufacturing is one of the important tasks to achieve the carbon peaking and carbon neutrality goals, which needs to improve the use efficiency of unit carbon emission. In order to describe the processing state in real time and improve the accuracy of carbon emission prediction, a dynamic prediction and simulation model of carbon efficiency based on digital twin was proposed. First, the dynamic characteristics of carbon emission during hobbing process was analyzed, and three carbon efficiency targets were defined to assess carbon emissions from processing processes. Then, a dynamic prediction and simulation model of carbon emissions was constructed based on convolutional neural network and dynamic discrete event system specification. On this basis, the framework of the carbon efficiency digital twin (CEDT) of the hobbing process was built, and the dynamic prediction and simulation models were integrated into CEDT as virtual models. The application in hobbing process showed that the presented model has higher accuracy in carbon emission prediction. The root-mean-square error, mean absolute error, and mean absolute percentage error of the real-time power prediction were reduced by 43.98%, 34.55%, and 30.67% on average, compared with the traditional method. Meanwhile, the validity of CEDT was verified and the effect of dynamic parameters on carbon efficiency was discussed.


Introduction
To combat global warming, the Chinese government has proposed carbon peaking and carbon neutrality goals [1]. Manufacturing is the main source of China's carbon emissions, consuming more than 30% of primary energy and producing about 36% of greenhouse gases [2]. On the premise of ensuring the development of the industry, how to reduce carbon emissions is an urgent issue to be solved [3]. The study of carbon emission efficiency is helpful to analyze the trend of carbon emission and plays an important role in reducing carbon emission [4]. How to improve the utilization efficiency of unit carbon emission, take into account economic and environmental benefits under the limitation of fixed carbon emission quota, and achieve high efficiency, energy saving and low carbon manufacturing are the issues that the country and enterprises need to focus on.
Gear hobbing is the most widely used gear processing technology. Improving the carbon efficiency of gear hobbing process is of great significance for improving the economic benefits of enterprises, reducing environmental pollution, and achieving the national strategic goals. Therefore, many scholars have done a lot of research on hobbing. Sun et al. [5] took the minimum geometric error of gear as the optimization objective, and used the improved particle swarm optimization algorithm to optimize the hobbing process parameters. Xiao et al. [6] established a model based on the energy consumption of hobbing machine tool parts, constructed a comprehensive energy model based on the processing parameters, and optimized it with the goal of energy consumption and cost. Li et al. [7] established a multi-objective optimization model of time and energy consumption by analyzing the characteristics of gear hobbing energy consumption, and adopted the imperial competition algorithm for optimization. Ni et al. [8] quantitatively modeled the carbon footprint of the hobbing process and optimized the hobbing parameters based on the improved multi-objective gray wolf algorithm. In addition, they added consideration to the hob parameters on the basis of the processing parameters, and adopted the multi-objective Antlion optimization algorithm to optimize the energy consumption and cost of hobbing [9]. Cao et al. [10] predicted and optimized the hobbing parameters based on support vector regression and improved Harris Hawks optimization algorithm. Yi et al. [11] established the carbon emission prediction model of hobbing by using backpropagation neural network through small-sample experimental design, and optimized the hobbing parameters based on the improved multi-objective gray wolf algorithm. Kharka et al. [12] studied the influence of processing parameters and lubricating oil parameters on gear quality through experiments based on minimum quantity lubrication assisted hobbing. Liu et al. [13] used multi-objective whale optimization algorithm to optimize the hobbing parameters with the goal of processing cost and error.
All the above literatures study the hobbing process in the static environment. By default, other factors in the hobbing process are constant and the influence of processing parameters is focused. In fact, the hobbing process is a dynamic process under dynamic machining conditions. Due to the influence of dynamic parameters such as equipment wear, process parameters variation, and material differences [14][15][16], the simple static model is difficult to ensure the accuracy of prediction and optimization, and cannot describe the real-time state of the hobbing process. However, to build a new model according to the changes will consume a lot of time, which runs counter to the real-time demand of production.
In order to comprehensively consider the impact of dynamic parameters and accurately describe the real-time state of machining, it is necessary to establish a dynamic model, which combines data-driven and simulation to express the dynamic process and results of machining. Zhu et al. [17] established a multi-level carbon emission simulation model using discrete event system specification in view of the multi-granularity characteristics of carbon emission in machining process, and conducted simulation analysis on an example. Tuo et al. [18] proposed a dynamic acquisition method of carbon emissions in mechanical manufacturing processes, which can overcome the problem that traditional static statistical methods cannot accurately reflect the dynamics and uncertainty of carbon emissions. Alzalab et al. [19] proposed a stepwise fault locking method based on trust model and colored Petri net, which can manage, detect, and deal with faults in automatic manufacturing system. Kim et al. [20] proposed to use machine learning model and simulation model for collaborative modeling in view of the problem that a single method could not fully reflect a complex model. Tsinarakis et al. [21] proposed a general process modeling and simulation framework for discrete industrial systems based on Petri net in the context of digital twin. Li et al. [22] established a metamodel of manufacturing energy consumption behavior using hybrid Petri net, simulated the processing process, and finally constructed a digital twin model of energy saving manufacturing.
The dynamic model can comprehensively consider the dynamic parameters and conditions in actual machining, describe the real-time state, and reflect the process and result of machining more accurately. However, it is interesting to note that there are few studies on the dynamic model of hobbing process under the influence of dynamic parameters.
Different from turning or milling processing, gear hobbing is usually produced in small batches of multiple varieties in actual industrial production, and the production time of a single gear is longer. In addition, only the first few gears will be tested for precision in a production batch, so it is difficult to collect a large number of complete data including manufacturing results and precision results to guide the processing practice. Data generated based on simulation is another effective way to obtain data [23]. Simulation can be used to characterize the carbon emission dynamics of manufacturing systems and help enterprises reduce carbon emissions from production [24]. What is more, due to the long processing time of hobbing, the operator often needs to operate the processing of multiple equipment at the same time. How to allocate the working time reasonably, disassemble the workpiece and replace the tool in time, and adjust the hobbing parameters is a problem worth thinking about. Based on the data-driven simulation model, enterprises can effectively use the historical manufacturing data to guide the production process arrangement and time management of operators, save more time and money, reduce the carbon emissions generated by production, and achieve a win-win situation of economic and environmental benefits.
Digital twin establishes a multi-dimensional, multi-temporal scale, multi-disciplinary, and multi-physical quantity dynamic virtual model of physical entities in a digital way to simulate and describe the properties, behaviors, and rules of physical entities in the real environment [25]. Driven by data and models, digital twin can be used for monitoring, simulation, prediction, and optimization [26]. After continuous development in recent years, digital twin has been widely used in the field of machinery. Liu et al. [27] proposed a four-fold architecture of design-planning-development-optimization based on digital twin in order to avoid the high cost caused by reconfiguring the intelligent manufacturing system. Wei et al. [28] proposed a consistency keeping method for digital twin of CNC machine tools to ensure the accuracy and fidelity of the model. Luo et al. [29] proposed to realize fault prediction and maintenance of CNC machine tools using hybrid drive of model and data based on digital twin. Tao et al. [30] proposed the construction criteria of digital twin, and carried out a series of research and practice on the construction of digital twin workshop model. Xia et al. [31] proposed an intelligent fault diagnosis framework for machinery based on digital twin and deep transfer learning to solve the problem of large fault diagnosis errors caused by insufficient measured fault state data. Wang et al. [32] proposed an assembly accuracy analysis method based on universal parts digital twin model, which can effectively identify the effects of manufacturing errors and assembly process errors on assembly accuracy. Dai et al. [33] proposed an information modeling method for the digital twin model of prefabricated parts to ensure the reusability of manufacturing data. Li et al. [34] proposed a digital twin-driven online tool wear monitoring method, which solved the problems of large prediction error of milling cutter wear and difficulty of online acquisition of dynamic data.
A perusal of current literature concludes that the static model is generally adopted in the existing research on manufacturing process optimization. Although significant efforts have been made for low-carbon and energy-saving manufacturing, most of them only pay attention to the influence of process parameters and can only output static results. In addition, some scholars have applied the dynamic model to the simulation of manufacturing process to reflect the realtime state of machining, but there is no research on comprehensively considering the dynamic characteristics of the gear hobbing process and establishing a dynamic model. Digital twin can make full use of the data of dynamic parameters in physical space, and realize the accurate prediction and realtime dynamic simulation of the carbon efficiency of hobbing process by relying on virtual model. Unfortunately, there are few papers combining dynamic models and digital twin.
Inspired by the comments above, this paper applies the digital twin to the hobbing process. According to the carbon emission characteristics of different periods of the hobbing process, the dynamic prediction and simulation model is integrated into the carbon efficiency digital twin (CEDT) model of the hobbing process as virtual models. In addition to improving the prediction accuracy, CEDT can also express the real-time states and carbon efficiency results of gear hobbing. Operators can check the prediction and simulation results of the model before processing, and plan the production process arrangement and time management in advance according to the production plan and processing conditions, so as to improve the carbon emission efficiency of hobbing and ensure the economic and environmental benefits of the enterprise.
Due to the lack of comprehensive consideration of the dynamics of gear hobbing process and dynamically reflects the machining results in real time to guide production management, this paper fills the gap and makes the following contributions: (1) The carbon emission characteristics of hobbing process are analyzed from the angle of dynamic characteristics based on each period of the process, and three carbon efficiency targets are defined. (2) Dynamic discrete event system specification (DDEVS) is proposed, and a dynamic prediction and simulation model of carbon efficiency considering dynamic characteristics of gear hobbing process is constructed based on one-dimensional convolutional neural network and DDEVS. (3) The framework of CEDT is built, and the dynamic prediction and simulation model is integrated into the CEDT model of gear hobbing process. This model can make full use of the dynamic parameter data of physical space, and simulate the real-time state and carbon efficiency results of the gear hobbing process. So as to guide operators to plan production process arrangement and time management.
The remainder of this paper is organized as follows. Section 2 analyzes the carbon emission characteristics of hobbing process and defines the carbon efficiency target. Section 3 introduces the dynamic prediction and simulation model of carbon efficiency in gear hobbing process. Section 4 integrates the dynamic prediction and simulation model into CEDT of gear hobbing process. Section 5 implements the case study. Section 6 concludes the paper and gives an outlook on future research.

Analysis of carbon emission dynamic characteristics in gear hobbing process
Gear hobbing is a complex gear machining process with numerous sources of carbon emissions. Generally speaking, the running process of hobbing machine tool can be divided into states including startup-standby-unload-cutting-retract, and the carbon emissions can be calculated separately. After the machine tool is started, the operator will clamp the gear blank, install the hob and perform tool setting, and then select or input the corresponding program code in the CNC system. After starting the machine tool, the gear blank will go through each processing period and consume a certain amount of time and materials, resulting in corresponding carbon emissions, finally be sent to inspection after forming. Figure 1 shows the real-time power-time graph for two gear hobbing processes in the industrial scenario. The same type of gear is processed by the same machine tool twice, and the process parameters (spindle speed and feed) are the same. However, due to the influence of the environment, hob, and other dynamic parameters, the power of the hobbing process is different, which also indicates that the carbon emissions generated by the hobbing process are dynamic. Figure 2 shows the tool path and its corresponding power in the gear hobbing process. After the machine is started, it is the standby period. When the operator completes a series of preparations such as clamping and starts processing, the gear hobbing process enters the unload period. At this time, the spindle starts to rotate, the cutting fluid of the machine tool is turned on, and the hob moves slowly from position A to position B, and cuts downward according to the fixed feed speed set in advance. When the hob is in contact with the workpiece (position C), it enters the cutting period, and the cutting period ends until the hob is separated from the workpiece (position F). Then, enter the retracting period, the hob passes through position G, position H, and quickly returns to the origin position of the machine tool (position A). At this point, a hob process is over.
The startup period of the machine tool is only a very short time. Its carbon emission is very small and has little relationship with processing, so its carbon emission is ignored.
Carbon emission sources of hobbing include energy (electricity), materials, and equipment [35]. During the standby period, the carbon emission of the machine tool is generated by the power consumption, which is determined by dynamic factors such as the performance of the machine tool and the environment conditions. The time includes gear blank clamping, tool setting, and the time required for inputting the numerical control program, etc., which is affected where, EF elec is the carbon emission factor of electric energy.
Compared with the overall time, the unload period and the retract period in the hobbing process only account for a very small part of time, so they can be ignored. The carbon emissions generated during cutting period is mainly considered.
The carbon emission model is established according to the degree of hob cutting, which can effectively improve the accuracy of prediction and describe the real-time state of the hobbing process. The cutting period includes three continuous processes of cut-in (l CD ), complete cut-in (l DE ), and cut-out (l EF ), and the real-time power varies linearly, as shown in Fig. 2. The hob contacts with the gear blank at position C, and moves downward along the radial direction of the gear blank. With the increasing of the cutting depth of the hob, the cutting power also increases, which is the cut-in process. Up to position D, the cutting depth reaches the maximum, that is, full cut. The machine maintains this cutting power so that the hob continues to feed down until it reaches position E and starts to cut out. During the cut-out period, as the depth of cut decreases, the cutting power gradually decreases until the hob is separated from the workpiece at position F, and the cutting period ends.
In the cutting period, the hobbing machine tool removes excess material to shape the gear. The carbon footprint during this period comes from electricity consumption, cutting fluid preparation and treatment, hob preparation, and waste disposal. The carbon emissions of the three cutting processes can be calculated by integrating the power with time and using the carbon emission factor. As shown in Eq. (2): where x = cut − in, full − cut, cut − out, which respectively represent the three processes in the cutting period; T c is the effective cycle of cutting fluid; L c is the circulating usage of cutting fluid on the hobbing machine; EF c is the carbon emission factor of mineral oil; L w is the amount of waste cutting fluid; EF w is the carbon emission factor of waste cutting fluid treatment; T h is the total life of the hob; EF h is the carbon emission factor of the hob; W h is the weight of the hob; EF m is material carbon emission factor; and ∆m is the weight of the waste.
Parameters related to carbon emissions are shown in Table 1.

Carbon efficiency of gear hobbing process
In the context of low carbon, improving carbon emission efficiency is an effective solution to overcome environmental constraints and ensure economic development [36]. In actual industrial processing, hobbing products are required to be processed before the delivery time under the premise of meeting the quality standards, and economic and environmental benefits should be taken into account. That is, gear hobbing needs to ensure lower carbon emissions under the premise of short time, excellent quality, and low cost. Based on this, this paper proposes three carbon efficiency targets, including quality carbon efficiency, production carbon efficiency, and profit carbon efficiency, to evaluate the carbon emission benefit of the gear hobbing process.

Quality carbon efficiency
For the quality of gear hobbing, the quality carbon efficiency is proposed, which is defined as the ratio of the difference between the design accuracy and the actual machining accuracy and the carbon emissions produced by the production of the gear. It is used to describe the relationship between the hobbing quality and carbon emissions. The quality carbon where F is the design accuracy, ∼ F is the manufacturing accuracy, both of which are characterized by radial runout F r , C single is the carbon emission generated by this gear hobbing process, and the calculation formula is shown in Eq. (4):

Production carbon efficiency
For the hobbing processing time, the production carbon efficiency is proposed, which is defined as the ratio of the number of qualified products in this batch to the product of the total processing time and the total carbon emissions of the hobbing  [42] process. It is used to describe the relationship between hobbing efficiency and carbon emissions of the equipment. The production carbon efficiency η q (piece/kgCO 2 • h) is shown in Eq. (5): where Q is the number of qualified gears and t ntotal is the total time consumed by the produced gears. C total is the carbon emissions generated by this gear hobbing process, and its calculation method is shown in Eq. (6): where m is the weight of the unqualified gear.

Profit carbon efficiency
For the economic benefit of enterprises, the profit carbon efficiency is proposed, which is defined as the ratio of the profit generated by hobbing to the carbon emissions. It is used to describe the relationship between the added value of gear hobbing and carbon emissions. The profit carbon efficiency η c (yuan • piece/kgCO 2 ) is shown in Eq. (7): where, P represents the value generated by the hobbing step and C ntotal is the total carbon emissions generated by the processed gears. M is the production cost, and its calculation formula is shown in Eq. (8): where p elec is the unit price of electric energy, p c is the unit price of cutting fluid, p h is the unit price of the hob, and p m is the unit price of the gear blank. t cutting is the total duration of cutting period, and its calculation method is shown in Eq. (9): 3 Virtual model of carbon efficiency digital twin in gear hobbing process

Real-time power fitting of gear hobbing process
In order to realize the real-time power prediction in gear hobbing process, it is necessary to comprehensively consider the dynamic parameters of the process, and collect data of multiple dynamic parameters including actual working conditions, operating parameters and process parameters in real time.
Traditional statistical modeling methods manually extract data features in a targeted manner, which is limited by professional fields and experience, and it is difficult to ensure the accuracy of prediction models. Convolutional neural network (CNN) is a widely used deep learning algorithm. When the data of multidimensional parameter features are input, the features can be extracted in a more targeted way and used to fit the complex mapping relationship. Its generalization ability, reliability, and robustness are superior to traditional artificial neural network [37].

Data preprocessing
Before using one-dimensional convolutional neural network to predict the real-time power of gear hobbing process, the raw collected data needs to be preprocessed. The raw data includes qualitative data such as machine tool model, workpiece material, and quantitative data such as gear parameters and process parameters. Qualitative data cannot be input into the prediction model directly, so one-hot encoding is used to convert them into quantitative data. When a feature has N possible qualitative values, the feature is extended to N quantitative features represented by 0 and 1. For example, for the model of machine tool, "10" can be used to represent machine tool YS3132CNC6, and "01" can represent machine tool YS3140CNC6.
For quantitative data, it is necessary to normalize the data and map the dimensional eigenvalues of the data to [0,1] to prevent the reduction of prediction accuracy caused by different dimensions and large order of magnitude gaps. The formula for data normalization is shown in Eq. (10): where x ′ is the normalized value, x is the original value of the feature, and x max and x min are the maximum and minimum values of the feature.

Construction of one-dimensional convolutional neural network model
The 1D-CNN is trained with historically collected data. The algorithm automatically extracts the features of the dynamic parameters, and constructs the regression prediction model of the realtime power in gear hobbing process. During machining, the data collected in real time is used as the input of the model, and the trained model will regress to predict and output real-time power according to the value of each dynamic feature. Moreover, the data generated by this machining will be added to the historical data set, and the model will be retrained to continuously enhance the dynamic prediction performance of the model.
1D-CNN consists of an input layer, a series of convolutional layers, activation layer, pooling layer, fully connected layer, and an output layer. Input data enters the network from the input layer. Feature extraction is carried out by the convolution layer, that is, according to the set step size, the data is continuously slid and convolutional operations are performed. The calculation formula of 1-D discrete convolution is shown in Equation (11): where Y i is the value of the feature map after convolution, bias is the bias value, X i is the ith input data with dimension p × 1, θ is the convolution kernel with kernel size N, and ⊗ is the convolution operator.
After convolution, the rectified linear unit (ReLU) is used in the activation layer to add nonlinear factors to prevent linear inseparability. The calculation formula is shown in Eq. (12): where f(x) is the output after activation and x is the input.
The pooling layer allows only the most influential features to be retained, which can reduce the dimension of data and prevent overfitting. After multiple convolutions and pooling, the fully connected layer is used to activate all neurons through linear transformation to obtain the regression result. By calculating the loss between the predicted value and the monitored value, and propagating the loss back, the model is adjusted continuously by stochastic gradient descent, and the results are output in the output layer when the requirements are met. Figure 3 shows the structure of the convolutional network model used for dynamic prediction in this paper.

Simulation algorithm for dynamic prediction and simulation model
Discrete event system specification (DEVS) is a modular, hierarchical modeling method. DEVS builds systems by connecting system components, can express dynamic systems, and formally describe discrete or continuous systems [38]. DEVS model includes atomic model and coupled model. The atomic model is used to simulate the most basic behavior of the model.
Multiple atomic models can be coupled to form a coupled model to dynamically simulate the behavior of more complex systems.
The hobbing process goes through four continuous stages: standby, cut-in, full-cut, and cut-out, which can be regarded as a continuous system of carbon emission. Gear hobbing usually includes rough hobbing and finishing hobbing twice, and a gear production workshop has more than one hobbing machine bed for processing; their carbon efficiency of gear hobbing process can be regarded as a discrete system. As shown in Fig. 4, the atomic model is designed according to the machining process of gear hobbing, and it is coupled in chronological order to construct the coupled model of rough hobbing and finishing hobbing. The two coupling models can be coupled again and become a coupled model for a machine tool to complete hobbing. Finally, according to the situation of the workshop, several hobbing machine bed models are coupled. From this, the DEVS dynamic simulation model of the carbon efficiency of the hobbing process is constructed from the bottom up to output the real-time progress and machining results of the hobbing process.

Atomic model construction
The traditional DEVS atom model is represented by a seventuple, but it cannot simulate dynamically changing inputs. In order to use the fitting value of 1D-CNN for dynamically changing real-time power as input for simulation, this paper extends the traditional DEVS and proposes dynamic discrete event system specification (DDEVS), which is represented by an octuple, as shown in Eq. (13): DI: External dynamic input set. DP = {Pstandby, Pcutin, Pfullcut, Pcutout} represent the real-time power fitting values in each period from dynamic prediction model. X: External input event set. X = {batch, p, os}, batch ∈ N + indicates the batch of gears to be processed this time; p ∈ R represents the real-time power of the period, which is determined by DI; os = {gh, gc, gm} represent hob, cutting fluid, and material respectively. period, cut-in period, full-cut period, and cut-out period, respectively. ec = {nq, np, nc}, nq, np, nc ∈ R represent quality carbon efficiency, production carbon efficiency, and profit carbon efficiency, respectively, t a (s) ∈ R represents the duration of this period, am ∈ N + represents the total number of gears, and qam, uam ∈ N represent the number of qualified gears and the number of unqualified gears, respectively. S: System state set. S = {ts, bn, am, qam, uam, c, ec, t}, where ts = {r, f}, r indicates that the period is running, f indicates that the period is idle, b n = {q 1 , q 2 , …, q n }, b n = q n means that the n th gear of the batch is being processed, and the meaning of m, qam, uam, c, ec, t are the same as those defined in the external output event set. δ int : Internal transition function, which is used to describe the transition logic and operation method of the model state when an internal event occurs. δ int = {δ 1 , δ 2 , δ 3 , δ 4 }。δ 1 means that when the state of the period is f and batch = 0, this state is maintained, carbon emissions and carbon efficiency are not calculated, and the state duration is t a (s). δ 2 means that when the state of the period is f and batch > 0, the state changes to r, the number of gears to be processed batch is reduced by 1; b n = qam + uam, calculate the carbon emission and carbon efficiency, and record the state duration t a (s). δ 3 indicates that when the state is r and batch = 0, the state changes to f, carbon emissions and carbon efficiency are not calculated, and the state duration is t a (s). δ 4 means that when the state of the period is r and batch > 0, keep this state, calculate the carbon emission and carbon efficiency, and record the state duration t a (s). δ ext : External transition function, which is used to describe the state change of the model when an external event occurs. When there is batch input, if the original period state is f, change the state to r and batch = input. If the original period state is r, keep the state and batch + = input.
λ: Output function. Information output when an internal or external event occurs in the system. When the status of this period is f, the information of carbon emission, time, and carbon efficiency is collected and sent to the relevant port. t a : Time advance function. Records the duration of the current state, and stops recording when the state transitions.

Coupled model construction
According to the order of the machining period of gear hobbing process, the atomic models can be connected in sequence to become the coupled model of gear hobbing process that describes the hobbing of a single gear. The coupled model is described in the form of a seven-tuple, as shown in Eq. (14): where, the definitions of X and Y refer to the definitions in the atomic model. D is the members name set. E IC is the external input coupled set, that is, the connection relationship between the external input and the input interface of the internal atomic model. E OC is the external output coupled set, that is, the connection relationship between the external output Gear production workshop

Material Electricity
Gears Carbon efficiency and the output interface of the internal atomic model. IC is the internal coupled relationship set, that is, the connection relationship between the atomic models of machining period within the coupled model of the hobbing process. select is the selection function. When multiple members of the coupling model have state changes at the same time, the priority of the state changes is determined. In this paper, the priority of the coupled model of hobbing process from low to high is the standby atomic model, the cut-out atomic model, the fully cut atomic model, and the cut-in atomic model. Figure 5 shows the operation mechanism of the model, in which the dotted line represents the transformation mechanism of the internal events of the model, and the solid line represents the transformation relationship of the external events of the model.

Framework of carbon efficiency digital twin
The framework of the carbon efficiency digital twin model in gear hobbing process is shown in Fig. 6, which includes three modules: physical entity, twin database, and virtual model.
The physical entity of the digital twin includes the device layer and the perception layer. The device layer is the gear hobbing equipment, including machine tools, workpieces, and hobs. The perception layer is based on the Internet of Things (IoT) technology to perceive and transmit the data in gear hobbing process. The sensor, analyzer, and other equipment are used to collect the data in the device layer in real time, and the data is transferred to the computer and the acquisition terminal for simple processing. In order to improve the response rate and reduce the time delay, edge server is used to analyze the real-time data. Historical data will be transferred to the cloud server for storage during idle time.
In the twin database, the data collected by the perception layer is collectively referred to as perception data. These perception data will be used as the input of the virtual model to realize the dynamic prediction and simulation of the carbon efficiency in gear hobbing process.
Virtual model includes two modules, prediction layer and simulation layer, which undertake the work of dynamic prediction and dynamic simulation, and is the focus of this paper. The prediction layer of the virtual model first preprocesses the sensing data of dynamic parameters such as machine tools, workpieces, and process parameters collected from physical entities and stored in the twin database. The  1D-CNN will extract features and predict the real-time power in gear hobbing process. After that, the predicted real-time power data will be input into the simulation layer together with other sensing data, which will be simulated by the DDEVS dynamic simulation model, and the real-time hobbing states and carbon efficiency results will be output to the twin database, which will be used as service data. The operator can call to view the service data before the formal processing to understand the simulation process and results of the machining. Based on this, the operator can plan the production process arrangement and time management in advance, and improve the carbon emission efficiency of hobbing processing. This realizes the mapping of the virtual model of the CEDT of gear hobbing process to the physical entity.

Integration relationship of carbon efficiency digital twin
The carbon efficiency digital twin model (CEDT) in gear hobbing process can be expressed by Eq. (15): where PE represents the physical entity, TD represents the twin database, and VM represents the virtual model. In order to fully express the integration relationship of each part, the class diagram of unified modeling language (UML) is used to describe it. As shown in Fig. 7, the upper part of the box is class name, and the lower part is class properties. The solid line-rhombus is the aggregation relationship, that is, from the part to the whole, such as the physical entity including hobbing machine tool, workpiece, and hob. The solid line-solid rhombus represents the composite relationship. Compared with aggregation relationship, the whole and part of the composite relationship are more closely, such as the atomic model of the hobbing period and the coupled model of the gear hobbing process; the latter must be composed of the former. The dashed line-arrow represents the dependency relationship; that is, the implementation of the class needs the assistance of the directed class, such as the hobbing parameter data in the perception data needs to be obtained from the process data in the CNC system of the machine tool. The solid lines without arrows indicate associations, such as perception data and service data are associated.

Case data description
In order to verify the effectiveness of the dynamic prediction and simulation carbon efficiency digital twin model in the gear hobbing process proposed in this paper, experiments and data collection were carried out in the gearbox manufacturing workshop of a company in Chongqing. The workshop has gear hobbing, Prediction layer Fig. 6 The framework of the CEDT in gear hobbing process gear shaping, gear grinding, heat treatment, and other gear processing equipment. There are two gear hobbing machine tools in total; the models are YS3132CNC6 and YS3140CNC6. Table 2 shows the parameters of the two machine tools. According to the processing orders of the workshop in 2021 including hobbing, a total of 271 sets of complete data were collected based on the Internet of Things. The scene is shown in Fig. 8. Firstly, the information of gears being processed and the hob used is collected from the manufacturing database of the factory. Process parameters are collected in numerical control system.

Device layer
Then, the clamp-type current sensor and alligator clip are installed in the electrical box of the hobbing machine tool. HIOKI3390 power analyzer is used to analyze and collect the real-time power signal during the gear hobbing process. After the hobbing is completed, the WGT400 gear measuring center is used for precision inspection. The collected data will be transmitted to the edge server through Ethernet or WIFI for analysis and utilization to achieve dynamic prediction and simulation of carbon efficiency. The generated simulation data will be used to guide operators to plan production process arrangement and time management.

Dynamic prediction and simulation results
of carbon efficiency in gear hobbing process

Dynamic prediction and simulation results of real-time power
During gear hobbing, there are numerous dynamic parameters that have an impact on carbon emissions. Principal component analysis (PCA) is used to process the data, which can exclude the influence of noise in industrial production on real-time power, and only retain the attributes of important dynamic parameters. In this case, the dynamic properties of the machine tool are represented by the operating time of the machine tool, the dynamic properties of the environment are represented by the ambient temperature during the machining process, the dynamic properties of the hob are represented by its usage time and material, and the dynamic properties of the gear are represented by the gear material and modulus, and the number of teeth is reflected. As for hobbing parameters, its dynamic properties are reflected by spindle speed and feed.
The parameters of 1D-CNN used in this case are shown in Table 3. Among the 271 groups of data collected, 54 groups  are randomly selected as the test set, and the rest data are used as the training set. The collected dynamic parameter data enter the input layer after preprocessing. In convolution layer 1, the convolution operation is carried out by 5 convolution kernels with the size of 3, and the maximum pooling with the size of 2 is performed. Then, the data is convolved by 10 convolution kernels of size 3 in convolutional layer 2, and the maximum pooling of size 2 is performed again. The output is connected to a fully connected layer with 128 neurons. After dimensionality reduction through two fully connected layers with sizes of 64 and 32, respectively, the real-time power prediction of the gear hobbing process is realized in the output layer. The predicting value and monitoring value of real-time power in gear hobbing process based on 1D-CNN are shown in Fig. 9.
In order to reflect the simulation accuracy of the 1D-CNN model on real-time power under the influence of dynamic parameters in gear hobbing process, this paper compares its prediction results with those of traditional machine learning such as back propagation neural network (BPNN), extreme learning machine (ELM), and support vector regression (SVR). The parameters of each machine learning algorithm are shown in Table 3. In this paper, four indicators of rootmean-square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and determination coefficient (R 2 ) are used to evaluate the prediction effect of each model. The formulas of the four indicators are shown in Eqs. (16)(17)(18)(19): where N is the total number of samples. y i is the ith monitoring value, ỹ i is the ith predicting value, and y is the average value of the monitoring value. Table 4 shows the effect of each prediction model. Among them, RMSE, MAE and MAPE can be used to evaluate the deviation between the predicting value and monitoring value of the model. The smaller the value of them, the better the prediction effect of the model on the real-time power in gear hobbing process and the more stable the performance. The determination coefficient R 2 ∈ [0, 1], which is used to evaluate the fitting effect of the model on the real-time power of hobbing for each dynamic parameter. The closer its value is to 1, the better the fitting effect of the model, and the more it can fit the influence of dynamic parameters on real-time power in gear hobbing process. According to the results in Table 4, among the four evaluation indicators, 1D-CNN has the best results. Compared with the other three methods, the values of RMSE, MAE, and MAPE of it are reduced on average by 43.98%, 34.55%, and 30.67%, respectively. The RMSE of 1D-CNN is 209.41, indicating that the error between the predicting value and the monitoring value is small, and the prediction stability of this method is better. MAE shows the actual error between the predicted value and the monitored value. 1D-CNN has the smallest MAE value, indicating that its absolute error is the smallest. MAPE is the percentage of error to the monitoring value. The MAPE of 1D-CNN is 1.59%, indicating that the prediction accuracy is above 98% and has a good prediction effect. As for R 2 , the R 2 of the model used in this paper is 0.99, which is the closest to 1 among several models, which shows that 1D-CNN is feasible for the fitting between dynamic parameters and real-time power. It should be noted that although the 1D-CNN model used in this paper has better prediction effect, its training time is also far longer than the other three models, which is a common constraint of deep learning.  In gear hobbing process, the standby period is mainly determined by the parameters of the machine tool itself and environmental factors, and is less affected by dynamic factors. The impact of dynamic parameters on carbon emission is more reflected in the three processes of the cutting period. Figure 10 shows the index evaluation of the real-time power simulation accuracy of 1D-CNN for rough gear hobbing and finishing gear hobbing in the three processes of the cutting period.
According to Fig. 10a, it can be seen that the RMSE values of rough hobbing in the three stages are greater than that of finishing hobbing, which indicates that the stability of real-time power simulation for rough hobbing is weaker. Figure 10b depicts the MAE values of the three periods. It can be seen that the absolute error of real-time power prediction for rough hobbing is larger. The results of the previous two figures are caused by the machining allowance. The machining allowance of rough hobbing and finishing hobbing is related to the full tooth height of the gear. Generally, the rough hobbing will cut off most of the material, and only the machining allowance of 40 μm is reserved for finishing hobbing. This also leads to a huge change in the power of rough hobbing in the three stages of cut-in, full-cut, and cut-out, while finishing hobbing due to small machining allowance, the power change is relatively small in the three periods of cutting, so the real-time power prediction value is relatively more stable. It can be found from Fig. 10c that for rough hobbing, the mean absolute percentage error is smaller than that for fine hobbing. From Fig. 10d, it can be found that the R 2 of rough hobbing is closer to 1, indicating that the fitting effect of the model for rough hobbing is better than that of finishing hobbing. This is caused by the change of dynamic parameters. After rough hobbing, the workpiece is changed from gear blank to a gear; that is, the workpiece parameters have changed. However, in the input of the model, only the spindle speed and feed are changed, which leads to the reduction of the fitting effect and prediction accuracy of the model.

Dynamic prediction and simulation results of carbon efficiency
The prediction results of the dynamic prediction model cannot directly describe the carbon emission and carbon  . 10 Evaluation of prediction effect in cutting periods efficiency results of gear hobbing process, nor can they intuitively describe the real-time state. Therefore, the prediction results and other dynamic parameters should be taken as input, and the dynamic simulation model should be used to simulate the process and output the results of carbon efficiency and real-time processing state. In order to validate the feasibility of CEDT and demonstrate its practical application, based on the processing configuration of the data acquisition shop, this paper takes single gear hobbing and batch gear hobbing processing of WS2001-04372 workpiece as examples to further illustrate the visual expression and simulation application of the model. Table 5 shows the design parameters of the gear.
(1) Single gear hobbing process simulation Based on the description in Section 3.2, this paper adopts CD++ Builder [39] to establish dynamic simulation models based on DEVS. Figure 11 shows the dynamic simulation model of the single gear hobbing process of gear hobbing machine bed YS3132CNC6. The model has three input ports, which are batch (Batch), power (P), and others (Os). There are 13 output ports, which are the total number of processed workpieces (am), the number of qualified gears (qam), the carbon emissions of rough hobbing in each period (including croustd, croucin, croufct. and croucot), the total carbon emissions of rough hobbing (crough), the carbon emissions of finishing hobbing in each period (including cfinstd, cfincin, cfinfct, and cfincot), the total carbon emissions of finishing hobbing (cfinishing), and the total carbon emissions (ctotal). The dynamic simulation model of gear hobbing simulates the process of rough hobbing and finishing hobbing, respectively, by using four atomic models: standby, cut-in, full-cut, and cut-out. Three statistical atomic models are used to integrate the carbon emission data and send them to corresponding output ports. Tables 6 and 7 show the simulation parameters (including the time and the weight of the waste) for the hobbing machine tool to process it. The standby time of rough machining is related to the proficiency of operator. This paper adopts the average service time according to the investigation. The standby time of the machine tool YS3132CNC6 is 300 s, and that of the YS3140CNC6 is 240 s. The standby time of finishing is related to the program code, in which the standby time of machine tool YS3132CNC6 is 8 s and that of the YS3140CNC6 is 11 s. The simulation time for the rest of the period is determined by cutting parameters and tooth thickness. The circulation cycle of cutting fluid is 83,000 s; the circulation usage and waste volume of cutting fluid are both 13 L. The tool life is 112,800 s, and weight is 2.35 kg.  The single gear hobbing process is simulated based on YS3132CNC6, and the results are shown in Table 8. The simulation results show the real-time working state and carbon emissions of gear hobbing process. For example, during the period from 09:49 to 12:25, it is in the full-cut period of rough hobbing, and a total of 1.50963 kgCO 2 is produced in this period. The rough processing is completed in 18:01, and 5.47073 kgCO 2 is produced. Finishing processing is completed at 24:06, resulting in 1.22903 kgCO 2 , and a total of 6.69977 kgCO 2 is generated from machining the workpiece. Figure 12 shows the carbon emissions and total carbon emissions in each period of gear hobbing process. It can be seen that the carbon emissions of rough hobbing account for more than 80% of the total carbon emissions. On the one hand, the rough hobbing feed is smaller. Although the real-time power of the finishing hobbing is higher, the longer processing time results in more carbon emissions from electrical energy, cutting fluid, and tool preparation during the rough hobbing process. On the other hand, because rough hobbing removes more machining allowance, it produces more waste disposal carbon emissions. In addition, in the three periods of cutting, since the time for full-cut is shorter, it produces less carbon emissions than both cut-in and cut-out.
(2) Batch gear hobbing process simulation The dynamic simulation of single hobbing carbon emission can help us analyze the carbon emission of hobbing process. However, to take into account economic and environmental benefits, it is still necessary to simulate the carbon efficiency of batch hobbing.
According to the actual workshop investigation, we designed the dynamic simulation model of carbon efficiency in the workshop gear hobbing process as shown in Fig. 13. We split a complete gear hobbing process into two coupled models of rough hobbing and finishing hobbing, and construct a dynamic simulation model of carbon efficiency in gear hobbing workshop based on the two machine tools. The model has 4 input ports including batch (Batch), power (P), others (Os), and radial runout of gears (Fr). The output ports of the dynamic simulation model include the number of processed gears (amout), the number of qualified gears (qamout), the number of unqualified gears (uamout), total carbon emissions (cout), production carbon efficiency (npout), profit carbon efficiency (ncout), and quality carbon efficiency (nqout). The Buffer atomic model assigns the input processing batches to the two gear hobbing machine tools according to the running state of them. The four coupled models in the middle simulate the rough hobbing and finishing hobbing of the two machine tools respectively, and finally, the Statistic atomic model calculates and outputs the results. Figure 14 shows the dynamic simulation results of carbon efficiency of the processing task with the number of batch hobbing being 9. Figure 14a shows the total number of processed gears, the number of qualified gears, and the number of unqualified gears in this batch. This batch has a total of nine workpieces. The first work piece is processed at 00:23:09, and the last work piece is processed at 01:55:45. No unqualified gears are produced. According to the simulation data of the number of processed workpieces, the operator can operate another machine when the workpiece is processed, and then return to the machine tool until the processing is completed. Figure 14b shows the cumulative change in carbon emissions from this batch of gear processing. A total of 59.97089 kgCO 2 is produced in this batch. The CO 2 generated rises in a step pattern. The large step contains the CO 2 generated by rough gear hobbing and finishing gear hobbing of machine tool YS3140CNC6 and rough gear hobbing of machine tool YS3132CNC6, while the small step only contains the CO 2 generated by finishing gear hobbing of machine tool YS3132CNC6. This is due to the different standby time, which leads to the parallel generation of carbon emissions. Figure 14c, d, and e show the changes of carbon efficiency of this batch, which are respectively quality carbon efficiency, production carbon efficiency and profit carbon efficiency. The  quality carbon efficiency is related to the precision of the processed gear. It can be seen that the radial runout of the 1st, 5th, and 7th gear is larger, resulting in lower quality carbon efficiency. These three gears are all processed by the machine tool YS3140CNC6, so the operator could check the situation of the hob and make certain adjustments. The production carbon efficiency is related to the processing time. Since the operator of machine tool YS3140CNC6 has higher proficiency and less standby time, the production carbon efficiency is higher than that of machine tool YS3140CNC6. The profit carbon efficiency is related to the qualified rate. Although it fluctuates under the influence of the cumulative carbon emissions, it can be found that with the continuous increase of the number of gears processed in batches, the profit carbon efficiency gradually stabilizes at a higher value. To ensure that the profit carbon efficiency does not decline, it is necessary to combine with the quality carbon efficiency, and adjust the processing technology in time before unqualified gears appear to ensure the smooth progress of processing. Based on the output results of the dynamic simulation system, the operator can predict the machining process and results of the batch gear, and allocate the operation time reasonably. By adjusting the processing technology or changing the hob in advance, the production can be ensured smoothly and the emission of CO 2 can be reduced. This plays an important role for enterprises to achieve refined management of carbon emissions and ensure a win-win situation between economic and social environmental benefits. To verify the validity of CEDT, we compare the results of dynamic prediction and simulation with the results of workshop data collection. Then, the reason of error is analyzed. Figure 15 shows the error (absolute value of the difference between simulated value and monitored value) between dynamic simulation results and actual machining results for a single gear hobbing. It can be seen that the simulation error of carbon emission in standby period is the smallest, because the power of the machine tool in this stage is related to its own performance and environment, and is less affected by dynamic parameters. For the cutting stage, the error of the full cut period is lower than that of the other two cut periods, which is due to the existence of air cuts in the cut-in and cut-out periods, resulting in the difference between the simulated time and the actual time. The error of finishing hobbing is lower than that of rough hobbing mainly because of its smaller absolute value. In general, the MAPE value of the dynamic simulation of carbon emissions for single hobbing is 1.68%, which indicates the effectiveness of the model. Figure 16 shows the percentage error between the dynamic simulation results and the actual machining results of CEDT for batch hobbing carbon efficiency. The error in quality carbon efficiency is the most obvious, which indicates that there may be dynamic factors affecting machining quality that are not taken into account. The error of production carbon efficiency is relatively smooth, which indicates that the model is fairly stable and can maintain a high accuracy for its simulation. Overall, the MAPE value of the batch gear carbon efficiency simulation is 3.14%, indicating that the proposed method is feasible.

Analysis of the effect of dynamic parameters
During gear hobbing, changes in dynamic parameters have an impact on carbon emissions and carbon efficiency. These dynamic parameters are derived from machine tools, tools, workpieces, environmental and process parameters, etc., and each has different effects on carbon emissions and carbon efficiency. When the output results of the carbon efficiency digital twin model in gear hobbing process cannot meet the requirements, it is necessary to optimize the dynamic parameters to improve the processing, so as to obtain satisfactory results.
Based on the grey correlation analysis (GRA), we obtained the ranking of the effects of each dynamic parameter on carbon emission and carbon efficiency, as shown in Fig. 17. Figure 17a shows the correlation between dynamic parameters and carbon emissions, which are in order of modulus, number of teeth, gear width, rough spindle speed, finishing spindle speed, rough feed, finishing feed, hob wear (number of gears machined by that hob), gear It can be seen that the parameters of the gear itself have the highest correlation with carbon emissions, followed by the four hobbing parameters, which can well explain why researchers focus on the impact of process parameters on carbon emissions in the static model. When the carbon emissions generated by the hobbing process are too large, and the parameters of the gear itself cannot be changed, the best optimization solution is to optimize the hobbing parameters. As for the following dynamic parameters, due to the low degree of correlation, after optimizing the gear hobbing parameters, it can be decided whether to optimize according to the optimization results. Figure 17b shows the correlation degree between dynamic parameters and quality carbon efficiency, which is in order of modulus, number of teeth, gear width, finishing feed, hob wear, rough feed rate, finishing spindle speed, rough spindle speed, gear material, hob material, ambient temperature, operator proficiency, and machine tool service time. Quality carbon efficiency is related to gear machining accuracy and carbon emissions, and the parameters of the gear itself still have the highest correlation degree. Among the hobbing parameters, the hob wear is mixed, indicating that both the wear degree of hob and hobbing parameters have great influence on gear machining accuracy. When the hobbing parameters cannot be changed to achieve satisfactory results, it is necessary to replace a new hob. In addition, the material of the gears and hob also have a certain impact on quality carbon efficiency. Figure 17c shows the correlation between dynamic parameters and production carbon efficiency, which is in order of gear width, rough feed, operator proficiency, modulus, finishing feed, number of teeth, rough spindle speed, finishing spindle speed, hob wear, gear material, hob material, ambient temperature, and machine tool service time. The production carbon efficiency is mainly related to the processing time and carbon emissions, and has a certain relationship with the processing quality (requires qualified). The big difference between this result and the previous two results is mainly due to the influence of various dynamic parameters on the machining time, such as gear width, feed rate, and standby time. The following parameters with high correlation degree affect carbon emissions, such as hobbing parameters and gear parameters. When the production carbon efficiency cannot meet the requirements, the feed can be changed preferentially, or the operator can be strengthened to reduce the standby time. Figure 17d shows the correlation degree between dynamic parameters and profit carbon efficiency, which is in order of modulus, finishing feed, finishing spindle speed, gear width, tooth number, rough feed, rough spindle speed, hob wear, gear material, hob material, operator proficiency, ambient temperature, and machine tool service time. Profit carbon efficiency is related to cost and carbon emission, and also has a certain relationship with processing quality, because when there is unqualified gear, it will seriously reduce profit carbon efficiency. When the profit carbon efficiency decreases, the hobbing parameters should be optimized preferentially, especially the hobbing parameters of finishing hobbing. Then, according to the situation to predict and simulate again, decide whether to replace a new tool.
Although grey correlation analysis cannot provide specific weight between dynamic parameters and the carbon emission or carbon efficiency, it can provide optimization priority for operators according to the correlation degree, and also provide direction for the dynamic optimization of carbon efficiency digital twin in gear hobbing process in the next step.

Conclusion
Considering the influence of dynamic parameters on machining under actual production conditions, this paper proposed the dynamic prediction and simulation model of carbon efficiency in gear hobbing process based on digital twin. Firstly, the carbon emission dynamic characteristics of hobbing process was analyzed and three carbon efficiencies (c) (d) Fig. 17 The ranking of the effects of each dynamic parameter were defined to describe the carbon emission results. Then, DDEVS was proposed, which used 1D-CNN to fit the influence of dynamic parameters on the real-time power of gear hobbing to carry out dynamic simulation of the gear hobbing process and its carbon efficiency. Finally, the dynamic prediction and simulation model of hobbing carbon efficiency was constructed and integrated into CEDT as virtual model. The RMSE, MAE, and MAPE of the proposed prediction model were 209.41, 154.81, and 1.59% respectively, which were 43.98%, 34.55%, and 30.67% lower than traditional methods on average. In addition, the fitting effect was as high as 0.99, which further proved the superiority of the model. The simulation results showed that CEDT could effectively reflect the carbon emission of single hobbing and carbon efficiency of batch hobbing, and the MAPE values are 1.68% and 3.14%, respectively. It could provide effective guidance for operators to plan production process arrangement and time management. Meanwhile, this paper discussed the correlation effect of dynamic parameters on carbon emission and carbon efficiency in the process of gear hobbing, and proposed process modification suggestions according to the processing objectives, which provided ideas for the realization of dynamic optimization in the follow-up research.
Although CEDT provides a new approach for low-carbon hobbing, future research needs to address the following issues: (1) With the accumulation of data, we need to deeply explore the mapping relationship between dynamic parameters and carbon emissions in the processing process, so that the model can learn continuously and simulate the actual processing process more accurately. (2) Based on the CEDT model proposed in this paper, iteratively adjust the variable parameters in batch hobbing for real-time dynamic optimization of the carbon efficiency of the hobbing process.
(3) Improve the model's guidance strategy for operators, and develop CEDT-based application platforms and corresponding software for the actual conditions of factory.