Implementation of Digital Twin for Engine Block Manufacturing Processes

The digital twin (DT) is undergoing an increase in interest from both an academic and industrial perspective. Although many authors proposed and described various frameworks for DT implementation in the manufacturing industry context, there is an absence of real-life implementation studies reported in the available literature. The main aim of this paper is to demonstrate feasibility of the DT implementation under real conditions of a production plant that is specializing in manufacturing of the aluminum components for the automotive industry. The implementation framework of the DT for engine block manufacturing processes consists of three layers: physical layer, virtual layer and information-processing layer. A simulation model was created using the Tecnomatix Plant Simulation (TPS) software. In order to obtain real-time status data of the production line, programmable logic control (PLC) sensors were used for raw data acquisition. To increase production line productivity, the algorithm for bottlenecks detection was developed and implemented into the DT. Despite the fact that the implementation process is still under development and only partial results are presented in this paper, the DT seems to be a prospective real-time optimization tool for the industrial partner.


Introduction
The digital twin (DT) is becoming progressively more interesting to academia and industry. The main questions are: what technologies are needed to create DT and how can the DT improve manufacturing processes? Commonly characterized as containing a physical entity, a virtual counterpart, and the data connections in between, the DT is increasingly being examined as a way of advancing the efficiency of the physical assets. [1]. The DT is a digital description of an operating product or service that consist of its preferred features, attributes, circumstances, and ways of behaving through replicas, information, and data within a single or even across multiple life-cycle phases [2]. The DT has important pertinence in the production context as it has the capability to improve production processes, discover points of congestion in a production system, confirm settings, and simulate situations to forecast performance [3].
Manufacturing and fully integrated DTs are suggested in the literature. However, currently operated DTs in industrial practice still need attention [4]. According to Qi et al. [5] regardless of an intense ambition from small and medium-size enterprises (SMEs) to integrate DT into their everyday business, a majority of the SMEs are inexperienced with the essential technologies and tools of the DT. Feofanov and Baranov [6] formulated four obstacles to the implementation of the DT: lack of human resources, organizational barriers, high expenses, and the deficiency of legislative support. Furthermore, the next limitation relates to DT implementation occurring because there is no standardized approach for development of the DT, and an application framework for DT is missing. Normalized procedures guarantee comprehension between users while ensuring information flow between each stage of DT development and implementation [4]. However, the four standards for a DT manufacturing network [7][8][9][10] are currently under development. These standards define general principles of the DT framework for manufacturing and specify requirements for the reference architecture, digital representation of the manufacturing elements and information exchange.
Although many authors proposed and described various frameworks for DT implementation in the manufacturing industry context, there is an absence of real-life implementation studies reported in the available literature. The main aim of this paper is to demonstrate the feasibility of DT implementation under real conditions of a production plant specializing in manufacturing of the aluminum components for the automotive industry.

Literature Review
Even though the DT is considered as a challenging technology, it is still at the conceptual stage and only a few studies have specifically discussed methods for its development and implementation in the manufacturing domain [11][12][13]. Zheng et al. [12] proposed an application framework of the DT for welding production line. Zhang et al. [14] developed a DT-based approach for designing and multi-objective optimization of the hollow glass production line. Cao et al. [15] established a compressor manufacturing system architecture based on digital twinning. Bao et al. [16] proposed an approach to modelling and operations for the DT in the context of manufacturing. In order to provide the implementation methods of virtual-physical convergence and information integration for a factory, they used Automation Markup Language for modelling a structural parts machining cell. Liu et al. [17] developed a DT-driven methodology for rapid individualized design of the automated flow-shop manufacturing system. Ding et al. [18] presented the framework reference model of a DT-based Cyber-Physical Production System (DT-CPPS) and discussed in detail its configuring mechanism, operating mechanism, and real-time data-driven operations management. Zhou et al. [19] proposed a general framework for a knowledge-driven DT manufacturing cell towards intelligent manufacturing, which could support autonomous manufacturing by an intelligent perceiving, simulating, understanding, predicting, optimizing, and controlling strategy. Zhuang et al. [20] presented a detailed implementation process of the proposed framework of the DT-based smart production management and control approach in a satellite assembly shop-floor scenario. Bilberg and Malik [21] developed a DT-driven human-robot assembly system that extends the use of virtual simulation models developed in the design phase of a production system to the operations for real-time control, dynamic skill-based tasks allocation between human and robot, sequencing of tasks, and developing a robot's program accordingly. He and Bai [22] proposed the framework of DT-driven sustainable intelligent manufacturing. To provide guidance for practical development and implementation, Liu et al. [23] developed a conceptual framework for DT-enabled collaborative data management for metal additive manufacturing systems, where a cloud DT communicates with distributed edge DTs in different product life-cycle stages. Zamba et al. [24] proposed DT for the manufacturing of structural parts made from carbon fiber composite materials. In order to optimize production process, Sujová et al. [25] developed the DT of the real assembly line. Cimino et al. [26] proposed a practical implementation of the DT in manufacturing an execution system equipped within an assembly laboratory line.

