Handover in 5GNR

Simulate and study 5G Handover procedure

Introduction#

The handover logic of NetSim 5G library is based on the Strongest Adjacent Cell Handover Algorithm (Ref: Handover within 3GPP LTE: Design Principles and Performance. Konstantinos Dimou. Ericsson Research). The algorithm enables each UE to connect to that gNB which provides the highest Reference Signal Received Power (RSRP). Therefore, a handover occurs the moment a better gNB (adjacent cell has offset stronger RSRP, measured as SNR in NetSim) is detected.

This algorithm is similar to 38.331, 5.5.4.4 Event A3 wherein Neighbor cell's RSRP becomes Offset better than serving cell's RSRP. Note that in NetSim report-type is periodical and not eventTrigerred since NetSim is a discrete event simulator and not a continuous time simulator.

This algorithm is susceptible to ping-pong handovers; continuous handovers between the serving and adjacent cells on account of changes in RSRP due mobility and shadow-fading. At one instant the adjacent cell\'s RSRP could be higher and the very next it could be the original serving cell\'s RSRP, and so on.

To solve this problem the algorithm uses:

a) Hysteresis (Hand-over-margin, HOM) which adds a RSRP threshold (Adjacent_cell_RSRP - Serving_cell_RSRP > Hand-over-margin or hysteresis), and

b) Time-to-trigger (TTT) which adds a time threshold.

This HOM is part of NetSim implementation while TTT can be implemented as a custom project in NetSim. 

Network Setup#

Open NetSim and click on Experiments> 5G NR> Handover in 5GNR> Handover Algorithm then click on the tile in the middle panel to load the example as shown in below Figure 28‑1.

Graphical user interface, text, application Description automatically
generated

Figure 28‑1: List of scenarios for the example of Handover in 5GNR

Handover Algorithm#

NetSim UI displays the configuration file corresponding to this experiment as shown below Figure 28‑2.

Figure 28‑2: Network set up for studying the 5G handover

Procedure for 5G Handover#

The following set of procedures were done to generate this sample:

Step 1: A network scenario is designed in NetSim GUI comprising of 5G-Core devices, 2 gNBs, and 2 UEs in the "5G NR" Network Library.

Step 2: The device positions are set as per the table given below Table 28‑1.

| gNB 7 | gNB 8 | UE 9 | UE 10 -|-------|-------|------|------ X Co-ordinate | 500 | 4500 | 500 | 4500 Y Co-ordinate | 1500 | 1500 | 3000 | 3000

Table 28‑1: Device positions

Step 3: In the General Properties of UE 9 and UE 10, set Mobility Model as File Based Mobility.

Step 4: Right click on the gNB_7 and select Properties, the following is set Table 28‑2.

Interface_4(5G_RAN) Properties
CA_Type Single Band
CA_Configuration n78
CA_Count 1
Numerology 0
Channel Bandwidth (MHz) 10
PRB Count 52
MCS Table QAM64
CQI Table Table 1
X_Overhead XOH0
DL UL Ratio 4:1
Pathloss Model 3GPPTR38.901-7.4.1
Outdoor Scenario Urban Macro
LOS_NLOS_Selection User_Defined
LOS Probability 1
Shadow Fading Model None
Fading _and_Beamforming NO_FADING_MIMO_UNIT_GAIN
O2I Building Penetration Model LOW_LOSS_MODEL
Additional Loss Model None

Table 28‑2:gNB_7 > 5G_RAN Interface Properties Window

Similarly, it is set for gNB 8.

Step 5: The Tx_Antenna_Count was set to 2 and Rx_Antenna_Count was set to 1 in gNB > Interface (5G_RAN) > Physical Layer.

Step 6: The Tx_Antenna_Count was set to 1 and Rx_Antenna_Count was set to 2 in UE > Interface (5G_RAN) > Physical Layer.

Step 7: Right click on the Application Flow App1 CBR and select Properties or click on the Application icon present in the top ribbon/toolbar.

A CBR Application is generated from UE 9 i.e., Source to UE 10 i.e., Destination with Packet Size remaining 1460Bytes and Inter Arrival Time remaining 20000µs. QOS is set to UGS.

Additionally, the "Start Time(s)" parameter is set to 40, while configuring the application.

