Digital twin based reference architecture for petrochemical monitoring and fault diagnosis w

. The whole process of the petrochemical industry involves ﬂ ammable and explosive dangerous goods. The timely discovery of abnormalities or failures in the petrochemical process is crucial to ensure production safety. This paper sets up the approach to build the Digital Twin System (DTs) of a petrochemical process. Speci ﬁ cally, we decompose the petrochemical process into ﬁ ve levels one by one and build a digital twin plug-in for each component of the component layers, and then inversely decouple the process to assemble the DTs layer by layer. As a speci ﬁ c experimental example, the characteristic DTs is proposed to build modules of temperature ﬁ eld and pressure ﬁ eld and ﬂ ow ﬁ eld, these DT modules are driven by practical industrial sampling data from cracking furnace, and three characteristic DTS modules stated above are integrated to form DTS. Based on the digital twin technology and DTs, we propose the logical structure of chemical process status monitoring and fault diagnosis in detail, which improves the safety and controllability of the petrochemical process.


Introduction
The petrochemical industries use petroleum and natural gas as raw materials to produce petroleum products (such as gasoline, kerosene, diesel, and other fuel oils and lubricants, as well as liquefied petroleum gas, petroleum coke, paraffin, asphalt, etc.) and petrochemical products (including ethylene, acrylic, butadiene, benzene, toluene, xylene and other 200 kinds of chemical raw materials, as well as plastics, synthetic fibers, synthetic rubber and other synthetic materials). The petrochemical production is a typical high-risk area. The entire production process involves the processing and production of dangerous goods, which are flammable, explosive, highly corrosive, and highly polluting. Any abnormality or accident in any part of the entire chemical production process may result in serious consequences and disasters. For example, a flash burn occurred in the solvent deasphalting device during the equipment overhaul of Fujian United Petrochemical Company, and ten people were burned at the scene on January-4-2019. The residual gas chlorobenzene from the process pump of Wanhua Chemical Company leaked resulted in two people being poisoned (one of whom died) on January-15-2019.
Tianjiayi Chemical Co., Ltd. suffered a serious explosion accident due to ethylbenzene leakage, causing 78 deaths and 76 serious injuries on March-21-2019. Besides, a chemical plant in Houston, USA, caused an explosion due to a leak of isobutene, which resulted in one death and two injuries, on April-3-2019. Therefore, it is extremely important to prevent accident hazards and ensure the safety of petrochemical production.
In order to effectively prevent accidents and ensure petrochemical safety, official departments and enterprises have paid great attention and formulated a series of safety regulations. Besides, universities and related research institutes have published a variety of research results for this issue. For example, in 1990, the American Petroleum Institute API published the "API RP 750 Management of Process Hazard", which is one of the most influential events in the petrochemical industry. This document clearly stated the process risk management, involving plant design, construction, maintenance, and operation. The approaches of the safety precautions against accidents should be documented through the regular hazard analysis, safety evaluation, operating specifications, safe working rules, and systematic requirements for hazard management processes [1]. The Sinopec Industry also has stipulated a series of safety management regulations and specifications, such as the "five musts" of Sinopec safety management, 27 safety management regulations for petrochemical enterprises, and the petrochemical safety production supervision and management system [2], etc.
Focusing on the key problems such as the fault correlation analysis and the accident prevention, many domestic and foreign scholars as well as engineering and technical personnel have engaged in quite a lot of preliminary explorations and researches, and have proposed a variety of creative methods and technical solutions. Paper [3] proposed a non-physical quantity fault diagnosis index for petrochemical rotating machinery based on big data, which is different from Fault Detection and Diagnosis (short as FDD) method existed for the fault diagnosis of petrochemical rotating machinery. Mining the apriori algorithm and the association rules were used to enhance the failure judgment for the petrochemical rotating machinery and equipment. Aiming at the process failure of petroleum system and its damage caused by fault propagation chain, which seriously affects oil and gas production, the tarGet Tree-Success Tree-Dynamic Main Logic Diagram (GTST-DMLD) model was proposed to quantitatively model the effects of fault propagation behavior chains [4] and to prevent faults for petrochemical atmospheric distillation equipment and vacuum furnaces, which was based on the Markov process theory. Aiming at the practical problem that some conventional model-based Fault Detection and Isolation (FDI) methods are difficult to function due to the complexity and multi-domain characteristics of petrochemical, Marais et al. [5] adopted the system effectiveness as the FDI diagnostic measure and proposed a method based on the data abstract FDI hybrid method for petrochemical processes to deal with the detectable problem of petrochemical process failures. Regarding that the storage and management of dangerous goods and the injection of production at the ultra-high pressure of the reservoir face huge challenges and safety risks, paper [6] targeted an Underground Gas Storage (UGS) as an object, and analyzed the safety risks in the construction and other aspects. Ding et al. [6] established a three-level safety guarantee system for tubing string and wellhead control to ensure intensive injection and production safety. The integrated three-level safety control system achieved local safety control of single well as well as the well-site centralized emergency control from single well to UGS. However, the methods stated above are difficult to be applied to the distributed ultra-large-scale petrochemical complex system with multiple persons, multiple machines, and multiple environments, the reason of which is that they are either merely focusing on safety management or concerning with local situations, or only suitable for data analysis or post-mortem diagnostic analysis under the assumptions of idealized models.
For the large-scale industrial production systems with distributed structure and process characteristics such as petrochemicals, the conventional model-based FDD and the data-driven FDD are often difficult to achieve the desired results due to many practical problems, such as difficulties in building accurate models and difficulties in decoupling multi-link faults.
In order to overcome the problem that accurate models must be obtained in order to adopt the model-based FDD method, the system simulation-based FDD approach [7] was proposed to design the control system. Recently, this idea was combined with the artificial intelligence and used for the knowledge acquisition of the fault diagnosis expert systems [8]. Papers [9] and [10] applied this idea to the fault diagnoses of bearing and pipeline leakage, respectively. Hossam et al. [11] used the simulation-based methods for the fault propagation analysis of hydrogen plants, and realized the process detection and prediction of the nonlinear interaction patterns between variables [11].
In order to extend the above-mentioned simulationbased FDD idea to the safety management and control of complex processes such as petrochemicals, we consider the idea of the digital twin-based FDD, and use the Digital Twin (short as DT) technique to realize the analysis, diagnosis, and prediction of faults in complex systems. In view of this idea, this article uses the DT technique for safety management and control of the petrochemical processes, and explores a new fail-safe management and control mode. Besides, this article also builds a DT system (short as DTs) and realizes the dynamic sensing of failure for the entire large-scale distributed complex chemical production process to achieve online diagnosis and deduction. The DTs enriches the techniques of safety management and accident prevention in high-risk industrial areas.
The rest of this paper is organized as follows. In Section 2, a novel way is proposed to build a DTs for the petrochemical process and construct an acquisition system, in order to abstract actual system data and update the state of the digital twin system. Sections 3 and 4 establish the process monitoring and fault diagnosis techniques based on digital twin information, respectively. The conclusion is drawn in Section 5.