Materials and Methods
Implementation framework of the DT for engine block manufacturing processes consists of three layers: physical layer, virtual layer and information-processing layer. The bidirectional mapping and interoperability of a physical space and virtual space are realized through data interaction [12].

Characteristics of Production Line
The process flow for aluminum-alloy engine block manufacturing includes melting, holding casting, fettling, heat treatment, and machining. However, the subject of the present study is only the machining part of the production line. Once the engine block is removed from the casting process a number of different machining processes need to be performed. The engine block machining line consists of a robotic arm, two horizontal machining centers, conveyor system, and buffer system (see Figure 1).

Characteristics of Production Line
The process flow for aluminum-alloy engine block manufacturing includes melting, holding casting, fettling, heat treatment, and machining. However, the subject of the present study is only the machining part of the production line. Once the engine block is removed from the casting process a number of different machining processes need to be performed. The engine block machining line consists of a robotic arm, two horizontal machining centers, conveyor system, and buffer system (see Figure 1). After loading of the serial number of the casting by the line scan camera fixed on the input conveyor, the robotic arm is used to transport the workpiece from the conveyor to the empty buffer. The robot's decision-making algorithm is shown in Figure 2. Engine block computer numeric control (CNC) machining includes processes such as milling, face milling, drilling, boring, tapping, threading, etc. Two clamping fixtures are positioned in the machining area of the CNC machine by a rotary table. Machining is followed by measurement and piercing of excess workpiece parts. After a trouble-free execution of all operations, the engine block After loading of the serial number of the casting by the line scan camera fixed on the input conveyor, the robotic arm is used to transport the workpiece from the conveyor to the empty buffer. The robot's decision-making algorithm is shown in Figure 2.

Characteristics of Production Line
The process flow for aluminum-alloy engine block manufacturing includes melting, holding casting, fettling, heat treatment, and machining. However, the subject of the present study is only the machining part of the production line. Once the engine block is removed from the casting process a number of different machining processes need to be performed. The engine block machining line consists of a robotic arm, two horizontal machining centers, conveyor system, and buffer system (see Figure 1). After loading of the serial number of the casting by the line scan camera fixed on the input conveyor, the robotic arm is used to transport the workpiece from the conveyor to the empty buffer. The robot's decision-making algorithm is shown in Figure 2. Engine block computer numeric control (CNC) machining includes processes such as milling, face milling, drilling, boring, tapping, threading, etc. Two clamping fixtures are positioned in the machining area of the CNC machine by a rotary table. Machining is followed by measurement and piercing of excess workpiece parts. After a trouble-free execution of all operations, the engine block Engine block computer numeric control (CNC) machining includes processes such as milling, face milling, drilling, boring, tapping, threading, etc. Two clamping fixtures are positioned in the machining area of the CNC machine by a rotary table. Machining is followed by measurement and piercing of excess workpiece parts. After a trouble-free execution of all operations, the engine block is placed on the OK output conveyor. In case of an error, the workpiece is defined as defective. Therefore, manual processing is required and workpiece is placed on the Not OK conveyor.

Development of Simulation Model
Based on the aforementioned process flow, a simulation model was created using the Tecnomatix Plant Simulation (TPS) software (version 15, license TN75010-1253850, Siemens, Munich, Germany) (see Figure 3). The TPS software uses an object-oriented modeling method. Based on the library of typical equipment provided by the TPS, we customized the equipment that matches the actual situation. Control of the simulation process was achieved by programming with the SimTalk programming language.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 10 is placed on the OK output conveyor. In case of an error, the workpiece is defined as defective. Therefore, manual processing is required and workpiece is placed on the Not OK conveyor.

