Application Research of Digital Twin-Driven Ship Intelligent Manufacturing System: Pipe Machining Production Line

: Digital twin has aroused extensive attention of international academia and industry to support future interaction with the physical and virtual world. Although the research and application of digital twin spring up continuously, the concept in the manufacturing domain remains in its infancy. In this context, this paper ﬁrst reviews the applications of digital twins for intelligent manufacturing. Then it presents an innovative application framework of a digital twin-driven ship intelligent manufacturing system and analyzes its operation mechanism. The application framework of a digital twin-driven ship intelligent manufacturing system mainly includes ﬁve parts: the physical layer, model layer, data layer, system layer, and application layer. Finally, key enabling techniques, as well as a case study in a pipe machining production line, are constructed and studied to validate the proposed approach. Meanwhile, system design and implementation, the twin modeling construction, application process, and implementation effect of the pipe machining production line are described in detail to provide a reference for enterprises.


Introduction
Intelligent manufacturing is deep integration between the new-generation information and communication technology and advanced manufacturing technology. The newgeneration information and communication technology mainly include cloud computing [1,2], 5G [3,4], artificial intelligence [5,6], Internet of Things (IoT) [5,7], big data [8,9], et cetera. Intelligent manufacturing is a new mode of production through intelligent sensing, human-computer interaction, self-learning, decision making, and self-adaptation technology, which exists in all aspects of product lifetime, such as design, production, management, and service [10,11]. With the transformation and upgrade of the manufacturing industry, countries have issued advanced manufacturing strategies such as 'Industry 4.0', 'Industrial Internet', and 'Made in China 2025' [12]. The digitalization, networking, intelligence, and the capability of technological innovation in ship construction have been improved. However, compared with the world's advanced ship enterprises, China's shipbuilding industry and marine equipment industry are still in their infancy in terms of intelligent manufacturing. There is a large gap in intelligent manufacturing in China's marine industry compared to intelligent manufacturing standards [13].
Ship piping is described as the vessels of ships, which is responsible for the supply of water, pneumatics, fuel, et cetera. Pipe manufacturing is an essential phase in ship construction. Time consumption of pipe machining and installation in ship construction accounts for 9-18% of the total hours, of which more than half of the working hours are used for assembling and welding various flanges and pipes [14]. Marine pipe machining is typical discrete manufacturing with low-volume, multi-variety production [15]. With the help of intelligent manufacturing and new-generation information technology, intelligent production lines are established to improve the production capacity of pipe machining, to realize responsive production mode. The autonomous control and highly flexible personalized nature of the pipe production process could be achieved at last.
Intelligent manufacturing systems are being readily developed for personalized tasks and applied to physical entity production. The real-time data interaction and convergence between virtual models and physical manufacturing equipment to generate accurate information of manufacturing systems are facing challenges [16]. In this context, the digital twin has aroused extensive attention from international academia and industry to support future interaction with the physical and virtual worlds.
Digital models are digital representations of existing or planned physical objects that do not take any form of automated data exchange between the physical object and the digital object. These models might include simulation models of planned factories, mathematical models of new products, or any other models of a physical object, which do not use any form of automatic data integration. Digital data of existing physical systems might still be in use for the development of such models, but all data exchange is done manually. A change in the state of the physical object has no direct effect on the digital object and vice versa. Digital twins are the data flows fully integrated into both directions between the existing physical object and digital object. In such a combination, the digital object might also act as a controlling instance of the physical object. A change in the state of the physical object leads directly to a change in the state of the digital object and vice versa [17]. Digital twin as the carrier can promote the integration of next-generation information technology and manufacturing. The digital twin will have broad application prospects in equipment health management, and predictive maintenance, as well as the control, operation, and optimization of the intelligent production line and intelligent shop floor [17][18][19]. In shipbuilding workshops, problems such as unreasonable workshop layout, a disconnection between production plan and actual work progress, delayed material distribution, and large inventory problems are likely to occur, which seriously affect the efficiency of ship production and construction. To deal with the problems of information decentralization, lack of production process simulation platform, low visualization, and absence of real-time mapping and interaction between entities and models in the manufacturing process of ship pipe machining workshops, a digital twin system of ship pipe machining production line is constructed. The light-weight dynamic model, layout optimization, and real-time mapping technology of pipe machining production equipment based on digital twin are studied in this paper. The production schedule and current material information of the workshop, real-time warning of abnormal states, and operating parameters of equipment in the digital twin system can be visualized. These can greatly improve process control, efficiency, and the quality of the production line that can accelerate the digital transformation of the shipping industry.
According to the motivation discussed above, the rest of this paper is organized as follows. The basis of the literature review of the digital twin is given in the Section 2. In the Section 3, a novel application framework of a digital twin-driven ship intelligent manufacturing system is proposed and discussed in detail. A case study of pipe machining production lines is constructed and studied to validate the proposed approach. The Section 5 is a conclusion of the paper and future research work.

Research Development of Digital Twin Technology
The development process of the digital twin is driven by the demand of military equipment development need and by the simulation technology impetus function promoting effect. The term "digital twin" was formally proposed in NASA's academic report, which was defined as an integrated multi-physics, multi-scale, probabilistic simulation of a vehicle or system that uses the best available physical models, sensor updates, fleet history, et cetera, to mirror the life of its flying twin [20,21]. With the research and application of digital twin springing up continuously, the concept in the manufacturing domain is still in its infancy.