Construction of the petrochemical DTs
The definition of DT in Baidu Encyclopedia is to completely map the full life-cycle of the physical equipment into the virtual space with the integrated multi-disciplinary, multi-physical quantities, multi-scale, and multi-probability simulation processes, using data such as the physical models, sensor updates, and operation history [12,13]. In the IBM Watson [14], the digital twin is defined as a virtual representation of a physical object or system implemented  9 (2021) by using real-time data for understanding, learning, and reasoning throughout its life cycle.
The core of DT is to establish the mapping between real space and virtual space through information/data exchange. By this means, DT realizes the interaction between the real physical systems and the digital models of virtual space, and transfers the changes in the physical world to the digital space. Besides, there is also a feedback of the virtual space simulation process and operating results to the real physical system, which ensures the coordination of the digital and the physical world in the entire life cycle of the process [12]. Various types of simulation, analysis, data clustering, mining, and artificial intelligence can be used on the digital models, which provide valuable feedbacks to predict and control the real physical systems. This is what DT means to intelligent manufacturing [12].
In order to apply the DT technologies to the petrochemical field, how to construct petrochemical DTs is a key problem, which means that how to design and implement a set of virtual petrochemical production processes in a computer or computer network environment. The DTs constructed for the petrochemical process needs to ensure interaction of data and information between the virtual processes and real systems, as shown in Figure 1.
The petrochemicals are the industrial production process that uses raw material liquid/gas such as petroleum and natural gas. The raw materials flow through petrochemical refining equipment (including a series of pipelines and pumps) are distilled, cracked, fractionated, and coked under different temperatures and pressures to form petroleum products and petrochemical products. Generally, the petrochemical process is divided into two different stages: petroleum refining and petrochemical production. More specifically, the petroleum refining stage can be further subdivided into atmospheric pressure fractionation (production of gasoline, kerosene, light diesel oil, and heavy diesel oil), vacuum fractionation (production of machine oil using atmospheric pressure distillation of heavy oil as raw materials, production, various lubricating oils such as cylinder oil and petroleum jelly, petroleum wax, etc.), catalytic cracking (cracking to produce gasoline and diesel, separation of methane, ethane, ethylene, acetylene, propane, propylene, butane, etc.), catalysis reforming (gasoline isomerization, dehydrogenation, aromatization), and so on. Nevertheless, due to the high complexity, it is challenging to construct a DTs for the petrochemical production.
With reference to the hierarchical decoupling technology proposed by Zhao and Ning [15], in this section, the petrochemical is decomposed into five levels one by one and build plug-in DT components for each component of the five layers. Then, we reverse the decoupling process for each layer. The assembly can complete the development of the entire process of the petrochemical large-scale DTs, as shown in Figure 2.
The key difference between the DTs and an ordinary computer simulation system is that there is information/ data exchange between the DTs and the real physical system. Moreover, the state changes of the two systems must be kept synchronized, which is also the prominent challenge in developing the petrochemical DTs. To ensure that the step-by-step assembly process shown in Figure 2 completes the DTs, we must set up a forward data communication link and a reverse information transmission channel between the real physical system and the virtual digital system.
The petrochemical atmospheric and vacuum distillation unit are taken as an example. When we build a DTs for the atmospheric and vacuum distillation unit, the DTs are constructed through the development process of "physical system ? model abstraction ? virtual system". The sampling data of the sense network enters the forward channel of the virtual system, i.e., DTs, after analog-todigital conversion. Besides, there also exist reverse channels    9 (2021) of the virtual system simulation data that return to the physical system after digital-to-analog conversion, as shown in Figure 3.