Development of Simulation Model
Based on the aforementioned process flow, a simulation model was created using the Tecnomatix Plant Simulation (TPS) software (version 15, license TN75010-1253850, Siemens, Munich, Germany) (see Figure 3). The TPS software uses an object-oriented modeling method. Based on the library of typical equipment provided by the TPS, we customized the equipment that matches the actual situation. Control of the simulation process was achieved by programming with the SimTalk programming language. Modeling of production systems in the TPS is realized by implementation of virtual objects, which represent individual production equipment, machines, workers, transport and logistics systems such as conveyors, trucks, loaders, etc., warehouses, buffers and other storage objects occurring in manufacturing companies. Hierarchically, the model of a production line or production system is created by sequential modeling in the TPS software that represents the states occurring on a real production line in a virtual world. The simulation model consists of active and static objects. Active objects include facilities that perform production or logistics operations. In our case, the Source, SingleProc, Buffer, PickandPlace (robot) and Conveyor objects are included among the active objects. The behavior and logical sequences of an operations are created using source codes, which are written in the Method interface. The individual methods are then assigned to the individual devices.

Development of Communication Interface
Data acquisition represents a crucial part of implementing the DT of engine block manufacturing processes. In order to obtain real-time status data of the production line, programmable logic control (PLC) sensors were used for raw data acquisition. Data were gathered from the distributed PLCs (18 collection points) according to the configurable trigger conditions by data logger (Softing Industrial Automation GmbH, echocollect e,Haar, Germany). Verification of the PLC signals was performed by a software system (Autem GmbH, PLC-Analyzer pro 6, Emden, Germany). Subsequently, collected data were transferred into the local Structured Query Language (SQL) database. Two types of network protocols were used: Transmission Control Protocol/Internet Protocol (TCP/IP) as transport protocol and Siemens S7 as application protocol. TPS has an Open Database Connectivity Modeling of production systems in the TPS is realized by implementation of virtual objects, which represent individual production equipment, machines, workers, transport and logistics systems such as conveyors, trucks, loaders, etc., warehouses, buffers and other storage objects occurring in manufacturing companies. Hierarchically, the model of a production line or production system is created by sequential modeling in the TPS software that represents the states occurring on a real production line in a virtual world. The simulation model consists of active and static objects. Active objects include facilities that perform production or logistics operations. In our case, the Source, SingleProc, Buffer, PickandPlace (robot) and Conveyor objects are included among the active objects. The behavior and logical sequences of an operations are created using source codes, which are written in the Method interface. The individual methods are then assigned to the individual devices.

Development of Communication Interface
Data acquisition represents a crucial part of implementing the DT of engine block manufacturing processes. In order to obtain real-time status data of the production line, programmable logic control (PLC) sensors were used for raw data acquisition. Data were gathered from the distributed PLCs (18 collection points) according to the configurable trigger conditions by data logger (Softing Industrial Automation GmbH, echocollect e, Haar, Germany). Verification of the PLC signals was performed by a software system (Autem GmbH, PLC-Analyzer pro 6, Emden, Germany). Subsequently, collected data were transferred into the local Structured Query Language (SQL) database. Two types of network protocols were used: Transmission Control Protocol/Internet Protocol (TCP/IP) as transport protocol and Siemens S7 as application protocol. TPS has an Open Database Connectivity (ODBC) interface that is able to retrieve data of events from the physical layer via the cloud-based database. Data exchange between the SQL database and the TPS software was allowed using the object SQlite. Internal cloud platform was used as a cloud-based information repository. Used real data are collected and then implemented into the production line DT. Collected data from the production line include: the position of the robot, the occupancy of buffers in front of the CNC and inside the CNC, the occurrence of workpieces on conveyors, the handling time of the robot, the machining time of the CNC, and the time from the placement of the workpiece at the input of the conveyor to its exit from the conveyor. Synchronization between the physical and virtual worlds is achieved using PLC controllers, which are analyzed and tested by the external test software. DT mapping diagram between layers is shown in Figure 4.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 5 of 10 (ODBC) interface that is able to retrieve data of events from the physical layer via the cloud-based database. Data exchange between the SQL database and the TPS software was allowed using the object SQlite. Internal cloud platform was used as a cloud-based information repository. Used real data are collected and then implemented into the production line DT. Collected data from the production line include: the position of the robot, the occupancy of buffers in front of the CNC and inside the CNC, the occurrence of workpieces on conveyors, the handling time of the robot, the machining time of the CNC, and the time from the placement of the workpiece at the input of the conveyor to its exit from the conveyor. Synchronization between the physical and virtual worlds is achieved using PLC controllers, which are analyzed and tested by the external test software. DT mapping diagram between layers is shown in Figure 4.