Definitions
At present, there is no accurate, unified definition and description of the concept and content of digital twin. Therefore, several representative definitions of digital twins are hereby introduced.
Definition 1 (International standardization organization: ISO). The digital twin is fit for the purpose of digital representation of some realized thing or process with a means to enable convergence between the realized instance and the digital instance at an appropriate rate of synchronization, meanwhile, providing an integrated view of the physical entity or process for the lifecycle to optimize overall performance [22].
Definition 2 (Academic representative). Digital twin, as a technology of integrating multi-physics, multi-scale, and multidisciplinary attributes, characterized by real-time synchronization, faithful mapping, and high fidelity, which could realize interaction and integration between physical space and virtual world [23].
Definition 3 (Enterprise representative of General Electric Co. (GE)). Digital twins are software representations of assets and processes that are used to understand, predict, and optimize performance to achieve improved business outcomes. Digital twins consist of three components: a data model, a set of analytics or algorithms, and knowledge [24].

Applications of the Digital Twin for Intelligent Manufacturing
Recently, digital twin technology has attracted widespread attention from scholars. The research of digital twin was first applied in the field of aerospace, which was mainly for fault prediction and health management of aircraft [19]. With the continuous deepening of Industry 4.0, intelligent manufacturing, and other research, application exploration of the digital twin is gradually transferred to the product, manufacturing equipment, manufacturing process, and shop floor [11,23,25]. Application research of digital twin for intelligent manufacturing from a different level is showed in Table 1. Table 1. Application research of the digital twin.

Application-Level References Descriptions
Aircraft [20] Real-time monitoring of aircraft utilizing an ultra-high-fidelity model, the digital twin model was used to evaluate the health status and predicting the life of the aircraft structure.
Product [26][27][28] The digital twin model was used to customize and produce personalized products for achieving rapid product design and improving production efficiency.
Manufacturing equipment/production line [29][30][31][32][33][34][35][36] Digital twin models of different devices were established to realize automatic control parameter visualization and real-time status monitoring, diagnosis, controlling, and optimizing of the running modes of real equipment for interoperability between digital twin models, more accurately planning and optimizing the operation of a real production line by building and simulating the digital twin of the production line.
Manufacturing process/Manufacturing shop [37][38][39] The digital twin model of the product was applied to automatically plan the machining, welding, and assembly process, consequently optimizing the production resources consequently. The virtual workshop twin model was built, which can improve the efficiency of workshop manufacturing equipment and optimize the production process.
Tuegel et al. [20] utilized an ultra-high-fidelity model of individual aircraft by tail number, a digital twin, to integrate computation of structural deflections and temperatures 4 of 20 in response to flight conditions, with resulting local damage and material state evolution. A conceptual model of how the digital twin can be used for predicting the life of the aircraft structure and assuring its structural integrity was presented.
Zhang et al. [32] proposed a digital twin-based application framework to provide engineering analysis capabilities and to support the decision-making over the rapid individualized designing and solution evaluation of the hollow glass production line. The digital twin merged physics-based system modeling and distributed real-time process data to generate an authoritative digital design of the system to the preproduction phase. The cyber-physical system (CPS) architecture of the intelligent manufacturing shop floor was proposed, and it verified the feasibility of the architecture on a small-scale flexible automated production line. The proposed architecture could provide solutions from three key aspects to the configuration and operation of CPS: interconnection and interoperability among different devices, multi-source and heterogeneous data acquisition, integration, and intelligent decision-making based on knowledge acquisition and learning methodology [33,34]. Karanjkar et al. [35] presented an IoT framework in a surface-mounted technology-printed circuit board assembly line using digital twin technology. It showed a buffering-based solution for improving the energy efficiency and evaluated its impact using the simulation of the digital twin. The drawbacks of this framework are that the sensor data are collected at a high sampling rate, but the machine state estimation is performed remotely on the raw data sent over a network. To solve the problem of low efficiency and poor model quality of the production line modeling method, the concept of the digital twin production line was proposed, and the real-time modeling and simulation method of the digital twin production line was researched. The effectiveness of the proposed method was verified by investigating an assembly line [36]. However, intelligent control of the digital twin production line through the digital twin model should be further studied to completely solve the real-time visualization and intelligent control of the production line.
Tao et al. [37] proposed the concept of digital twin shop-floor for the interaction and fusion of physical and virtual spaces, and summarized its composition of physical shop-floor, virtual shop-floor, shop-floor service system, shop-floor digital twin data, and proposed the operational mode, and key technologies. Leng et al. [38] presented a digital twin-driven manufacturing cyber-physical system for parallel controlling of the smart workshop, and addressed a bi-level online intelligence in proactive decision making for the organization and operation of manufacturing resources. Zhang et al. [39] presented a digital twin-driven cyber-physical production system (CPPS) towards smart shop-floor, and addressed the opportunities to use a digital twin of the CPPS to support job scheduling during normal operation. However, the above-mentioned researches are in their initial stages; further studies of smart interconnection and interaction in physical shop-floors, the connection between physical and virtual spaces, high-fidelity models for virtual shopfloors, service management, and precious service-demand matching, applications of digital twin shop-floors in smart manufacturing need to be executed.