File Based Mobility:

In File Based Mobility, users can write their own custom mobility models and define the movement of the mobile users. Create a mobility.txt file for UE's involved in mobility with each step equal to 0.5 sec with distance 50 m.

The NetSim Mobility File (mobility.txt) format is as follows:

#Initial position of the UE 9

$node_(8) set X_ 500.0

$node_(8) set Y_ 3000.0

$node_(8) set Z_ 0.0

#Initial position of the UE 10

$node_(9) set X_ 4500.0

$node_(9) set Y_ 3000.0

$node_(9) set Z_ 0.0

#Positions of the UE 9 at specific time

#Initial position of the UE 9

$node_(8) set X_ 500.0

$node_(8) set Y_ 3000.0

$node_(8) set Z_ 0.0

#Initial position of the UE 10

$node_(9) set X_ 4500.0

$node_(9) set Y_ 3000.0

$node_(9) set Z_ 0.0

#Positions of the UE 9 at specific time

$time 0.0 "$node_(8) 500.0 3000.0 0.0"

$time 0.5 "$node_(8) 1000.0 3000.0 0.0"

$time 1.0 "$node_(8) 1050.0 3000.0 0.0"

$time 1.5 "$node_(8) 1100.0 3000.0 0.0"

$time 2.0 "$node_(8) 1150.0 3000.0 0.0"

$time 2.5 "$node_(8) 1200.0 3000.0 0.0"

$time 3.0 "$node_(8) 1250.0 3000.0 0.0"

$time 3.5 "$node_(8) 1300.0 3000.0 0.0"

$time 4.0 "$node_(8) 1350.0 3000.0 0.0"

$time 4.5 "$node_(8) 1400.0 3000.0 0.0"

$time 5.0 "$node_(8) 1450.0 3000.0 0.0"

$time 5.5 "$node_(8) 1500.0 3000.0 0.0"

$time 6.0 "$node_(8) 1550.0 3000.0 0.0"

$time 6.5 "$node_(8) 1600.0 3000.0 0.0"

$time 7.0 "$node_(8) 1650.0 3000.0 0.0"

$time 7.5 "$node_(8) 1700.0 3000.0 0.0"

$time 8.0 "$node_(8) 1750.0 3000.0 0.0"

$time 8.5 "$node_(8) 1800.0 3000.0 0.0"

$time 9.0 "$node_(8) 1850.0 3000.0 0.0"

$time 9.5 "$node_(8) 1900.0 3000.0 0.0"

$time 10.0 "$node_(8) 1950.0 3000.0 0.0"

$time 10.5 "$node_(8) 2000.0 3000.0 0.0"

$time 11.0 "$node_(8) 2050.0 3000.0 0.0"

$time 11.5 "$node_(8) 2100.0 3000.0 0.0"

$time 12.0 "$node_(8) 2150.0 3000.0 0.0"

$time 12.5 "$node_(8) 2200.0 3000.0 0.0"

$time 13.0 "$node_(8) 2250.0 3000.0 0.0"

$time 13.5 "$node_(8) 2300.0 3000.0 0.0"

$time 14.0 "$node_(8) 2350.0 3000.0 0.0"

$time 14.5 "$node_(8) 2400.0 3000.0 0.0"

$time 15.0 "$node_(8) 2450.0 3000.0 0.0"

$time 15.5 "$node_(8) 2500.0 3000.0 0.0"

$time 16.0 "$node_(8) 2550.0 3000.0 0.0"

$time 16.5 "$node_(8) 2600.0 3000.0 0.0"

$time 17.0 "$node_(8) 2650.0 3000.0 0.0"

$time 17.5 "$node_(8) 2700.0 3000.0 0.0"

$time 18.0 "$node_(8) 2750.0 3000.0 0.0"

$time 18.5 "$node_(8) 2800.0 3000.0 0.0"

$time 19.0 "$node_(8) 2850.0 3000.0 0.0"

$time 19.5 "$node_(8) 2900.0 3000.0 0.0"

$time 20.0 "$node_(8) 2950.0 3000.0 0.0"

$time 20.5 "$node_(8) 3000.0 3000.0 0.0"

$time 21.0 "$node_(8) 3050.0 3000.0 0.0"