DTs-based state monitoring of petrochemical processes
The synchronous operation and information exchange between the DTs and the real physical system provide a feasible technical approach for accurately understanding the actual operations of the physical system and monitoring its abnormal working conditions. Specifically, for large equipment and systems such as petrochemical processes that are complicated and possessing many coupling factors and operating links, it is very difficult to model a petrochemical plant as a whole.
The basic technical route is to design a DTs which accounts for the petrochemical processes in a virtual space and ensure that the DTs and the real system to keep continuous data/information interaction and working condition synchronization. In this way, the state of the real system can be analyzed and judged through the state changes of DTs, as shown in Figure 4.
As can be seen in Figure 4, the key technologies of the petrochemical process state monitoring based on DT include three core components, which are described in detail as follows: 1. Design of sensor monitoring network. The sensor network provides a window to understand the operating status of the physical system. Without the sensor network to collect data in real time, we cannot acquire the actual system operating status and cannot transmit data to DTs. The sensor network is crucial in DT since that once no actual operating data enters the DTs, the DTs will not be able to keep synchronization with the physical system. In this case, the DTs degenerates into a conventional digital simulation system. 2. Construction of DTs. DTs is neither replicas of physical systems, nor a proportionally compression of physical systems. When constructing the DTs, it is not equivalent to "drawing" a virtual image similar to a physical system in a virtual space. Instead, constructing the DTs is about building a "homogeneous" virtual system. This virtual system and the physical system are isomorphic with the physical system in terms of essential characteristics, engineering traits, changing processes, and operating laws. As long as there is sufficient observation data of the actual physical system, and the initial conditions of the virtual and actual physical systems are the same, the running process of the virtual system should be identical with that of the physical system. This is the inherent requirement of DTs and the value of DTs' existence. 3. Feature extraction and process modeling. Using mechanism modeling, we can adaptively optimize the structure and parameters of the modeling for the real physical system. Using the historical data and conventional optimization tools and training the models with the deep learning, this process can be achieved.