Results
Programmed source codes and methods to create a faithful replica of the physical production line are shown in Figure 5. To verify and validate conformity of the simulation model with the real production line, a test of the correct logical sequence of operations was performed without real production data firstly. The simulation model was compared with a video recording from the real production line to achieve compliance of the virtual twin with the real production line. An agreement between the real and virtual production line can also be observed when comparing real data from the production line with the Gantt chart generated by the DT. TPS software allows CAD (computeraided design) models to be implemented in the production line interface in STEP (Standard for the Exchange of Product Data) or JT (Jupiter Tessellation) file format to enhance visual aspect of the DT. Detailed 3D simulation model of the production line in the TPS software is presented in Figure 6. This model is able to reproduce, in near real-time, all actions of the physical twin using feedback from the embedded sensors.

Results
Programmed source codes and methods to create a faithful replica of the physical production line are shown in Figure 5. To verify and validate conformity of the simulation model with the real production line, a test of the correct logical sequence of operations was performed without real production data firstly. The simulation model was compared with a video recording from the real production line to achieve compliance of the virtual twin with the real production line. An agreement between the real and virtual production line can also be observed when comparing real data from the production line with the Gantt chart generated by the DT. TPS software allows CAD (computeraided design) models to be implemented in the production line interface in STEP (Standard for the Exchange of Product Data) or JT (Jupiter Tessellation) file format to enhance visual aspect of the DT. Detailed 3D simulation model of the production line in the TPS software is presented in Figure 6. This model is able to reproduce, in near real-time, all actions of the physical twin using feedback from the embedded sensors.  Data from the real production line, recorded using the Echocollect device, were implemented into the simulation model. Recorded data contained the following parameters: signal sequence number, signal occurrence time, manipulation time for each operation, robots position/process, data collection point description, connection of each signal to its corresponding device in the simulation model, and the total production time. Remote monitoring of the production line parameters was possible through visualization of: • lead time (time interval from entry of the workpiece into the production process through the input conveyor to the removal of the workpiece from the output conveyor); • cycle times and histograms for the CNC machines; • throughput (the interval of occurrence of a casting at a given point); • Gantt chart of the entire production line.
Remote monitoring through the DT refers to an ability to monitor and observer specific processes and operations within production without a physical presence in the production process. Remote monitoring involves observation of the physical production parameters through a dashboard  Data from the real production line, recorded using the Echocollect device, were implemented into the simulation model. Recorded data contained the following parameters: signal sequence number, signal occurrence time, manipulation time for each operation, robots position/process, data collection point description, connection of each signal to its corresponding device in the simulation model, and the total production time. Remote monitoring of the production line parameters was possible through visualization of: • lead time (time interval from entry of the workpiece into the production process through the input conveyor to the removal of the workpiece from the output conveyor); • cycle times and histograms for the CNC machines; • throughput (the interval of occurrence of a casting at a given point); • Gantt chart of the entire production line.
Remote monitoring through the DT refers to an ability to monitor and observer specific processes and operations within production without a physical presence in the production process. Remote monitoring involves observation of the physical production parameters through a dashboard Data from the real production line, recorded using the Echocollect device, were implemented into the simulation model. Recorded data contained the following parameters: signal sequence number, signal occurrence time, manipulation time for each operation, robots position/process, data collection point description, connection of each signal to its corresponding device in the simulation model, and the total production time. Remote monitoring of the production line parameters was possible through visualization of: • lead time (time interval from entry of the workpiece into the production process through the input conveyor to the removal of the workpiece from the output conveyor); • cycle times and histograms for the CNC machines; • throughput (the interval of occurrence of a casting at a given point); • Gantt chart of the entire production line.
Remote monitoring through the DT refers to an ability to monitor and observer specific processes and operations within production without a physical presence in the production process. Remote monitoring involves observation of the physical production parameters through a dashboard or screen in a virtual world. Within DT, TPS software provides an interface for production line modeling with the ability to monitor physical production line status, while a personal computer represents viewing hardware.
To increase production line productivity, the algorithm for bottlenecks detection was developed and implemented into the DT. The DT uses real-time data from the production line to detect bottlenecks. Implementation and synchronization of the data between the physical and virtual worlds in the DT is in real time, compared to the classical simulation that uses data that are implemented offline and only historical data can be implemented. Bottlenecks within a production line significantly reduce throughput of the system, so quick and correct identification of bottleneck locations can lead to an increase of system throughput. The algorithm for bottlenecks detection and prediction is based on the real-time production data. Bottleneck detection and diagnosis is one of the main roles of the DT. Based on the implemented algorithm to identify bottlenecks of the production line, it was possible to determine the following bottlenecks shown in Table 1. A bottleneck arises when the workload is higher than the workplace can handle in terms of capacity. In general, any system (conveyor, buffer, CNC machine, measuring station, piercing station, or robot) can become a bottleneck. The bottleneck detection algorithm reveals deviations from the standard processing, machining, or handling time.
The DT records data on such occurrence into the table. Based on the analysis of the results obtained from the DT, we were able to identify following conditions that affects optimal operation of the production line the most: Based on the data analysis from the DT, we were able to detect bottlenecks in the production line. The DT provides a new perspective on the production line behavior and its management. The original estimate before the introduction of the DT was that a main bottleneck is caused by the CNC machine itself, but the results from DT show that the greatest impact on the extension of the throughput of the production line are the output conveyors and the measuring station. In addition, output conveyors are influenced by human factors. The worker must remove the casting from the process at the end of the conveyor to make room for the robot to place the next casting. The worker is also in charge of controlling the conveyor. Late start-up of the conveyor prolongs the time of casting on the conveyor, which in turn causes occupancy and the robot must wait to free up space in order to continue performing the required operations.

