# Multi-Connectivity-Based Adaptive Fractional Packet Duplication in Cellular Networks
## 4 ns-3 and mmWave Module  
The Network Simulator 3 (ns-3) is an open-source platform enabling the simulations of multiple different protocols for cross-layer design and analysis. Based on the already established LTE LENA platform, ns-3 has a new mmWave module that is highly modular and flexible, which helps researchers to design and validate their work. This is a full-stack implementation with multiple examples and a wide variety of test configurations, all designed using C++ [2, 27]. We make use of the dual connectivity (DC) functionality on the mmWave module. We utilize the MATLAB tool to further simulate packet traces received on the downlink (DL) and the uplink (UL) to reduce the computational overhead on ns-3. Our MATLAB code is used to precisely determine the amount of packet duplication required to maintain a certain quality of service (QoS) given the application. We can optimally turn ON and OFF the packet duplication in the environment based upon our scenarios described in further sections. Figure 4 gives a high level representation of our simulation layout. A UE that is dual stack capable, meaning that it supports LTE as well as 5G mmWave, is moving from point A to point B. There is a building between the UE and the two bases stations. At point A, UE will have some SINR received from both BS but it is closer to and has line of sight with BS-1, so the SINR from BS-1 is stronger. As it moves, this SINR is reduced when UE is  
behind the building, and this is where it becomes closer to BS-2. Now, both the BS SINR are moderately lower. Finally, the BS-2 SINR becomes better as the UE crosses over the building and has line of sight with BS-2. This is also when line of sight is established again with BS-1 improving the SINR. Our UE is always connected to two BS, and this means that the user plane connectivity is always enabled on both the RF links of the two BS. MC (or DC in our case) represents that the UE in connected mode is configured to use the available radio resources of both the BS. Thus, in case of a radio link degradation on one of the BS, the other radio link can be used for the data transmission. This helps with significantly reducing the radio link failures (RLF) and service disruptions. Our UE is continuously measuring and reporting the SINR of both the base stations. Figure 5 shows the SINR of BS-1 received on the UE and Figure 6 shows the SINR of BS-2. We compare and select the better of the two signals at every instant, and we represent that as the best SINR. Figure 7 has the best SINR and the instantaneous SINR from the two base stations. The SINR for BS-1 varies from 50 to \(-\)30 dB, whereas the SINR for BS-2 varies between 35 and \(-\)20 dB, and the best SINR will pick the better signal of the two. The UE sends and receives data from both the base stations on the UL and DL. Not all data received on the UE is usable as some of the packets could be corrupted, and some could be completely lost due to a deep fade. Thus, we ensure that, even if the SINR is acceptable, the data received are not corrupted. Figure 4: ns-3 simulation setupwith one UE, two base stations and one building. Figure 5: Instantaneous SINR of base station 1. Figure 6: Instantaneous SINR of base station 2. We discussed some of the pros and cons of packet duplication (PD) in earlier sections. Always-ON PD is a wasteful utilization of the available resources, and so we proposed adaptive fractional packet duplication (A-FPD), which will adapt to the channel conditions and duplicate packets only when necessary on the secondary RF link. We proposed multiple schemes to turn the packet duplication (PD) ON and OFF. The first scheme proposed for PD is when the SINR difference between the two base stations is under a certain predefined threshold value, called Delta. A smaller SINR difference, or Delta, means that the channel conditions for the two base stations are similar, and a higher difference means that the RF channel conditions are very different for the two base stations.