DTs-based fault diagnosis of petrochemical processes
Monitoring can only find out whether the petrochemical system is abnormal or faulty, and the diagnosis is to further determine which part, when, and how many types of faults have occurred. For this reason, this section intends to combine actual physical systems with DTs and propose a novel set of ideas for fault diagnosis in the petrochemical processes, which are illustrated in Figure 5. The core idea of the fault diagnosis system is depicted in Figure 5 can be summarized into the following four points: 1. A completely isomorphic reflection of the monitored object in the real physical system is regenerated from the DTs. 2. Inject different types of faults f d (t) with different time and different amplitudes in different units. Then, the reflection system, i.e., DTs, is used to generate process feature output y d (t) corresponding to the injected faults, which form training the sample pairs. 3. Use all of the sample pairs to train a deep Convolutional Neural Network (CNN), which forms a fault Discriminator (CNND) for offline and online diagnosis of petrochemical faults.
4. Inject the actual system operation process as well as the sampling data into the fault discriminator, i.e., CNND, to realize detection and diagnosis of faults from the real physical system.

A specific experimental example
The cracking furnace is one of the most typical units in the petrochemical industry. The ethylene cracking furnace which is common in petrochemical industry is taken as an experimental example in this section. The construction method of DT modules is briefly described.
The changes of temperature, pressure and material flow rate are the most important for the safety of cracking furnace. So, in this section, the top-down decomposition method is used to construct the characteristic DTs, which takes the key characteristic variables such as temperature, pressure and flow rate of the cracking furnace production process as the objects. In detail, the top-down analysis method shown in Figure 2 is used to decompose the changes of key characteristic parameters of cracking furnace into three parts: temperature field, pressure field and material flow field, and the DTs of characteristic parameter change process of cracking furnace is constructed respectively.
Considering the three fields of temperature, pressure and flow, the design idea and the technical route of digital twin module are similar. In order to avoid redundancy, this section only gives the modeling process of DT modules of temperature field variation.
Generally, the temperature field of cracking furnace obeys the first order differential equation of equation as follows [16,17]: where, T w is the average tube wall temperature (K), U k is the heat transfer coefficient of tube wall (kcal/m 2 h K), H fi is the standard heat (kcal/kmol) of formation of ith component at 298 K and pressure of 101.3 kPa, C qi is the heat capacity (kcal/kmol K) of reactant of ith component, D is the outer diameter of furnace tube (m), N w and N i are the molar flow rate (kcal/h) of diluted water vapor and reactant of ith component respectively. Using the mechanism model (1), it is not difficult to construct the digital simulation model shown in Figure 6. In order to ensure that the temperature field change of DTs is the twin of real cracking furnace temperature field, the link of real-time data interaction to DTS is added into the simulation system shown in Figure 6. In detail, the simulation system is driven by the device structure parameters and dynamic sampling data, such as the molar flow rate of diluted water vapor from the cracking furnace, the measured temperature data of each branch wall, the molar flow rate of reactants, the heat capacity of reactants, the heat generation heat of each component, the outer diameter of the tube wall and the heat transfer coefficient of the tube wall, etc.
The simulation process stated above involves five dynamic variables related to the number of tubes and three structural parameters. Assuming that the number of tubes is 20, the time-varying parameters are 100 groups, and the structural parameters are less than or equal to 60 (most of the tube wall outer diameter and heat transfer coefficient are the same). The amount of data is completely within the scope of machine learning software.
As shown in Figure 6, the DT module of the temperature field of the cracking furnace can be used as an important basis for judging whether the furnace tube is coking or not. Using these practical sampling data stated above, the temperature field T can be calculated in DTs' module with real time, and then the working condition of cracking furnace can be monitoring in DTs, coking faults can be judged and the abnormal trend of temperature change can be prognosticated.
Based on the similar method stated above, the DT module of pressure field and flow field of cracking furnace can be built. With three basic DT modules about the temperature field and the pressure field and the flow field, the characteristic DTs of a cracking furnace can be assembled to monitor and to diagnose faults such as coking and abnormal changes.
It should be noted that in the process of the bottom-up aggregation, it is not the simple splicing or combination of modules, but the correlation and coupling relationship between the operation process of different digital twin modules at the bottom must be considered.

