# Connection-Aware Digital Twin for Mobile Adhoc Networks in the 5G Era
This replication is not limited to static properties but extends to dynamic interactions, ensuring that the virtual entity mirrors the physical system's ongoing activities in real-time. By integrating comprehensive data from physical entities, these digital twins can capture operational actions such as performance fluctuations, environmental changes, and system status variations. DT technology has found successful applications across various domains, including industrial operations [11], where it aids in monitoring distributed systems [12], and in healthcare, where it is used to represent and analyze complex biological entities [13]. However, DTs offer more than just monitoring capabilities; their core value lies in their ability to simulate and predict system behavior by manipulating the virtual counterpart. This predictive functionality allows for proactive optimization and informed decision-making, empowering users to evaluate the effects of potential changes on system performance without directly interfering with the physical asset. The ability to foresee and address potential issues, as well as optimize operations based on virtual testing, is a significant advantage of DTs. Considering these advances, DT can significantly enhance the monitoring of MANETs by creating real-time virtual representations of the network. This enables continuous tracking of node behavior, dynamic routing, and resource allocation. As a result, relevant data, such as network performance and issue detection, can be effectively gathered. These capabilities lead to proactive management and optimization of the MANET, which is especially useful given the inherent challenges of these networks [14]. In light of these strengths, this paper proposes the deployment of a DT over 5G networks to tackle the challenges of monitoring 5G-MANETs, leveraging the advanced capabilities of DTs to enhance network management and performance evaluation. The proposed work focuses on providing a connection-aware communication architecture to monitor 5G-MANETs using a DT. This approach offers a real-time virtual representation of physical networks, updating the topology and displaying communication processes. Based on the collected network events, the proposal integrates a simulation core to estimate the impact of customized configurations on performance. For this, contextual applications may be deployed on physical nodes, which individually manage local connections within the 5G-MANET, while continuously updating the DT with network events via the 5G infrastructure. However, considering the challenges inherent to 5G-MANETs, such as node mobility and varying deployment contexts, connectivity losses can occur [3], which may hinder the network's ability to keep the DT updated. The lack of Internet access in the 5G-MANET affects the DT's accuracy in representing changes in topology, reporting data traffic, and maintaining communications. To address this issue, the proposed solution defines a connection-aware routing technique, enabling disconnected nodes within the topology to communicate with online nodes that act as gateways for the network. This routing strategy determines the shortest path between disconnected devices and those with Internet access, based on local control messages that manage the hops required to reach online nodes. As a result, the technique aims to keep the DT updated during disconnection periods, addressing the challenge of connectivity interruptions in MANETs. To assess the accuracy of the proposal and its technical viability, a proof-of-concept is implemented and evaluated under multiple testing scenarios. In these tests, a physical 5G-MANET is monitored, analyzing the latency of the DT and comparing the estimated QoS results with the actual ones. As a result, experiments show that the proposal provides a reliable DT. The paper is organized as follows: first, Section 2 details the most relevant proposals in the DT field for 5G-MANETs; then, Section 3 provides an overview of the proposal, including the architecture and connection-aware routing.