## 3 Digital Twin and Physical Twin Integration  
The core of the proposed methodology is based on realizing a digital twin (DT) of the sensorized upper-limb prosthesis, namely its digital replica [21], which differs from a virtual prototype in three main aspects:  
* The DT communicates (preferably two-way) with its physical counterpart, namely the physical twin (PT) (exchanges information with real sensors);
* The DT increases the information of its PT through mathematical models, providing real-time augmented information;
* The DT is conceived to flank the PT throughout its life cycle. DTs can easily interface with virtual and/or augmented reality environments, with immersive video technologies to facilitate (even immersive and highly realistic) communication with the user [22]. DTs have been adopted in different fields, from maintenance to product and process design, and, in recent years, researchers have been considering their adoption for training purposes [23], particularly in medicine [24; 25; 26]. Within this frame, we are focused on improving sensorized prosthesis dexterity to assess the strategic, but often disregarded, aspect of their long-term adoptability [8; 9], moreover allowing customization and optimization for classifiers, electronics, and mechanical parts of the ensemble, before \"wearing\" the actual device. The virtual reality approach immerses the user in an environment where the prosthesis is highlighted, allows verification that the interfaced electronics correctly interpret his/her intent, and allows a series of manipulation and dexterity exercises to be performed as many times as is desired by the user. Figure 1 shows a scheme of the DT-PT three communication paths (COM paths). The first path delivers real-time information related to the arm positions in space with respect to the user's head, in order to correctly collimate the virtual prosthesis on the upper limb. The second path regards the myoelectric sensors' communication for the assessment of the hand grasping poses. The directions of both the first and second communication paths are from the physical to the digital twin, whilst the third path goes in the opposite direction to deliver visual feedback to the user. A data processing unit is in the middle of the three paths with the aim to synchronize information, ensure the real-time rendering and realism of the scene and, therefore, achieve training success. To this aim, from the hardware side, we adopted the VIVE PRO virtual reality system (by HTC Corporation, New Taipei City, Taiwan) consisting of a head-mounted display, fixed infrared lighthouses, and crown-shaped trackers. On the helmet and on the trackers, there is a series of photodiodes that are activated by the lighthouses, and differences in illumination allow for determining their spatial position and attitude. From the software side, we developed the digital twin and the virtual scene using the UNITY platform (by Unity Technologies, San Francisco, CA, USA). During training, the user is asked to wear the helmet and the two trackers using armbands (Figure 2). One tracker is firmly fixed on the arm, and the other on the remaining part of the forearm. Moreover, the user is asked to put on the myoelectric sensors (pads) and connect the whole system to the data processing workstation. The DT gathers information from the sensors of the PT and updates the immersive virtual scene using a specific procedure and computational algorithm (described in the next subsection). In the virtual environment, the virtual arm representing the sensorized prosthesis is placed according to the physical sensors. The virtual scenario is completed by other virtual objects classified as interactable entities that can come in contact and interact with the virtual hand. A set of instructions is also present in the virtual scene to guide the user to complete the training tasks. Figure 1: Communication paths between the physical and the digital twins in the training environment.