# Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-Physical Collectives +
###### Abstract  
The engineering of large-scale cyber-physical systems (CPS) increasingly relies on principles from self-organisation and collective computing, enabling these systems to cooperate and adapt in dynamic environments. CPS engineering also often leverages digital twins that provide synchronised logical counterparts of physical entities. In contrast, sensor networks rely on the different but related concept of virtual device that provides an abstraction of a group of sensors. In this work, we study how such concepts can contribute to the engineering of self-organising CPSs. To that end, we analyse the concepts and devise modelling constructs, distinguishing between identity correspondence and execution relationships. Based on this analysis, we then contribute to the novel concept of \"collective digital twin\" (CDT) that captures the logical counterpart of a collection of physical devices. A CDT can also be \"augmented\" with purely virtual devices, which may be exploited to steer the self-organisation process of the CDT and its physical counterpart. We underpin the novel concept with experiments in the context of the pulverisation framework of aggregate computing, showing how augmented CDTs provide a holistic, modular, and cyber-physically integrated system view that can foster the engineering of self-organising CPSs. c SF 202  
process [5]. In settings like Wireless Sensor and Actuator Network and Internet-of-Things, the related but different notion of a _virtual device_ (where there is no twinning relationship but rather only hosting or execution relationships with some physical devices) has sometimes been proposed to achieve abstraction or improved Quality of Service [6; 7; 8; 9], for example, by abstracting a whole set of underlying physical sensors. In this paper, we focus on _self-organising Cyber-Physical Systems_[10; 11], namely collectives of physical devices monitored and controlled by computer-based algorithms that allow them to autonomously organise as a whole towards global goals. In this context, we sustain a vision whereby logical representations of system entities (e.g., digital twins and virtual devices) are key for: (i) separation of concerns in system design and implementation [11; 12]; and (ii) achieving improved application cost/performance profiles, for example, through smart deployment or controlled augmentation of the system to improve or facilitate self-organisation processes [13; 14; 15]. Our position is also that programming approaches to self-organisation can especially benefit from such logical representations, for example, in terms of separation of concerns, declarativity, modularity, and execution optimisability. In particular, we address the problem of modular abstraction and the design of self-organising Cyber-Physical Systems. We aim to address it by decoupling cyber vs. physical components, as per [11], decoupling virtual devices from twinning relationships, and devising corresponding modelling concepts at a collective level. Indeed, in this work, we provide the following contributions:  
* We review from literature various kinds of logical devices, and provide a conceptual characterisation including digital twins, virtual devices, and \"collective\" devices. We do so by distinguishing between the relationships of _identity correspondence_ and _execution_ existing between logical and physical devices, and by taking both an individual and collective stance (Section 2);
* We re-interpret and conceptually extend the meta-model of self-organising Cyber-Physical Systems presented in [11] in light of the novel proposed concepts, especially discussing how it can express a notion of _augmented collective digital twin_ considering digital twins and virtual devices by a global perspective;
* We run an experimental investigation showing how virtual nodes can opportunistically be integrated [15] into an existing self-organising CPS (providing discovery and navigation services in dynamic environments) to improve its performance without changing its logic.