Application Framework of Digital Twin-Driven Ship Intelligent Manufacturing System
According to the general architecture model and the definition of digital twin [37,38,40], an innovative application framework of digital twin-driven ship intelligent manufacturing system is presented as shown in Figure 1. The application framework mainly consists of the following contents: the physical layer, model layer, data layer, system layer, and application layer. The virtual-physical real-time mapping, the light-weight dynamic modeling, and the whole iterative optimization process of shipbuilding production lines are realized by digital twin technology. The bidirectional mapping and interoperability of the physical layer and twin model layer are realized through data-driven processes and interaction. The real-time connection between two layers is realized through the perception control layer, that interactive transmission of data and information is continuously carried out. Simulation, monitoring, and control of the formation process and behavior of ship products in the real environment is performed through a virtual digital system control as a physical entity. Therefore, the closed-loop digital management of the lifecycle and the collaboration of the whole value chain of the ship products manufacture process will be realized. eling, and the whole iterative optimization process of shipbuilding production lines are realized by digital twin technology. The bidirectional mapping and interoperability of the physical layer and twin model layer are realized through data-driven processes and interaction. The real-time connection between two layers is realized through the perception control layer, that interactive transmission of data and information is continuously carried out. Simulation, monitoring, and control of the formation process and behavior of ship products in the real environment is performed through a virtual digital system control as a physical entity. Therefore, the closed-loop digital management of the lifecycle and the collaboration of the whole value chain of the ship products manufacture process will be realized.

Physical Layer
The physical layer is a diverse, dynamic, and complex production environment, which consists of the manufacturing resource layer and perceptual control layer. The manufacturing resources layer mainly contains intelligent automation equipment and ship products, which comply with the requirements of the digital twin system. By its function or category, it can be divided into ship products (raw materials, articles being processed, finished parts, etc.), automatic machining unit (machine tool, cutting tool, testing equipment, etc.), automatic stereoscopic warehouse, logistics equipment (automatic guided vehicle, conveyor line, etc.), and robot work cell (welding robot, assembly robot, grinding robot, etc.). Discrete manufacturing equipment of the ship is isolated and distributed in various physical activities. They need to integrate with IoT technology to acquire production data in real-time. Therefore, real-time perception and interconnection of manufacturing resources can be implemented by the network module and perception module in the perceptual control layer.
A complete physical information perception system should be established in the ship's workshop to collect and transmit multi-source heterogeneous data, such as equipment status, process, fault, et cetera. The perception system mainly includes a programmable logic controller (PLC), radio frequency identification (RFID), human-machine interface (HMI), sensor, visual inspection machine, industrial personal computer (IPC), et cetera, as shown in the perceptual control layer of Figure 1. The function of status, location, and manufacturing quality perception will be realized through the bar code, RFID, IPC, PLC, and sensors. They are used for data acquisition, interactive and executive control between the physical and the digital space. The perceived physical objects of the ship manufacturing process contain equipment information, logistics information, warehousing information, and material information.
The perceptual and control system receives the decision information from the system layer, which realizes the total factor interconnection between the physical entity and the digital twin model under instruction control and interaction. The perceptual control layer connects the physical and the twin model layers in the ship products manufacturing process. Thus, the iterative optimization and real-time control of ship products manufacturing processes are further realized by transmission of this layer.

Model Layer
The model layer mainly includes a ship product digital twin model, manufacturing equipment digital twin model, warehouse logistics equipment digital twin model, process digital twin model, et cetera. The information model of the ship production line is a complete mapping of the physical production line in twin space, which mainly involves the construction of the geometric model, such as the equipment layout model, process equipment model, and auxiliary equipment model. The appearance, size, and location information of the above-mentioned twin model should be identical to the physical production line. The production line information model based on a digital twin system should be evaluated and validated to ensure the correctness and effectiveness of the model. Finally, digital twin-driven intelligent manufacturing platform of ship shop floor can be realized with the informatization of management, the digitization of manufacturing, and the intellectualization of decision-making. The intelligent level of manufacturing management for ship products should be greatly improved. Three-dimensional lightweight models with the attributes of interaction, computing, and control, are adopted to achieve it in the browser display. The manufacturing activities in the physical layer can be simulated and analyzed effectively in the twin model layer. The model layer provides control instructions for the physical layer and optimization strategies for the system layer through the process database and optimization algorithm database of the data layer. Figure 2 shows the expansion of the twin model layer, data layer, and digital twin system application in Figure 1. The digital twin model is achieved through digital tools to establish integrating multi-physics, a multi-scale, hyper-realistic, and dynamic probability simulation model in the virtual space. The digital tools might include a function model, virtual service, and virtual-real communication interface. The function model mainly includes the 3D model of equipment, the position information, the equipment behavior, and the product geometry model. Virtual service mainly includes motion control, signal processing, and state evolution service. Virtual-real communication interface mainly includes end-effector data interface, equipment action signal interface, warehouse information interface, start and stop signal interface, equipment status data interface, and sensor signal interface.
virtual-real communication interface. The function model mainly includes the 3D model of equipment, the position information, the equipment behavior, and the product geometry model. Virtual service mainly includes motion control, signal processing, and state evolution service. Virtual-real communication interface mainly includes end-effector data interface, equipment action signal interface, warehouse information interface, start and stop signal interface, equipment status data interface, and sensor signal interface.

Data Layer
The data layer is the data management platform for ship products manufacturing, mainly including edge computing, data storage, and data mapping. The edge computing module mainly includes data cleaning, data encoding, data analysis, data mining, data fusion, data format standardization, et cetera. Data storage in the data layer mainly includes two parts, production data from the physical layer and digital twin data from the twin model layer. Data mapping mainly includes data-driven processes, time series analysis, data correlation, and data real-time synchronization. The physical layer data and model layer data are stored in the data layer. The data acquisition module can implement real-time data acquisition and storage for relevant factors of ship manufacture and operation process. In the process of ship product manufacturing, multivariate and heterogeneous data mainly involve data from the physical layer and the model layer. Data from the physical layer mainly include process data, equipment data, material data, logistics information, workshop environment data, et cetera. The data from the model layer mainly include digital twin model data, simulation data, optimization data, and decision data. According to the collected multivariate and heterogeneous data of the workshop, data