$time 22.0 "$node_(8) 3100.0 3000.0 0.0"

$time 23.0 "$node_(8) 3150.0 3000.0 0.0"

$time 24.0 "$node_(8) 3200.0 3000.0 0.0"

$time 25.0 "$node_(8) 3250.0 3000.0 0.0"

$time 26.0 "$node_(8) 3300.0 3000.0 0.0"

$time 27.0 "$node_(8) 3350.0 3000.0 0.0"

$time 28.0 "$node_(8) 3400.0 3000.0 0.0"

$time 29.0 "$node_(8) 3450.0 3000.0 0.0"

$time 30.0 "$node_(8) 3500.0 3000.0 0.0"

$time 31.0 "$node_(8) 3550.0 3000.0 0.0"

$time 32.0 "$node_(8) 3600.0 3000.0 0.0"

$time 33.0 "$node_(8) 3650.0 3000.0 0.0"

$time 34.0 "$node_(8) 3700.0 3000.0 0.0"

$time 35.0 "$node_(8) 3750.0 3000.0 0.0"

$time 36.0 "$node_(8) 3800.0 3000.0 0.0"

$time 37.0 "$node_(8) 3850.0 3000.0 0.0"

$time 38.0 "$node_(8) 3900.0 3000.0 0.0"

$time 39.0 "$node_(8) 3950.0 3000.0 0.0"

$time 40.0 "$node_(8) 4000.0 3000.0 0.0"

Step 8: Packet Trace is enabled in NetSim GUI. At the end of the simulation, a very large .csv file is containing all the packet information is available for the users to perform packet level analysis. Plots is enabled in NetSim GUI.

Step 9: The log file can enable per the information provided in Section 3.18 5G-NR technology library document.

Step 10: Run the Simulation for 50 Seconds.

Results and Discussion#

Handover Signaling#

Figure 28‑3: Control packet flow in the 5G handover process

The packet flow depicted above can be observed from the packet trace.

  1. UE will send the UE_MEASUREMENT_REPORT every 120 ms to the connected gNB

  2. The initial UE- gNB connection and UE association with the core takes place by transferring the RRC and Registration, session request response packets.

  3. As Per the configured file-based mobility, UE 9 moves towards gNB 8.

  4. After 18.6 s gNB 7sends the HANDOVER REQUEST to gNB 8.

  5. gNB 8 sends back HANDOVER REQUEST ACK to gNB 7.

  6. After receiving HANDOVER REQUEST ACK from gNB 8, gNB 7 sends the > HANDOVER COMMAND to UE 9

  7. After the HANDOVER COMMAND packet is transferred to the UE, the target gNB will send the PATH SWITCH packet to the AMF via Switch 5

  8. When the AMF receives the PATH SWITCH packet, it sends MODIFY BEARER REQUEST to the SMF

  9. The SMF on receiving the MODIFY BEARER REQUEST provides an acknowledgement to the AMF.

  10. On receiving the MODIFY BEARER RESPONSE from the SMF, AMF acknowledges the Path switch request sent by the target gNB by sending the PATH SWITCH ACK packet back to the target gNB via Switch 5.

  11. The target gNB sends CONTEXT RELEASE to source gNB, and the source gNB sends back CONTEXT RELEASE ACK to target gNB. The context release request and ack packets are sent between the source and target gNB via Switch 6.

  12. RRC Reconfiguration will take place between target gNB and UE 9.

  13. The UE 9 will start sending the UE MEASUREMENT REPORT to gNB 8.

Figure 28‑4: Screenshot of NetSim packet trace file showing the control packets involved in handover. Some columns have been hidden before the last column.

Plot of SNR vs. Time#

Figure 28‑5: Plot of DL SNR (at UE_3 from gNB1 and gNB2) vs time. The handover process shown in Figure 28‑3 commences when Adj_cell_SNR > Serving_cell_SNR + Hand_over_Margin

This plot can be got from the LTENRLog file. However, it would involve a fair amount of time and effort. Users can analyze the log file and see.

  • Time 15.60s when the SNR from gNB7 is 7.81dB and the SNR from gNB8 is 7.81dB. This represents the point where the two curves intersect.

  • Time 18.6s when the SNR from gNB7 is 6.18 dB and the SNR from gNB8 is 9.51dB. This represents the point where Adj cell RSRP is greater than serving cell RSRP by Hand-over-margin (HOM) of 3dB.