Concluding remarks
The Digital Twin technology was first proposed by the United States Department of Defense and used for the health maintenance and protection of aerospace vehicles. The basic idea is to build a virtual aircraft model in digital space and achieve full synchronization with the real state of the aircraft through sensor data interaction. According to the structural situation and the past load, the approaches of timely analysis and assessment are provided, which involves whether maintenance is needed, whether it can withstand the next mission load [12], and so on. Drawing on the ideas stated above, this paper proposes some uses of the DT technology for the safety management and the control of petrochemical processes, and elaborates the method of state monitoring and fault diagnosis for the petrochemical processes based on the DT in detail.
Moreover, we can use Integrated Health Management (IHM) system to further enhance the DTs. The integrated health management system is equipped with functions such as the historical data maintenance, the sensing data analysis, and the diagnostic knowledge discovery [13]. If an IHM is plugged into the physical system or DTs, the DTs can integrate the data from different sources above. Based on these data, the DTs can be applied for continuously predicting the health status, remaining service life, and judging system responses of the critical safety events for the petrochemical equipment and systems. By observing the system response of the entity, we can reveal the hidden defects and unknown problems of the equipment. In addition, the DTs can also be used to simulate failure event by deliberately injecting faults. By this means, we can deduce the fault evolution processes and to predict risks and the impact of faults, which assist in the decisionmaking on fault disposal and enhance the safety management of the actual petrochemical systems.
On the one hand, the faults occur frequently and the consequences of disasters are serious. On the other hand, the fault modeling, monitoring, and diagnosis involve many factors and difficult to identify. As an attractive solution, the DT technology can be used to improve fault monitoring, fault analysis, and fault prediction technologies. The significance of adopting the DTs technology is undoubtedly necessary. This article is the preliminary work in this area. Although it may not be mature, it can be expected that with the advancement of information science and technology, the methods and technologies associated with DT will definitely receive greater attention and gain rapid development in the field of petrochemical safety control.
Petrochemical industry is a typical large-scale complex system. In order to avoid the DTS involving too many parameters and too complicated structure, this paper creatively proposes the method of decomposing structures from top to bottom and constructing the DT modules from bottom to top. In this way, the bottom layer is the basic components or units, and the number of symptoms concerned and the number of sensing data is controllable. In other words, because the process of building a DTS in this paper is composed of top-down decomposition and bottomup modeling, and the model is synthesized and integrated layer by layer when building DTS, this method can ensure that the structure of local model is not too complex to be processed.