# Conceiving a Digital Twin for a Flexible Manufacturing System
## 1 Introduction
### Background of Digital T twins: Concept and Integration Levels
Although there are several definitions of DT, one of the most referenced (focused on NASA's autonomous space exploration vehicles) is given by [15]: a DT is an integrated, multiphysics, multiscale and probabilistic simulation of a system, which uses physical models and data to mirror it reliably and in real time, predictively taking care of its own permanence in the environment in the face of unforeseen problems in the real or virtual system. Based on this definition, researchers from different universities and institutes proposed their own understanding of DT [16]. It is clear that the concept of DT depends on the context and on the point of view necessary for the specific application area, that is, the DT is an adequate digital representation. In this way, a DT only needs to collect data relevant to the use of interest, instead of all possible and available data from the physical system [31]. With the advancement of research on DT, and the perception of the importance of this concept for the achievement of intelligentmanufacturing, its adoption in industries is becoming increasingly beneficial. Among these benefits, we can mention greater visibility of the business, agility in product development, process optimization, and improvement in service quality [16]. However, as in the literature, different understandings of DTs can be observed in the industry. According to [PERSON] et al. [29], many works found in the literature are not really DTs, as there is no bidirectional communication between the DT and the physical system. There are three levels of virtualization for a given system, as illustrated in Figure 1. (a) Digital Model: the simple digital representation of a physical object. There is no interaction between the physical and virtual models; (b) Digital Shadow: characterized by the connection between physical and digital objects, but in a unidirectional way, with the physical object updating the digital object; (c) Digital Twin: also characterized by the connection between physical and digital objects, but in a bidirectional way, with the physical object updating the digital object, and vice versa. The transformation of industrial equipment into a CPS and its subsequent virtualization in the form of a DT is not a trivial process [10]. It involves the integration of different systems, the interoperation of different protocols and communication formats, the analysis of suitable protocols to support the transmission of large volumes of data in real time, the construction of wrappers on top of legacy PLCs, the synthesis instrumentation, and IoT and data from industrial networks, among other aspects [32; 33]. There are other entities in the environment with which a DT must interact and for which appropriate forms of communication must be designed [10]:  
* Between physical and virtual twins;
* Between the DT and other different DTs in the surrounding environment;
* Between the DT and domain experts, who interact and operate in the DT, through human interfaces. In terms of the functionality of a DT, [PERSON] et al. [34] and [PERSON] et al. [34] list the following:
* Real-time monitoring to update the DT, with information about parts, products, operations, machines, and all entities that make up the physical environment;
* Analysis and forecasting of energy consumption;
* Smart optimization and updating, based on user operation analysis and product and/or production process data;
* Analysis and user operation behavior, to detect and evaluate the operations performed by him;
* Virtual maintenance of the product, using virtual or augmented reality, for testing, evaluation and, finally, for real maintenance;
* Failure analysis and forecasting for equipment and/or product maintenance planning. Figure 1: Levels of virtualization. The functionalities of a DT consider the application domain and the aspects to be evaluated and visualized. Thus, there may be a variation in the level of detail that a graphical interface must have, as well as the level of performance in the real system [29]. [PERSON] et al.