# A Five-Step Approach to Planning Data-Driven Digital Twins for Discrete Manufacturing Systems
## 4 Results and Discussion
### Step 4  
In the fourth step, the actual digital twin of the process is created. The digital model presented in Step 3 is connected to the experimental setup of the Demo Center Smart Factory (as indicated in the beginning of Section 3) via a feedback control loop (shown in Figure 15 with bi-directional data flows between the digital model and the six main building blocks). The six main building blocks of the experimental setup represented in Figure 15 are: (V) Robot 1 and (IV) Robot 2, (X) Assembly station 1, (XI) Assembly station 2, (IX) machine vision, and (III) WBPFP. They are all equipped with separate controllers. The feedback control loop is implemented in two steps: (i) the digital twin in connection with digital agents (described in Section 2.4) collects data about the current state of the manufacturing system (e.g., quantity and type of available base parts, assembly parts, availability of robot grippers... ) and updates the input data for the simulation (e.g., optimal order sequence). After the simulation run, the order sequence and operations to be performed are transmitted from the digital twin to the appropriate building blocks. For example, information about the current order and the assembly operations to be performed are transmitted to the assembly stations. Information about robot jobs to be executed as well as generated tasks are transmitted to robots. (ii) Each building block filters locally acquired data during the assembly process (e.g., data about orders detected by RFID, assembly station status, and pallet presence from proximity sensors, product quality check from machine vision) and transmits it back to the digital twin for continuous (re-)validation of simulation results. The described steps (i) and (ii) for implementing the feedback loop are now presented in the case study. A camera mounted on the ceiling of the demo center checks the current states of the tiles in buffers. The availability of the robot grippers is checked by proximity  
Figure 15: Connections between the digital model and the six main building blocks in the case study. sensors in the WRG. The availability of the base parts in the WBPFP is acquired by checking RFID data from the WBPFP controller. Gathered states of the parts are sent to the digital twin before the scenario is executed. The digital twin receives information that there are 11 base parts and 0 finished products in the WBPFP. It also receives the information that there are 3 base parts in the second column and 4 base parts in each of the other two columns. There are 64 blue, green and red parts (tiles) in the buffers (Figure 16a). Based on the state of the WBPFP and WRG and the buffers, as well as the products that need to be assembled in a given scenario, the Flip and Insert (FI) algorithm (the algorithm is described in detail in the PhD thesis of a member of our team [50]) computes in the digital twin the suboptimal order sequence for the assembly of the products (assembly schedule) in Scenario 1. The assembly schedule is sent to the controllers in the real system and the assembly of Scenario 1 begins. Immediately after the completion of Scenario 1, the sensors check the availability of the parts in the WBPFP, WRG and buffers and provide information to the digital twin. For Scenario 2, the FI algorithm again computes the suboptimal order sequence. The same process is repeated for all scenarios. The last (fourth) scenario involves the assembly of three products. The number of parts before the last scenario is as follows: 2 base parts and 9 finished products in the WBPFP and 7 blue, 26 green and 38 red tiles in  
Figure 16: The figure shows: (**a**) the state of the assembly system before the start of assembly with full WBPFP and buffers; (**b**) no base parts in the first row of the WBPFP after assembling; (**c**) finished products in the warehouse in the second row; (**d**) the state of the buffer with red tiles, (**e**) green tiles, and (**f**) blue tiles after the completion if the assembly process. buffers.