Data Layer
The data layer is the data management platform for ship products manufacturing, mainly including edge computing, data storage, and data mapping. The edge computing module mainly includes data cleaning, data encoding, data analysis, data mining, data fusion, data format standardization, et cetera. Data storage in the data layer mainly includes two parts, production data from the physical layer and digital twin data from the twin model layer. Data mapping mainly includes data-driven processes, time series analysis, data correlation, and data real-time synchronization. The physical layer data and model layer data are stored in the data layer. The data acquisition module can implement realtime data acquisition and storage for relevant factors of ship manufacture and operation process. In the process of ship product manufacturing, multivariate and heterogeneous data mainly involve data from the physical layer and the model layer. Data from the physical layer mainly include process data, equipment data, material data, logistics information, workshop environment data, et cetera. The data from the model layer mainly include digital twin model data, simulation data, optimization data, and decision data. According to the collected multivariate and heterogeneous data of the workshop, data cleaning is carried out to remove the redundant data and obtain time-series and structured data. Furthermore, the structured data are encrypted and transmitted to the cloud to realize distributed storage.
The data layer can provide the integration and interconnection of the physical layer and the model layer. Therefore, the entity data are mapped to the digital twin model in real-time. When specific parameters are received from the model layer, the digital twin system directly displays the data and records the data in the digital twin database for further algorithm optimization. The geometric model of each piece of equipment is updated in a 3D scene to realize the action and behavior synchronous mapping between the digital twin model and physical equipment. Besides, the workshop digital model library is established in the cloud platform to facilitate the call of the digital twin system. The workshop data network is built for the production line status analysis and the realtime mapping between the physical layer and digital twin system. The lifecycle process of the ship production line is simulated, verified, and controlled by using the real-time data, historical data, and algorithm model. The algorithm is optimized through real-time production data collected by IoT technology. Based on data acquisition, edge computing, and data mapping, multi-level data fusion between the physical layer and digital twin model is possible. Data mapping supports the synchronous mapping of physical layer data, digital twin model data, and system layer data.

System Layer
The system layer is composed of an intelligent manufacturing system platform and a digital twin system. The intelligent manufacturing system platform is the integration of management systems, one of which is the upper production plan and product data information for manufacturing, such as product lifecycle management (PLM) and enterprise resource planning (ERP). The PLM system mainly includes a simulation manager, product design, process design, bill of material (BOM) management, et cetera, for providing product model-based definition (MBD) and process data information. The ERP system mainly includes the master production schedule, material requirements planning (MRP), order management, inventory management, et cetera. The other part is the manufacturing operation management (MOM) system and field control system, to realize the workshop management, visual management, equipment management, quality management, et cetera. The digital twin system includes a system-level model, geometric model, production model, facility layout simulation, quality monitoring of ship products, process simulation, scheduling simulation, alarm management, information display, and decision analysis. The digital twin model is realized through digital tools to establish integrating multi-physics, a multi-scale, hyper-realistic, and dynamic probability simulation model in the virtual space. The digital tools might include a function model, virtual service, and virtual-real communication interface. Perceived physical entity data will be real-time mapped to the above-mentioned models, meanwhile, the functional analysis and simulation optimization of the products are conducted in manufacturing operating conditions. The system layer controls the operation of the physical layer and the model layer through data, models, algorithms, and knowledge of product and manufacturing information in the data layer.

Application Layer
The digital twin application layer mainly contains the production line layout design and optimization based on a light-weight 3D model of products and equipment, 3D visualization virtual production line, design and optimization of process technology for ship production line, simulation and optimization of production scheduling and logistics scheduling based on virtual ship workshop, augmented reality (AR) task instruction, virtual reality (VR) workshop roaming, et cetera. The digital twin system collects real-time material consumption data, quality data, equipment data, and related process data in the ship product's production process, and continuously improves the internal simulation analysis model. The digital twin model of the production line based on the digital twin system should be evaluated and validated to ensure the correctness and effectiveness of the model.
After the digital twin system runs, it calls for the state matching module to carry out virtual-real state matching according to the real-time data. The data acquisition module collects data from outside the system and manages it through the digital twin database. The data visualization module sends the request to the digital twin system and searches the data through the data list provided by the digital twin database. The motion driver module calls the corresponding motion driver algorithm according to the updated data.

