# Connection-Aware Digital Twin for Mobile Adhoc Networks in the 5G Era
## 3 Connection-Aware DT for 5G-MANETs
### Architecture
In the architecture, this layer provides contextual information to the individual local reports of the nodes, including data such as new connections and disconnections, as well as performance variables like signal strength. * Local report. This component performs two main functions: managing and monitoring the network events executed by the node and providing structured storage for communication statistics. On the one hand, it handles the node's interactions, including managing routing processes and the creation, reception, and delivery of messages. On the other hand, the structured storage of this information enables the identification of new interactions, allowing for early notification of events to the DT via the 5G interface. For this, cache storage is used to keep the latest updates of the node. * 5G interface. The low-latency properties of 5G enhance the potential application of DT to monitor MANETs. In this way, when the local report updates network variables, changes are transmitted to the DT, ensuring a reliable representation of the nodes. As a result, the components integrated into the nodes foster the monitoring of 5G-MANETs, providing updated and accurate information about the events in the network to the DT. Meanwhile, the DT is executed remotely on a cloud server and consists of two main components: the monitoring core, responsible for simultaneously monitoring multiple physical 5G-MANETs, and the simulation core, which provides customized configurations of the physical networks. Next, each of these components is addressed. * Monitoring core. This component is responsible for managing the virtual representation of the physical 5G-MANETs, including handling incoming communications with updates in the network topology, displaying information about data traffic, generating performance reports on QoS, storing historical information, and providing real-time graphical representations. The following set of sub-components is involved:
* MQTT Interface. This entity is responsible for receiving incoming communications from the physical nodes of the 5G-MANETs. Several topics are provided, enabling the specification of the alive links associated with each node, the creation, sending, and reception of messages, and the transmission of contextual information about the devices. MQTT technology enhances real-time communication, providing low-latency data transmission. * Real-time mobility model. Based on the information about links received by the MQTT interface, the mobility model manages the topology of the virtual 5G-MANET. In this way, it is possible to track the connections between nodes and additional contextual variables, such as signal strength. * Real-time routing protocol. Using the data received by the MQTT interface, this component is responsible for representing the creation, reception, and delivery of messages between nodes in the 5G-MANET. This allows for tracking the latest data transfers, including those successfully completed and those that failed. * Database. This component is responsible for storing all network interactions received by the MQTT interface. The database is implemented following a relational paradigm, considering the structured nature of the data. As a result,  
definition of additional network conditions, and modification of contextual data for each node. Considering the variety of these inputs, Table 2 details the set of customizable variations. Estimated reports. Based on a simulation of the virtual network, executed under the provided conditions, the DT provides estimated reports on performance and QoS, following the same variables reflected in Table 1. The collection of accurate and detailed data about historical network events enhances these estimations. Considering the described architecture, the proposal provides accurate virtual representations of physical 5G-MANETs and offers detailed estimations for customized variations. Nevertheless, the dynamic nature of mobile nodes in the physical network may lead to significant changes in topology and 5G availability.