Discussion
DT implementation is an important vision for today's shop floors, especially for SMEs who want to reach the goals of smart manufacturing by using minimum investments and manpower [11].
A limiting factor for the data collection was discovered during the DT's evaluation. Several data collection point signals in the virtual layer showed latencies in the connection. Latencies caused writing of faulty data properties, which resulted in missing motions in the database. Therefore, each data collection signal time impulse had to be modified to ensure correct data collection. A similar problem with latencies was reported by Redelinghuys et al. [27].
The DT provides the capability to simulate the production line in near-real time. The physical state of the production line can be acquired through the PLC sensors and the status of each part of the production line in form of raw data is stored in the Local SQL database and in the Cloud database. With the use of TPS software, the physical production line was simulated. Information-processing layer established communication through the ODBC interface between the physical and virtual worlds. The throughput diagram, histograms, cycle time chart, lead time diagram and Gantt chart are used for the remote monitoring of the physical state of the production line. A bottleneck detection algorithm was implemented in the DT, which provides a new insight into production line behavior.

Conclusions and Future Work
This paper demonstrated the feasibility of DT implementation in the real condition of a production plant that is specializing in the manufacturing of an aluminum components for the automotive industry. The main contributions of this paper can be summarized as follows: 1.
The simulation model of the engine block machining process was developed and validated.

2.
Real-time interaction between physical and virtual entities of the production line was established.

3.
To increase production line productivity, an algorithm for the bottleneck detection was developed and implemented in the DT.
Despite the fact that the process of the DT implementation is still under development and only partial results were presented in this paper, the DT seems to be a prospective real-time optimization tool for an industrial partner. Several authors were able to create a DT, but mainly laboratory conditions are presented in literature. Sun et al. [28] was able to improve the throughput of a production line with development of the throughput prediction DT model to predict the future throughput with simplicity and high accuracy. Liau et al. [29] created a DT framework for injection-molding processes that helped in the real-time to optimize and monitor processes and predict defects and quality of the final product. Talkhestani et al. [30] created a DT with the ability to detect changes in the production system to reduce the occurrence of an errors in production.
The novelty of our approach is in implementation of the DT in practical scenario, compared to other authors who implemented DT only in laboratory conditions. Furthermore, the DT uses real-time data synchronization between virtual and physical world, compared to the conventional simulation that uses only historical data.
Future work will be focused in two directions. Firstly, to increase production line productivity, optimization of the production line based on the detected bottlenecks from the DT will be undertaken. Secondly, an investigation to identify potential security risks need to be performed in order to develop reliable and effective cyber-security measures against possible forms of cyber-attack.