Background
Pipe manufacturing is an important phase in ship construction. Time consumption of pipe machining and installation in ship construction accounts for 9-18% of the total construction hours, of which more than half of the working hours are used for assembling and welding various flanges and pipes [14]. The manufacturing process of ship piping involves all kinds of real-time data of structured and heterogeneous types. Many drawings, schedules, purchase orders, bills of materials, assignment orders, and other text information are involved in parts processing and assembly in the manufacturing process. As a typical representative of ship shop floor manufacture, the ship pipe machining production line is taken as a case study to verify the validity of the proposed digital twin-driven ship intelligent manufacturing system application framework.
In ship manufacturing workshops, problems such as unreasonable workshop layout, a disconnection between production plan and actual work progress, delayed material distribution, and large inventory problems are likely to occur, which seriously affect the efficiency of ship production and construction. To resolve the problems of information decentralization, lack of production process simulation platform, low visualization, and absence of real-time mapping and interaction between entities and models in the manufacturing process of ship pipe machining workshops, a digital twin system of ship pipe machining production line using the digital twin technology is constructed.
According to the flow and functional characteristics of the ship pipe production line, the light-weight dynamic model, layout optimization, and real-time mapping technology of pipe machining production equipment based on digital twin are studied in this paper. The digital twin model of the pipe machining production line is a complete mapping of the physical production line in twin space. It is mainly focused on geometric model construction of the production equipment model and auxiliary equipment model. The appearance, size, and location information of the above-mentioned twin model should be identical to the physical production line. Therefore, it can consistently achieve real-time interaction between the physical production line and the digital twin model of the pipe machining production line. The production schedule and current material information of the workshop, real-time warning for the abnormal state, and operating parameters of equipment in the digital twin system can be visualized. Finally, it can greatly improve the ship pipe manufacturing quality and machining efficiency to accelerate the digital transformation of the shipping industry.

System Design and Implementation
The digital twin system of pipe machining production line adopts browser/server architecture. Additionally, it adopts Unity3D to provide a rendering engine, physical engine, and visual script engine as the underlying technical support platform. Product and equipment information models are modeled using computer-aided design (CAD) software. For the regular model with a simple structure, the stp format of the CAD model is lightweight and makes direct use of the Unity3D engine. For irregular models with complex structures, they need to be rendered in 3ds MAX software and then imported into the Unity3D engine. Unity3D is used to build the virtual scene. JavaScript and C# are used to complete the script design. This process involves a series of virtual simulation technologies such as modeling, rendering, light source, rigid body, user interface, collision detection, perspective control, physical system, event management, et cetera. On this basis, the level of detail (LOD) algorithm is used to compress the number of tops and triangular surfaces of the model, and the display effect of the virtual scene is optimized. The gravity, skybox, resistance, friction, velocity, and acceleration for the external imported 3D model in the PhysX physics engine can be set, which can effectively achieve dynamics simulation based on physical laws. Therefore, the PhysX physical engine is used to simulate the kinematic pairs of device actuators. The digital twin system uses a MySQL database to store most SQL data, while Mon-goDB database is used to store some non-SQL data. ActiveX data objects (ADO) access technology used to establish communication between the database of the ship production line and the digital twin system; making sure the digital twin system acquires the JavaScript object notation (JSON) format data stream through the polling mode of the data transmission module. The digital twin system acquires real-time data of pipe machining production equipment and sensors at a frequency of 30 Hz, and then the packet is parsed.
Because the digital twin system client cannot connect directly to the database, the prepackaged dynamic link library (DLL) is placed in a digital twin system subdirectory. The script functions are referenced in the digital twin system script application programming interface (API) and then the connections implemented in a programmatically driven manner. Figure 3 shows the link of a sample digital twin system data structure. ogies such as modeling, rendering, light source, rigid body, user interface, collision detection, perspective control, physical system, event management, et cetera. On this basis, the level of detail (LOD) algorithm is used to compress the number of tops and triangular surfaces of the model, and the display effect of the virtual scene is optimized. The gravity, skybox, resistance, friction, velocity, and acceleration for the external imported 3D model in the PhysX physics engine can be set, which can effectively achieve dynamics simulation based on physical laws. Therefore, the PhysX physical engine is used to simulate the kinematic pairs of device actuators. The digital twin system uses a MySQL database to store most SQL data, while Mon-goDB database is used to store some non-SQL data. ActiveX data objects (ADO) access technology used to establish communication between the database of the ship production line and the digital twin system; making sure the digital twin system acquires the JavaScript object notation (JSON) format data stream through the polling mode of the data transmission module. The digital twin system acquires real-time data of pipe machining production equipment and sensors at a frequency of 30 Hz, and then the packet is parsed.
Because the digital twin system client cannot connect directly to the database, the prepackaged dynamic link library (DLL) is placed in a digital twin system subdirectory. The script functions are referenced in the digital twin system script application programming interface (API) and then the connections implemented in a programmatically driven manner. Figure 3 shows the link of a sample digital twin system data structure.

Modeling Construction of the Pipe Machining Production Line
Unity3D, as the virtual development engine, is used for rendering and interactive active modeling of the virtual pipe machining production line. In this study, the virtual 3D models of the stereoscopic warehouse, conveyor belts, cutting machine, computer numerical control (CNC) machining equipment, labeling machine, assembly robot, and welding robot in the pipe machining production line are constructed, respectively. The stereoscopic warehouse is used for the storage of raw materials and finished parts. Conveyor belts are used for the logistics transportation of the pipe and flange. The cutting equipment is used to cut the two ends of the pipe. CNC machining equipment is used for flange surface and hole processing. Grinding equipment is used for grinding pipe fittings and flange ends. A labeling machine is used for attaching the bar code to the pipe surface.