Throughput and delay variation during handover#

NetSim UI displays the configuration file corresponding to this experiment as shown below Figure 28‑6.

Figure 28‑6: Network set up for studying the Throughput and delay variation during handover

Procedure for Effect of Handover on Delay and Throughput#

The following set of procedures were done to generate this sample:

Step 1: A network scenario is designed in NetSim GUI comprising of 2 gNBs, 5G Core, 1 Router, 1 Wired Node and 2 UEs in the "5G NR" Network Library.

Step 2: The device positions are set as per the table given below Table 28‑3.

gNB 7 gNB 8 UE 9 UE 10
X Co-ordinate 500 4500 500 4500
Y Co-ordinate 500 500 1000 1000

Table 28‑3: Device positions

Step 3: Right click on the gNB 7 and select Properties, the following is set.

Interface(5G_RAN) Properties
CA_Type Single Band
CA_Configuration n78
CA_Count 1
Numerology 0
Channel Bandwidth (MHz) 10
PRB Count 52
MCS Table QAM64
CQI Table Table 1
X_Overhead XOH0
DL UL Ratio 4:1
Pathloss Model 3GPPTR38.901-7.4.1
Outdoor Scenario Urban Macro
LOS_NLOS Selection User_Defined
LOS Probability 1
Shadow Fading Model None
Fading _and_Beamforming NO_FADING_MIMO_UNIT_GAIN
O2I Building Penetration Model LOW_LOSS_MODEL
Additional Loss Model None

Table 28‑4: gNB > Interface(5G_RAN) Properties Setting

Similarly, it is set for gNB 8.

Step 4: The Tx_Antenna_Count was set to 2 and Rx_Antenna_Count was set to 1 in gNB > Interface (5G_RAN) > Physical Layer.

Step 5: The Tx_Antenna_Count was set to 1 and Rx_Antenna_Count was set to 2 in UE > Interface (5G_RAN) > Physical Layer.

Step 6: In the General Properties of UE 9 and UE 10, set Mobility Model as File Based Mobility.

Step 7: The BER and propagation delay was set to zero in all the wired links.

Step 8: Right click on the Application Flow App1 CBR and select Properties or click on the Application icon present in the top ribbon/toolbar.

A CBR Application is generated from Wired Node 12 i.e., Source to UE 9 i.e., Destination with Packet Size remaining 1460Bytes and Inter Arrival Time remaining 233.6µs. QOS is set to UGS.

Additionally, the "Start Time(s)" parameter is set to 1, while configuring the application.

File Based Mobility:

In File Based Mobility, users can write their own custom mobility models and define the movement of the mobile users. Create a mobility.txt file for UE's involved in mobility with each step equal to 0.5 sec with distance 50 m.

The NetSim Mobility File (mobility.txt) format is as follows:

#Initial position of the UE 9

$node_(8) set X_ 500.0

$node_(8) set Y_ 1000.0

$node_(8) set Z_ 0.0

#Initial position of the UE 10

$node_(9) set X_ 4500.0

$node_(9) set Y_ 1000.0

$node_(9) set Z_ 0.0

#Positions of the UE 9 at specific time

$time 0.0 "$node_(8) 500.0 1000.0 0.0"

$time 0.5 "$node_(8) 750.0 1250.0 0.0"

$time 1.0 "$node_(8) 1000.0 1500.0 0.0"

$time 1.5 "$node_(8) 1250.0 1750.0 0.0"

$time 2.0 "$node_(8) 1500.0 2000.0 0.0"

$time 2.5 "$node_(8) 1750.0 2250.0 0.0"

$time 3.0 "$node_(8) 2000.0 2500.0 0.0"

$time 3.5 "$node_(8) 2250.0 2750.0 0.0"

$time 4.0 "$node_(8) 2500.0 3000.0 0.0"

$time 4.5 "$node_(8) 2750.0 2750.0 0.0"

$time 5.0 "$node_(8) 3250.0 2250.0 0.0"

$time 5.5 "$node_(8) 3500.0 2000.0 0.0"

