# Connection-Aware Digital Twin for Mobile Adhoc Networks in the 5G Era
## 5 Conclusions and Future Work  
5G-MANETs are a popular and agile solution for facilitating information exchange in local contexts. These communication infrastructures are significant due to their use of 5G for remote communications and local wireless interfaces for effective data transmissions in local contexts. The relevance of these networks, and their connectivity possibilities, has led to increasing interest in their application for deploying contextual solutions, as well as in real-time monitoring of their resources. However, 5G-MANETs present unique challenges, such as highly variable topology, unstable links between nodes, energy consumption of the devices, dynamic routing of messages, and 5G disconnections in nodes. As a result, these characteristics pose significant challenges for monitoring these networks. In response, this paper introduces a communication architecture to monitor 5G-MANETs based on a DT, enabling real-time representation of physical 5G-MANETs and the estimation of their QoS in customized scenarios. The work proposes a connection-aware solution that equips nodes with the capability to use their local wireless interface to track network events and their 5G interface to update the DT with the latest interactions. For this, a heterogeneous architecture is described, combining the computing capabilities of autonomous nodes with the low-latency transmissions of 5G. Considering the potential challenges of these networks in physical contexts, the proposal integrates a connection-aware routing protocol designed to handle intermittent Internet disconnections in network nodes. As a result, when nodes lack 5G access, control data are routed toward gateway nodes to keep the DT updated. These functionalities enable two main objectives: real-time accurate monitoring of network events in 5G-MANETs and estimation of the network's performance under customized scenarios. For the first objective, the DT is updated with the latest changes in the topology, including contextual information about nodes, such as their energy consumption and active connections. Additionally, message transmissions are monitored, providing a real-time representation of the creation, delivery, and reception of local information. Considering these interactions, the DT maintains a historical record of network events, enabling the definition of historical data, which is relevant for AI applications. On the other hand, the DT also provides a simulation core responsible for estimating QoS outcomes for customized variations of the networks. Users can define contextual conditions over virtual networks, allowing the estimation of their performance based on historical data. Simulated mobility models and routing protocols are provided to analyze the impact of the applied changes. Considering the multidimensional features of the proposed work, a proof-of-concept of the architecture was developed to assess the performance of the DT's monitoring functions. A simplified version of the proposal was implemented, integrating real-time monitoring of nodes, connection-aware routing for control messages, and virtual representation of the networks. These functions enable the analysis of the global performance of the proposal, including the accuracy of the DT and the calculated outcomes for the physical network. To evaluate the implementation, four scenarios were considered to explore the impact of 5G availability and mobility on the accuracy of the proposal. The DT performed successfully for online topologies, providing real-time information about network events and reaching 100% accuracy. In contexts where the Internet is unavailable for most nodes, performance decreases but remains close to the actual values. In scenarios with limited connectivity and dynamic topology, estimated results slightly differ from the physical network. Finally, the analysis of the computational complexity cost demonstrates suitable performance for short-length scenarios, with manageable energy consumption and viable CPU usage.