Modeling Construction of the Pipe Machining Production Line
Unity3D, as the virtual development engine, is used for rendering and interactive active modeling of the virtual pipe machining production line. In this study, the virtual 3D models of the stereoscopic warehouse, conveyor belts, cutting machine, computer numerical control (CNC) machining equipment, labeling machine, assembly robot, and welding robot in the pipe machining production line are constructed, respectively. The stereoscopic warehouse is used for the storage of raw materials and finished parts. Conveyor belts are used for the logistics transportation of the pipe and flange. The cutting equipment is used to cut the two ends of the pipe. CNC machining equipment is used for flange surface and hole processing. Grinding equipment is used for grinding pipe fittings and flange ends. A labeling machine is used for attaching the bar code to the pipe surface. The assembly robot and welding robot complete the assembly and welding of pipe and flange.
The digital twin model of the pipe machining production line includes the 3D geometric model, physical model, and kinematic model. The geometric model uses light-weight triangular mesh data to describe the shape and size of equipment and products. Revit secondary development technology and web graphics library (WebGL) technology will be used to realize the geometric transformation of the models and light-weight display of the models in the browser. The LOD rendering optimization algorithm is designed for the high-capacity Revit model. The physical model defines the mechanics and thermodynamic state of the equipment in parametric data. The physical model process uses the PhysX physical engine by Nvidia. Rigid body physical models or hinge physical models can be added to the models through visual and parameterized components. The kinematics model defines kinematic pairs of equipment for describing the connection between the components of the equipment. The Unity3D engine is used to realize the virtual and real mapping of the pipe machining production line. It includes action and behavior mapping, function mapping, 3D roaming, data display, abnormal warning, and other basic functions. Action and behavior mapping refer to the synchronous movement of virtual equipment and real equipment. Figure 4 shows the proposed digital twin model, mapping diagram, and information flow, including pipe machining production equipment in the physical layer, virtual pipe machining production equipment in the digital twin model layer, digital twin database, and digital twin system application platform. The scope of production line information modeling includes device, instrument, information points of the production system and production auxiliary system, et cetera. The geometric model of these modeling objects should be consistent with the physical production line for the exact appearance, size, and location. Each modeling object needs to be assigned a unique code. Each modeling object needs to define its logistics input and output equipment, information flow input and output, information points, power supply equipment, and relating to each other through the unique code of the equipment.  The production line of the workshop has the functions of processing, transportation, and storage of products and materials. Firstly, it should ensure that the three-dimensional behavior is consistent with the entity. Meanwhile, to obtain the entity data in real-time, the twin model needs to establish the virtual and real communication control interface. To achieve its behavior, the associated virtual services need to be defined. Therefore, the digital twin model of the production line is defined as follows: The production line of the workshop has the functions of processing, transportation, and storage of products and materials. Firstly, it should ensure that the three-dimensional behavior is consistent with the entity. Meanwhile, to obtain the entity data in real-time, the twin model needs to establish the virtual and real communication control interface. To achieve its behavior, the associated virtual services need to be defined. Therefore, the digital twin model of the production line is defined as follows: where: (1) FunctionM is the functional model. It builds the twin model of the corresponding function according to the physical equipment in the digital space and ensures the consistency between the twin model and a physical entity in the geometric dimension, a physical structure, kinetic characteristic, and other aspects. The functional model includes the three-dimensional model of the device, the position information of the digital space, and the behavior of the device.
(2) VRInter f ace represents the virtual and real communication interface. To realize the data interaction and real-time data-driven process between the twin models, it should establish the communication interface according to the data-driven operation process. Therefore, the digital space should have a flexible communication mechanism, and utilize the interfaces of programmable logic controller (PLC), radio frequency identification (RFID), and hypertext transfer protocol (HTTP) in real-time communication with the entity. VRInter f ace includes the joint data interface, end-effector data interface, and state data interface.
(3) VService is virtual services. It needs the support of various virtual services for the organic connection and operation of the functional model, including the realization of equipment functions, signal processing, the guidance of model behavior, constraints of operation rules, et cetera. The virtual service updates the device's movement and state by using motion control and signal processing services with the acquired physical space data.
In this study, the functional model is constructed according to the three-dimensional accurate model of equipment for pipe machining lines in the shipping industry. The device model of digital twin space is guaranteed to be consistent with the physical space in terms of geometry, physical structure, and motion characteristics. The virtual and real communication interface is the unified information interface model of equipment. It is the fundamental to realize the dimension of key parts, process parameters, processing time, processing orders, and to meet the requirements of virtual combination simulation of production equipment. The equipment layout optimization of pipe machining production line based on the particle swarm model is constructed. The workflow of the simulation process based on particle swarm optimization is shown in Figure 5.
The mathematical model of equipment layout optimization for the pipe machining production line is constructed as showed in Formula (2).
where C t is the total material transport cost and E is the penalty.
where M ij represents the unit transport cost matrix, N ij represents the processing order matrix, and L ij represents the transport distance matrix. The transport distance matrix can be expressed by the following formula (4): (Xout i , Yout i ) represents the absolute coordinate of the outlet of equipment i, and (Xin j , Yin j ) represents the absolute coordinate of the inlet of equipment j.
The penalty term E is equal to the vacant lot penalty plus the intervention penalty. The vacant lot penalty is the vacant lot area Se multiplied by the vacant lot penalty factor Ce.
The interference penalty is the interference area Si multiplied by the interference penalty factor Ci.
where Ci is an empirical function. The calculation formula of vacant land area Se is as follows: where Sc is the minimum bounding rectangle area of the equipment, Sd is the total area occupied by the equipment, and Si is the interference area. The calculation formula of the vacant lot penalty factor Ce is as follows: J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 13 of 20 (RFID), and hypertext transfer protocol (HTTP) in real-time communication with the entity. includes the joint data interface, end-effector data interface, and state data interface.
(3) is virtual services. It needs the support of various virtual services for the organic connection and operation of the functional model, including the realization of equipment functions, signal processing, the guidance of model behavior, constraints of operation rules, et cetera. The virtual service updates the device's movement and state by using motion control and signal processing services with the acquired physical space data.
In this study, the functional model is constructed according to the three-dimensional accurate model of equipment for pipe machining lines in the shipping industry. The device model of digital twin space is guaranteed to be consistent with the physical space in terms of geometry, physical structure, and motion characteristics. The virtual and real communication interface is the unified information interface model of equipment. It is the fundamental to realize the dimension of key parts, process parameters, processing time, processing orders, and to meet the requirements of virtual combination simulation of production equipment. The equipment layout optimization of pipe machining production line based on the particle swarm model is constructed. The workflow of the simulation process based on particle swarm optimization is shown in Figure 5. The mathematical model of equipment layout optimization for the pipe machining production line is constructed as showed in Formula (2).

