# Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-Physical Collectives +
## 4 Digital Twins and Virtual Nodes in Self-Organising Cyber-Physical Systems
### Augmented Collective Digital Twins in the Pulverised Aggregate Computing Meta-Model
#### 4.2.2 Augmentation with Virtual Devices  
The platform subsystem is \"augmented\" with an additional (not necessarily disjunct) set of infrastructural nodes supporting improved connectivity, computation offloading, and other non-functional requirements. Similarly, the cyber subsystem can be \"augmented\" through the addition of purely virtual devices, not mapped (in terms of identity correspondence) to any existing host, giving birth to what we call an _augmented collective digital twin_: these virtual devices constitute an _augmented reality_ for the physical twins.  
Since they have no direct correspondence with any application-level host, sensors and actuators of virtual devices need to be virtualised. Obviously, there must be at least one physical device providing the mere _execution_ support (i.e., in terms of virtualisation) for any given virtual device. A virtual device exists for another device once the latter can perceive the former: the details of how this existence is reified essentially depend on the interface component \(\chi\) (which is the mediator for the interactions between any couple of devices) and how the state \(\kappa\) of the virtual device is populated. One approach is to model the virtual device exactly as a normal device, that is, by letting the state be determined by proper sensors \(\sigma\), messages \(\chi\), and behaviour \(\beta\). In particular, virtual devices--being decoupled from reality (besides mere execution needs)--can be positioned at arbitrarily in space, and their position and distance sensors can be populated based on the position information of devices bound to physical hosts. In other words, as far as it is possible to generate reasonable data for synthesised sensors and actuators and the network performance of the specific deployment (in particular, information propagation speed) remains adequate for the application at hand, virtual devices and their physical hosts are _spatially decoupled_. For the virtual devices to be part of the logical network, the middleware treat them as it does with physical devices: it must synchronise, collect, reason about, and propagate information as it would for any ordinary device, such that any of its neighbours perceive and interact with it exactly as if it were real. Achieving a completely transparent emulation is relatively easy in centralised deployments (e.g., cloud-based or hierarchical), but it growsincreasingly challenging with the degree of decentralisation of the physical network. In particular, in decentralised settings there is the problem of network partitions which may lead to inconsistencies or availability issues (cf. CAP theorem [45]). It seems opportune to assume a single reachable and available \"virtualiser node\" owning a given virtual device, otherwise the determination of the state of a virtual device, and interaction with it, becomes a problem of distributed consensus. Another typical requirement for spatial situation of virtual devices is the availability of a global coordinate system and accessibility of services like the GPS. Finally, whereas the set of virtual nodes (and the corresponding situation) might be determined statically, an interesting opportunity arises when a more dynamic management is considered.  
In summary, augmenting a system with virtual devices requires solving two key problems:  
1. _virtual device synthesis_--which involves determining what must be virtualised and how (namely, filling it the details);
2. _virtual device integration_--which involves determining how to make the actual system perceive the virtual device as a regular device.  
Such problems can, and often need to be addressed at runtime.