$time 6.0 "$node_(8) 3750.0 1750.0 0.0"

$time 6.5 "$node_(8) 4000.0 1500.0 0.0"

$time 7.0 "$node_(8) 4250.0 1250.0 0.0"

$time 7.5 "$node_(8) 4500.0 500.0 0.0"

Step 9: Packet Trace and Event Trace is enabled in NetSim GUI. At the end of the simulation, a very large .csv file is containing all the packet information is available for the users to perform packet level analysis. Plots is enabled in NetSim GUI.

Step 10: The log file can enable per the information provided in Section 3.18 5G NR technology library document.

Step 11: Run the Simulation for 20 Seconds.

Computing delay and throughput#

Delay computation from Event Traces#

NOTE: Follow the article link given below, to generate pivot table for large Packet Trace and Event Trace files

How to generate pivot reports for large packet trace and event trace files?

  1. Open Event Trace after simulation.

  2. Goto Insert option at the top ribbon of the trace window and select Pivot Tables.

  3. In the window which arises, you can see Table_1. Click on OK.

  4. This will create a new sheet with Pivot Table as shown below Figure 28‑7.

Figure 28‑7: Blank Pivot Table

  1. Now drag and drop Packet_Id to Rows field. Similarly, drag and drop the following: Event_Type to Columns field, Event_Time to Values field as shown Figure 28‑8.

Figure 28‑8: Adding fields into Columns, Rows and Values

  1. Now in the Pivot table formed, filter Event_Type to APPLICATION_IN and APPLICATION_OUT as shown Figure 28‑9.

Figure 28‑9: Event Type filtered to APPLICATION_IN and APPLICATION_OUT to calculate delay

  1. In the Values field in the Pivot Table Fields, Click on Sum of Event Time (US) and select Value Field Settings as shown Figure 28‑10.

Figure 28‑10: Value Field Settings to Sum of Event Time

  1. Select Show Values As option and filter it to Difference From as shown Figure 28‑11.

Figure 28‑11: Select Show Values as Difference From

  1. In the Base field, select Event_Type and in the Base_item field select APPLICATION_OUT and click on OK. This will provide the end-to-end delay in the pivot table.

Figure 28‑12: Select Base field to Event Type and Base item to APPLICATION OUT

  1. Now ignore the negative readings in the Delay values (Figure 28‑13) obtained and use these values to plot the Delay vs Time (APPLICATION_IN) graph.

Figure 28‑13: Ignore the negative values in the Delay

  1. In the Event trace window, filter the Event Type to APPLICATION_IN and use the Event Time thus obtained as the x-axis of the plot.

Figure 28‑14: Event Trace

Results and Discussion#

UDP Throughput Plot

Chart Description automatically
generated

Figure 28‑15: We see how throughput varies with time, and the reasons for this variation, as the UE moves from the source gNB to the target gNB.

The application starts at 1s. The generation rate is 50 Mbps and we see the network is able to handle this load, and the throughput is equal to the generation rate. We then observe that the throughput starts dropping from 2.5s onwards because the UE is moving away from the gNB. As it moves as the SNR falls, and therefore a lower MCS is chosen leading to reduced throughput. At 3s there is a further drop in throughput and then a final dip at 3.9s. The time the handover occurs is 5.04 sec. At this point we see the throughput starts increasing once UE attaches to gNB8. The throughput for a short period of time is greater than 50 Mbps because of the transmission of queued packets in the s-gNB buffer which get transferred to the t-gNB buffer over the Xn interface.

UDP Delay Plot

Figure 28‑16: Plot of Delay vs. Time

Since the application starts at 1s, the UDP plot begins at 1000 ms. The initial UDP delay is $\approx 1\ ms$, and hence the curve is seen as close to 0 on the Y axis. We then see that the packet delay starts increasing as the UE moves away from the gNB. This is because the link capacity drops as the CQI falls. The peak delay experienced shoots up to $\approx 1.1s$ at $\approx 5.5s$ when the handover occurs. Once the handover is complete the delay starts reducing and returns to $\approx 1\ ms$. The reason is that as the UE moves closer to the gNB its CQI increases and hence the 5G link can transmit at a higher rate (see Figure 2815).