Information Perception, Data Acquisition, and Real-Time Mapping
The IoT is the carrier of the ship digital twin, which is the underlying logic of the IoT. The digital twin system collects information from analog and digital measuring units through IoT technology, which is used for timely processing of real-time alarm events, analysis of productive efficiency, and energy consumption. The digital twin system needs to acquire relevant business data from the ERP for off-line simulation of equipment and function display of visual report. Meanwhile, it is integrated with the MOM and production line control system through the Web service data interface. The real-time manufacturing data of pipe machining equipment are structured for further optimizing of the performance of the production line.
The equipment data are described in object linking and embedding (OLE) for process control (OPC) in protocol specification on an OPC unified architecture (OPCUA) server which provides data services. Digital twin systems can acquire the start and end signals of each processing unit from an intelligent production line control system. It can also acquire the task of processing information such as batch information, pipe diameter, thickness, and flange information, to realize real-time display and on-line process simulation of the twin system in the visualization module. The digital twin system can obtain the implementation status of each piece of equipment in the pipe production line from the field control and acquisition system, including operation, suspension, stop, alarm, and so on, to realize real-time visual display of equipment information in the twin system. Digital twin systems can obtain real-time storage information of stereoscopic warehouses and relevant realtime inbound and outbound information from the warehouse management system. Data collection of the key equipment acquisition client is as follows: (1) action and position information of assembling welding robots; (2) position and status information of cutting machine, machining tools, and labeling machine; (3) parameters of each welding machine such as welding current, speed, and gas type in pipe production line; (4) the starting and ending state of action units, and the position of transport platform for the stereoscopic warehouse; and (5) logistics information of each logistics unit. Processing equipment driver data, data sources, and virtual services of pipe machining production line are shown in Table 2. procedures.

Stereoscopic warehouse system
An example of a data acquisition background program of a digital twin system is shown in Figure 6.

7
Cutting machine material, cutting parameters gram, automatic cut off control pro-gram ting unit 8 Stereoscopic warehouse Warehouse distribution order Inbound management, inventory management, and outbound management control procedures.
Stereoscopic warehouse system An example of a data acquisition background program of a digital twin system is shown in Figure 6. After the objects and the methods of data acquisition are ascertained, the workflow of real-time data for mapping is determined. The raw data collected from the pipe production line are processed by edge processing, which mainly includes data cleaning, data mining, data encoding, data fusion, and data format standardization. Labeled data formed are compressed storage and uploaded to the cloud platform. The data mapping relationship between the moving mechanism unit of the virtual production line and the real equipment is established. The system kernel constantly refreshes the data mapping area by polling to ensure that the virtual workshop receives real-time data of the production line equipment and sensors at a frequency of no less than 30 Hz. In the real-time mapping process, the data, algorithm, model, and knowledge are accessed and called through the corresponding database, and the mapping results are finally sent to the interface database. When the virtual scene is updated, the monitoring data are extracted from the data buffer and sent to the corresponding equipment.

Results and Discussion
The construction of the intelligent production line based on the digital twin in the ship pipe manufacturing realizes the intelligent processing and control for the whole production process of storage and logistics, cutting, machining, labeling, assembling, welding, et cetera. The system can show more than 50 types of key models of typical manufacturing equipment, logistics equipment, and product repository for the production line in real-time. With the help of many reference models, the designer can quickly complete the production line layout design, equipment configuration, and the virtual machining of the model. The equipment layout result of pipe machining production line based on particle swarm optimization algorithm is shown in Figure 7. duction process of storage and logistics, cutting, machining, labeling, assembling, welding, et cetera. The system can show more than 50 types of key models of typical manufacturing equipment, logistics equipment, and product repository for the production line in real-time. With the help of many reference models, the designer can quickly complete the production line layout design, equipment configuration, and the virtual machining of the model. The equipment layout result of pipe machining production line based on particle swarm optimization algorithm is shown in Figure 7. The synchronous operation of the intelligent manufacturing system is driven by the correlation and integration of physical equipment and the twin model of the pipe machining production line. Real-time synchronous mapping and remote monitoring of the pipe machining production line are realized. A reasonable explanation for this is that after the digital twin system runs, it calls for the state matching module to carry out virtual realstate matching according to the real-time data. The data acquisition module collects data from outside the system and manages it through the digital twin database. The data visualization module sends the request to the digital twin system and searches the data through the data list provided by the digital twin database. The motion driver module calls the corresponding motion driver algorithm according to the updated data. When The synchronous operation of the intelligent manufacturing system is driven by the correlation and integration of physical equipment and the twin model of the pipe machining production line. Real-time synchronous mapping and remote monitoring of the pipe machining production line are realized. A reasonable explanation for this is that after the digital twin system runs, it calls for the state matching module to carry out virtual real-state matching according to the real-time data. The data acquisition module collects data from outside the system and manages it through the digital twin database. The data visualization module sends the request to the digital twin system and searches the data through the data list provided by the digital twin database. The motion driver module calls the corresponding motion driver algorithm according to the updated data. When specific parameters are received from the physical model, the digital twin system directly displays the data and records the data in the digital twin database for further algorithm optimization. When specific parameters are received from the kinematic model, the digital twin system sends the data to the corresponding equipment and updates all components' positions in the equipment by kinematic pairs. Finally, the geometric model of each piece of equipment is updated in a 3D scene to realize the action and synchronous mapping behavior between the digital twin model and physical equipment.
Based on the ship pipe machining process flow and the actual scene, the virtual production line and the physical production line are accurately matched in coordinates and azimuth by selecting the environmental reference point of the workshop, the reference point of the specific production unit, and the reference point of executing component stroke. Virtual service is a hierarchical model division based on the mechanical structure of ship pipe machining production equipment. By the actual equipment movement specifications and the main follow-up relationship, a virtual production line motion control script and driver interface will be formed.
The production schedule and current material information of the workshop, real-time status warning for the abnormal state, and operating parameters of equipment in the digital twin system can be visualized. The digital twin-driven ship intelligent manufacturing system can simulate a production order and accurately predict the order delivery time through calculating the production load and collecting production cycle time. The digital twin is equivalent to adding a virtual manufacturing execution simulation system between the ERP system and the MOM system. The virtual manufacturing execution system carries out virtual manufacturing before the real production. Additionally, the results of virtual manufacturing execution (virtual product and simulation analysis results) are returned to the ERP system. Meanwhile, it transmits production plan information from the ERP system, process information from the PLM system, and executive strategy to the MOM system.
The MOM system receives production plan and process information from the digital twin system to be transmitted to the manufacturing resource layer by the field control system.
All the digital twin models of pipe machining production equipment can be updated and optimized in real-time according to the manufacturing requirements. Interactions between digital twin models can be available via a digital thread. The synchronous realtime mapping between the physical production line and the digital twin model is realized. The proposed digital twin model strengthens the ability to digitally simulate how the ship pipe machining production line will perform in the real world. These can greatly improve process control, efficiency, and the quality of the production line that can accelerate the digital transformation of the shipping industry.

Implementation Effect
The digital twin technology of the production line is used to verify and simulate the whole process of pipe manufacturing. All machine collaborations are performed in accordance with the original design actions. By replicating the physical production line in digital space, the process of pipe machining can be simulated in advance. The digital twin system is browser/server architecture with a system response time of no more than 500 milliseconds. Equipment status parameters and acquisition time of order information data are no more than 500 milliseconds. Getting real-time image refresh frequency of production line equipment and sensors is about 30 frames per second. Figure 8 shows the operation interface of the digital twin system in the pipe machining production line. The highlighted yellow area in Figure 8 corresponds to the actual position of the pipe in the physical production line and the digital twin production line. The synchronous real-time mapping between the physical production line and the digital twin model is realized.

Conclusions
Digital twin as the carrier can promote the integration of next-generation information technology and manufacturing. It has aroused extensive attention of international academia and industry to support future interaction with the physical and virtual world. This paper first presents an innovative application framework of a digital twin-driven ship intelligent manufacturing system and analyzes its operation mechanism. The application framework of a digital twin-driven ship intelligent manufacturing system mainly consists of five parts: the physical layer, model layer, data layer, system layer, and application layer.
Finally, the ship pipe machining production line is taken as a case study to verify the validity of the proposed digital twin-driven ship intelligent manufacturing system application framework and closed-loop digital twin application mode to production practice. The light-weight, high-fidelity, and dynamic models of pipe machining production equipment based on digital twin are constructed. The layout optimization and real-time mapping technology of pipe machining production equipment based on digital twin are stud-

Conclusions
Digital twin as the carrier can promote the integration of next-generation information technology and manufacturing. It has aroused extensive attention of international academia and industry to support future interaction with the physical and virtual world. This paper first presents an innovative application framework of a digital twin-driven ship intelligent manufacturing system and analyzes its operation mechanism. The application framework of a digital twin-driven ship intelligent manufacturing system mainly consists of five parts: the physical layer, model layer, data layer, system layer, and application layer.
Finally, the ship pipe machining production line is taken as a case study to verify the validity of the proposed digital twin-driven ship intelligent manufacturing system application framework and closed-loop digital twin application mode to production practice. The light-weight, high-fidelity, and dynamic models of pipe machining production equipment based on digital twin are constructed. The layout optimization and real-time mapping technology of pipe machining production equipment based on digital twin are studied in this paper. The production schedule and current material information of the workshop, real-time warning for the abnormal state, and operating parameters of equipment in the digital twin system can be visualized. The synchronous real-time mapping between the physical production line and the digital twin model is realized. The proposed digital twin model strengthens the ability to digitally simulate how the ship pipe machining production line will perform in the real world. These can greatly improve process control, efficiency, and the quality of the production line that can accelerate the digital transformation of the shipping industry.
However, there are many challenges to implementing digital twin-driven ship intelligent manufacturing systems. In the actual production process, the digital twin system can only collect the data of the physical equipment and store it in database. It cannot control the physical production equipment to realize the real-time process optimization through the real-time optimization model because of its reliability being questioned.
Further work will be conducted in extending the application of the digital twin model in complex product assembly and manufacturing, optimizing the existing digital twin model by more intelligent algorithms, improving the ability of the virtual system to control the entity by incorporating big data analytics and cloud computing into digital twin model.