5G

## Introduction to 5G simulations with NetSim#

NetSim 5G NR library allows for end-to-end simulation of all layers of the protocol stack as well as applications running over the network[^1]. The 5G devices available in NetSim are the 5G core devices: (i) AMF, (ii) SMF, (iii) UPF, and RAN devices: (i) gNBs (ii) UEs. Simulation is discrete event and done at a packet level abstraction. This 5G library is architected to connect to the base component of NetSim (and in turn to other components), which provides functionalities such as the TCP/IP network stack, Wireless protocols, Routing algorithms, Mobility, Output Metrics, Animation, Traces etc.

NetSim’s protocol source C code shipped along with (standard / pro versions) is modular and customizable to help researchers to design and test their own 5G protocols.

## Simulation GUI#

Open NetSim, Go to New Simulation → 5G NR

### NetSim 5G Network Setup#

#### Deployment Architecture#

The deployment options have been grouped into 2 categories. Standalone (SA) option where there is only one independent access network (LTE or 5G NR) that is connected to either the EPC or the 5G Core and the Non-Standalone options where both LTE and 5G NR radio access technologies are present, where one of the access networks assist the other in connecting to either an EPC or a 5GC.

Stand Alone: In 5G Stand-alone mode of operation in NetSim, the network can be created using the 5G Core devices which includes a single AMF, SMF and UPF to which the gNB can be connected via Layer 2 Switches. The RAN part consists of gNBs and UEs and the UEs can handle both Uplink and Downlink data transfer to and from the Data Network (DN) via the UPF.

Non-Stand Alone: In the Non-Stand-alone mode of operation in NetSim, the users can design the network scenario using different deployment options.

The NSA modes in NetSim’s 5G module includes:

1. Option 3 where only LTE core/ EPC is present and no 5G Core devices are present. Option 3 is categorized into:
a. Option 3: Only eNB connects to EPC and eNB and gNB connects to the XN interface.
b. Option 3a: Both eNB and gNB connects to the EPC. gNB connects to the XN interface and eNB does not XN interface.
2. Option 4 where only 5G Core devices are present, and EPC is not available. Option 4 is categorized into:
a. Option 4: Only gNB connects to all the 5G Core interfaces. eNB connects to the XN interface.
b. Option 4a: gNB connects to all 5G Core interfaces and eNB connects to AMF and UPF through respective interfaces.
3. Option 7 where only 5G Core devices are present, and EPC is not available. Option 7 is categorized into:
a. Option 7: eNB connects to all 5G Core interfaces. gNB connects only to the XN interface.
b. Option 7a: gNB connects to all the 5G Core interfaces. eNB connects to AMF and UPF through the respective interfaces.

### Device Placement#

NetSim places the 5G core devices (AMF, SMF, UPF and Switches) / LTE EPC by default on to the grid.
a. Only one 5G Core and/or LTE EPC is currently supported.
b. Users cannot remove 5G Core devices and/or LTE EPC, or their interconnecting links.
c. User may move these devices in the grid.

• Users can drop gNBs/eNBs which get automatically connected to 5G Core. If a gNB/eNB is removed, the connected links to the core switches are automatically removed.
• Users can drop UEs and must connect them to gNBs/eNBs via links.
• Users can drop Routers and connect them to the UPF/EPC for connectivity to the data-network (DN).
• IP addressing is automatically set by NetSim. It is recommended not to change the default IP addresses.

#### NSA Deployment Device Connectivity#

The device connectivity rules are explained below. Example screen shots are available in the section 5G- Non-Stand-alone (NSA)

##### Option 3 / 3a / 3x#
• UE should mandatorily be connected to the master node (MN) first. In option 3, the MN is eNB
• UE should mandatorily be connected to the secondary node (SN) next. In option 3, the SN is the gNB
• UE cannot be connected to any other device.
• The data (external) network connects to the EPC. This is achieved by first connecting a router (let’s call it R1) to the EPC.
• Switches, nodes, APs and other routers can now be connected to R1
• Connectivity rules for the devices within the data network is per the Internetwork library document.
##### Option 4 / 4a#
• UE should mandatorily be connected to the master node (MN) first. In option 4, the MN is gNB
• UE should mandatorily be connected to the secondary node (SN) next. In option 4, the SN is the eNB
• UE cannot be connected to any other device.
• The data (external) network connects to the 5G core through the UPF. This is achieved by first connecting a router (let’s call it R1) to the UPF.
• Switches, nodes, APs and other routers can now be connected to R1
• Connectivity rules for the devices within the data network is per the Internetwork library document.
##### Option 7 / 7a#
• UE should mandatorily be connected to the master node (MN) first. In option 7, the MN is eNB
• UE should mandatorily be connected to the secondary node (SN) next. In option 7, the SN is the gNB
• UE cannot be connected to any other device.
• The data (external) network connects to the 5G core through the UPF. This is achieved by first connecting a router (let’s call it R1) to the UPF.
• Switches, nodes, APs and other routers can now be connected to R1.
• Connectivity rules for the devices within the data network is per the Internetwork library document.

#### Grid Settings#

• NetSim allows users to design the network on a square grid. The major and minor grid lines are displayed; major grid line values along X and Y co-ordinate is displayed. Each device’s X, Y co-ordinate is determined by its location on the grid.
• Users can choose the grid size prior to placement of the first device. The grid size cannot be changed after the first device has been placed on the grid.
• The grid length can be in the range of 10m to 1,000,000m.

### Create Scenario#

5G NR comes with a palette of various devices like Wired & Wireless Nodes, L2 Switch & Access Point, AMF (Access and Mobility Management Function), UPF (User Plane Function), SMF (Session Management Function) & Router, gNB (Equivalent of eNB in LTE), UE (User Equipment), and Building. Devices are connected using 3GPP defined interfaces; O-RAN defined interfaces are not available.

### Devices Specific to NetSim 5G NR Library#

• UE: User Equipment.
• Each UE has a single LTE NR interface with an infinite buffer. It can connect to a gNB (Base Station or BS) in both FR1 (𝜇-Wave) and FR2 (mm-Wave) bands.
• A UE can be stationary or mobile.
• The UE’s location is determined by its (X, Y) co-ordinate on the grid or by its (Lat, Lon) when using a map background.
• gNB: This represents a base station (BS) with all the components i.e., antennas, radio, baseband, and the protocol stack. NetSim currently does not allow for the gNB to be split into RU, DU and CU.
• It has a 5G RAN interface for wireless connectivity to UEs.
• A gNB can be configurated as a 𝜇-Wave (FR1, sub 6GHz) or a mm-Wave (FR2) BS by appropriately selecting the frequency of operation.
• It has a 5G_N3 interface for wired connectivity to UPF through L2_Switch,
• It has a 5G_N1_N2 interface for wired connectivity to AMF through L2_Switch, and
• It has a 5G_XN interface for wired connectivity between the gNB’s though L2_Switch. gNB has an infinite buffer.
• UPF (User Plane Function): User Plane Function has 5G_N4 interface for wired connectivity to SMF, 5G_N3 interface for wired connectivity to gNB through L2_Switch, and 5G_N6 interface for wired connectivity to Routers in NG core which in turn can connect to Switches, APs, Servers etc.
• SMF (Session Management Function): Session Management Function has 5G_N11 interface for wired connectivity to AMF and 5G_N4 interface for wired connectivity to UPF.
• AMF (Access and Mobility Management Function): Access and Mobility Management Function has 5G_N11 interface for wired connectivity to SMF and 5G_N1_N2 interface for wired connectivity to gNB’s through L2_Switch.
• Building: Users can place gNBs, UEs inside buildings to simulate indoor RF propagation effects

#### Devices: Click and drop into environment#

a. AMF, UPF, and SMF:

• Exactly one set of these devices are automatically placed by NetSim into the environment and connected appropriately to switches.
• These devices are part of the 5G core.
• These devices which are placed onto the environment cannot be deleted by the user.

• Click the gNB icon on the toolbar and place the gNB in the grid it will automatically connect to the L2_Switches connected to the AMF and UPF. The logical connectivity of the different interfaces (Xn, N1-N2, and N3) are broken out into different physical links.
• gNBs can also be placed inside the building based on the network scenario created.
• Every gNB should be connected to at least one UE.

c. Add a User Equipment (UE):

• Click the UE icon on the toolbar and place the UE in the grid.
• UE’s can also be placed inside the building based on the network scenario created. The UE’s are always assumed to be connected to one gNB.
• A UE can never be connected to more than one gNB, and neither can it be out-of-range of all gNBs.

d. Add a Router: Click on Router and drop it onto the environment. At least one Router should be connected to a UPF. A router is not a mandatory requirement.

e. Add a L2 Switch or Access Point: Click the L2 Devices > L2_Switch icon or L2 Devices > Access_Point icon on the toolbar and place the device in the grid.

f. Add a Wired Node and Wireless Node: Click the Node > Wired_Node icon or Node > Wireless_Node icon on the toolbar and place the device in the grid.

g. Add a Building: Click the Building icon on the toolbar and place the building in the grid.

• Buildings will have an impact on RF propagation losses if Pathloss_Shadowfading_O2I is selected
• A building occupies a minimum 1 cell on the grid and a maximum size equal to the complete grid. The default size is 10 cells*10 cells.
• An empty space of 10 cells*10 cells within the grid is required to place a building.
• Two buildings cannot be overlap one another.
• The resizing corners of a building includes South and East edges and South-East corner
• The maximum number of buildings supported in NetSim is ten (10)

h. Connect the devices in 5G NR network by using Wired/Wireless Links present in the top ribbon/toolbar. While connecting gNB and UE, the following connections are allowed:

• Outdoor gNB to Outdoor UE.
• Outdoor gNB to Indoor UE.
• Indoor gNB to Indoor UE.
• Connecting Indoor gNB to Outdoor UE is not allowed in NetSim.
• Based on gNBs/UEs placed inside or outside of the buildings NetSim automatically choose the indoor/outdoor propagation models during simulation.

i. Configure an application as follows:

• Click the application icon on the top ribbon/toolbar.
• Specify the source and destination devices in the network.
• Specify other parameters as per the user requirement.

j. Set the properties of UPF, AMF, SMF, gNB, UE, and other devices as follows:

• Right-click an UPF, AMF, and SMF click Properties and modify the interface and layer-wise properties to your requirement.
• Right-click a gNB or UE, click Properties and specify the parameters.
• The TX_Power_per_layer (dBm) parameter (Interface 5G_RAN - Physical_Layer) is local and if you change this parameter in gNB or UE, manually update the parameter for the other devices.
• The PDCP_Header_Compression, PDCP_Discard_Delay_Timer, and PDCP_Out_of_Order_Delivery parameters (Interface 5G_RAN - DataLink_Layer) are local and if you change any of these parameters in gNB or UE, manually update the parameter for the other devices.
• Right-click an Access_Point, L2_Switch, Wireless_Node or Wired_Node and specify the parameters.
• The Interface_Wireless > Physical Layer and Interface_Wireless > DataLink Layer parameters are local and if you change any of these parameters in Access_Point or Wireless_Node, manually update the parameter for the other devices.

### GUI Parameters in 5G NR#

The 5G NR parameters can be accessed by right clicking on a gNB or UE and selecting Interface Wireless (5G RAN) Properties → Datalink and Physical Layers.

gNB Properties
Interface (5G RAN) – Datalink Layer
Parameter Type Range Description
Scheduling Type Local Round Robin The scheduler serves equal portion to each queue in circular order, handling all processes without priority.
Local Proportional Fair Schedules in proportional to the CQI of the UEs
Local Max Throughput Schedules to maximize the total throughput of the network by giving scheduling priority accordingly
Local Fair Scheduling Fair scheduling is a method of assigning resources to job such that all jobs get, on average, an equal share of resources over time.
UE Measurement Report Interval Local 120 ms - 40960 ms It is a time interval between UE Measurement Report
PDCP Header Compression Link Global True / False Header compression of IP data flows using the ROHC protocol, Compresses all the static and dynamic fields.
PDCP Discard Delay Timer Link Global 50/150/300/500/750/1500 The discard Timer expires for a PDCP SDU, or the successful delivery of a PDCP SDU is confirmed by PDCP status report, the transmitting PDCP entity shall discard the PDCP SDU along with the corresponding PDCP Data PDU.
PDCP Out of Order Delivery Link Global True / False Complete PDCP PDUs can be delivered outof-order from RLC to PDCP. RLC delivers PDCP PDUs to PDCP after the PDU reassembling.
PDCP T Reordering Timer Link Global 0-500ms This timer is used by the receiving side of an AM RLC entity and receiving AM RLC entity in order to detect loss of RLC PDUs at lower layer.
RLC T Status Prohibit Link Global 0-2400ms This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU.
RLC T Reassembly Link Global 0-200ms This timer is used by the receiving side of an AM RLC entity and receiving UM RLC entity in order to detect loss of RLC PDUs at lower layer. If t-Reassembly is running, tReassembly shall not be started additionally, i.e. only one t-Reassembly per RLC entity is running at a given time.
RLC T Poll Retransmit Link Global 5-4000ms This is used by the transmitting side of an AM RLC entity in order to retransmit a poll.
RLC Poll Byte Link Global 1kB-40mB This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollByte bytes.
RLC Poll PDU Link Global p4-p65536 (In multiples of 8) This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollPDU PDUs.
RLC Max Retx Threshold Link Global t1, t2, t3, t4, t6, t8, t16, t32 This parameter is used by the transmitting side of each AM RLC entity to limit the number of retransmissions of an AMD PDU.

Note: For detailed information on RLC, please refer RLC (Based on specification 38.322

Interface (5G_RAN) – Physical Layer
Parameter Type Range Description
Frame Duration (ms) Fixed 10ms Length of the frame.
Sub Frame Duration (ms) Fixed 1ms Length of the Sub-frame.
Subcarrier Number Per PRB Fixed 12 NR defines physical resource block (PRB) where the number of subcarriers per PRB is the same for all numerologies.
gNB Height Local 10-150m It is the height of the gNB.
TX Power (dBM) Local *40dBm to 50dBm It is the signal intensity of the transmitter.
CA_Type Local INTER_BAND_CA
INTRA_BAND_CONTIGUOUS_CA
INTRA_BAND_NONCONTIGUOUS_CA
SINGLE_BAND
Carrier Aggregation (CA) is used in LTE/5G in order to increase the bandwidth and thereby increase the bitrate. CA options are intra-band (contiguous and non-contiguous) and interband
CA_Configuration Local Depends Type on CA Drop down provides the various bands available for the selected CA type (Eg: n78, n258, n261 etc)
CA_Count Fixed Depends Type on CA Single or multiple carriers depending on the CA_Type chosen
Duplex Mode Local TDD, FDD In TDD, the upstream and downstream transmissions occur at different times and share the same channel.
In FDD, there are different frequency bands used uplink and downlink, The UL and DL transmission an occur simultaneously
Note: For detailed information to Frequency Range (FR1 & FR2), Please, refer PHY Layer
Frequency Range Local FR1 & FR2 The frequency band for 5G NR is separated into two frequency ranges. First, is Frequency Range 1 (FR1) which includes sub-6 GHz, and Frequency Range 2 (FR2) which includes frequency bands in the mmWave range.
DL/UL Ratio Local a:b Represents the ratio in which slots are assigned to downlink and uplink transmissions. The value is in the form of a:b::DL:UL. Note that the ratio 1:0 or 0:1 might lead to NIL data transmissions since the initial attachment procedures require both UL and DL control packet transmissions.
Operating Band Fixed n34, n38, n39, n40, n41, n50, n51, n77, n78, n79, n257, n258, n259, n260, n261 The 5G-NR operates in different operating bands corresponding to Frequency Ranges FR1 and FR2 respectively.
F_Low (MHz) Fixed 2010-4400 MHz The lowest frequency of the Uplink/Downlink operating band.
F_High (MHz) Fixed 2025-5000 MHz The highest frequency of the Uplink/Downlink operating band.
Numerology Local µ = 0, 1, 2, 3 It is the numerology value that represents the subcarrier spacing.
Channel Bandwidth (MHz) Local 5-400 MHz The frequency range constitutes the channel.
PRB Count Local 11-264 PRB stands for physical resource block. The PRB count is determined automatically by NetSim as per the other inputs and cannot be edited in the GUI.
Guard Band (KHz) Local 242.5-9860 KHz A guard band is the unused part of the radio spectrum between radio bands, for the purpose of preventing interference.
Subcarrier Spacing Local 15-120 KHz Subcarriers are mapped on the subset/superset of the PRB grid for subcarrier spacing of 15kHz in a nested manner in the frequency domain. The value for Subcarrier Spacing is set to 15 kHz.
Bandwidth PRB Local 180-1440 KHz Physical Resource Block Bandwidth is a range of frequencies occupied by the radio communication signal to carry most of PRB energy.
Slot per Frame Local 10, 20, 40, 80 Slot within a frame is depending on the slot configuration.
Slot per Subframe Local 1, 2, 4, 8 Slot within a Subframe is depending on the slot configuration.
Slot Duration (ms) Local 125, 250, 500, 1000 ms Slot duration gets different depending on numerology. The general tendency is that slot duration gets shorter as subcarrier spacing gets wider.
Cyclic Prefix Local Normal,  Extended Cyclic prefix is used to reduce ISI (Inter Symbol Interference), If you completely turn off the signal during the gap, it would cause issues for an amplifier. To reduce this issue, we copy a part of a signal from the end and paste it into this gap. This copied portion prepended at the beginning is called 'Cyclic Prefix'.
Symbol per Slot Local 12, 14 The number of OFDM symbols within a slot is 14 for all slot configurations.
Symbol Duration (ms) Local 71.43, 35.71, 17.86,8.93, 20.83 Symbol duration is depending on the subcarrier spacing.
ANTENNA
TX_Antenna_Count Local 1, 2, 4, 8, 16, 32, 64,128 in gNB(1, 2, 4, 8, 16 in UE) The number of transmit antennas. Power is split equally among the transmit antennas.
RX_Antenna_Count Local 1, 2, 4, 8, 16, 32, 64, 128 in gNB(1, 2, 4, 8, 16 in UE) The number of receive antennas
PDSCH CONFIG
MCS Table Local QAM64LOWSE,QAM64,QAM256 MCS (Modulation Coding Scheme) is related to Modulation Order.
X Overhead Local XOH0,XOH6,XOH12,XOH18 Accounts for overhead from CSI-RS, CORSET, etc. If the xOverhead in PDSCHServingCellconfig is not configured (a value from 0, 6, 12, or 18), N_oh^PRB the is set to 0.
PUSCH CONFIG
MCS Table Local QAM64LOWSE,QAM64,QAM256 MCS (Modulation Coding Scheme) is related to Modulation Order.
Transform Precoding Local Enable/Disable Transform Precoding is the first step to creating a DFT-s-OFDM waveform. Transform Precoding is to spread UL data in a special way to reduce the PAPR (Peak-to-Average Power Ratio) of the waveform. In terms of mathematics, Transform Precoding is just a form of DFT (Digital Fourier Transform).
CSIREPORT CONFIG
CQI Table Local Table1,Table2,Table3 The CQI indices and their interpretations are chosen from Table 1 or Table 3 for reporting CQI based on QPSK, 16QAM, and 64QAM.
The CQI indices and their interpretations are chosen from Table 2 for reporting CQI based on QPSK, 16QAM, 64QAM and 256QAM.
CHANNEL MODEL
Pathloss Model Local 3GPPTR38.901-7.4.1-NONE None represents an ideal channel with no pathloss.
TR 38.901_Standard Table 7.4.2-1 means pathloss will be calculated per the formulas in this standard
Outdoor Scenario Local Rural Macro  (RMa) For RMa, we need to specify the Building Height and Street Width.
Buildings can be used in the scenario. UEs can be inside/outside buildings but gNBs can only be outside buildings.
Local Urban Macro  (UMa) Buildings can be used in the scenario. UEs can be inside/outside buildings but gNBs can only be outside buildings.
Local Urban Micro  (UMi) Buildings can be used in the scenario. UEs can be inside/outside buildings but gNBs can only be outside buildings.
Building Height Local 5-50m It is the height of the building in meters. The building-height parameter shown in gNB, eNB Physical layer is for the Rural Macro environment.
However, the properties won't be available when users choose other environments like Urban Macro or Urban Micro.
Note: This Building-height parameter is an input parameter to the stochastic pathloss model and is not related to the “building” that can dragged and dropped into the environment.  Buildings in the GUI are present to differentiate between indoor and outdoor propagation. They do not have height as a parameter.
Street Width Local 5-50m It is the width of the street in meters.
Indoor Scenario Fixed Indoor Office Automatically chosen by NetSim in case the UE is within an indoor building.The Indoor Office parameter will be automatically chosen by NetSim depending on the scenario (whether the device is inside the building or outside).In the case of LTE, this parameter will be automatically chosen as Outdoor since buildings are not present.
Indoor Office Type Local Mixed-Office Open-Office The pathloss will be per the chosen option when the UE is within a building
LOS_NLOS Selection Fixed 3GPPTR38.901-Table 7.4.2-1
USER_DEFINED
This choice determines how NetSim decides if the gNB-UE communication is Line-of-sight or Non-Line-of-Sight. In case of USER_DEFINED the LOS probability is user defined. Else it is standards defined.
LOS Probability Local 0 to 1 If LOS Probability =1, the LOS mode is set to Line-of-Sight and if the LOS Probability =0, the LOS mode as set to Non-Line-of-Sight. For a value in between the LOS is determined probabilistically. By default, value is set to 1.
LOG_NORMAL
Select NONE to Disable Shadowing Select LOG_NORMAL to Enable Shadowing Model, and the Std dev would be per 3GPP TR38.901Table 7.4.1-1
RAYLEIGH_WITH_EIGEN_BEAMFOR MING
See section 3.9.2
O2I_Building_Penetrat ion_Model Local None,Low Loss Model,High Loss Model, The composition of low and high loss is a simulation parameter that should be determined by the user of the channel models and is dependent on the buildings and the deployment scenarios.
None to disable O2I Loss.
Low-loss model is applicable to RMa.
High-loss model is applicable to UMa and UMi.
Additional Loss Model Local NONE, MATLAB Additional Loss model can be set to None or MATLAB, if set to MATLAB then MATLAB will be automatically called by NetSim during execution.

Propagation Model: Refer mmWave Propagation Models (Per 3GPPTR38.900 Channel Model) for technical information.

UE Properties
Interface (5G_RAN) – Physical Layer
Parameter Type Range Description
UE Height (m) Local 1-22.5 It is the height of the UE in meters
TX Power (dBM) Local *40dBM to 50dBM It is the signal intensity of the transmitter. The higher the power radiated by the transmitter's antenna the greater the reliability of the communications system.
ANTENNA
TX_Antenna_Count Local 1,2,4,8,16 Number of transmit antennas. NetSim uses this parameter in MIMO operations.
RX_Antenna_Count Local 1,2,4,8,16 Number of receive antennas. NetSim uses this parameter in MIMO operations.
Beamforming Gain (dB) Local 0dB to 100dB The antenna gain provided by signal processing techniques for directional transmissions

## Model Features#

### The 5G Frame Structure#

In 5G-NR the physical time and frequency resources correspond to OFDM symbols (time) and subcarriers (frequency) respectively. The physical radio resources in each frame (or subframes) can be considered as a resource grid made up of OFDM subcarriers in the frequency domain, and OFDM symbols in the time domain. The smallest physical resource, known as the resource element (RE), comprises one subcarrier (frequency) and one OFDM symbol (time).

5G NR supports a flexible OFDM numerology to support diverse spectrum bands/types and deployment models. The numerology, 𝜇, can take values from 0 to 4 and specifies the Sub-Carrier-Spacing (SCS) as $15 \times 2^\mu kHz$ and a slot length of $\frac{1}{2^\mu} ms$. With $\mu$ varying from 0 to 4, SCS varies from 15 to 240 kHz. NetSim supports $\mu$= 0, 1, 2 for FR1 and $\mu$ = 2, 3 for FR2. The setting $\mu$ = 0 corresponds to the LTE (4G) system configuration.

In the time domain (to support backwards compatibility with LTE) the frame length in 5G NR is set to 10 ms, and each frame is composed of 10 subframes of 1 ms each. The 1 ms subframe is then divided into one or more slots in 5G, whereas LTE had exactly two slots in a subframe. The slot length depends on the numerology, $\mu$, and is equal to $\frac{1}{2^\mu}ms$. The number of OFDM symbols per slot is 14 for a configuration using normal cyclic prefix. For extended cyclic prefix, the number of OFDM symbols per slot is 12. See section 3.9.7.2 - Numerologies, for more information

In the frequency domain, the number of subcarriers per physical resource block (PRB) is fixed to 12, and the Sub-Carrier-Spacing (SCS) is $15 \times 2^\mu kHz$

Physical Resource Block (PRB): The PRB is the minimum unit of resource allocation in the frequency domain, i.e., the width of a resource block, 180 kHz. It is a system-level constant. For example, a PRB can either contain 12 subcarriers of 15 kHz each. As a formula, $PRB_{Width} = 12 \times 15 \times 2^\mu$

Resource Block (RB): It is the minimum unit of resource allocation, i.e., 1 PRB by 1 slot. NetSim’s scheduler performs resource allocation every subframe (TTI, transmission time interval), however, the granularity of resource allocation 1 slot in time, i.e., the duration of a resource block, and 1 PRB in frequency. One sub-carrier by one symbol is defined as a resource element.

### Data Transmission Overview#

• In NetSim only the DL and UL traffic channels (PDSCH and PUSCH) are modelled. The control signals and control channels are abstracted; these abstractions are explained is various parts of this document.
• In TDD operation the UL and DL transmissions are separated in the time-domain over different frames/subframes/slots/symbols and use the same carrier frequency. In FDD operation UL and DL transmissions are separated in the frequency domain, with different frequencies used for UL and for DL transmission.
• Higher layer packets arrive at the RLC buffer for each UE and each gNB.
• Prior to transmission, the MAC scheduler in the gNB determines the allocation of PRBs (PHY resources) to users. In this module the Transport block size (TBS) (explained in 3.9.12) is computed using the channel quality index (CQI). The CQI is determined by the Adaptive Modulation and Coding (AMC) function based on the SNR.
• Now, the received SNR is determined from a) large scale pathloss and shadowing calculated per the 3GPP’s stochastic propagation models, and b) the small-scale fading which leads to beamforming gains when using MIMO[^2]. These models provide signal attenuation as an output. Several parameters are used in the model, including the distance between the transmitter and the receiver. These computations are executed each associated UE-gNB pair, in DL and UL,at the start of simulation and again at every mobility event. In calculating SNR, the noise power is obtained from $𝑁 = 𝑘 \times 𝑇 \times 𝐵.$
• Note that the SNR/CQI is not computed/fed-back using reference signals/control channels but is computed on the data channel (PDSCH and PUSCH).Then it is assumed to be instantaneously known to the transmitter and receiver. This assumption is known as perfect CSIT and CSIR. With perfect CSIT the transmitter can adapt its transmission rate (MCS) relative to the instantaneous channel state (SNR).
• Based on this SNR the AMC determines a wideband CQI which indicates the highest rate Modulation and coding scheme (MCS), that it can reliably decode, if the entire system bandwidth were allocated to that user. The modulation scheme defines the number of bits, that can be carried by a single RE. Modulation scheme supported by 5G include QPSK (2 bits), 16 QAM (4 bits), 64 QAM (6 bits), and 256 QAM (8 bits). The code rate defines the proportion of bits transmitted that are useful. It is computed as the ratio of useful bits by total bits that are transmitted. The modulation order $𝑄_𝑚$, which denotes the number of bits per RE, and the code rate denoted by 𝑅 are jointly encoded as modulation and coding scheme (MCS) index. These values of $𝑄_𝑚$ and 𝑅 are then passed to the TBS determination function.
• At each gNB a frame of length 10ms is started. Each frame in turn starts 10 sub frames each of length 1ms. Each sub frame then starts a certain number of slots based on numerology.
• The PHY layer in NetSim then notifies the MAC about the slot start. The MAC sub layer in turn seeks a buffer status report from the RLC layer and invokes the MAC scheduler. It then notifies the RLC of the transmission. The RLC then transmits the transport block to the PHY layer. The downlink and uplink data channels (PDSCH, PUSCH) receive this transport block as its service data unit (SDU), which is then processed and transmitted over the radio interface.

### SDAP (Specification: 37.324)#

5G-NR User contains PHY, MAC, RLC, and PDCP same as LTE and has introduced a new layer named as SDAP (Service Data Adaptation Protocol). The features in NetSim SDAP are:

• Mapping between a QoS flow and a data radio bearer (DRB) (Due to new QoS framework)
• Marking QoS flow ID (QFI) in both DL and UL packets

In NetSim the SDAP module’s SetMode function maps the Application QoS Type (which can be set in NetSim’s GUI) to RLC mode.

Application QoS (Set in NetSim GUI) RLC Mode Priority
nrtPS, ertPS, rtPS, UGS UM Mode GBR
BE AM Mode Non-GBR

In the same function, the logical channel is also set to DTCH which is the dedicated traffic channel. Next, comes the MAC_OUT function. This function determines what the current device is connected to i.e., if it is a UE, it finds the associated gNB, else if the current device is a gNB it finds the associated UEs. The SDAP header is then added which contains the QFI. Recall that the NetSim 5G NR library only supports unicast transmissions (i.e., broadcast/multicast is not supported).

After this is the SendToNetwork function. This function is called when a packet is at MAC-IN at the receiever.. The function creates the Network Event, sets all the Event-Details and sends the packet to IP layer. And finally, the HandleMacIN function decides whether the packet must be sent to another interface (if intermediate device) or sent to network layer (if end device).. The header is stripped off.

#### 5G QoS characteristics#

5G Quality of Service (QoS) model is based on QoS Flows. Each QoS flow has a unique identifier called QoS Flow Identifier (QFI). There are two types of flows: Guaranteed Bit Rate (GBR) QoS Flows and Non-GBR QoS Flows. Every QoS flow has a QoS profile that includes QoS parameters and QoS characteristics. Applicable parameters depend on GBR or non-GBR flow type. QoS characteristics are standardized or dynamically configured.

The current NetSim COTS build does not implement 5G QoS. All traffic flowing is categorized as non-GBR. A framework has been provided for users to modify the underlying code to implement QoS flow categorization in terms of:

1. Resource Type (GBR, Delay critical GBR or Non-GBR);
2. Priority Level.
3. Packet Delay Budget.
4. Packet Error Rate.

### RLC (Based on specification 38.322)#

NetSim RLC entity is based on 3GPP Technical specification 38.322. The RLC layer sits between PDCP and MAC layer. The RLC has three different modes of operation: TM (Transparent Mode), UM (Unacknowledge Mode) and AM (Acknowledge mode) as shown in diagram below Figure

A brief summary of key features of these modes is as follows:

• TM: No RLC Header, Buffering at Tx only, No Segmentation/Reassembly, No feedback (i.e, No ACK/NACK)
• UM: RLC Header, Buffering at both Tx and Rx, Segmentation/Reassembly, No feedback (i.e., No ACK/NACK)
• AM: RLC Header, Buffering at both Tx and Rx, Segmentation/Reassembly, Feedback (i.e., ACK/NACK)

Each of these modes can both transmit and receive data. In TM and UM, separate entity is used for transmission and reception, but in AM a single RLC entity perform both transmission and reception,

NetSim implements all the 7 entities for the RLC that are shown Figure 3 5: RLC Modes of operation and RLC Entities.RLC Modes of operation and RLC Entities. Note that each of logical channels use a specific RLC mode:

• BCCH, PCCH, CCCH use RLC TM only.
• DCCH use RLC AM only.
• DTCH use RLC UM or AM. (Which mode is used for each DTCH channel, is determined by RRC message).

The RLC entities provide the RLC service interface to the upper PDCP layer and the MAC service interface to the lower MAC layer. The RLC entities use the PDCP service interface from the upper PDCP layer and the MAC service interface from the lower MAC layer.

The main call at the transmit side RLC is done in the function
fn_NetSim_LTENR_RLC_HandlePDUFromUpperLayer() in the file LTENR_RLC.c

Then the MAC Layer calls the following function in LTENR_RLC.c
UINT fn_NetSim_LTENR_RLC_BufferStatusNotificaton(NETSIM_ID d, NETSIM_ID in, NETSIM_ID r, NETSIM_ID rin, LTENR_LOGICALCHANNEL logicalChannel)to know the buffer status in order to do the scheduling

Once the MAC Layer allocates resources it calls the following function in LTENR_RLC.c
void fn_NetSim_LTENR_RLC_TransmissionStatusNotification(NETSIM_ID d, NETSIM_ID in,NETSIM_ID r, NETSIM_ID rin, UINT size, LTENR_LOGICALCHANNEL logicalChannel)

UM stands for 'Unacknowledged Mode'. 'Unacknowledged Mode' means 'it does not require any reception response from the other party'. 'Reception response' simply mean 'ACK' or 'NACK' from the other party. (UM mode is similar to TM mode in that it does not require any ACK/NACK from the other party, but it is different from TM in that it has its own header)

Per the figure below the RLC transmit side (All the RLC UM functionality is available in the file LTENR_RLC_UM.c in the project LTE_NR).

• Buffers the data and generates RLC Header. This is handled in NetSim by the function void LTENR_RLC_UM_HandlePDUFromUpperLayer()
• Segmentation of the RLC SDU and modification RLC Header (Some fields in RLC header may be changed based on the segmentation status)
• The above two functionalities are handled in NetSim by the function UINT LTENR_RLC_UM_SEND_PDU (NETSIM_ID d, NETSIM_ID in,NETSIM_ID r, NETSIM_ID rin, UINT size, LTENR_LOGICALCHANNEL logicalChannel) which in turn calls the function static NetSim_PACKET* LTENR_RLC_UM_FRAGMENT_PACKET (NetSim_PACKET* p, UINT size, UINT sn) and the function static int LTENR_RLC_UM_ADD_HDR(NetSim_PACKET* p)

NOTE: If you compare this in LTE process, it seems that UM RLC does not perform any 'Concatenation'. According to following statement from 38.322 v0.1.0, the 'concatenation' process is moved to MAC layer.

From RAN2 NR#1: Working assumption on no RLC concatenation taken at RAN2#96 is confirmed (i.e., concatenation of RLC PDUS is performed in MAC).

The main call at the receive side RLC is done in the function void fn_NetSim_LTENR_RLC_HandleMACIN() in the file LTENR_RLC.c

The RLC on the receive side:

• Buffers. Here the RLC waits for all the fragments to arrive.
• This is handled in NetSim by the function void LTENR_RLC_UM_RECEIVE_PDU(). If there is no fragments then call LTENR_CallPDCPIN(); else call LTENR_RLC_UM_RECEIVE_PDU_WITH_SN();
• Reorders, if required
• Reassembles
• The above three functionalities are handled in NetSim by the code in the region #pragma region RLC_UM_RECEPTIONBUFFER

NetSim GUI RLC Configurable parameters
The following timers are configured per TS 38.331 [5]:

• t-PollRetransmit: This timer is used by the transmitting side of an AM RLC entity in order to retransmit a poll. Default value in NetSim is set to ms5(5 milli seconds). Range is provided in the GUI dropdown menu.
• t-Reassembly: This timer is used by the receiving side of an AM RLC entity and receiving UM RLC entity in order to detect loss of RLC PDUs at lower layer. If t-Reassembly is running, t-eassembly shall not be started additionally, i.e. only one t-Reassembly per RLC entity is running at a given time. Default value in NetSim is set to ms5(5 milli seconds). Range is provided in the GUI dropdown menu.
• t-StatusProhibit: This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU. Default value in NetSim is set to ms5(5 milli seconds). Range is provided in the GUI dropdown menu. The following parameters are configured per TS 38.331 [5]:
• maxRetxThreshold: This parameter is used by the transmitting side of each AM RLC entity to limit the number of retransmissions corresponding to an RLC SDU, including its segments. Default value in NetSim is set to t1. Range is provided in the GUI dropdown menu.
• pollPDU: This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollPDU PDUs. Default value in NetSim is set to p4(PDUs). Range is provided in the GUI dropdown menu.
• pollByte: This parameter is used by the transmitting side of each AM RLC entity to trigger a poll for every pollByte bytes. Default value in NetSim is set as kB25 (KBytes). Range is provided in the GUI dropdown menu.

### RLC-AM (Based on specification 38.322)#

AM stands for 'Acknowledge Mode'. This means an ACK/NACK is required from the receiver unlike RLC-UM where no ACK/NACK is required from the receiver. The code for RLC-AM mode is written in the file LTENR_RLC_AM.c

The functionality of RLC-AM is:

After RLC transmitters does the segmentation/concatenation process, it adds RLC header and then it creates two identical copies and transmit the one copy of the data out to lower layer (MAC) and sends another copy to Retransmission buffer.

If the RLC gets Nack or does not get any response from the receiver for a certain period of time, the RLC PDU in the retransmission buffer gets transmitted again. If the RLC get ACK, the copy of the packet in retransmission buffer is discarded.

There are four buffers maintained in RLC-AM. There is no size defined in the standard and hence NetSim implements an infinite buffer (see LTENR_RLC.h and LTENR_RLCBuffer.c for related code). There are 3 buffers for transmit operations and 1 for receive operation:

1. Transmission buffer: Queues SDUs received from higher layer (PDCP)
2. Transmitted buffer: Queues SDUs that has been transmitted but for which ACK/NACK has not yet received.
3. Re-transmission Buffer: Queues RLC SDUs which are considered for retransmission. (i.e. for which NACK has been received)
4. Reception Buffer: Queues fragments of SDUs (receiver side)

The MAC sub layer then seeks a Buffer Status Report from the RLC.

The entry functions for RLC-AM is defined in the section #pragma region RLCAM_OUT. The first function called is void LTENR_RLCAM_HandlePDUFromUpperLayer()

Here the packet is added to the Transmission Buffer. Then based on the MAC scheduler, the MAC layer sends a notification to RLC, which in turn sends a packet by first checking the Re Transmission Buffer followed by the Transmission-Buffer. These functions are also in the same region.

The T_POLLRetransmit determines if a packet needs to be re-transmitted. If RLCAM- Ack is not received packet is moved from transmitted buffer to retransmission buffer. The codes for T_POLLRetransmit are in the section #pragma region RLCAM_T_POLLRetransmit.

#### Transmit Operations#

The transmitting side of an AM RLC entity shall prioritize transmission of RLC control PDUs over AMD PDUs. The transmitting side of an AM RLC entity shall prioritize transmission of AMD PDUs containing previously transmitted RLC SDUs or RLC SDU segments over transmission of AMD PDUs containing not previously transmitted RLC SDUs or RLC SDU segments. The transmitting side of an AM RLC entity shall maintain a transmitting window according to the state variable

TX_Next_Ack as follows:

• a SN falls within the transmitting window if TX_Next_Ack <= SN < TX_Next_Ack + AM_Window_Size;

• a SN falls outside of the transmitting window otherwise.

The transmitting side of an AM RLC entity shall not submit to lower layer any AMD PDU whose SN falls outside of the transmitting window. For each RLC SDU received from the upper layer, the AM RLC entity shall:

• associate a SN with the RLC SDU equal to TX_Next and construct an AMD PDU by setting the SN of the AMD PDU to TX_Next;

• increment TX_Next by one.

When submitting an AMD PDU that contains a segment of an RLC SDU, to lower layer, the transmitting side of an AM.

RLC entity shall:

• set the SN of the AMD PDU to the SN of the corresponding RLC SDU.

The transmitting side of an AM RLC entity can receive a positive acknowledgement (confirmation of successful reception by its peer AM RLC entity) for an RLC SDU by the following:

• STATUS PDU from its peer AM RLC entity. When receiving a positive acknowledgement for an RLC SDU with SN = x, the transmitting side of an AM RLC entity shall:

• send an indication to the upper layers of successful delivery of the RLC SDU;

• set TX_Next_Ack equal to the SN of the RLC SDU with the smallest SN, whose SN falls within the range

TX_Next_Ack ≤ SN ≤ TX_Next and for which a positive acknowledgment has not been received yet.

The receiving side of an AM RLC entity shall maintain a receiving window according to the state variable RX_Next as follows:

• a SN falls within the receiving window if RX_Next ≤ SN < RX_Next + AM_Window_Size;

• a SN falls outside of the receiving window otherwise.

When receiving an AMD PDU from lower layer, the receiving side of an AM RLC entity shall:

• either discard the received AMD PDU or place it in the reception buffer.

• if the received AMD PDU was placed in the reception buffer:

• update state variables, reassemble and deliver RLC SDUs to upper layer and start/stop t-Reassembly as needed when t-Reassembly expires, the receiving side of an AM RLC entity shall:

• update state variables and start t-Reassembly as needed.

After submitting an AMD PDU including a poll to lower layer, the transmitting side of an AM RLC entity shall:

• set POLL_SN to the highest SN of the AMD PDU among the AMD PDUs submitted to lower layer;

• if t-PollRetransmit is not running:

• start t-PollRetransmit.

• else:

• restart t-PollRetransmit

#### Actions when a RLC PDU is received from a lower layer#

At the Receive side the functionality is handled in the section #pragma region RLCAM_IN. The entry function in the receive side is void LTENR_RLC_AM_RECEIVE_PDU(). The receives the AMPDU and checks if

1. It is within the receive window.

If both the conditions are true, the AMPDU is placed in the Reception Buffer and starts the ReassemblyTimer. If the PDU has a PollRequest then it starts constructing the StatusPDU. The code for this is in the section #pragma region RLCAM_STATUSPDU_SEND

#### Reception of a STATUS report#

Upon reception of a STATUS report from the receiving RLC AM entity the transmitting side of an AM RLC entity shall:

• if the STATUS report comprises a positive or negative acknowledgement for the RLC SDU with sequence number equal to POLL_SN:

• if t-PollRetransmit is running:

• stop and reset t-PollRetransmit

### PDCP (Based on specification 38.322)#

The PDCP layer receives a packet (data/control) from the upper layer, executes the PDCP functions and then transmits it to a lower layer.

PDCP Entity: The PDCP entities are located in the PDCP sublayer. NetSim currently implements one PDCP entity per UE (users can add more by modifying the code). The same PDCP entity is associated with both the control and the user plane.

The source code files related to PDCP are:

• LTENR_PDCP.c
• LTENR_PDCP.h

and the primitives are void fn_NetSim_LTENR_PDCP_TransmitPDCPSDU(), to send the PDCP SDU to a lower layer, and fn_NetSim_LTENR_PDCP_ReceivePDCPSDU()

The PDCP functionality supported (see LTENR_PDCP.c) in NetSim is:

• Transmit PDCP SDU
• Sets the PDCP Sequence Number
• Calls RLC service primitive.
• PDCP Association
• This call back function is invoked when the UE associates/dissociates from a gNB.
• Maintenance of PDCP sequence numbers (to know more check the PDCP entity structure)
• When the discardTimer expires for a PDCP SDU, or the successful delivery of a PDCP SDU is confirmed by PDCP status report, the transmitting PDCP entity shall discard the PDCP SDU along with the corresponding PDCP Data PDU.
• Discarding a PDCP SDU already associated with a PDCP SN causes a SN gap in the transmitted PDCP Data PDUs, which increases PDCP reordering delay in the receiving PDCP entity.
• NetSim Specific (can be seen in the event trace upon completion of simulation)
• Event Type: TIMER_EVENT
• Transmission Buffer (size is assumed to infinite): This is where PDCP SDU's are stored before being sent down to a lower layer.
• PDCP Entity: The PDCP Entity structure is defined in LTENR_PDCP.h
• PDCP State variables.
• TREORDERING Timer.

### MAC Layer#

#### Overview#

NetSim 5G NR MAC implements the following features:

• Multiplexing/de-multiplexing of MAC SDUs into/from transport blocks for DL-SCH and UL-SCH data transfer
• Buffer status reporting
• MAC Scheduler

#### MAC Scheduler#

At each gNB the MAC scheduler decides the PRB allocation, in a slot, for DL and UL, for each carrier. Control packets such as the buffer status report (BSR) and UL assignment, are assumed to be sent out of band. The resources for transmission of these packets are part of Overhead as defined in 3.9.16. The MAC scheduler works as follows:

• Round Robin: It divides the available PRBs among the active flows, i.e., those logical channels which have a non-empty RLC queue. The MCS for each user is calculated according to the received CQIs.
• Proportional fair: It allocates PRBs in proportion to the CQI of the active flows. The allocation for each user is not in the ratio of reported rate to its fading-averaged value.
• Max throughput: It allocates PRBs to the active flow(s) to maximize the achievable rate. In other words, it selects the user that sees the highest CQI.
• Fair Scheduler: It ensures equal throughputs for all active flows.

Note that these are MAC scheduling algorithms, and do not use the QoS parameter that can be set in the Application properties in NetSim’s GUI.

### PHY Layer#

#### Overview of the PHY implementation#

NetSim is a packet level simulator for simulating the performance of end-to-end applications over various packet transport technologies. NetSim can scale to simulating networks with 100s of end-systems, routers, switches, etc. NetSim provides estimates of the statistics of application-level performance metrics such as throughput, delay, packet-loss, and statistics of network-level processes such as buffer occupancy, collision probabilities, etc.

In order to achieve a scalable simulation, that can execute in reasonable time on desktop level computers, in all networking technologies the details of the physical layer techniques have been abstracted up to the point that bit-error probabilities can be obtained from which packet error probabilities are obtained.

Of all the wireless access technologies implemented in NetSim, the most sophisticated is 5G NR, in which the physical layer utilizes a variety of techniques that go well beyond even 4G LTE. These include multiple subcarrier bandwidths in the same system, slot lengths that depend on the subcarrier bandwidth, flexible time-division duplexing, a wide range of constellation sizes and coding rates, multiuser MIMO-OFDM, etc. Particularly with regard to MIMO-OFDM, with the attendant channel estimation (the errors therein), and the complexities of signal processing, NetSim has taken the design decision to replace these by idealized, symbol level models, where the statistics of the effective stochastic channel gains, and the statistics of the effective stochastic noise and interference are modelled in an idealized setting. Such models then permit the calculation of the required bit error rates, and thereby code block error rates, etc.

Overview of the 5G NR PHY:

• 5G NR utilizes an implementation of OFDMA, with several different carrier bandwidths, and a wide range of modulation and coding schemes.
• Users would be sharing the same RF bandwidth but would be using different modulation schemes and thus obtaining different bit rates. As the devices involved in the communication move around, the radio channel between them also keeps changing.
• The received SNR is determined from pathloss calculated per the 3GPP’s stochastic propagation models. The models provide signal attenuation as an output. Several parameters are used in the model, including the distance between the transmitter and the receiver.
• A CQI is computed for all the symbols in one TB, based on the SNR calculated on the data channels (DL and UL). The SNR calculation is done at the start of the simulation, then every UE measurement interval and also at every instant a UE moves. In calculating SNR, the noise power is obtained from $𝑁 = 𝑘 \times 𝑇 \times 𝐵.$
• Based on the SNR, the Adaptive Modulation and Coding (AMC) functionality determines the values of 𝑄, the modulation order, and 𝑅, the code rate, in the TBS formula. The SNR is computed on a per UE level for UL and DL.
• The transport block size in NetSim is as per the MAC procedure for TBS determination standardized in TS 38.214 Section 5.1.3.2 (DL) and 6.1.4.2 (UL).
• An approximate estimate of the TBS per carrier is.
$$n_{info} = R \times log_2Q \times v \times n^{rb}_{sc} \times n_{symbols} \times N_{PRB} \times(1-OH)$$ Where 𝑅 is the code rate, 𝑄 is the modulation order, 𝜈 is the number of MIMO layers, $𝑛^{rb}_{𝑠𝑐}$ is the number of sub carriers per resource block, $𝑛_{𝑠𝑦𝑚𝑏𝑜𝑙}$ is the number of symbols per slot, $𝑁_{𝑃𝑅𝐵}$ is the number of PRBs and 𝑂𝐻 is the overheads specified in the standard.
• The available PHY resource is shared dynamically between the users, with the resource allocation being dynamically adjusted per user demands and channel conditions. The MAC Scheduler determines the data (how much to and from, which UE and gNB) that is to be transmitted, from the higher layer RLC buffer, in units of Physical Resource Blocks (PRBs). It is transmitted at a rate determined using 𝑅, code rate and 𝑄, modulation order of the UE –gNB channel.

#### Digital Beamforming#

• For a transmitter (gNB or eNB) with 𝑡 antennas and a receiver with 𝑟 antennas, the $𝑟 × 𝑡$ channel gain matrix (between every transmit-receive antenna pair) has complex Gaussian elements. We assume in the standard model that the complex Gaussian elements are statistically independent across elements, and each element is a circularly symmetric Gaussian. We denote this matrix by 𝐻.
• For the channel matrix 𝐻 being defined as above, the Wishart Matrix is defined as follows: $$𝑊 = 𝐻 𝐻^\dagger \ \ \ \ r<t$$ $$𝑊 = 𝐻^\dagger 𝐻 \ \ \ \ 𝑟 ≥ t$$

Therefore, letting $𝑚 = min(𝑟,𝑡)$, 𝑊 is an 𝑚 × 𝑚 nonnegative definite matrix, with eigenvalues $\lambda_1 \geq \lambda_2 \geq \lambda_3 \geq ⋯ ≥ \lambda_𝐿 > 0 = \lambda_{𝐿+1} = ⋯ = \lambda_𝑚$. It is these eigenvalues that are used in the parallel SISO models described below.

• NetSim permits the user to enable or disable a stochastic fading model. Fading is modelled by the elements of 𝐻 being time varying, with some coherence time. Such time variation results in the eigenvalues of 𝑊 also varying. NetSim models such time variation by letting the user define a coherence time during which the eigenvalues (fast fading gains) are kept fixed. For each (𝑟,𝑡) value, NetSim maintains a list of samples of eigenvalues for the corresponding Wishart matrix. To model fading, a new set of eigenvalues is used by NetSim in successive coherence times.
• Putting the above discussions together, if fast fading with eigen-beamforming is enabled in NetSim’s GUI, then the MIMO link is modelled by several SISO channels (see below), with the symbol level channel gain being derived from the eigenvalues of the Wishart matrix. $$𝐵𝑒𝑎𝑚𝐹𝑜𝑟𝑚𝑖𝑛𝑔𝐺𝑎𝑖𝑛 (𝑑𝐵) = 10 log_{10}(𝐸𝑖𝑔𝑒𝑛𝑉𝑎𝑙𝑢𝑒)$$ It must be noted that the eigenvectors are not required as they are only a part of the receive and transmit signal processing, and NetSim only needs to work with the equivalent symbol-by-symbol flat fading SISO channels.
• If fast fading is disabled, NetSim reduces the MIMO transmission to a set of parallel, independent channels with constant gain, since the Beam forming gain does not change with time.
• Note that the LOS probability parameter in NetSim is solely used to compute the large scale pathloss per the 3GPP 38.901 standard. This parameter is not used in the channel rank (MIMO layers) computations. The Fading and Beam Forming parameter is used to determine (i) the number of MIMO layers and (ii) the gains in each layer, as shown in the table below
Parameter drop down option No. of MIMO layers Beamforming Gain and Model
No fading MIMO unit gain Min (𝑁𝑡, 𝑁𝑟) Unity (0 dB).
A theoretical model useful for benchmarking.
No fading MIMO array gain Min (𝑁𝑡, 𝑁𝑟) Max (𝑁𝑡, 𝑁𝑟).
Assumes Matched Filter Precoding(MFP) and Maximal Ratio Combining (MRC)
Rayleigh with Eigen Beamforming Min (𝑁𝑡, 𝑁𝑟) Eigen values of the Wishart Matrix.Assumes MFP and MRC

#### MIMO (Digital) Beamforming Assumptions in NetSim#

NetSim makes the following assumptions to simplify MIMO operations for a packet-simulator:

• Operation in spatial multiplexing mode only and not in transmit diversity mode.
• The $𝐿𝑎𝑦𝑒𝑟𝐶𝑜𝑢𝑛𝑡 = 𝑀𝑖𝑛 (𝑁_𝑡, 𝑁_𝑟)$ where $𝑁_𝑡$ is the number of transmit antennas and $𝑁_𝑟$ is equal to the number of receive antennas.
• The rank of the channel is assumed to be equal to the layer count. NetSim doesn’t perform any Rank indicator (RI) computations.
• Each layer is reduced to a flat fading SISO channel, i.e., for layer $𝑗, 1 \geq 𝑗 \geq 𝐿𝑎𝑦𝑒𝑟𝐶𝑜𝑢𝑛𝑡,$ $$𝑦𝑗 = \sqrt{\lambda_j x_j + w_j}$$ where, $𝑥_𝑗$ is the symbol transmitted, $\lambda_𝑗$is the corresponding eigenvalue of the Wishart matrix obtained as in the previous section, $𝑤_𝑗$ is circular symmetric complex Gaussian noise, and $𝑦_𝑗$ is the complex valued baseband received symbol.
• Since the distance between the transmitter and receiver is much larger than the antenna spacings, a common pathloss is assumed for every layer. The pathloss is modelled, as usual, using distance dependent pathloss (power law), log normal shadowing, and a statistical model for fast fading (e.g., Rayleigh fading).
• Then, given the transmit power in the symbol $𝑥_𝑗$, the layer SNR can be obtained directly from the flat fading SISO equivalent model displayed above.
• It is assumed that the transmit power is equally split between all 𝐿𝑎𝑦𝑒𝑟𝑠 transmitted. At a high SNR, (iterative) water-filling will lead to nearly equal power allocation across all subcarriers and all layers [1].
• The transmit power (or total radiated power) is not split equally among the antennas. The per-antenna power depends on the beamforming vector used. For example, if the (eigen) beamforming vector is $[1, 0]^T$ in the 2 antenna case, all the power is radiated out of the first antenna. If it is $\lbrack \frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\rbrack^2$, then the power is split equally among the antennas ... and so on. NetSim abstracts out the actual beamforming operation and computes the received SINR when the beamforming vectors are used.
• Downlink parallel transmission to multiple users is enabled by utilising multiple parallel resource blocks. Within each resource block, all MIMO layers are transmitted to the same UE.
• UEs receive no interference from other gNBs, and a gNB does not receive interference from UEs connected to any other gNB.
• Error free channel: This arises due to the practical fact that the adaptive MCS algorithm chooses the modulation order and coding scheme based on the SNR, in such a way that the data is decoded successfully at the receiver with a very high probability.
• The MAC scheduler will assign the subcarriers to the UEs. If required all available subcarriers can also be assigned to a single UE.
• The channel is flat across the bandwidth per user. Modeling frequency selective fading within each user has been avoided to reduce computation time; NetSim already chooses a different fading gain every coherence time. Hence a further averaging over frequency is not modelled. Note that scheduler does not allot RBs based on CQI feedback and hence modelling frequency selectivity is not necessary.

Figure 3-9: An example NetSim output showing SINR vs. time for each MIMO layer, as the UE moves away from the gNB. The beamforming gain is recalculated every coherence time

In summary, NetSim models the effect of eigen-beamforming in MIMO systems via the eigenvalues of the gram matrix formed using (random) channel instantiations. These eigenvalues are used to compute layer-wise SNRs and the corresponding CQI. The CQI values are used by a scheduler to fix the TBS parameters, and this in turn determines the throughput.

NetSim's power lies in its ability to incorporate the impact of link-level factors (such as beamforming) on the network-level performance with high precision and computational efficiency. This, in turn, allows the simulator to scale to 10s of gNBs and 100s of UEs, and yet return performance results in a short time.

#### Analog beamforming in the SSB#

1. In Analog beamforming, multiple antennas are used to concentrate the radiated power towards a particular direction (e.g., a part of a sector), thus improving the received SINR and the probability of detecting the SSB from the gNB (at a UE.)
2. Analog beamforming and digital beamforming are different as shown in the table below
Analog Beamforming Digital Beamforming
Benefit Array gain Spatial Multiplexing/Diversity
Principle Use the antennas to steer the main lobe towards the users in a particular area (e.g., a sector, and e.g., using a phased array)
Directional (Spatial)
Channel independent
Transmit and receive coding to create parallel channels
Eigen vector based
Channel dependent
Use Case mmWave
Short range
LOS
Low and Mid Band
Medium and long ranges
NLOS

Table 3-2: Difference between Analog and digital beamforming

1. In NetSim, downlink Analog beamforming is implemented only in the control plane, i.e., broadcast beams for the SS/PBCH channel. If Analog beamforming is enabled in the UI then it will be used in signal strength calculations for purposes of Initial access (association) and Handovers.
2. The Analog beam forming gain computed is a wideband estimate.
3. A certain fraction of the (time-frequency) resources is deducted for control plane operations, when computing available resources in the PDSCH. This fraction is termed as overheads (OH) and the fractions are different for DL, UL and for FR1, FR2 as explained in section 3.9: Beamforming in NetSim. Analog beamforming measurements are assumed to be part of this overhead.
4. The Initial access and handover decisions are based on received SSB SNR, defined as

$$SNR=\frac{RxSignalLevel(dB)+AnalogBFGain(dB)}{N_0×W}$$

where $N_0$ is the noise spectral density and W is the channel bandwidth. Recall, that rate (MCS selection) is based on PDSCH SINR.

• Given the directional beamforming and the periodic transmission bursts we assume that SSB interference from other gNBs to be NIL. The probability of two SSB (directional) beams from two gNBs arriving at the same time at a UE is low. Even if this were to occur then both beams would be impacted almost equally by interference and the relative impact is negligible. This stems from the fact that UEs would see nearly equal powers from each gNB when H/O is occurring. Hence $SNR$ is used.
• In the above formula $$RxSignalLevel=gNBTxPower+Pathgain+ShadowFading$$

• The $gNBTxPower$ is the transmit power in the SSB. This is different from the per layer transmit power that NetSim uses in PDSCH transmissions. The SSB power is set equal to the total power across all layers in the data channel (PDSCH).

• NetSim does not (currently) implement Analog beamforming in the PDSCH or in the PUSCH. Digital beamforming can be enabled in the PDSCH/PUSCH as explained in section 3.9.
• Analog beamforming is support in 5G (gNBs) only since 4G (eNBs) does not support beamforming the SSB
##### Assumptions#
• A1. The UE’s optimal receive beam is perfectly aligned to the gNB’s optimal transmit beam. As shown in the figure below, UE needs to measure RSRP based on the selected best SSB from serving cell and neighbouring cells, respectively. In the figure, UE measures the SS-RSRP from SSB with analog beamforming direction 3 from the serving cell, and from SSB from analog beamforming direction 1 from neighbouring cell. In this example, NetSim assumes beam 3 from s-gNB and beam 1 from neighbor gNB in perfectly aligned with the UE’s receive beams

Figure 3 10: UE Measuring RSRP using Beamforming

• A2. Based on A1, NetSim computes an upper bound on the average Analog beam forming gain (dB) as $10log_{10}⁡(N_t×N_r)$. Here $N_t$ is the transmit antenna count at the gNBs and $N_r$ is the receive antenna count at the UE.
• A3. The beam selection and alignment are assumed to occur instantaneously. There is no time delay to account for beam-selection, SSB burst periodicity etc. Users requiring such time delays can attempt modelling it using the Handover interruption time variable available in the gNB properties. In any case, the beam selection/monitoring of the best beams from both serving and neighbouring cells are assumed to be occurring in parallel with the other data processing taking place at the UE.
##### Logging#

There is a change in radio measurements data logging in comparison with v13.1.

• The column DL/UL is being replaced as "Channel" and will have three types of entries (i) PDSCH (ii) PUSCH and (iii) SSB.
• PUSCH/PDSCH transmit/receive powers will continue to be logged on a per MIMO layer basis.
• The SSB is transmitted/received as a single stream using all Tx/Rx antennas. Hence this will have a single value for Tx-power (equal to the gNB Tx-power set in UI), for Rx-power and for AnalogBFGain.

#### Minimum guardband and transmission bandwidth configuration#

The minimum guardband for each UE channel bandwidth and SCS is specified below.

SCS (kHz) 50 MHz 100 MHz 200 MHz 400 MHz
60 1210 2450 4930 N/A
120 1900 2420 4900 9860

Standards Table 5.3.2-1: Minimum guardband for each UE channel bandwidth and SCS (kHz)

NOTE: The minimum guardbands have been calculated using the following equation: $$\frac{BW_{channel}×1000(kHz)-N_{RB}×SCS×12)-SCS)}{2}$$

where N_RB are from Table 5.3.2-1. The minimum guardband of receiving BS SCS 240 kHz SS/PBCH block for each UE channel bandwidth is specified below.

SCS (kHz) 100 MHz 200 MHz 400 MHz
240 3800 7720 15560

Standards Table 5.3.3-2: Minimum guardband (kHz) of SCS 240 kHz SS/PBCH block

NOTE: The minimum guardband in Table 5.3.3-2 is applicable only when the SCS 240 kHz SS/PBCH block is received adjacent to the edge of the UE channel bandwidth within which the SS/PBCH block is located.

For a transmitter (gNB or eNB) with t antennas and a receiver with r antennas, the $𝑁𝑟 × 𝑁𝑡$ channel gain matrix (between every transmit-receive antenna pair) on a given subcarrier has complex Gaussian elements. We assume in the standard model that the complex Gaussian elements are statistically independent across elements (which is the case the antennas are spread sufficiently far apart, e.g., of the order of a few wavelengths), and each element is a circularly symmetric Gaussian. We denote this matrix by H.

In NetSim, Fast-Fading is modeled by the elements of the H-Matrix being time-varying, with some coherence time. NetSim abstracts out the actual (digital) beamforming operation and computes the received SINR when the beamforming vectors are used. The MIMO link is modelled by parallel SISO channels, and the beamforming gain/loss would be equal to Eigenvalues of the Gram matrix of H (which would also be time-varying). This is the case when the transmitter/receiver use Eigen beamforming to precode/combine the signals across antennas, respectively. In turn, it assumes the availability of channel state information at both the transmitter and receiver. In the case where multiple layers are transmitted to different users, the interference is calculated by considering its statistics, by assuming that the channels between the base station and the different users to be independent of each other.

#### NR Frequency Bands#

The definition of frequency ranges is per the table given below Table

Frequency range designation Corresponding frequency range
FR1 410 MHz – 7125 MHz
FR2 24250 MHz – 52600 MHz
##### NR Band – FR 1#

The FR1 bands (per 3GPP TS 38.101-1 V15.5.0 (2019-03)) implemented in NetSim are those that run:

• TDD single band in Duplex mode, namely n34, n38, n39, n40, n41, n50, n51, n77, n78, n79 as shown below in Table 3-3.
• FDD Single band in Duplex mode, namely n1, n2, n3, n5, n7, n8, n12, n20, n25, n28, n66, n70, n71 and n74 as shown below in Table 3 4.
NR operating band Uplink(UL) Opearting band
F$_{UL\_low}$ –  F$_{UL\_high}$
F$_{DL\_low}$ –  F$_{DL\_high}$
Duplex Mode
n1 1920 MHz – 1980 MHz 2110 MHz – 2170 MHz FDD
n2 1850 MHz – 1910 MHz 1930 MHz – 1990 MHz FDD
n3 1710 MHz – 1785 MHz 1805 MHz – 1880 MHz FDD
n5 824 MHz – 849 MHz 869 MHz – 894 MHz FDD
n7 2500 MHz – 2570 MHz 2620 MHz – 2690 MHz FDD
n8 880 MHz – 915 MHz 925 MHz – 960 MHz FDD
n12 699 MHz – 716 MHz 729 MHz – 746 MHz FDD
n20 832 MHz – 862 MHz 791 MHz – 821 MHz FDD
n25 1850 MHz – 1915 MHz 1930 MHz – 1995 MHz FDD
n28 703 MHz – 748 MHz 758 MHz – 803 MHz FDD
n34 2010 MHz – 2025 MHz 2010 MHz – 2025 MHz TDD
n38 2570 MHz – 2620 MHz 2570 MHz – 2620 MHz TDD
n39 1880 MHz – 1920 MHz 1880 MHz – 1920 MHz TDD
n40 2300 MHz – 2400 MHz 2300 MHz – 2400 MHz TDD
n41 2496 MHz – 2690 MHz 2496 MHz – 2690 MHz TDD
n50 1432 MHz – 1517 MHz 1432 MHz – 1517 MHz TDD
n51 1427 MHz – 1432 MHz 1427 MHz – 1432 MHz TDD
n66 1710 MHz – 1780 MHz 2110 MHz – 2200 MHz FDD
n70 1695 MHz – 1710 MHz 1995 MHz – 2020 MHz FDD
n71 663 MHz – 698 MHz 617 MHz – 652 MHz FDD
n74 1427 MHz – 1470 MHz 1475 MHz – 1518 MHz FDD
{--n75--} {--N/A--} {--1432 MHz – 1517 MHz--} {--SDL--}
{--n76--} {--N/A--} {--1427 MHz – 1432 MHz--} {--SDL--}
n77 3300 MHz – 4200 MHz 3300 MHz – 4200 MHz TDD
n78 3300 MHz – 3800 MHz 3300 MHz – 3800 MHz TDD
n79 4400 MHz – 5000 MHz 4400 MHz – 5000 MHz TDD
{--n80--} {--1710 MHz – 1785 MHz--} {--N/A--} {--SUL--}
{--n81--} {--880 MHz – 915 MHz --} {--N/A--} {--SUL--}
{--n82--} {--832 MHz – 862 MHz --} {--N/A--} {--SUL--}
{--n83--} {--703 MHz – 748 MHz --} {--N/A--} {--SUL--}
{--n84--} {--1920 MHz – 1980 MHz--} {--N/A--} {--SUL--}
{--n86--} {--1710 MHz – 1780 MHz--} {--N/A--} {--SUL--}
###### Maximum transmission bandwidth configuration#

The maximum transmission bandwidth configuration NRB for each UE channel bandwidth and subcarrier spacing is specified below Table

SCS(kHz) 5MHz 10 MHz 15 MHz 20 MHz 25 MHz 30 MHz 40 MHz 50 MHz 60 MHz 80 MHz 90 MHz 100 MHz
$N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$ $N_{RB}$
15 25 52 79 106 133 160 216 270 N/A N/A N/A N/A
30 11 24 38 51 65 78 106 133 162 217 245 273
60 N/A 11 18 24 31 38 51 65 79 107 121 135
###### Minimum guard band and transmission bandwidth configuration#

The minimum guard band for each UE channel bandwidth and SCS is specified below Table

SCS(kHz) 5MHz 10 MHz 15 MHz 20 MHz 25 MHz 30MHz 40 MHz 50 MHz 60 MHz 80 MHz 90 MHz 100 MHz
15 242.5 312.5 382.5 452.5 522.5 592.5 552.5 692.5 N/A N/A N/A N/A
30 505 665 645 805 785 945 905 1045 825 925 885 845
60 N/A 1010 990 1330 1310 1290 1610 1570 1530 1450 1410 1370

NOTE: The minimum guardbands have been calculated using the following equation: $$\frac{(𝐵𝑊_{𝑐ℎ𝑎𝑛𝑛𝑒𝑙} \times 1000(𝑘𝐻𝑧) − 𝑁_{𝑅𝐵} \times 𝑆𝐶𝑆 \times 12) − 𝑆𝐶𝑆}{2}$$ where $𝑁_{𝑅𝐵}$ are from Table 5.3.2-1.

The minimum guardband of receiving BS SCS 240 kHz SS/PBCH block for each UE channel bandwidth is specified below.

#### NR Band – FR 2#

The FR2 bands (per 3GPP TS 38.101-2 V15.5.0 (2019-03)) implemented in NetSim as shown below Table

NR operating band Uplink(UL) Opearting band
F$_{UL\_low}$ –  F$_{UL\_high}$
F$_{DL\_low}$ –  F$_{DL\_high}$
Duplex Mode
n257 26500 MHz – 29500 MHz 26500 MHz –  29500 MHz TDD
n258 24250 MHz - 27500 MHz 24250 MHz - 27500 MHz TDD
n260 37000 MHz – 40000 MHz 37000 MHz - 40000 MHz TDD
n261 27500 MHz - 28350 MHz 27500 MHz - 28350 MHz TDD
###### Maximum transmission bandwidth configuration#

The maximum transmission bandwidth configuration NRB for each UE channel bandwidth and subcarrier spacing is specified below.

SCS(kHz) 50 MHz 100 MHz 200 MHz 400 MHz
NRB NRB NRB NRB
60 66 132 264 N/A
120 32 66 132 264

#### UE channel bandwidth#

##### General#

All UEs connected to BS (gNB) have the same channel bandwidth. This is a user settable bandwidth available in the gNB properties. Bandwidth is a single parameter in TDD; in FDD users can set DL bandwidth and UL bandwidth. It is currently not possible in NetSim to configure different channel bandwidths to different UEs connected to a BS. The above is true even in case of carrier aggregation (CA). All component carriers (CCs) are assigned to all UEs, and the pooled OFDM resources are shared between the UEs.

#### Frame structure and physical resources#

##### Numerologies#

Multiple OFDM numerologies are supported as given by below Table where $\mu$ and the cyclic prefix for a bandwidth part are obtained from the higher-layer parameter subcarrierSpacing and cyclicPrefix, respectively

$\mu$ $\varDelta_f = 2^{\mu}.15[kHz]$ Cyclic prefix
0 15 Normal
1 30 Normal
2 60 Normal, Extended
3 120 Normal
4 240 Normal
##### Frames and subframes#

Downlink and uplink transmissions are organized into frames with $𝑇_𝑓 =10ms$ duration, each consisting of ten subframes of $𝑇_{𝑠𝑓}=1ms$ duration. The number of consecutive OFDM symbols per subframe is $N^{subframe,\mu}_{symb} = 𝑁_{symb}^{slot} 𝑁_{slot}^{subframe,\mu}$. Each frame is divided into two equally-sized half-frames of five subframes each with half-frame 0 consisting of subframes 0 – 4 and half-frame 1 consisting of subframes 5 – 9.

There is one set of frames in the uplink and one set of frames in the downlink on a arrier. Uplink frame number 𝑖 for transmission from the UE shall start $𝑇_{𝑇𝐴} = (𝑁_{𝑇𝐴} + 𝑁_{𝑇𝐴,o𝑓𝑓𝑠𝑒𝑡})𝑇_{𝑐}$ before the start of the corresponding downlink frame at the UE where $N_{TA,offset}$ is given by [5, TS 38.213].

##### Slots#

For subcarrier spacing configuration $\mu$, slots are numbered $𝑛^{\mu}_s \epsilon \lbrace0, … , 𝑁_{slot}^{subframe,\mu − 1}\rbrace$ in increasing order within a subframe and $𝑛^{\mu}_{s,f} \epsilon \lbrace0, … , 𝑁_{slot}^{subframe,\mu − 1}\rbrace$ in increasing order within a frame. There are $𝑁_{symb}^{slot}$ consecutive OFDM symbols in a where $𝑁_{symb}^{slot}$ depends on the cyclic prefix as given by Tables 4.3.2-1 and 4.3.2-2. The start of slot $𝑛_s^{\mu}$ in a subframe is aligned in time with the start of OFDM symbol $𝑛_𝑠^\mu 𝑁_{symb}^{slot}$ in the same subframe.

OFDM symbols in a slot can be classified as 'downlink', 'flexible', or 'uplink'. Signaling of slot formats is described in subclause 11.1 of [5, TS 38.213].

In a slot in a downlink frame, the UE shall assume that downlink transmissions only occur in 'downlink' or 'flexible' symbols.

In a slot in an uplink frame, the UE shall only transmit in 'uplink' or 'flexible' symbols. A UE not capable of full-duplex communication among a group of cells is not expected to transmit in the uplink in one cell within the group of cells earlier than $𝑁_{Rx-Tx}𝑇_c$ after the end of the last received downlink symbol in the same or different cell within the group of cells where $𝑁_{Rx-Tx}$ is given by. Table 4.3.2-3.

A UE not capable of full-duplex communication among a group of cells is not expected to receive in the downlink in one cell within the group of cells earlier than $𝑁_{Rx-Tx}𝑇_c$ after the end of the last transmitted uplink symbol in the same or different cell within the group of cells where $𝑁_{Tx-Rx}$ is given by Table 4.3.2-3..

$\mu$ $𝑵^{slot}_{symb}$ $𝑵^{frame, \mu}_{slot}$ $𝑵^{subframe, \mu }_{slot}$
0 14 10 1
1 14 20 2
2 14 40 4
3 14 80 8
4 14 160 16

Standards Table 4.3.2-1: Number of OFDM symbols per slot, slots per frame, and slots per subframe for normal cyclic prefix

$\mu$ $𝑵^{slot}_{symb}$ $𝑵^{frame, \mu}_{slot}$ $𝑵^{subframe, \mu }_{slot}$
2 12 40 4

Standards Table 4.3.2-2: Number of OFDM symbols per slot, slots per frame, and slots per subframe for extended cyclic prefix

Transition time FR1              FR2
$𝑵_{Tx-Rx}$ 25600 13792
$𝑵_{Rx-Tx}$ 25600 13792

Standards Table 4.3.2-3: Transition time 𝑁Rx-Tx and 𝑁Tx-Rx

#### Channel state information#

Perfect CSIT and CSIR: The channel matrix H is assumed to be known perfectly and instantaneously at the transmitter and receiver, respectively. With perfect CSIT the transmitter can adapt its transmission rate (MCS) relative to the instantaneous channel state (SNR).

##### Channel quality indicator (CQI)#

The CQI indices and their interpretations are given in Table 5.2.2.1-2 or Table 5.2.2.1-4 for reporting CQI based on QPSK, 16QAM and 64QAM. The CQI indices and their interpretations are given in Table 5.2.2.1-3 for reporting CQI based on QPSK, 16QAM, 64QAM and 256QAM.

A CQI is computed for all the symbols in one TB, based on the SNR calculated on the data channels (DL and UL). The SNR calculation is done at the start of the simulation, then every UE measurement interval and at every instant a UE moves. In calculating SNR, the noise power is obtained from $𝑁 = 𝑘 \times 𝑇 \times 𝐵$. Based on the SNR, the Adaptive Modulation and Coding (AMC) functionality determines the values of Q, the modulation order, and R, the code rate, in the TBS formula. The SNR is computed on a per UE level for UL and DL.

The modulation order and code rate is based on the table chosen by the user. In the GUI users can select “table1” (corresponding to Table 5.2.2.1-2), “table2” (corresponding to Table 5.2.2.1-3) or “table3” (corresponding to Table 5.2.2.1-4). Block error probability is currently not implemented in NetSim and hence is not used for deciding the table.

NetSim does not implement Sub-band Offset. The AMC determines a wideband CQI which indicates the highest rate Modulation and coding scheme (MCS), that it can reliably decode, if the entire system bandwidth were allocated to that user.

A combination of modulation scheme and transport block size corresponds to a CQI index if:

• the combination could be signaled for transmission on the PDSCH in the CSI reference resource according to the Transport Block Size determination described in Subclause 5.1.3.2, and

• the modulation scheme is indicated by the CQI index, and

• the combination of transport block size and modulation scheme when applied to the reference resource results in the effective channel code rate which is the closest possible to the code rate indicated by the CQI index. If more than one combination of transport block size and modulation scheme results in an effective channel code rate equally close to the code rate indicated by the CQI index, only the combination with the smallest of such transport block sizes is relevant.

CQI index   modulation code rate $\times$ 1024    Efficiency
0 out of range
1 QPSK 78 0.1523
2 QPSK 120 0.2344
3 QPSK 193 0.3770
4 QPSK 308 0.6016
5 QPSK 449 0.8770
6 QPSK 602 1.1758
7 16QAM 378 1.4766
8 16QAM 490 1.9141
9 16QAM 616 2.4063
10 64QAM 466 2.7305
11 64QAM 567 3.3223
12 64QAM 666 3.9023
13 64QAM 772 4.5234
14 64QAM 873 5.1152
15 64QAM 948 5.5547

Standards Table 5.2.2.1-2: 4-bit CQI Table 1

CQI index   modulation code rate $\times$ 1024    Efficiency
0 out of range
1 QPSK 78 0.1523
2 QPSK 193 0.3770
3 QPSK 449 0.8770
4 16QAM 378 1.4766
5 16QAM 490 1.9141
6 16QAM 616 2.4063
7 64QAM 466 2.7305
8 64QAM 567 3.3223
9 64QAM 666 3.9023
10 64QAM 772 4.5234
11 64QAM 873 5.1152
12 256QAM 711 5.5547
13 256QAM 797 6.2266
14 256QAM 885 6.9141
15 256QAM 948 7.4063

Standards Table 5.2.2.1-3: 4-bit CQI Table 2

CQI index   modulation code rate $\times$ 1024    Efficiency
0 out of range
1 QPSK 30 0.0586
2 QPSK 50 0.0977
3 QPSK 78 0.1523
4 QPSK 120 0.2344
5 QPSK 193 0.3770
6 QPSK 308 0.6016
7 QPSK 449 0.8770
8 QPSK 602 1.1758
9 16QAM 378 1.4766
10 16QAM 490 1.9141
11 16QAM 616 2.4063
12 64QAM 466 2.7305
13 64QAM 567 3.3223
14 64QAM 666 3.9023
15 64QAM 772 4.5234

Standards Table 5.2.2.1-4: 4-bit CQI Table 3

#### Efficiency#

In NetSim efficiency is calculated per the Shannon rate as $$𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 = 𝑙𝑜𝑔_2(1 +\frac{E_b}{N_0})$$ Where
$\frac{E_b}{N_0}$ is the ratio of the signal to noise in linear power scale, while SNR is the ratio in logarithmic decibel scale.

#### Modulation order, target code rate, and TBS determination#

To determine the modulation order, target code rate, and transport block size(s) in the physical downlink shared channel, the UE shall first.

• determine the modulation order (𝑄𝑚) and target code rate (𝑅) based on the procedure defined in Subclause 5.1.3.1, and and second

• the UE shall use the number of layers (𝜐), the total number of allocated PRBs before rate matching (𝑛𝑃𝑅𝐵) to determine to the transport block size based on the procedure defined in Subclause 5.1.3.2.

The UE is not expected to handle any transport blocks (TBs) in a 14 consecutive-symbol duration for normal CP (or 12 for extended CP) ending at the last symbol of the latest PDSCH transmission within an active BWP on a serving cell whenever $$2^{max(0,\mu - \mu')} . \sum_{i \epsilon S} \bigg \lfloor \frac{C_i'}{L_i} \bigg \rfloor x_i.F_i > \bigg \lfloor \frac{X}{4}\bigg \rfloor. \frac{1}{R_{LBRM}}.T_{LBRM}$$

where, for the serving cell,

• S is the set of TBs belonging to PDSCH(s) that are partially or fully contained in the consecutive-symbol duration
• for the 𝑖th TB

• 𝐶𝑖′is the number of scheduled code blocks for as defined in [5, 38.212].

• $𝐿_𝑖$ is the number of OFDM symbols assigned to the PDSCH

• $𝑋_𝑖$ is the number of OFDM symbols of the PDSCH contained in the consecutive-symbol duration

• $𝐹_𝑖 = max_{𝑗=0,...,𝐽−1}(min(𝑘_{0,𝑖}^𝑗 + 𝐸_𝑖^𝑗, 𝑁_{𝑐𝑏,𝑖}))$ based on the values defined in Subclause 5.4.2.1 [5, TS 38.212]

• $𝑘_{0,𝑖}^𝑗$ is the starting location of RV for the 𝑗th transmission

• $𝐸_𝑖^𝑗 = min(𝐸_𝑟)$ of the scheduled code blocks for the 𝑗th transmission

• 𝑁_{𝑐𝑏,𝑖} is the circular buffer length

• $𝐽 − 1$ is the current (re)transmission for the 𝑖th TB

• $\mu$' corresponds to the subcarrier spacing of the BWP (across all configured BWPs of a carrier that has the largest configured number of PRBs

• in case there is more than one BWP corresponding to the largest configured number of PRBs, $\mu$′ follows the BWP with the largest subcarrier spacing.

• $\mu$ corresponds to the subcarrier spacing of the active BWP

• $𝑅_{𝐿𝐵𝑅𝑀} = \frac{2}{3}$ as defined in Subclause 5.4.2.1 [5, TS 38.212]

• $𝑇𝐵𝑆_{𝐿𝐵𝑅𝑀}$ as defined in Subclause 5.4.2.1 [5, TS 38.212]

• 𝑋 as defined for downlink in Subclause 5.4.2.1 [5, TS 38.212].

If the UE skips decoding, the physical layer indicates to higher layer that the transport block is not successfully decoded.

For a 𝑗th serving cell, if higher layer parameter processingType2Enabled of PDSCH-ServingCellConfig is configured for the serving cell and set to enable, or if at least one $𝐼_{𝑀𝐶𝑆} > 𝑊$ for a PDSCH, where 𝑊 = 28 for MCS tables 5.1.3.1-1 and 5.1.3.1-3, and 𝑊 = 27 for MCS table 5.1.3.1-2, the UE is not required to handle PDSCH transmissions, if the following condition is not satisfied: $$\frac{\sum^{M-1}_{m=0}}{L \times T^\mu _s} \leq DataRateCC$$

where

• 𝐿 is the number of symbols assigned to the PDSCH

• 𝑀 is the number of TB(s) in the PDSCH

• $𝑇_𝑠^\mu = \frac{10^{-3}}{2^\mu . N^{slot}_{symb}}$ where $\mu$ is the numerology of the PDSCH

• for the 𝑗th TB, $𝑉_{𝑗,𝑚} = 𝐶' . \lfloor \frac{A}{C} \rfloor$

• 𝐴 is the number of bits in the transport block as defined in Subclause 7.2.1 [5, TS 38.212] - 𝐶 is the total number of code blocks for the transport block defined in Subclause 5.2.2 [5, TS 38.212]

• 𝐶′ is the number of scheduled code blocks for the transport block as defined in Subclause 5.4.2.1 [5, TS 38.212]

• 𝐷𝑎𝑡𝑎𝑅𝑎𝑡𝑒𝐶𝐶 [Mbps] is computed by the approximate maximum data rate given by Subclause 4.1.2 in [13, TS 38.306] from the band/band combination signaling for the serving cell, including the scaling factor 𝑓(𝑖)

##### Modulation order and target code rate determination#

The user can select from the following MCS tables, for each gNB and associated UEs, from the GUI:

• QAM64 Table 5.1.3.1-1
• QAM256 Table 5.1.3.1-2
• QAM64LowSE Table 5.1.3.1-3

The UE and gNB then uses this table to determine the modulation order $𝑄_𝑚$ and Code Rate, 𝑅. Different tables can be chosen for DL (gNB to UE) and for UL (UE to gNB). The UL table index selection based on transform precoding selection in the GUI is given below.

Transform Precoding MCS Table (PUSCH Config) MCS Table Index
Enabled QAM256 5.1.3.1 – 2
Enabled QAM64LowSE 6.1.4.1 – 2
Enabled QAM64 6.1.4.1 – 1
Disabled QAM256 5.1.3.1 – 2
Disabled QAM64LowSE 5.1.3.1 – 3
Disabled QAM64 5.1.3.1 – 1
MCS Index($I_{mcs}$) Modulation Order($Q_m$) Target code Rate R $\times$ [1024] Spectral efficiency
0 2 120 0.2344
1 2 157 0.3066
2 2 193 0.3770
3 2 251 0.4902
4 2 308 0.6016
5 2 379 0.7402
6 2 449 0.8770
7 2 526 1.0273
8 2 602 1.1758
9 2 679 1.3262
10 4 340 1.3281
11 4 378 1.4766
12 4 434 1.6953
13 4 490 1.9141
14 4 553 2.1602
15 4 616 2.4063
16 4 658 2.5703
17 6 438 2.5664
18 6 466 2.7305
19 6 517 3.0293
20 6 567 3.3223
21 6 616 3.6094
22 6 666 3.9023
23 6 719 4.2129
24 6 772 4.5234
25 6 822 4.8164
26 6 873 5.1152
27 6 910 5.3320
28 6 948 5.5547
29 2 Reserved
30 4 Reserved
31 6 Reserved

Standards Table 5.1.3.1-1: MCS index table 1 for PDSCH

MCS Index($I_{mcs}$) Modulation Order($Q_m$) Target code Rate R $\times$ [1024] Spectral efficiency
0 2 120 0.2344
1 2 193 0.3770
2 2 308 0.6016
3 2 449 0.8770
4 2 602 1.1758
5 4 378 1.4766
6 4 434 1.6953
7 4 490 1.9141
8 4 553 2.1602
9 4 616 2.4063
10 4 658 2.5703
11 6 466 2.7305
12 6 517 3.0293
13 6 567 3.3223
14 6 616 3.6094
15 6 666 3.9023
16 6 719 4.2129
17 6 772 4.5234
18 6 822 4.8164
19 6 873 5.1152
20 8 682.5 5.3320
21 8 711 5.5547
22 8 754 5.8906
23 8 797 6.2266
24 8 841 6.5703
25 8 885 6.9141
26 8 916.5 7.1602
27 8 948 7.4063
28 2 Reserved
29 4 Reserved
30 6 Reserved
31 8 Reserved

Standards Table 5.1.3.1-2: MCS index table 2 for PDSCH

MCS Index($I_{mcs}$) Modulation Order($Q_m$) Target code Rate R $\times$ [1024] Spectral efficiency
0 2 30 0.0586
1 2 40 0.0781
2 2 50 0.0977
3 2 64 0.1250
4 2 78 0.1523
5 2 99 0.1934
6 2 120  0.2344
7 2 157  0.3066
8 2 193  0.3770
9 2 251  0.4902
10 2 308  0.6016
11 2 379  0.7402
12 2 449  0.8770
13 2 526  1.0273
14 2 602  1.1758
15 4 340  1.3281
16 4 378  1.4766
17 4 434  1.6953
18 4 490  1.9141
19 4 553  2.1602
20 4 616  2.4063
21 6 438  2.5664
22 6 466  2.7305
23 6 517  3.0293
24 6 567  3.3223
25 6 616  3.6094
26 6 666  3.9023
27 6 719  4.2129
28 6 772  4.5234
29 2 Reserved
30 4 Reserved
31 6 Reserved

Standards Table 5.1.3.1-3: MCS index table 3 for PDSCH

#### Transport block size (TBS) determination#

The procedure for TBS determination is standardized in TS 38.214 Section 5.1.3.2 (DL) and 6.1.4.2 (UL). The standard specifies the TBS determination through Step 1, Step 2, Step 3, and Step 4, all which are implemented in NetSim.

NetSim first determines the TBS as specified below:

1. The UE shall first determine the number of Res ($N_{RE}$) within the slot.
• A UE first determines the number of REs allocated for PDSCH within a PRB ($𝑁'_{𝑅𝐸}$) by $𝑁'_{𝑅𝐸} =𝑁_{𝑠𝑐}^{𝑅𝐵} \times 𝑁_{𝑠𝑦𝑚𝑏}^{𝑃𝑅𝐵} − 𝑁_{𝐷𝑀𝑅𝑆}^{𝑃𝑅𝐵} − 𝑁_{OH}^{𝑃𝑅𝐵}$, where $𝑁_{𝑠𝑐}^{𝑅𝐵} = 12$ is the number of subcarriers in a physical resource block, $N_{symb}^{sh}$ is the number of symbols of the PDSCH allocation within the slot,$N_{DMRS}^{PRB}$ is the number of REs for DM-RS per PRB in the scheduled duration and $N_{OH}^{PRB}$ is the overhead configured by higher layer parameter and $𝑁_{OH}^{𝑃𝑅𝐵}$ is set to 0.
• A UE determines the total number of REs allocated for PDSCH ($N_{RE}$) by $𝑁_{𝑅𝐸} =min(156, 𝑁'_{𝑅𝐸}) \times 𝑛_{𝑃𝑅𝐵}$, where $𝑛_{𝑃𝑅𝐵}$ is the total number of allocated PRBs for the UE.
2. Intermediate number of information bits (𝑁𝑖𝑛𝑓𝑜) is obtained by $𝑁_{𝑖𝑛𝑓𝑜} = 𝑁_{𝑅𝐸} × 𝑅 × 𝑄_{𝑀} × 𝑣.$
3. When $𝑁_{𝑖𝑛𝑓𝑜} \leq 3824$, TBS is determined as follows

• quantized intermediate number of information bits $𝑁'_{𝑖𝑛𝑓𝑜} = 𝑚𝑎𝑥 \big(24, 2^𝑛 \lfloor\frac{N_{info}}{2^n}\rfloor\big),$ where $𝑛 = 𝑚𝑎𝑥(3,\lfloor log_2(𝑁_{𝑖𝑛𝑓𝑜})⌋ − 6)$.
• use Table 5.1.3.2-1 find the closest TBS that is not less than $𝑁'_{𝑖𝑛𝑓𝑜}$.
Index      TBS Index TBS Index TBS    Index TBS
1 24 31 336 61 1288 91 3624
2 32 32 352 62 1320 92 3752
3 40 33 368 63 1352 93 3824
4 48 34 384 64 1416
5 56 35 408 65 1480
6 64 36 432 66 1544
7 72 37 456 67 1608
8 80 38 480 68 1672
9 88 39 504 69 1736
10 96 40 528 70 1800
11 104 41 552 71 1864
12 112 42 576 72 1928
13 120 43 608 73 2024
14 128 44 640 74 2088
15 136 45 672 75 2152
16 144 46 704 76 2216
17 152 47 736 77 2280
18 160 48 768 78 2408
19 168 49 808 79 2472
20 176 50 848 80 2536
21 184 51 888 81 2600
22 192 52 928 82 2664
23 208 53 984 83 2728
24 224 54 1032 84 2792
25 240 55 1064 85 2856
26 256 56 1128 86 2976
27 272 57 1160 87 3104
28 288 58 1192 88 3240
29 304 59 1224 89 3368
30 320 60 1256 90 3496
4. When $𝑁_{𝑖𝑛𝑓𝑜}$ > 3824, TBS is determined as follows.

• quantized intermediate number of information bits$N'_{info} = max \big ( 3840, 2^n \times round(\frac{N_{info}-24}{2^n}) \big )$, where $n = \lfloor log_2(N_{info}-24) \rfloor - 5$ and ties in the round function are broken towards the next largest integer.
• if $R \leq \frac{1}{4}$
$$TBS = 8.C \bigg\lfloor\frac{N'_{info}+24}{8.C} \bigg\rfloor -24 \ where C = \bigg\lfloor \frac{N'_{info}+24}{3816}\bigg\rfloor$$ else
if $N'_{info} > 8424$
$$TBS = 8.C \bigg\lfloor\frac{N'_{info}+24}{8.C} \bigg\rfloor -24 \ where C = \bigg\lfloor \frac{N'_{info}+24}{8424}\bigg\rfloor$$        else $$TBS = 8 \bigg\lfloor\frac{N'_{info}+24}{8} \bigg\rfloor -24$$        end if
end if

else if Table 5.1.3.1-2 is used and $28 \leq 𝐼_{𝑀𝐶𝑆} \leq 31.$

#### Out of coverage#

As explained in the assumptions, NetSim does not model physical control channels or reference signals. All measurements are made on the physical data channels. The downlink received SNR is determined from large scale pathloss and shadowing calculated per the stochastic propagation models in the 3GPPTR38.900 standard, and fast fading calculated from the H matrix. This SNR calculation is done at the start of the simulation, and then at every instant a UE moves. It is a single wideband measurement at the center frequency. Interference from other gNBs is not considered in the SNR calculations.

Out of coverage in NetSim is based on the calculated spectral efficiency of the physical data channel. Spectral Efficiency is equal to $𝑙𝑜𝑔_2(1 + \frac{E_b}{N_0})$ . A UE is out-of-coverage when this spectral efficiency falls below a threshold. This threshold is the value of the spectral efficiency of index 1 per 3GPP 38.214 Table 5.2.2.1.-2 for CQI Table 1, or 5.2.2.1.-3 for CQI Table 2, or 5.2.2.1.-4 for CQI Table 3.

The NetSim log would report CQI/MCS as 0 whenever this condition occurs. Note that the RRC connection is not released and NetSim does not currently model Radio Link Failures (RLF). If the UE’s spectral efficiency, with the same serving gNB again crosses the threshold, data transmissions can occur. Due to mobility, if the UE’s spectral efficiency from a different gNB, crosses threshold then handover procedure is initiated.

#### Carrier Aggregation#

In NetSim carrier aggregation (CA) is done in both DL and in the UL. When doing CA, the PHY layer is separate for each component carrier (CC). Thus, each CC will have a different pathloss, SINR and TBS. Then the resources of all component carriers (CCs) are pooled at the MAC, and scheduling is across the pooled resources. However, in practice each UE may be assigned resources from a particular CC. Since NetSim doesn’t model frequency selective channel fading, there is generally negligible difference in network performance between allotting from a pool vs. allotting from one CC. The exception is when the data demand from any UE is greater than the capacity of a CC

#### CA Configuration Table (based on TR 38 716 01-01 Rel 16 NR)#

The Intraband CA configuration is based on TR 38 716 01-01 Rel 16 NR. The interband CA configuration is based on 38 716 02-00 for 2 bands DL / x bands UL, and TR 38.716 03 01 for 3 bands DL and 1 band UL. Carrier aggregation can be configured in the gNB's Physical layer properties. Following are the various configuration options that are available:

TDD Bands
CA Configuration Table
CA Configuration CA Count CA Type Frequency Range Uplink Low (MHz) Uplink High (MHz)
INTER_BAND_CA
CA_2DL_1UL_n39_n41 2 CA1, CA2 FR1 1880, 2496 1920, 2690
CA_2DL_2UL_n39_n41 2 CA1, CA2 FR1 1880, 2496 1920, 2690
CA_2DL_1UL_n41_n79 2 CA1, CA2 FR1 2496, 4400 2690, 5000
CA_2DL_2UL_n41_n79 2 CA1, CA2 FR1 2496, 4400 2690, 5000
CA_2DL_1UL_n40_n41 2 CA1, CA2 FR1 2300, 2496 2400, 2690
CA_2DL_2UL_n40_n41 2 CA1, CA2 FR1 2300, 2496 2400, 2690
CA_2DL_1UL_n50_n78 2 CA1, CA2 FR1 1432, 3300 1517, 3800
CA_2DL_2UL_n50_n78 2 CA1, CA2 FR1 1432, 3300 1517, 3800
CA_2DL_1UL_n41_n50 2 CA1, CA2 FR1 2496, 1432 2690,1517
CA_2DL_2UL_n41_n50 2 CA1, CA2 FR1 2496, 1432 2690,1517
CA_2DL_1UL_n39_n79 2 CA1, CA2 FR1 1880, 4400 1920, 5000
CA_2DL_2UL_n39_n79 2 CA1, CA2 FR1 1880, 4400 1920, 5000
CA_2DL_1UL_n40_n78 2 CA1, CA2 FR1 2300, 3300 2400, 3800
CA_2DL_2UL_n40_n78 2 CA1, CA2 FR1 2300, 3300 2400, 3800
CA_2DL_1UL_n40_n79 2 CA1, CA2 FR1 2300, 4400 2400, 5000
CA_2DL_2UL_n40_n79 2 CA1, CA2 FR1 2300, 4400 2400, 5000
CA_2DL_1UL_n77_n258 2 CA1, CA2 FR1, FR2 3300, 24250 4200, 27500
CA_2DL_2UL_n77_n258 2 CA1, CA2 FR1, FR2 3300, 24250 4200, 27500
CA_2DL_1UL_n78_n258 2 CA1, CA2 FR1, FR2 3300, 24250 3800, 27500
CA_2DL_2UL_n78_n258 2 CA1, CA2 FR1, FR2 3300, 24250 3800, 27500
CA_2DL_1UL_n79_n258 2 CA1, CA2 FR1, FR2 4400, 24250 5000, 27500
CA_2DL_2UL_n79_n258 2 CA1, CA2 FR1, FR2 4400, 24250 5000, 27500
CA_2DL_1UL_n78_n257 2 CA1, CA2 FR1, FR2 3300, 26500 3800, 29500
CA_2DL_2UL_n78_n257 2 CA1, CA2 FR1, FR2 3300, 26500 3800, 29500
CA_2DL_1UL_n41_n260 2 CA1, CA2 FR1, FR2 2496, 37000 2690, 40000
CA_2DL_2UL_n41_n260 2 CA1, CA2 FR1, FR2 2496, 37000 2690, 40000
INTRA_BAND_CONTIGOUOUS_CA
CA_2DL_n41C_1UL_n41A 2 CA1, CA2 FR1 2496, 2496 2690, 2690
CA_2DL_n257G_2UL_n257G 2 CA1, CA2 FR2 26500, 26500 29500, 29500
CA_3DL_n257H_3UL_n257G 3 CA1, CA2, CA3 FR2 26500, 26500,26500 29500, 29500,29500
CA_3DL_n257H_3UL_n257H 3 CA1, CA2, CA3 FR2 26500, 26500,26500 29500, 29500,29500
CA_4DL_n257I_4UL_n257G 4 CA1, CA2, CA3, CA4 FR2 26500, 26500,26500, 26500 29500, 29500,29500, 29500
CA_4DL_n257I_4UL_n257H 4 CA1, CA2, CA3, CA4 FR2 26500, 26500,26500, 26500 29500, 29500,29500, 29500
CA_4DL_n257I_4UL_n257I 4 CA1, CA2, CA3, CA4 FR2 26500, 26500,26500, 26500 29500, 29500,29500, 29500
CA_5DL_n257J_5UL_n257G 5 CA1, CA2,CA3, CA4, CA5 FR2 26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500
CA_5DL_n257J_5UL_n257H 5 CA1, CA2,CA3, CA4, CA5 FR2 26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500
CA_5DL_n257J_5UL_n257I 5 CA1, CA2,CA3, CA4, CA5 FR2 26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500
CA_5DL_n257J_5UL_n257J 5 CA1, CA2,CA3, CA4, CA5 FR2 26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500
CA_6DL_n257K_6UL_n257G 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500
CA_6DL_n257K_6UL_n257H 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 26500, 26500,26500, 26500,26500, 26500 29500, 29500, 29500,29500,29500, 29500
CA_6DL_n257K_6UL_n257I 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500
CA_6DL_n257K_6UL_n257J 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500
CA_6DL_n257K_6UL_n257K 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500
CA_7DL_n257L_7UL_n257G 7 CA1, CA2, CA3, CA4, CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_7DL_n257L_7UL_n257H 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_7DL_n257L_7UL_n257I 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_7DL_n257L_7UL_n257J 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_7DL_n257L_7UL_n257K 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_7DL_n257L_7UL_n257L 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 26500, 26500,26500, 26500,26500, 26500,26500 29500, 29500,29500, 29500,29500, 29500,29500
CA_8DL_n257M_8UL_n257G 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257H 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500, 29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257I 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257J 8 CA1, CA2,CA3, CA4, CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257K 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257L 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_8DL_n257M_8UL_n257M 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 26500, 26500,26500, 26500,26500, 26500,26500, 26500 29500, 29500,29500, 29500,29500, 29500,29500, 29500
CA_n258B 2 CA1, CA2 FR2 24250,24250 27500,27500
CA_n258C 3 CA1, CA2, CA3 FR2 24250, 24250,24250 27500, 27500,27500
CA_n258D 2 CA1, CA2 FR2 24250,24250 27500, 27500
CA_n258E 3 CA1, CA2, CA3 FR2 24250, 24250,24250 27500, 27500,27500
CA_n258F 4 CA1, CA2, CA3, CA4 FR2 24250, 24250,24250, 24250 27500, 27500,27500, 27500
CA_n258G 2 CA1, CA2 FR2 24250,24250 27500,27500
CA_n258H 3 CA1, CA2, CA3 FR2 24250, 24250,24250 27500, 27500,27500
CA_n258I 4 CA1, CA2, CA3, CA4 FR2 24250, 24250,24250, 24250 27500, 27500,27500, 27500
CA_n258J 5 CA1, CA2, CA3, CA4, CA5 FR2 24250, 24250,24250, 24250,24250 27500, 27500,27500, 27500,27500
CA_n258K 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 24250, 24250,24250, 24250,24250, 24250 27500, 27500,27500, 27500,27500, 27500
CA_n258L 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 24250, 24250,24250, 24250,24250, 24250,24250 27500, 27500,27500, 27500,27500, 27500,27500
CA_n258M 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 24250, 24250,24250, 24250,24250, 24250,24250, 24250 27500, 27500,27500, 27500,27500, 27500,27500, 27500
INTRA_BAND_NONCONTIGUOUS_CA
CA_2DL_n41(2A)_1UL_n41A 2 CA1, CA2 FR1 2496, 2496 2690, 2690
CA_n260(5A) 5 CA1, CA2,CA3, CA4, CA5 FR2 37000, 37000,37000, 37000,37000 40000, 40000,40000, 40000,400
CA_n260(6A) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 37000, 37000,37000, 37000,37000, 3700 40000, 40000,40000, 40000,40000, 40000
CA_n260(7A) 7 CA1, CA2,CA3, CA4,CA5, CA6,CA7 FR2 37000, 37000,37000, 37000,37000, 37000,37000 40000,40000,40000, 40000,40000, 40000,40000
CA_n260(8A) 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 37000, 37000,37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000,40000, 40000
CA_n260(2D) 4 CA1, CA2, CA3, CA4 FR2 37000, 37000,37000, 37000 40000, 40000,40000, 40000
CA_n260(3G) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000
CA_n260(4G) 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 37000, 37000,37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000,40000, 40000
CA_n260(2H) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000
CA_n260(2O) 4 CA1, CA2, CA3, CA4 FR2 37000, 37000,37000, 37000 40000, 40000,40000, 40000
CA_n260(3O) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 37000, 37000,37000, 37000,37000, 37000 40000, 40000, 40000, 40000,40000, 40000
CA_n260(4O) 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 37000, 37000,37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000,40000, 40000
CA_n260(2P) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000
CA_n260(4P) 12 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8, CA9, CA10,CA11,CA12 FR2 37000, 37000,37000, 37000,37000, 37000,37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000,40000, 40000,40000, 40000,40000, 40000
CA_n260(2Q) 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 37000, 37000,37000, 37000,37000, 37000,37000, 37000 40000, 40000,40000, 40000,40000, 40000,40000, 40000
CA_n261(2H) 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 27500, 27500,27500, 27500,27500, 27500 28350, 28350,28350, 28350,28350, 28350
CA_n261(2I) 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 27500, 27500,27500, 27500,27500, 27500,27500, 27500 28350, 28350, 28350, 28350,28350, 28350,28350, 28350
CA_n261(2D)_n261A 4 CA1, CA2, CA3, CA4 FR2 27500, 27500,27500, 27500 28350, 28350,28350, 28350
CA_n261(2G)_n261A 4 CA1, CA2, CA3, CA4 FR2 27500, 27500,27500, 27500 28350, 28350,28350, 28350
CA_n261(3G)_n261A 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 27500, 27500,27500, 27500,27500, 27500 28350, 28350,28350, 28350,28350, 28350
CA_n261(4G)_n261A 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 27500, 27500,27500, 27500,27500, 27500,27500, 27500 28350, 28350,28350, 28350,28350, 28350,28350, 28350
CA_n261(2O)_n261A 4 CA1, CA2, CA3, CA4 FR2 27500, 27500,27500, 27500 28350, 28350,28350, 28350
CA_n261(4O)_n261A 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 27500, 27500,27500, 27500,27500, 27500,27500,27500 28350, 28350,28350, 28350,28350, 28350,28350, 28350
CA_n261(7O)_n261A 14 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8, CA9, CA10,CA11,CA12,CA13,CA14 FR2 27500, 27500,27500, 27500,27500, 27500,27500, 27500, 27500, 27500, 27500, 27500,27500, 27500 28350, 28350,28350, 28350,28350, 28350,28350, 28350,28350, 28350,28350, 28350,28350, 28350
CA_n261(2P)_n261A 6 CA1, CA2,CA3, CA4,CA5, CA6 FR2 27500, 27500,27500, 27500,27500, 27500 28350, 28350, 28350, 28350,28350, 28350
CA_n261(2Q)_n261A 8 CA1, CA2,CA3, CA4,CA5, CA6,CA7, CA8 FR2 27500, 27500,27500, 27500,27500, 27500,27500, 27500 28350, 28350,28350, 28350,28350, 28350,28350, 28350
SINGLE_BAND
n34 1 CA1 FR1 2010 2025
n38 1 CA1 FR1 2570 2620
n39 1 CA1 FR1 1880 1920
n40 1 CA1 FR1 2300 2400
n41 1 CA1 FR1 2496 2690
n50 1 CA1 FR1 1432 1517
n51 1 CA1 FR1 1427 1432
n77 1 CA1 FR1 3300 4200
n78 1 CA1 FR1 3300 3800
n79 1 CA1 FR1 4400 5000
n257 1 CA1 FR2 26500 29500
n258 1 CA1 FR2 24250 27500
n259 1 CA1 FR2 39500 43500
n260 1 CA1 FR2 37000 40000
n261 1 CA1 FR2 27500 28350
n262 1 CA1 FR2 47200 48200
FDD Bands
CA Configuration Table
CA Configuration CA Count CA Type Frequency Range Uplink Low (MHz) Uplink High (MHz)
INTER_BAND_CA
CA_n1A_n8A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1920,880,2110,925 1980,915,2170,960
CA_n1A_n28A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1920,703,2110,758 1980,748,2170,803
CA_n3A_n8A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,880,1805,925 1785,915,1880,960
CA_n3A_n28A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,703,1805,758 1785,748,1880,803
CA_n7A_n28A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 2500,703,2620,758 2570,748,2690,803
CA_n7A_n66A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 2500,1710,2620,2110 2570,1780,2690,2200
CA_n20A_n28A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 832,703,791,758 862,748,821,803
CA_n25A_n71A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1850,663,1930,617 1915,698,1995,652
CA_n66A_n70A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,1695,2110,1995 1780,1710,2200,2020
CA_n66B_n70A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,1695,2110,1995 1780,1710,2200,2020
CA_n66(2A)_n71A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,663,2110,617 1780,698,2200,652
CA_n70A_n71A 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1695,663,1995,617 1710,698,2020,652
CA_n66A_n70A_n71A 3 CA1_UL,CA2_UL,CA3_UL,CA1_DL,CA2_DL,CA3_DL FR1 1710,1695,663,2110,1995,617 1780,1710,698,2200,2020,652
CA_n66B_n70A_n71A 3 CA1_UL,CA2_UL,CA3_UL,CA1_DL,CA2_DL,CA3_DL FR1 1710,1695,663,2110,1995,617 1780,1710,698,2200,2020,652
CA_n66(2A)_n70A_n71A 3 CA1_UL,CA2_UL,CA3_UL,CA1_DL,CA2_DL,CA3_DL FR1 1710,1695,663,2110,1995,617 1780,1710,698,2200,2020,652
INTRA_BAND_CONTIGUOUS_CA
CA_n1B 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1920,1920,2110,2110 1980,1980,2170,2170
CA_n7B 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 2500,2500,2620,2620 2570,2570,2690,2690
CA_n66B 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,1710,2110,2110 1780,1780,2200,2200
CA_n71B 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 663,663,617,671 698,698,652,652
INTRA_BAND_NONCONTIGUOUS_CA
CA_n3(2A) 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,1710,1805,1805 1782,1785,1880,1880
CA_n7(2A) 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 2500,2500,2620,2620 2570,2570,2690,2690
CA_n25(2A) 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1850,1850,1930,1930 1915,1915,1995,1995
CA_n66(2A) 2 CA1_UL,CA2_UL,CA1_DL,CA2_DL FR1 1710,1710,2110,2110 1780,1780,2200,2200
SINGLE_BAND
n1 1 CA1 FR1 21101920 21701980
n2 1 CA1 FR1 19301850 19901910
n3 1 CA1 FR1 18051710 18801785
n5 1 CA1 FR1 869824 894859
n7 1 CA1 FR1 26902500 26902570
n8 1 CA1 FR1 925880 960915
n12 1 CA1 FR1 729699 746716
n20 1 CA1 FR1 791832 821862
n25 1 CA1 FR1 19301850 19951915
n28 1 CA1 FR1 748703 803748
n66 1 CA1 FR1 21101710 22001780
n70 1 CA1 FR1 19951695 20201710
n71 1 CA1 FR1 617663 652698
n74 1 CA1 FR1 14271470 14701518

Table 3 89: CA Configuration Table

### PHY: Omitted Features#

The currently omitted features include:

• BLER
• NetSim currently assumes an error free channel. While received SNR is calculated NetSim currently does not further calculate the BLER based on the received SNR
• HARQ
• Physical control channels
• While calculating the TBS capacity, a fixed overhead is reduced to account for the control channels. This overhead fraction varies for UL and DL, across FR1 and FR2, and is provided in the standard.
• Detailed antenna models: NetSim currently supports only Omnidirectional antennas. As yet there are no options to set (i) antenna patterns and (ii) the elevation and azimuth angles to represent the antenna orientation
• Random access procedure
• Power control

### Supported max data rate#

For NR, the approximate data rate for a given number of aggregated carriers in a band or band combination is computed as follows. $$data \ rate (in \ Mbps) = 10^{-6} \sum_{j=1}^j \big( v^{(j)}_{Layers}\big).Q^{(j)}_{m}. f^{(j)} . R\frac{N^{BW(j).\mu}_{PRB}.12}{T^{\mu}_{s}}(1-OH^{(j)})$$

Where,

• 𝐽 is the number of aggregated component carriers in a band or band combination $𝑅_{𝑚𝑎𝑥}$ = 948/1024.

• For the 𝑗-th Component Carrier, $𝑣_{𝐿𝑎𝑦𝑒𝑟𝑠}^{(𝑗)}$ is the maximum number of supported layers given by higher layer parameter_maxNumberMIMO-LayersPDSCH_ for downlink and maximum of higher layer parameters maxNumberMIMO-LayersCB-PUSCH and maxNumberMIMO-LayersNonCB-PUSCH for uplink.

• $𝑄_𝑚^{(𝑗)}$ is the maximum supported modulation order given by higher layer parameter supportedModulationOrderDL for downlink and higher layer parameter supportedModulationOrderUL for uplink.

• $𝑓^𝑗$ is the scaling factor given by higher layer parameter scalingFactor and can take the values 1, 0.8, 0.75, and 0.4.
• $\mu$ is the numerology (as defined in TS 38.211 [6]).

• $𝑇_𝑠^\mu$ is the average OFDM symbol duration in a subframe for numerology $\mu$, i.e., $𝑇_𝑠^\mu =\frac{10^{-3}}{14.2^\mu}$

• Note that normal cyclic prefix is assumed, which has 14 ODFM symbols per slot or $14 \times 2^\mu$symbols per millisecond.

• $𝑁_{𝑃𝑅𝐵}^{𝐵𝑊(𝑗),\mu}$ is the maximum Resource Block allocation in bandwidth $𝐵𝑊^{(𝑗)}$ with numerology $\mu$ as defined in 5.3 TS 38.101-1 [2] and 5.3 TS 38.101-2 [3], where $𝐵𝑊^{(𝑗)}$is the UE supportedmaximum bandwidth in the given band or band combination. The number of subcarriers per physical resource block (PRB) is fixed to 12.
• 𝑂𝐻(𝑗) is the overhead and takes the following values

0.14, for frequency range FR1 for DL
0.18, for frequency range FR2 for DL
0.08, for frequency range FR1 for UL
0.10, for frequency range FR2 for UL

NOTE: Only one of the UL or SUL carriers (the one with the higher data rate) is counted for a cell operating SUL.

The approximate maximum data rate can be computed as the maximum of the approximate data rates computed using the above formula for each of the supported band or band combinations. For EUTRA in case of MR-DC, the approximate data rate for a given number of aggregated carriers in a band or band combination is computed as follows. $$data \ rate (in \ Mbps) = 10^{-3} \sum_{j=1}^j TBS_{j}$$

Where,

• 𝐽 is the number of aggregated EUTRA component carriers in MR-DC band combination.
• 𝑇𝐵𝑆𝑗 is the total maximum number of DL-SCH transport block bits received within a 1ms TTI for j-th CC, as derived from TS36.213 [22] based on the UE supported maximum MIMO layers for the j-th carrier and based on the modulation order and number of PRBs based on the bandwidth of the j-th carrier.
• The approximate maximum data rate can be computed as the maximum of the approximate data rates computed using the above formula for each of the supported band or band combinations.
• For MR-DC, the approximate maximum data rate is computed as the sum of the approximate maximum data rates from NR and EUTRA.

### Propagation Models (Per 3GPPTR38.900)#

#### Overview#

The pathloss and channel between a UE and a BS depends on:

• Location: The pathloss depends on the UE’s location (UE-gNB distance) and is calculated separately for each connected UE. The pathloss computations are recomputed every time a UE moves
• Scenario: Rural Macro (RMa), Urban Macro (UMa), Urban Micro (Umi). This parameter is available as Outdoor Scenario in gNB properties > Interface (5G_RAN) > Physical Layer > Channel Model. Each scenario has a different pathloss model defined in the standard. This property is common for the gNB and all connected UEs.
• Whether the UE-gNB is Line-of-sight or Non-line-of-sight (LOS/NLOS): This parameter is available as LOS probability in gNB properties > Interface (5G_RAN) > Physical Layer > Channel Model. The pathloss models defined in the standard differ for LOS and NLOS. This property is common for the gNB and all connected UEs. However, a different (uniform) random number is sampled for each associated UE so that different UEs will see different LOS/NLOS channels. For each UE, the LOS/NLOS random variable is sampled every time a UE moves, and hence a UE may switch from LOS to NLOS if it moves.
• Shadow fading: This parameter is available as Shadow fading model in gNB properties > Interface (5G_RAN) > Physical Layer > Channel Model. This property is common for the gNB and all connected UEs. In this case, a different log-normal random variable is sampled for each associated UE. For each UE, the shadow fading random variable is sampled every time a UE moves.
• Fading and beamforming: Fast fading is enabled by turning on the parameter Fading and Beamforming in gNB properties > Interface (5G_RAN) > Physical Layer > Channel Model. Please see sections 3.9.2 and 3.9.3 for a detailed explanation. In essence, the eigen value of an ($𝑁_𝑟 \times 𝑁_𝑡$) random matrix is the fast-fading gain. Since the random matrix would be different for each gNB-UE pair the gains would be different. The fast-fading gains are recomputed every (user settable) coherence time whose default value is 10ms. The coherence time is common to all UEs attached to a gNB.

NetSim also features Indoor and Outdoor pathloss (PL) models.

• NetSim GUI (gNB properties > Interface (5G_RAN) > Physical Layer > Channel Model) allows users to configure both indoor and outdoor PL models. Both indoor and outdoor options are shown in the GUI irrespective of the underlying scenario.
• Based on gNBs/UEs placement within or outside a building NetSim automatically chooses the indoor/outdoor propagation models. The selection is as follows:
• Outdoor gNB to Outdoor UE: Outdoor PL model
• Outdoor gNB to Indoor UE: Outdoor PL till building, then penetration (O2I) loss, and finally indoor PL within the building
• Indoor gNB to Indoor UE: Indoor PL model
• An Indoor gNB cannot be connected to an Outdoor UE in NetSim

#### Pathloss formulas#

The pathloss models are summarized in Table 7.4.1-1 and the distance definitions are indicated in Figure 7.4.1-1 and Figure 7.4.1-2. Note that the distribution of the shadow fading is log-normal, and its standard deviation for each scenario is given in Table 7.4.1-1

Figure7.4.1-1: Definition of $𝒅_{𝟐𝑫}$ and $𝒅_{𝟑𝑫}$ for outdoor UTs

Figure 7.4.1-2: Definition of $𝒅_{𝟐𝑫−𝒐𝒖𝒕}$, $𝒅_{𝟐𝑫−𝒊𝒏}$, and $𝒅_{𝟑𝑫−𝒐𝒖𝒕}, 𝒅_{𝟑𝑫−𝒐𝒖𝒕}$ for indoor UTs

Note that,
$$𝑑_{3D−out} + 𝑑_{3D−in} = \sqrt{(𝑑_{2D−out} + 𝑑_{2D−in})^2 + (ℎ_{BS} − ℎ_{UT})^2} \ \ \ (7.4.1-2)$$

Table 7.4.1-1: Pathloss model
Scenario LOS/NLOS Pathloss [dB], fc is in GHz and d is in meters, see note 6 Shadow fading std [dB] Applicability range, antenna height default
RMa LOS $𝑃𝐿_{RMa−LOS} = \begin{cases}PL_1 & 10m \leq d_{2D} \leq d_{BP}\\PL_2 & d_{BP} \leq d_{2D} \leq 10KM \end{cases}$,
\begin{aligned}PL_1 &= 20 log_{10}(40 \pi d_{3D}f_c/3 + min (0.03hh^{1.72},10)log_{10}(d_{3D}) \\ &-min(0.044h^{1.72},17.77) + 0.002 log_{10}(h)d_{3D}\end{aligned}
$PL_2 = PL_1(d_{BP})+ 40log_{10}(d_{3D/d_{BP}})$
$$\sigma_{SF} = 4$$ $$\sigma_{SF} = 6$$ $h_{BS}$ = 35m
$h_{UT}$ = 1.5m
W=20m
h=5m
h = avg. building height
W = avg. street widthThe applicability ranges:
5𝑚 $\leq$ ℎ $\leq$ 50𝑚
5𝑚 $\leq$ 𝑊 $\leq$ 50𝑚
10m $\leq$ $ℎ_{BS}$ $\leq$ 150𝑚
1𝑚 $\leq$ $ℎ_{UT}$ $\leq$ 10m
NLOS \begin{aligned}& PL'_{RMa - NLOS} = 161.04 - 7.1 log_{10}(W)+7.5log_{10}(h)\\ &-(24.37 - 3.7(h/h_{BS})^2log_{10}(h_{BS})\\&+43.42 - 3.1 log_{10}(h_{BS})^2)(log_{10}(d_{3D})-3)\\&+20log_{10}(f_c)-(3.2(log_{10}(11.7h_{UT}))^2-4.97)\end{aligned} $\sigma_{SF} = 8$
UMa LOS $PL_{UMa-LOS} = \begin{cases}PL_1 & 10m \leq d_{2D} \leq d'_{BP} \\ PL_2 = & d'_{BP} \leq d_{2D} \leq 5km \end{cases} \quad see \ note \ 1$
$PL_1 = 28.0 + 22log_{10}(d_{3D}+20log_{10}(f_c)$
\begin{aligned} PL_2 = & 28.0 + 40log_{10}(d_{3D}) + 20log_{10}(f_c) \\ & -9log_{10}((d'_{BP})^2 + (h_{BS}-h_{UT})^2)\end{aligned}
$\sigma_{SF} = 4$ $1.5m \leq h_{UT} \leq 22.5m$
$h_{BS}=25m$
NLOS \begin{aligned}&PL_{UMa-NLOS} = max(PL_{UMa-LOS},PL'_{UMa-NLOS}) \\ & for 10m \leq d_{2D} \leq 5km\end{aligned}
\begin{aligned}PL'_{UMa-NLOS} & = 13.54 + 39.08 log_{10}(d_{3D})+20log_{10}(f_c)-\\ &0.6(h_{UT}-1.5)\end{aligned}
$\sigma_{SF} = 6$ 1.5𝑚 $\leq ℎ_{UT} \leq$ 22.5𝑚
$ℎ_{BS} = 25m$
Explanations: see note 3
Optional $PL = 32.4 + 20log_{10}(f_c)+30log_{10}(d_{3D})$ $\sigma_{SF} = 7.8$
UMi - street Canyon LOS $𝑃𝐿_{UMi−LOS} =\begin{cases} PL_1 & 10m \leq d_{2D} \leq d'_{BP} \\ 𝑃𝐿2 & 𝑑'_{BP} \leq 𝑑2D \leq 5km, \quad see\ note \ 1 \end{cases}$
$𝑃𝐿_1 = 32.4 + 21 𝑙𝑜𝑔_{10}( 𝑑_{3D})+ 20 𝑙𝑜𝑔_{10}( 𝑓_𝑐)$
\begin{aligned}&𝑃𝐿_2 = 32.4 + 40 𝑙𝑜𝑔_{10}( 𝑑_{3D})+ 20 𝑙𝑜𝑔_{10}( 𝑓_𝑐)\\ &− 9.5 𝑙𝑜𝑔_{10}((𝑑'_{BP})^2 + (ℎ_{BS} −ℎ_{UT})^2)\end{aligned}
$\sigma_{SF} = 4$ $1.5m \leq h_{UT} \leq 22.5m$
$h_{BS} = 10m$
NLOS $P𝐿_{UMi−NLOS} = 𝑚𝑎𝑥( 𝑃𝐿_{UMi−LOS},𝑃𝐿'_{UMi−NLOS})$
for $10𝑚 \leq 𝑑_{2D} \leq 5km$
\begin{aligned}&𝑃𝐿'_{𝑈𝑀𝑖−𝑁𝐿𝑂𝑆} = 35.3 log_{10}(𝑑_{3𝐷})+ 22.4 +21.3 log_{10}( 𝑓_𝐶) \\ &− 0.3(ℎ_{𝑈𝑇}− 1.5)\end{aligned}
$\sigma = 7.82$ 1.5m $\leq h_{UT} \leq$22.5m
$h_{BS} = 10m$
Explanations: see note 4
Optional $PL = 32.4+ 20 𝑙𝑜𝑔_{10}(𝑓_𝑐)+ 31.9 𝑙𝑜𝑔_{10}(𝑑_{3D})$ $\sigma_{SF}= 8.2$
InH-Office LOS $P𝐿_{InH−LOS} = 32.4+ 17.3 𝑙𝑜𝑔_{10}( 𝑑_{3D})+20𝑙𝑜𝑔_{10}( 𝑓_𝑐)$ $\sigma_{SF} = 3$ 1m $\leq d_{3D} \leq 150m$
NLOS $PL_{InH − NLOS} = 𝑚𝑎𝑥( 𝑃𝐿_{InH−LOS}, 𝑃𝐿'_{InH−NLOS})$
$𝑃𝐿'_{InH−NLOS} = 38.3 𝑙𝑜𝑔_{10}(𝑑_{3D})+ 17.30 + 24.9 𝑙𝑜𝑔_{10}(𝑓_𝑐)$
$\sigma_{8.03}$ $1m \leq 𝑑_{3D} \leq 150m$
Optional $𝑃𝐿'_{InH-NLOS} = 32.4 +20 𝑙𝑜𝑔_{10}(𝑓_𝑐)+ 31.9 l𝑜𝑔_{10}(𝑑_{3D})$ $\sigma_{SF} = 8.29$ $1m \leq d_{3D} \leq 150m$
• Note 1: Breakpoint distance $𝒅'_{𝑩𝑷} =\frac{𝟒×𝒉'_{𝑩𝑺} \times 𝒉'_{𝑼𝑻} \times 𝒇_𝒄}{C}$, where $𝒇_𝒄$ is the centre frequency in Hz, $𝒄 = 𝟑 \times 𝟏𝟎^𝟖𝒎/𝒔$ is the propagation velocity in free space, and $𝒉'_{𝑩𝑺}$ and $𝒉'_{𝑼𝑻}$ are the effective antenna heights at the BS and the UT, respectively. The effective antenna heights h'BS and h'UT are computed as follows: $𝒉'_{𝑩𝑺} =𝒉'_{𝑩𝑺} − 𝑬 , 𝒉'_{𝑼𝑻} = 𝒉_{𝑼𝑻} − 𝒉_𝑬$ , where $𝒉_{𝑩𝑺}$ and $𝒉_{𝑼𝑻}$ are the actual antenna heights, and $𝒉_𝑬$ is the effective environment height. For UMi $𝒉_𝑬 = 𝟏.𝟎𝒎.$ For UMa $𝒉_𝑬 = 𝟏𝒎$ with a probability equal to $𝟏𝟏+𝑪(𝒅_{𝟐𝑫},𝒉_{𝑼𝑻})$and chosen from a discrete uniform distribution uniform ($(𝟏𝟐, 𝟏𝟓, … , (𝒉_{𝑼𝑻} − 𝟏. 𝟓))$ otherwise. With 𝐂(𝒅𝟐𝑫, 𝒉𝑼𝑻) given by $$𝑪(𝒅_{2D}, 𝒉_{UT}) = \begin{cases}0 & , h_{UT} < 13m\\ (\frac{h_{UT}-13}{10})^{1.5}g(d_{2D}) &, 13m \leq h_{UT} \leq 23m\end{cases}$$ $$𝒈(𝒅_{2D}) = \begin{cases}𝟎 , & 𝒅2D \leq 𝟏𝟖𝒎 \\ \frac{5}{4}(\frac{d_{2D}}{100})^3𝒆𝒙𝒑 (\frac{-d_{2D}}{150} &, 𝟏𝟖𝒎 < 𝒅_{2D}.\end{cases}$$
Note that $𝒉_𝑬$ depends on $𝒅_{𝟐𝑫}$ and $𝒉_{𝑼𝑻}$ and thus needs to be independently determined for every link between BS sites and UTs. A BS site may be a single BS or multiple co-located BSs.
• Note 2: The applicable frequency range of the PL formula in this table is $𝟎. 𝟓 < 𝒇_𝒄 < 𝒇_𝑯$ GHz, where $𝒇_𝑯 =𝟑𝟎$ GHz for RMa and $𝒇_𝑯 = 𝟏𝟎𝟎$ GHz for all the other scenarios. It is noted that RMa pathloss model for > 𝟕 GHz is validated based on a single measurement campaign conducted at 24 GHz.
• Note 3: UMa NLOS pathloss is from TR36.873 with simplified format and $$𝐏𝐋_{𝑼𝑴𝒂−𝑳𝑶𝑺} = 𝑷𝒂𝒕𝒉𝒍𝒐𝒔𝒔 𝒐𝒇 𝑼𝑴𝒂 𝑳𝑶𝑺 𝒐𝒖𝒕𝒅𝒐𝒐𝒓 𝒔𝒄𝒆𝒏𝒂𝒓𝒊𝒐.$$
• Note 4: $𝑷𝑳_{𝑼𝑴𝒊−𝑳𝑶𝑺} = 𝑷𝒂𝒕𝒉𝒍𝒐𝒔𝒔 𝒐𝒇 𝑼𝑴𝒊 − 𝑺𝒕𝒓𝒆𝒆𝒕 𝑪𝒂𝒏𝒚𝒐𝒏 𝑳𝑶𝑺 𝒐𝒖𝒕𝒅𝒐𝒐𝒓 𝒔𝒄𝒆𝒏𝒂𝒓𝒊𝒐.$
• Note 5: Break point distance $𝒅_{𝑩𝑷} = \frac{𝟐 \pi \times 𝒉_{𝑩𝑺} \times 𝒉_{𝑼𝑻}\times𝒇_𝒄}{C}$, where $𝒇_𝒄$is the centre frequency in Hz, $𝒄 = 𝟑 \times 𝟏𝟎^𝟖𝒎/𝒔$ is the propagation velocity in free space, and $𝒉_{𝑩𝑺}$ and $𝒉_{𝑼𝑻}$ are the antenna heights at the BS and the UT, respectively.
• Note 6: $𝒇_𝒄$ denotes the center frequency normalized by 1GHz, all distance related values are normalized by 1m, unless it is stated otherwise.

NetSim enforces the following

• RMa, UMa, UMI: If $𝑑_{2𝐷}$ < 10𝑚 then $𝑑_{2𝐷}$ = 10𝑚
• InH: If $𝑑_{2𝐷}$ < 1𝑚 then $𝑑_{2𝐷}$ = 1m

#### LOS probability#

The Line-Of-Sight (LOS) probabilities are given in Table 7.4.2-1

Scenario LOS probability(distance is in meters)
RMa $P𝑟_{LOS} =\begin{cases} 1 &,d_{2D-out} \leq 10m \\exp \big( - \frac{𝑑_{2D-out} − 10}{1000}\big) &10m < d_{2D-out} \end{cases}$
UMi - Street canyon $\begin{cases} 1 & ,d_{2D-out} \leq 18m \\ 𝑃𝑟_{LOS} =\frac{18}{d_{2D-out}}+ 𝑒𝑥𝑝 \big(− \frac{𝑑_{2D-out}}{36} \big) \big(1 −\frac{18}{d_{2D-out}}\big) & 18m < d_{2D-out} \end{cases}$
Uma $\begin{cases}1 \\ \bigg[\frac{18}{d_{2D-out}}+ exp\big(- \frac{d_{2D-out}}{63}\big)\big(1- \frac{18}{d_{2D-out}}\big) \bigg]\bigg( 1+ C'(h_{UT})\frac{5}{4}\big(\frac{d_{2D-out}}{100}\big)^3\ exp \big(-\frac{d_{2D-out}}{150}\big)\bigg) \end{cases}$
where
$C'(h_{UT}) = \begin{cases} 0 & ,h_{UT}\leq 13m \\ \big( \frac{h_{UT}-13}{10}\big)^{1.5} & ,13 < h_{UT} \leq 23m \end{cases}$
Indoor - Mixed office $Pr_{LOS} = \begin{cases} 1 &,d_{2D-in} \leq 1.2m \\ exp \big( - \frac{d_{2D-in}-1.2}{4.7}\big) &,1.2m < d_{2D-in} < 6.5m \\ exp \big(-\frac{d_{2D-in}-6.5}{32.6}\big).0.32 &,6.5m \leq d_{2D-in}\end{cases}$
Indoor - Open office $Pr_{LOS} = \begin{cases} 1 &,d_{2D-in} \leq 5m \\ exp \big( - \frac{d_{2D-in}-5}{70.8}\big) &,5m < d_{2D-in} < 49m \\ exp \big(-\frac{d_{2D-in}-49}{211.7}\big).0.54 &,49m \leq d_{2D-in}\end{cases}$
Note: The LOS probability is derived with assuming antenna heights of 3m for indoor, 10m for UMi, and 25m for Uma

Standards Table 7.4.2-1: LOS probability

#### O2I penetration loss#

##### O2I building penetration loss#

The pathloss incorporating O2I building penetration loss is modelled as in the following: $$𝑃𝐿 = 𝑃𝐿_𝑏 + 𝑃𝐿_{𝑡𝑤} + 𝑃𝐿_{𝑖𝑛} + 𝑁(0, \sigma^2𝑃) \qquad (7.4-2)$$

where $PL_𝑏$ is the basic outdoor path loss given in Subclause 7.4.1, where $𝑑_{3D}$ is replaced by $𝑑_{3D−out} + 𝑑_{3D−in}$ . $𝑃𝐿_{𝑡𝑤}$ is the building penetration loss through the external wall, $𝑃𝐿_{𝑖𝑛}$ is the inside loss dependent on the depth into the building, and 𝜎𝑃 is the standard deviation for the penetration loss.

$𝑃𝐿_{𝑡𝑤}$ is characterized as:

$$𝑃𝐿_{𝑡𝑤} = 𝑃𝐿_{𝑛𝑝𝑖} − 10𝑙𝑜𝑔_{10} \sum_{i=1}^N(\pi × 10^{\frac{L_{material}}{-10}}) \qquad(7.4-3)$$

PL𝑛𝑝𝑖 is an additional loss is added to the external wall loss to account for non-perpendicular incidence; $𝐿_{𝑚𝑎𝑡𝑒𝑟𝑖𝑎𝑙\_𝑖} = 𝑎_{𝑚𝑎𝑡𝑒𝑟𝑖𝑎𝑙\_𝑖} + 𝑏_{𝑚𝑎𝑡𝑒𝑟𝑖𝑎𝑙\_𝑖}$, 𝑓 is the penetration loss of material 𝑖 example values of which can be found in Table 7.4.3-1; 𝑝𝑖is proportion of 𝑖-th materials, where $\sum_{i=1}^N = 1$; and 𝑁 is the number of materials.

Material Penetration loss [dB]
Standard multi-pane glass $𝐿_{glass}$ = 2 + 0.2𝑓
IRR glass $𝐿_{IIRglass}$ = 23 + 0.3𝑓
Concrete $𝐿_{concrete}$ = 5 + 4𝑓
Wood $𝐿_{wood}$ = 4.85 + 0.12𝑓
Note: f is in GHz

Standards Table 7.4.3-1: Material penetration losses

Table 7.4.3-2 gives $𝑃𝐿_{𝑡𝑤}$, $𝑃𝐿_{𝑖𝑛}$ , and 𝜎𝑃 for two O2I penetration loss models. The O2I penetration is UT-specifically generated and is added to the SF realization in the log domain.

Path loss through external wall:$PL_{tw}$ in [dB] Indoor loss:$PL_{in}$ in [dB] Standard deviation:$\sigma_P$ in[dB]
Low-loss model $5-10log_{10}\big(0.3.10^{\frac{-L{glass}}{10}} + 0.7.10^{\frac{-L{concerte}}{10}} \big)$ $0.5 d_{2D-in}$ 4.4
High-loss model $5-10log_{10}\big(0.7.10^{\frac{-L{IIRglass}}{10}} + 0.3.10^{\frac{-L{concerte}}{10}} \big)$ $0.5 d_{2D-in}$ 6.5

Standards Table 7.4.3-2: O2I building penetration loss model

$𝑑_{2D−in}$ is minimum of two independently generated uniformly distributed variables between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m for RMa. $𝑑_{2D−in}$ shall be UT-specifically generated.

Both low-loss and high-loss models are applicable to UMa and UMi-Street Canyon.

Only the low-loss model is applicable to RMa

##### O2I model usage#

The O2I Models such as Low Loss and High Loss are associated with the type of material used in the buildings and is used to calculate the penetration loss in case of an indoor scenario. In case of scenario where UE's are not inside a building these parameters will not have any impact on the results. In an indoor scenario, users will be able to notice difference in the SNR.

Apart from the channel losses per the 3GPPTR38.900 specifications, NetSim allows modelling additional losses using MATLAB. This includes attenuation due to rain, fog, and gas.

Note that this implementation interfaces with MATLAB R2020(a/b). Lower versions of MATLAB are not directly supported.

The following is required to run these models:

#### Configuration#

Additional Loss Model can be configured in the gNB’s 5G_RAN interface properties under channel models section of Physical Layer as shown below:

Similarly, this can be configured in the eNB’s LTE interface properties under channel models section of Physical Layer as shown below

Additional Loss Model is set to NONE by default. When MATLAB is selected, MATLAB MODEL drop down with options GAS, FOG, and RAIN will appear along with associated parameters as shown below:

Each model has associated parameters that can be configured, which is listed in the table below:

Additional Loss Model Associated Parameters Value
RAIN Rain Rate (mm/hr) 16(default), Range 0 to 100
Tilt Angle 0(default), Range -90 to 90
Elevation Angle 0(default), Range -90 to 90
Exceedance Rain (%) 0.01(default), Range 0.001 to 1
GAS Ambient Temperature (Celsius) 15(default), Range -50 to 50
Dry Air Pressure (pa) 101300(default), Range 50000 to 300000
Water Vapor Density (𝑔/𝑚3) 4(default), Range 1 to 10
FOG Ambient Temperature (Celsius) 15(default), Range -50 to 50
Liquid Water Density ((𝑔/𝑚3) 0.5(default), Range 0 to 5

Note: Rain and Gas models support frequencies from 1 to 1000 GHz and Fog model supports frequencies from 10 to 1000 GHz only.

#### Running Simulation#

When Additional Loss Model option is set to MATLAB NetSim Simulation console waits for MATLAB Interface process to connect.

MATLAB Interface process can be started and connected to the running instance of NetSim simulation using one of the following methods depending on where MATLAB is installed:

• If MATLAB is installed in the same system where NetSim is installed. MATLAB Interface process can be launched directly from the design window of NetSim.
• Go to Options Menu and select the Open MATLAB Interface option as shown below:
• Click on the OK button when the following message is display
• If MATLAB is installed in a different system in the same network, then MATLABInterface.exe (present in <NetSim_Install_Directory>/bin folder), can be started in that system, manually from command prompt and the IP address of the system where NetSim simulation has started can be passed as an argument as shown below:

In both above cases, the MATLAB Interface process starts MATLAB process (MATLAB command window will open in minimized state) after which simulation in NetSim will start. During the simulation communication between NetSim and MATLAB is established to send inputs from NetSim to MATLAB pathloss models and to receive pathloss from MATLAB to NetSim happens via the MATLAB Interface process as shown below:

The pathloss value obtained from MATLAB is added to the total loss calculated as per the 3GPPTR38.900 specifications. At simulation end the MATLAB Interface process closes the MATLAB process that it started.

#### Configuration#

Downlink Interference Model can be configured in the gNB’s 5G_RAN interface properties under channel models section of Physical Layer as shown below.

Downlink Interference Model is set to NO_INTERFERENCE by default.

The Wyner model is widely used to model and analyze cellular networks due to its simplicity and analytical tractability. In this model:

• Only interference from (two) adjacent cells is considered
• Random user locations and path loss variations are ignored, and
• The interference intensity from each neighboring base station (BS) is characterized by a single fixed parameter 0 ≤ $\alpha$ ≤ 1). The channel gain between BS and its home user is 1 and the intercell interference intensity is $\alpha$. Thus, a user sees a constant interference irrespective of its location.

These three simplifications lose a lot of information. We alter the Wyner model to address these flaws by:

• Considering interference from arbitrary number of BSs
• Factoring in the user location. The UEs distance from the interfering BS is an obvious factor that determines the interference intensity since the amount of interference caused depends on the signal attenuation with distance, the path loss law. Since the Wyner model uses relative interference, the ratio of a UEs distance from serving and interfering BSs is used as one of the interference parameters.
• Using a graded interference intensity model, whereby a UE will see a different value of $\alpha$ at different locations, thereby modelling the effect of interference more accurately.
##### Technical description#
• We model DL interference from any number of interfering BSs. Let $𝐵𝑆_𝑖$ be the serving BS to $𝑈𝐸_𝑘$. Let $𝐵𝑆_𝑗$ be any other BS $(𝑗 \not ={i})$. Then the distance between $𝑈𝐸_𝑘$ and $BS_i$ is denoted as $D^{BS_i}_{UE_k}$

• A UE sees interference if $\frac{(D^{BS_j}_{{UE_k}}- {D^{BS_i}_{UE_k}})}{D^{BS_j}_{UE_k}}$ s within a user defined threshold (for example, 20%). This ratio is also equal to $1 − \frac{D^{BS_i}_{UE_k}}{D^{BS_j}_{UE_k}}$ When $D^{BS_i}_{UE_K} \leq \ D^{BS_j}_{UE_K}$ we see that $0 \leq \ \frac{(D^{BS_j}_{{UE_k}}-D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}} \leq 1$ the ratio is 0 when $D^{BS_i}_{UE_k} = D^{BS_j}_{UE_k}$ and is 1 when $D^{BS_i}_{UE_k} = 0$ when $D^{BS_i}_{UE_k} = D^{BS_j}_{UE_k}$ the UE is equidistant from both BS i.e., at the cell edge. When $D^{BS_i}_{UE_k} = 0$, the UE is at the center of the serving BS, $BS_i$

• Users at the cell-edge will see out of cell interference; as the user moves closer to the cell centre, it sees lesser interference.

• We call this user defined threshold as differential distance ratio threshold and denote it by $𝐷𝐷𝑅_{𝑡ℎ}$. The DDR threshold is used to define 𝐾 thresholds, which are in turn used to determine the out of cell interference experienced by $𝑈𝐸_𝑘$, as explained below. First, we bin the $𝐷𝐷𝑅_{𝑡ℎ}$, conditional on $D^{BS_i}_{UE_k} \leq D^{BS_j}_{UE_k}$, into K steps,as follows: $$0 \leq \frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}} < \bigg(\frac{DDR_{th}}{k}\bigg) \times 1$$ $$\bigg(\frac{DDR_{th}}{k}\bigg) \times 1 \leq \frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}} < \bigg(\frac{DDR_{th}}{k}\bigg) \times 2$$ $$....$$ $$....$$ $$\bigg(\frac{DDR_{th}}{k}\bigg) \times (k-1) \leq \frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}} < \bigg(\frac{DDR_{th}}{k}\bigg) \times k$$ $$\bigg(\frac{DDR_{th}}{k}\bigg) \times k \leq \frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}}$$

Where $𝐷𝐷𝑅_{th}$, is a user input varying from 0.00 to 1.00 (default is 0.1 or 10%), and K, the number of steps, is a user input varying from 1 to 4 (default is 1).

• The relative interference for each of these steps would be 𝐼𝑛 (0 ≤ 𝑛 ≤ 𝐾) where 𝐾 is the number of steps and 𝑛 represents each individual step (𝑛 = 𝑝 if the $𝑝^{th}$ inequality in the above is satisfied, counting the first inequality as the zeroth inequality).
• We specify the interference power relative to the power received from $𝐵𝑆_{i}$ . Therefore, given the value of $l_{n}$, interference power is calculated as the received power from 𝐵𝑆𝑖(excluding beamforming gain) less $𝐼_{n}$. Thus $$𝐼𝑛𝑡𝑒𝑟𝑓𝑒𝑟𝑒𝑛𝑒 \ 𝑃𝑜𝑤𝑒𝑟𝑓𝑟𝑜𝑚𝐵𝑆_{j}(𝑑𝐵) = 𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑𝑃𝑜𝑤e𝑟𝑓𝑟𝑜𝑚𝐵𝑆_{i} (𝑑𝐵𝑚) − 𝐼^{j}_{n}(𝑑𝐵)$$ Therefore, we have $𝐼^i_n (𝑑𝐵) = 𝑃^{BS}_{𝑠𝑒𝑟𝑣𝑖𝑛𝑔}(𝑑𝐵𝑚)−𝑃^{BS}_{𝐼𝑛𝑡𝑒𝑟𝑓𝑒𝑟𝑖𝑛𝑔}(𝑑𝐵𝑚)$.This is equivalent to the Wyner model with $\alpha = \frac{P^{BS}_{interfering}}{p^{BS}_{serving}}$ in the linear scale; however, note that in our interference model, $\alpha$ depends on the UE’s location, because $l_n$ depends on the distance.
• This interference powers (linear) from all interfering BSs are added to the noise power (in linear scale) and then $$𝑆𝐼𝑁𝑅 = \frac{𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑝𝑜𝑤𝑒𝑟 𝑓𝑟𝑜𝑚 𝐵𝑆𝑖 + 𝐵𝑒𝑎𝑚𝐹𝑜𝑟𝑚𝑖𝑛𝑔𝐺𝑎𝑖𝑛}{𝑁𝑜𝑖𝑠𝑒𝑃𝑜𝑤𝑒𝑟 + \sum 𝐼𝑛𝑡𝑒𝑟𝑓𝑒𝑟𝑒𝑛𝑐𝑒𝑃𝑜𝑤𝑒𝑟}$$
• Each 𝐼𝑛 is a user input. It is subject to the limits 0 ≤ 𝐼𝑛 ≤ 20 𝑑𝐵. NetSim will enforce the sanity check 20 $\geq$ 𝐼𝐾 $\geq$ 𝐼𝐾−1 $\geq$ … $\geq$ 𝐼0 $\geq$ 0. Here $I_K$ is the relative interference seen when the UE is near 𝐵𝑆𝑖 and $I_0$ is the relative interference seen when the UE is nearly equidistant from its two nearest BSs (and hence far from 𝐵𝑆𝑖 ).
• In an ideal case, when the user is at the cell edge, the received power from $𝐵𝑆_{i}$ will be roughly equal to the received power from $BS_j$(since it is equidistant from the two BSs), and so $𝑆𝐼𝑁𝑅_{𝐶𝑒𝑙𝑙𝐸𝑑𝑔𝑒}$ will necessarily be less than 0 dB.
• As the UE moves away from the cell edge and towards 𝐵𝑆𝑖 , the received power from $𝐵𝑆_{i}$ increases and that from $BS_{j}$ decreases, and so the SINR improves. For this reason, we have the limits on 𝐼𝑛 as 0 𝑑𝐵 $\leq$ 𝐼𝑛 $\leq$ 20 𝑑𝐵. If the user sets 𝐼𝑛 to a large value, it will be equivalent to having no inter-cell interference

therefore the equations where $\frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}}$ is equal to $\frac{k}{4} = 0.1\ , \frac{2k}{4} = 0.2 \ , \frac{3k}{4} = 0.3$ and $\frac{4k}{4} = 0.4$The handover interference region is also shown.

• In case $\frac{(D^{BS_j}_{UE_k}- D^{BS_i}_{UE_k})}{D^{BS_j}_{UE_k}} > DDR_{th}$,the out of cell interference seen at the UE is set to $I_K$. The default value of 𝐼𝐾 is 0, i.e., cell centre users do not see any out of cell interference. The default values of $I_K$ for 𝑘 = 1, 2, … ,𝐾 − 1 is 10 dB.
• In NetSim, handover is triggered when the signal strength from $BS_j$ is offset (3dB by default) higher than signal strength from $BS_j$. A handover is not triggered when $UE_K$ is equidistant from both BSs but only when it is slightly nearer to $BS_j$.Therefore, the short time when $𝐷^{BS_i}_{𝑈𝐸_𝐾} \geq D^{BS_j}_{UE_k}$ is a special case requiring a different interference power. We term this interference as “Handover interference” and is a separate user input. Handover interference is denoted as 𝐼−1 and −3𝑑𝐵 $\leq$ 𝐼−1 $\leq$ 0 𝑑𝐵.
• Sample interference file format and example:
<gNB_i>, <gNB_j>, <DDRth>, <nSteps>,<i_-1>,<i_0>,<i_1>,<i_2> … <i_(n-1)>
gNB_11, gNB_12, 0.2, 4, -1, 1, 2, 3, 4

#### Exact Geometric Model#

In this model NetSim computes interference from one or more interfering base-stations (BS or gNB) at a UE, based on (i) the gNB UE locations and (ii) the pathloss between the interfering gNB and the UE.

NetSim supports various 3GPP propagation models to calculate the pathloss between every BS (gNB) and UE. One of the parameters in the pathloss equations is the distance between the BS and the UE. Some of the other user settable parameters used in the 3GPP models are (i) Centre frequency (chosen from the band selected) (ii) Rural or Urban environments (iii) UE-BS channel is in LOS or NLOS (iv) Shadow-fading in the UE-BS channel (v) Indoor or outdoor UE location, etc., are also supported in NetSim.

Let $BS_i$ be the serving BS to $UE_k$. Let $BS_j$ be any other $BS (𝑗 ≠ 𝑖).𝑈𝐸_k$communicates with $BS_i$ while all other $BSs (𝑗 ≠ 𝑖)$ act as interferers. The distance between $𝑈𝐸_𝑘$ and $BS_i$ is denoted as $𝐷^{BS_i}_{𝑈𝐸_𝑘}$, while the distance between UE and $BS_j$ is denoted as $𝐷^{BS_j}_{𝑈𝐸_𝑘}$.The power of the interfering signal from any $BS_j$ at any $UE_k$ depends on (i) the transmit power of the interfering BS and (ii) pathloss between the interfering BS and the UE. It can therefore be expressed as $$I^{BS_j}_{UE_k} = P^{BS_j} - PL^{BS_j}_{UE_k}$$ where $𝑃^{𝐵𝑆_𝑗}$ is the transmit power of $𝐵𝑆_𝑗$,$𝑃𝐿^{BS_j}_{𝑈𝐸_𝑘}$ represents the 3GPP model based pathloss between $𝐵𝑆_j$ and $𝑈𝐸_k$. This pathloss is dependent on $𝐷^{BS_j}_{𝑈𝐸_𝑘}$ and the channel between $𝐵𝑆_𝑗$ and $𝑈𝐸_𝑘$. The interference powers (linear) from all interfering BSs (i.e., apart from the serving BS) are added to the noise power (in linear scale) and we get the expression $$SINR_{UE_k} = \frac{𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 \ 𝑝𝑜𝑤𝑒𝑟 \ 𝑓𝑟𝑜𝑚 BS_i + 𝐵𝑒𝑎𝑚𝐹𝑜𝑟𝑚𝑖𝑛𝑔𝐺𝑎𝑖n}{𝑁𝑜𝑖𝑠𝑒𝑃𝑜𝑤𝑒r + \sum_{j} I^{BS_j}_{UE_k} }$$

SINR determines the 5G PHY rate (throughput) that the UE would get. This is because the PHY Rate depends on the CQI/MCS which is in turn depends on SINR. Section 3.2 explains the details.

The Wyner model is approximate but is computationally faster; the geometric model is precise but computationally slower due to the calculations involved.

#### Interference modeling in OFDM in NetSim#

NetSim doesn’t model the allocation of specific subcarriers to individual users. The aggregate resources are divided amongst the UEs per UEs’ requirements and the scheduling algorithm.

• The received power at $𝑈𝐸_𝑘$ from $BS_i$ , with transmit power $𝑃_𝑖$ is given (in the linear scale) as $$p^{BS_i}_{UE_k} = \bigg(\frac{p_i}{PL^{BS_i}_{UE_k}}\bigg)$$
• $𝐼^j_{ik}$ or the interference in linear scale at a $𝑈𝐸_𝑘$ (associated with $𝐵𝑆_𝑖$) from $𝐵𝑆_𝑗$
• To normalize the power should we further multiply by the ratio given below $$I_{ik} = \sum_j I^j_{ik}\bigg(\frac{p_i}{PL^{BS_i}_{UE_k}}\bigg)$$
• Assumptions:
• A1.The above formula assumes the interference seen by $𝑈𝐸_𝑘$ is proportional to the number of RBs allotted to $𝑈𝐸_𝑘$
• A2. Fast fading is not accounted for in the interfering signalinterference calculations since it would require too much computational time, given that it needs to be re-calculated every coherence time, not just between BS and its associated UEs but between a BS and all the UEs in all cells. Hence NetSim calculates average interfering signal power and not instantaneous interfering signal power, which is a well-accepted assumption in multi-cell MIMO literature. Recall that NetSim accounts for fast fading in the direct signal power calculations-

• The total noise seen will be $$K \times T \times RB^{slot}_{UE_k}$$

• The signal power $𝑃^{BS_i}_{𝑈𝐸_𝑘}\times \bigg(\frac{RB^{slot}_{UE_k}}{RB^{slot}_{total}}\bigg)$
Therefore, $$SINR = \frac{P^{BS_i}_{UE_k}\times\bigg(\frac{RB^{slot}_{UE_k}}{B^{slot}_{total}}\bigg)}{k\times T \times RB^{slot}_{UE_k}} = \frac{P^{BS_i}_{UE_k}}{k \times T \times RB^{slot}_{total} + \sum_j I^j_{ik}}$$
###### Interference in MIMO#
• If $𝑈𝐸_𝑘$ is receiving from $𝐵𝑆_𝑖$ in multiple layers, the interference power $𝐼^j_{ik}$ is the same for all layers. $$SINR_L = \frac{P^{BS_i}_{UE_k} \times \lambda_L}{k \times T \times RB^{slot}_{total} + \sum_j I^j_{ik}}$$ Where 𝐿 represents a MIMO layer
• Note that neither the noise nor the interference is divided by the layer count, because the combining vector has unit norm
##### Fast fading component of interfering signals#

NetSim accounts for the Rx power from neighbouring cells, in a statistical sense, as explained below. Let us consider an example of two BSs and two UEs with BS1 transmitting to UE1 and BS2 transmitting to UE2. The BSs employ digital (Eigen) beamforming to the UE they are transmitting to, so there is no channel-dependent beamforming between BS1 and UE2 or BS2 and UE1.

Due to this, the interference seen by UE2 due to BS1’s transmission will depend on the inner product between the beamforming vector employed by BS1 (which depends only on the channel between BS1 and UE1) and the channel between BS1 and UE2 (which is independent of the channel between BS1 and UE1.)

Now, since we model the fast-fading component of the channel as having i.i.d. circularly symmetric complex Gaussian entries, the expected interference power at UE2 is simply the transmit power by BS1 times the path loss between BS1 and UE2. This because the long-term statistical average of the square of the magnitude inner product between the (unit-norm) beamforming vector employed by BS1 and the channel between BS1 and UE2 is unity.

##### Limitations#
• In the above interference formula NetSim assumes that all interfering BSs transmit data in that slot.
• The interference calculations need to be done for each slot. Enabling interference will slow down the simulation.

### 5G Core#

NetSim 5G core functionality was introduced in NetSim v13. This 5G core includes entities, which reside within the core devices (and partially within the gNB) such as Session Management Function (SMF), Access and Mobility Management Function (AMF) and User Plane Function (UPF) and the protocols these entities use for operation.

The NetSim 5G core model provides users the means to simulate the end-to-end IP connectivity. It supports interconnection of multiple UEs to the Internet/Cloud via the Radio Access Network or RAN. The RAN consists of multiple gNBs. These gNBs connect to the 5G core in the backhaul. In NetSim, the 5G core comprises of a single AMF, SMF and UPF

NetSim 5G Core model has been designed as follows:

1. The Packet type supported in NetSim 5G Core is IPv4.
2. A single set of SMF/UPF/AMF entities are only available. Scenarios with inter SMF mobility / inter AMF mobility are not supported in NetSim.
3. It is possible for a single UE to use different applications with different QoS models. Hence, multiple EPS Bearers are supported for each UE. This includes necessary classification of TCP/UDP traffic over IP done at the UE in the Uplink and at the UPF in the downlink.
4. The NetSim 5G model allows users to perform an XN based handover between two gNBs.

In the 5G standalone architecture, the roles played by each of the entities are different.

1. A UE has the following interactions:
a. The random-access procedure to initiate communication with the gNB.
b. Setup the RRC connection with the gNB.
c. Perform NAS level authentication.
d. Handle the RRC Reconfiguration from the gNB and this message sets up the default PDU session.
e. The UE concludes the registration procedure.
f. Data flow takes place in both the downlink and uplink directions.
2. The gNB acts as a bridge between the UE and the 5G Core. The gNB:
a. Handles the random-access request from the UE and assign resources for initiating the RRC connection.
b. Sets up the RRC connection with the UE. SRB1 is set up at this point. Starting at this point the gNB starts assigning downlink and uplink resources to the UE.
c. Transports the Registration Request from the UE to the AMF.
d. Carries the NAS signalling between the UE and the gNB.
e. The 5G Core initiates the default PDU session setup. A Registration Accept is also received from the UE.
f. Activates the default PDU session via the RRC Reconfiguration message. It also transports the Registration Complete message to the AMF.
g. The downlink and uplink data flow takes place between the UE and the Internet.
3. The AMF or Access Mobility Function coordinates the 5G Standalone registration procedure.
a. Handles the Initial UE Message from the gNB. This message carries the Registration Request from the UE.
b. On receiving the Registration Request, the AMF obtains the UE context.
c. AMF updates the SMF context and sends an Initial Context Setup Request to activate the default PDU session. The message also carries the Registration Accept message from the AMF.
d. When the gNB signals that the Initial Context setup has been completed, the AMF updates the SMF context.
e. The AMF also notifies the SMF when the session is ready for uplink and downlink data transfer.
f. All messages related to session management are forwarded over the N11 reference interface to the Session Management Function (SMF).
4. The SMF or Session Management Function serves as a control plane entity and it is responsible for the session management.
a. The SMF assigns an IP address to be used for sending uplink data.
b. The SMF selects the UPF to be used for the session.
c. The SMF updates the UPF using PFCP messages via the N4 control-data plane interface.
5. The UPF or User Plane function is a data plane component that handles user data.
a. The UPF is completely controlled from the SMF using the N4 interface. The SMF uses the Packet Forwarding Control Protocol (PFCP) to update the data plane.
b. The UPF is responsible for packet routing and forwarding, packet inspection, QoS handling, and external PDU session for interconnecting Data Network (DN), in the 5G architecture.
c. The UPF represents the data plane evolution of a Control and User Plane Separation (CUPS) strategy and is introduced as an extension to existing Evolved Packet Cores (EPCs).
d. The UPF identifies user plane traffic flow based on information received from the SMF over the N4 reference point. The N4 interface employs the Packet Forwarding Control Protocol (PFCP).

#### 5G Interfaces#

5G Interfaces present in NetSim are as follows:

1. 5G_N1_N2: N1-N2 is the reference point between the gNB (gNodeB) and the AMF.
2. 5G_N3: Interface between the RAN (gNB) and the (UPF).
3. 5G_N4: Interface between the Session Management Function (SMF) and the UPF
4. 5G_N6: Interface between the Data Network (DN) and the UPF.
5. 5G_N11: Interface between the SMF and AMF.
6. 5G_XN: Interface between two RAN (gNB) nodes.

The NG-AP interface (N2) provides control plane interaction between the gNB and the AMF. In NetSim, this interface is modelled in an abstract manner, with direct interaction between the gNB and the AMF. The encoding of NGAP messages and information elements specified in [TS36413] is not implemented.

The NG-AP primitives that are modelled are:

1. INITIAL UE MESSAGE AND REGISTRATION REQUEST
2. INITIAL CONTEXT SETUP REQUEST
3. INITIAL CONTEXT SETUP RESPONSE AND REGISTRATION COMPLETE
4. PATH SWITCH REQUEST
5. PATH SWITCH REQUEST ACKNOWLEDGE

The N11 interface provides control plane interaction between the SMF and the AMF using the GTPv2-C protocol specified in [TS29274]. In NetSim, this interface is modelled with directinteraction between the SMF and the AMF objects, without implementing the encoding of the messages.

The N11 primitives that are modelled are:

1. CREATE SESSION REQUEST
2. CREATE SESSION RESPONSE
3. MODIFY BEARER REQUEST
4. MODIFY BEARER RESPONSE

Of these primitives, the first two are used during the initial UE attachment for the establishment of the N2-U bearers; the other two are used during handover to switch the N2-U bearers from the source gNB to the target gNB as a consequence of the reception by the AMF of a PATH SWITCH REQUEST NG-AP message.

#### Cell Selection and UE attach procedure#

As an example, consider a 5G network scenario with 5G Core devices (which consists of AMF, SMF, UPF and three L2 Switches), a UE which is connected to a gNB, and in the server side, a Wired Node which is connected to a Router which is connected to the 5G core via UPF.

The attachment process is as follows:

1. Radio Resource Control – MIB(Master Information Block) packets are broadcast by each gNB to all the UEs. These packets are transmitted periodically every 80 ms.
• If the number of gNBs is ‘m’ and the number of UEs is ‘n’, then the number of MIB packets transmitted each time will be ‘m x n’
• The transmission of MIB packet starts from the MAC Layer. The transmission time can be calculated from the MAC Layer Arrival Time in the packet trace.
• The size of each MIB packet is 8 Bytes and can be observed in the Phy Layer Payload field in the packet trace.
2. RRC System Information Block 1 packets are broadcast by the gNBs to all the UEs. These packets are transmitted periodically every 160ms.
• The transmission of SIB1 packet starts from the MAC Layer. The transmission time can be calculated from the MAC Layer Arrival Time in the packet trace.
• If the number of gNBs is ‘m’ and the number of UEs is ‘n’, then the number of MIB packets transmitted each time will be ‘m x n’
• The size of each SIB1 packet is 8 Bytes. This can be observed in the Phy Layer Payload field in the packet trace.
3. After the first set of packets, the cell selection occurs as explained below.
• The UE attaches itself initially to the gNB from which it receives the highest SNR.
• If SNR from multiple gNBs is equal, the UE will attach to the gNB with the lowest ID.
• The gNB to which the UE is connected by the user in NetSim GUI at the network design stage, is only for visual purposes. It plays no role in determining which gNB the UE will attach to
4. RRC System Information are broadcast by the selected gNBs to all UEs when the cell selection is complete.
• The SI packet is sent only once during the simulation. It is not sent after every Handover.
• It occurs at 160.9ms.
• The transmission of SI packet starts from the MAC Layer. The transmission time can be calculated from the MAC Layer Arrival Time in the packet trace.
• The size of each SI packet is 8 Bytes. The size of the packet can be calculated from the Phy Layer Payload field in the packet trace.
5. The RRC Setup Request will be sent by the UE to the connected gNB within 2.5ms of receipt of RRC SI packet
• The RRC Setup Request is sent with the random UE-Identity and an establishment cause. This can be observed in the Headers column of the packet trace.
6. The RRC Setup message is used to establish SRB1.
• Selected gNB sends the setup to UE which contains RRCTransactionIdentifier, RRCResponsetype, PDCP Properties: UEID and GNBID, DiscardDelayTimer, T_Reordering, Hdr Type, SN=0, dcBit.
• RRC Setup Packet Size is 24 Bytes. The size of the packet can be calculated from the Phy Layer Payload field in the packet trace.
• UE stops the timer (T300) when it receives the RRC Setup message.
• UE makes a transition to RRC connected mode.
7. The RRC Setup Complete message is used to confirm the successful completion of an RRC connection establishment.
• UE sends this message on receipt of the RRC Setup message.
• Contains RRCTransactionIdentifier, SelectedPLMNIdentity, AMFIdentifier, Gaumi Type, Hdr Type, SN, dcBit
8. UE sends UE_MEASUREMENT_REPORT to the connected gNB. The measurement report is sent by each UE to its serving gNB and it contains SINR from all gNBs If the SNR from another gNB is offset greater than SNR from serving gNB, it leads to handover. After the handover procedure is completed RRC Reconfiguration would happen between target gNB and UE. The UE will then send the UE MEASUREMENT REPORT to this gNB. These can be observed in the NetSim Packet Trace.

#### 5G Core connection management process#

This functionality is based on (3gpp 38.413)

1. The gNB will introduce the UE to the 5G Core after the initial gNB- UE attachment process.
2. The gNB will send Initial UE message and Registration request to the selected AMF (In NetSim, there is only one AMF). The message will be transmitted when gNB receives the first NAS message to be transmitted from the radio link after the RRC Setup Complete
3. Upon receiving the UE message and registration request, the AMF will send Create Session Request to the SMF in-order to create a session for the UE.
4. The SMF will send the PFCP Session Request to UPF to denote that the UE is present in the network and the data packet flow may occur to UPF and to create/ establish/ modify PFCP session for UE.
5. Further, AMF will send the Initial Context Setup Request to the gNB to confirm the setup of a UE context.
6. The gNB will send Initial Context Setup and Registration Complete message to the AMF and then the UE will be associated with the core.

These can be observed in NetSim Packet Trace file

When the UE attachment is completed, the data packets will be transmitted from the source to the destination via the UPF.

### 5G Non-Stand Alone (NSA)#

#### Overview#

NSA leverages the existing LTE radio access and core network (EPC) to anchor 5G NR using the Dual Connectivity feature. This solution provides a seamless option to deploy 5G services with very less disruption in the network. The eNB is connected to the EPC through the LTE_S1 interface and to the gNB through the XN interface. The gNB can be connected to the EPC through the LTE_S1 interface and other gNBs through the XN interface. Similarly, the eNBs and gNBs will be connected to 5G Core through the N1_N2, and N3 interfaces and gNB-eNB and gNB-gNB connections through the XN interface. The control packets like RRC MIB, RRC SIB1, RRC SI in NSA modes will be transmitted from the master nodes to the UE. Similarly, the UE will send the UE_MEASUREMENT_REPORT and RRC_SETUP messages to the master nodes. The master node will be selected according to the deployment option selected.

The NSA modes in NetSim 5G module includes:

1. Option 3 where only LTE core/ EPC is present and no 5G Core devices are present. Here, eNB is the Master Cell and gNB is the Secondary Cell. Option 3 is categorized into:
a. Option 3: Only eNB connects to EPC and eNB and gNB connects to the XN interface.
b. Option 3a: Both eNB and gNB connects to the EPC. gNB connects to the XN interface and eNB does not XN interface.
2. Option 4 where only 5G Core devices are present, and EPC is not available. Here, gNB is the Master Cell and eNB is the Secondary Cell. Option 4 is categorized into:
a. Option 4: Only gNB connects to all the 5G Core interfaces. eNB connects to the XN interface.
b. Option 4a: gNB connects to all 5G Core interfaces and eNB connects to AMF and UPF through respective interfaces.
3. Option 7 where only 5G Core devices are present, and EPC is not available. Here, eNB is the Master Cell and gNB is the Secondary Cell. Option 7 is categorized into:
a. Option 7: eNB connects to all 5G Core interfaces. gNB connects only to the XN interface.
b. Option 7a: gNB connects to all the 5G Core interfaces. eNB connects to AMF and UPF through the respective interfaces.

NSA deployment - Option 3, Option 3a Networking modes

NSA deployment - Option 4, Option 4a Networking modes

NSA deployment - Option 7, Option 7a Networking modes:

n Options 3, 4 and 7, the secondary node is not directly connected with the LTE-EPC/ 5G-Core. On reception of a packet, the secondary node, transmits all packet to the master node via the XN interface for uplink cases and for downlink cases, the core / EPC transmits the packets to the master node and the master node splits the traffic between itself and the secondary node, since there is no connection between the core and secondary node. The master node also transmits the packets to the UE.

In options 3a, 4a and 7a, the split happens at the EPC/UPF.

#### Option 3/3a#

The standardized NSA EPC networking architecture includes Option 3, Option 3a, and Option 3x.

Non-standalone option 3 is where radio access network is composed of eNBs as the master node and gNBs as the secondary. The radio access network is connected to EPC (Evolved Packet Core).

##### Option 3#

Option 3 represents a network having both LTE and NR radio access but using only the EPC core of LTE to route the Control signals. In this option, LTE is used as the control plane anchor for NR, and both LTE and NR are used for user data traffic (user plane).

Option 3 involves routing of 5G data through the eNB.

All uplink/downlink data flows to and from the LTE part of the LTE/NR base station, i.e., to and from the eNB. The eNB then decides which part of the data it wants to forward to the 5G gNB over the XN interface. The gNB never communicates with the 4G core network directly.

In the Option 3 networking mode, the XN interface traffic between eNB and gNB.

Traffic is split across 4G and 5G at eNodeB. Hence, eNB is the Master Cell.

In NetSim Option 3 of NSA mode connects the eNB to the EPC using LTE_S1 interface. The gNBs and eNBs are inter-connected in option 3 using the XN interface via a Layer 2 Switch and the UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface.

The data flows from the eNB and the eNB decides which part of data is to be forwarded to the gNB over the XN interface

##### Option 3a#

In the option 3a, both the eNB and the gNB can directly talk to the LTE core network but they cannot directly talk with each other over the XN interface. This means that a single data bearer cannot share the load over LTE and NR.

There is only control plane traffic in the XN interface. The dynamic switching between 5G and 4G is not supported in Option 3a. The traffic is split across 5G and 4G at the EPC.

In NetSim Option 3a of NSA mode connects the eNB and gNB to the EPC using LTE_S1 interface. Hence, the eNB and gNB can directly communicate with the EPC. Since XN interface is not present for eNB and it is present for gNB in this deployment option, gNB and eNB cannot communicate with each other. the UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface.

#### Option 4/4a#

The EPC or the LTE Core in Option 3/3a/3x is replaced by the 5G Core in Option 4. The master node is the LTE NR cell or gNB and the secondary node is LTE cell or eNB

##### Option 4#

In Option 4 of Non-Stand-alone mode, both LTE and 5G NR radio access technologies are deployed and controlled through only the 5G Core, i.e., AMF, SMF and UPF.

The gNB has both the NG-U and NG-C interfaces. Both eNB and gNB connects over the XN interface. The interface between gNB and AMF is called N2 interface and the interface between gNB and UPF is called N3 interface, So the control plane is over N2 interface and user plane is over N3 interface.

The eNB is not connected to 5G Core, hence data traffic is split over the XN interface. The gNB is connected to 5G Core with NG-U and NG-C.

In NetSim, the gNB is connected to the UPF via Switch_4 using the 5G_N3 interface and to the AMF via Switch_5 using the 5G_N1_N2 interface, hence, gNB communicates directly with the 5G Core and eNB does not communicate directly with the 5G Core. The gNBs and eNBs are inter-connected using the XN interface via a Layer 2 Switch and the UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface.

##### Option-4a#

In Option 4a, the eNB is not connected to gNB over XN interface, but it is connected to 5G Core over the NG-U interface.

The gNB has both NG-U and NG-C interface. Data traffic is split between 4G and 5G at the 5G Core, specifically the UPF.

In NetSim, the gNB and eNB are connected to the UPF via Switch_4 using the 5G_N3 interface and to the AMF via Switch_5 using the 5G_N1_N2 interface. The gNBs we can inter-connected using the XN interface and does not have XN interface for eNBs. hence direct communication between eNB and gNB is not possible. The UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface.

#### Option 7/7a#

The eNB has NG-U and NG-C interfaces to 5G Core and eNB connects with gNB over XN interface. The master node is the LTE cell or eNB and the secondary node is the LTE-NR cell or gNB in these deployment options.

##### Option-7#

In Option 7, the gNB does not communicate to 5G Core. Data traffic flows through eNB communicating to and from the 5G Core. Some part of the data can be transferred through gNB over the XN interface.

In NetSim, the eNBs are connected to the UPF via Switch_4 using the 5G_N3 interface and to the AMF via Switch_5 using the 5G_N1_N2 interface. The gNBs and eNBs are inter-connected using the XN interface and hence direct communication between eNB and gNB is possible. The UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface. The data is delivered to the UE when it comes to the 5G NR through the LTE-RAN

##### Option-7a#

In Option 7a, eNB and gNB are not connected via the XN interface and instead gNB is connected to 5G Core over NG-U. The eNB is connected to 5G Core over NG-C and NG-U. Data traffic is split at the 5GC (UPF).

In NetSim, the gNB and eNB are connected to the UPF via Switch_4 using the 5G_N3 interface and to the AMF via Switch_5 using the 5G_N1_N2 interface. The gNBs does not have an XN Interface and eNBs inter-connected using the XN interface and hence direct communication between eNB and gNB is not possible. The UEs present in the network consists of two interfaces, an LTE interface and a 5G_RAN interface.

The user data goes directly from the 5G Core to the gNB and then to the UE

### NSA Packet Flow#

#### Option 3#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

eNB is the Master Node and gNB is the Secondary Node in Options 3, 3a and 3x.

The packet flow in the network takes place as explained below:

1. The MN, eNB will broadcast the RRC_MIB packets to the UE every 40 ms and RRC_SIB1 every 80 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the eNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the eNB.
4. On receiving the RRC_Setup_Request packet, the eNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. After the RRC connection, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the L2Switch.
7. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e. DC_SEC_CELL_ADDITION_RESPONSE.
8. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
9. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
10. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the EPC and from the EPC it goes to the MN, eNB, and from the eNB it will be transmitted to the UE.
11. The second data packet will flow to eNB from EPC and then to the gNB through the L2Switch (via XN interface) and then to the UE.
12. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below

#### Option 3a#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

The packet flow in the network takes place as explained below:

1. The MN, eNB will broadcast the RRC_MIB packets to the UE every 40 ms and RRC_SIB1 every 80 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the eNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the eNB.
4. On receiving the RRC_Setup_Request packet, the eNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. After the RRC connection, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the EPC.
7. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e. DC_SEC_CELL_ADDITION_RESPONSE.
8. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
9. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
10. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the EPC and from the EPC it goes to the MN, eNB, and from the eNB it will be transmitted to the UE.
11. The second data packet will flow from EPC to the gNB and then to the UE.
12. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below

#### Option 4#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

gNB is the Master Node and eNB is the Secondary Node in Options 4 and 4a.

The packet flow in the network takes place as explained below:

1. The MN, gNB will broadcast the RRC_MIB packets to the UE every 80 ms and RRC_SIB1 every 160 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the gNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the gNB.
4. On receiving the RRC_Setup_Request packet, the gNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. The gNB will send INITIAL_UE_MSG_AND_REGISTRATION_REQUEST to the AMF via L2Switch_5 through the N1_N2 interface.
7. AMF will send CREATE_SESSION_REQUEST to SMF through N11 interface.
8. SMF will send PFCP_SESSION_REQUEST to UPF through N4 interface.
9. UPF will send back the response packet to SMF, i.e, PFCP_SESSION_RESPONSE
10. SMF will send back the response packet to AMF, i.e., CREATE_SESSION_RESPONSE
11. AMF will send the INITIAL_CONTEXT_SETUP_REQUEST to the gNB via Switch_5.
12. On the receipt of Context setup request, gNB will send INITIAL_CONTEXT_SETUP_RESPONSE_REGISTRATION_COMPLETE packet to the AMF via switch_5 through the N1_N2 interface.
13. This marks the completion of UE registration process.
14. After the UE registration, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the L2Switch_6.
15. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e. DC_SEC_CELL_ADDITION_RESPONSE.
16. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
17. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
18. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the UPF through the N6 interface and from the UPF it goes to the MN, gNB via Switch_4 through the N3 interface, and from the gNB it will be transmitted to the UE through the RAN interface.
19. The second data packet will flow from UPF to the gNB via Switch_4 and from the gNB, the packet gets transmitted to the eNB via Switch_6 through the XN interface and then to the UE.
20. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below:

#### Option 4a#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

The packet flow in the network takes place as explained below:

1. The MN, gNB will broadcast the RRC_MIB packets to the UE every 80 ms and RRC_SIB1 every 160 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the gNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the gNB.
4. On receiving the RRC_Setup_Request packet, the gNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. The gNB will send INITIAL_UE_MSG_AND_REGISTRATION_REQUEST to the AMF via L2Switch_5 through the N1_N2 interface.
7. AMF will send CREATE_SESSION_REQUEST to SMF through N11 interface.
8. SMF will send PFCP_SESSION_REQUEST to UPF through N4 interface.
9. UPF will send back the response packet to SMF, i.e, PFCP_SESSION_RESPONSE
10. SMF will send back the response packet to AMF, i.e., CREATE_SESSION_RESPONSE.
11. AMF will send the INITIAL_CONTEXT_SETUP_REQUEST to the gNB via Switch_5.
12. On the receipt of Context setup request, gNB will send INITIAL_CONTEXT_SETUP_RESPONSE_REGISTRATION_COMPLETE packet to the AMF via switch_5 through the N1_N2 interface.
13. This marks the completion of UE registration process.
14. After the UE registration, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the Switch_4.
15. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e. DC_SEC_CELL_ADDITION_RESPONSE.
16. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
17. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
18. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the UPF through the N6 interface and from the UPF it goes to the MN, gNB via Switch_4 through the N3 interface, and from the gNB it will be transmitted to the UE through the RAN interface.
19. The second data packet will flow from UPF to the eNB via Switch_4 and then to the UE.
20. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below:

#### Option 7#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

eNB is the MN and gNB is the SN in deployment options 7, 7a and 7x.

The packet flow in the network takes place as explained below:

1. The MN, eNB will send broadcast the RRC_MIB packets to the UE every 40 ms and RRC_SIB1 every 80 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the eNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the eNB.
4. On receiving the RRC_Setup_Request packet, the eNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. The eNB will send INITIAL_UE_MSG_AND_REGISTRATION_REQUEST to the AMF via L2Switch_5 through the N1_N2 interface.
7. AMF will send CREATE_SESSION_REQUEST to SMF through N11 interface.
8. SMF will send PFCP_SESSION_REQUEST to UPF through N4 interface.
9. UPF will send back the response packet to SMF, i.e, PFCP_SESSION_RESPONSE
10. SMF will send back the response packet to AMF, i.e., CREATE_SESSION_RESPONSE.
11. AMF will send the INITIAL_CONTEXT_SETUP_REQUEST to the eNB via Switch_5.
12. On the receipt of Context setup request, eNB will send INITIAL_CONTEXT_SETUP_RESPONSE_REGISTRATION_COMPLETE packet to the AMF via switch_5 through the N1_N2 interface.
13. This marks the completion of UE registration process.
14. After the UE registration, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the Switch_6.
15. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e., DC_SEC_CELL_ADDITION_RESPONSE.
16. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
17. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
18. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the UPF through the N6 interface and from the UPF it goes to the MN, eNB via Switch_4 through the N3 interface, and from the eNB it will be transmitted to the UE through the LTE interface.
19. The second data packet will flow from UPF to the eNB via Switch_4 and then from eNB to the gNB via Switch_6 through XN interface and then to the UE.
20. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below:

#### Option 7a#

Consider the following network scenario:

All the devices have the default properties, application start time was set to 1s and scenario is simulated for 10s.

The packet flow in the network takes place as explained below:

1. The MN, eNB will send broadcast the RRC_MIB packets to the UE every 40 ms and RRC_SIB1 every 80 ms.
2. After the transmission of the RRC_MIB and RRC_SIB1 packets, the eNB will send RRC_SI packet to the UE.
3. After reception of RRC_SI packet, UE will send RRC_Setup_Request to the eNB.
4. On receiving the RRC_Setup_Request packet, the eNB will acknowledge the request by transmitting RRC_Setup packet to the UE.
5. The UE will send back the RRC_Setup_Complete packet on the receipt of RRC_Setup message.
6. The eNB will send INITIAL_UE_MSG_AND_REGISTRATION_REQUEST to the AMF via L2Switch_5 through the N1_N2 interface.
7. AMF will send CREATE_SESSION_REQUEST to SMF through N11 interface.
8. SMF will send PFCP_SESSION_REQUEST to UPF through N4 interface.
9. UPF will send back the response packet to SMF, i.e, PFCP_SESSION_RESPONSE
10. SMF will send back the response packet to AMF, i.e., CREATE_SESSION_RESPONSE.
11. AMF will send the INITIAL_CONTEXT_SETUP_REQUEST to the eNB via Switch_5.
12. On the receipt of Context setup request, eNB will send INITIAL_CONTEXT_SETUP_RESPONSE_REGISTRATION_COMPLETE packet to the AMF via switch_5 through the N1_N2 interface.
13. This marks the completion of UE registration process.
14. After the UE registration, the MN node will send DC_SEC_CELL_ADDITION_REQUEST to the SN via the Switch_4.
15. On the receipt of this secondary cell addition request, the SN sends back the response packet, i.e. DC_SEC_CELL_ADDITION_RESPONSE.
16. The UE will now send the UE_MEASUREMENT_REPORT every 120 ms to the MN which contains the SNR information. The time interval at which the measurement report is to be transmitted can be set by the user in the eNB/ gNB properties-> Interface_ LTE/ 5G_RAN -> Datalink Layer.
17. After the UE attachment procedure, the data packets will be transmitted from the server to the UE based on the splitting algorithm.
18. As per the current splitting algorithm in NetSim, the first data packet will be transmitted to the UPF through the N6 interface and from the UPF it goes to the MN, eNB via Switch_4 through the N3 interface, and from the eNB it will be transmitted to the UE through the LTE interface.
19. The second data packet will flow from UPF to the gNB via Switch_4 and then from gNB to the UE.
20. Similarly, the third packet will flow through the MN, fourth through the SN and so on.

Packet flow can be analyzed using NetSim’s Packet Animation. Packet flow can be analyzed using the Packet Trace log file as shown below:

### Handover#

#### Use of SNR instead of RSRP#

NetSim is a packet-level simulator for simulating the performance of end-to-end applications over various packet transport technologies. NetSim can scale to simulating networks with 100s of UEs, gNBs, routers, switches, etc. In order to achieve a scalable simulation, that can execute in reasonable time on desktop-level computers, many details of the physical layer techniques have been abstracted.

In 5G, NetSim does not model control channels; there are no pilots/reference/synchronization signals. The channel matrix H is assumed to be known perfectly and instantaneously at the transmitter and receiver, respectively. Hence there is no RSRP, and all signal power related calculations are done using the data channel itself. Therefore, the hand-over is based on the SNR measured at the s-gNB and the t-gNB. Since the noise power would be the same at s-gNB and t-gNB, in effect the handover is based on received signal level on the PDSCH.

#### Handover algorithm#

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. Ericcson Research). The algorithm enables each UE to connect to that gNB which provides the highest SNR. Therefore, a handover occurs the moment a better gNB - adjacent cell has offset stronger RSRP (measured as SNR in NetSim) - is detected. If there is more than one gNB with offset higher signal strength, then the gNB with the highest signal strength becomes the target gNB. If carrier aggregation and MIMO is enabled then the SNR is averaged over all carriers and over all layers.

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. Therefore, the signal strength comparisons between source-gNB and all other gNBs is done every time a UE Measurement report is received at the source gNB. Note that:

• The signal strength compared is the average of all layers across all carriers.
• NetSim assumes that admission control during handover is always successful. Hence there are no handover failures on this count.

#### Ping pong handovers#

The above algorithm is susceptible to ping-pong handovers; continuous handovers between the serving and adjacent cells on account of changes in SNR due mobility and shadow-fading. At one instant the adjacent cell's SNR 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:

• Hysteresis (Hand-over-margin, HOM) which adds a SNR threshold (Adjacent_cell_SNR - Serving_cell_SNR > Hand-over-margin or hysteresis), and
• Time-to-trigger (TTT) or hysterisis which adds a time threshold.

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

Users may also be interested in measuring Ping pong handovers. For this, users should log the gNB to which the UE is attached. Users can then simulate scenarios where UE would attach to gNB1 then to gNB2, back to gNB1, again to gNB2 ... and so on, within a short time frame. Ping pong handovers can then be calculated per some (user-defined) criteria. Such scenarios can be simulated by enabling shadow-fading and fading-and-beamforming (fast fading). These phenomena would cause SINR to fluctuate over short distances and even over time at the same location.

Custom coding is required to log the "attached gNB" for each UE. NetSim radio measurements workspace (available in file-exchange/ GitHub) can serve as the base for this development effort.

#### Packet flow during handover#

NetSim implements on those aspects of the 5G handover procedure that directly affects network performance. Other aspects of the handover, for example security, are either not implemented or abstracted since they do not affect network performance. Handovers can occur in RRC_CONNECTED (during active Tx or Rx) or in RRC_IDLE states (no Tx or Rx)

The packet flow (which can be observed from the packet trace) is as follows:

1. Once the UE connection and association procedures are completed, the UE sends a UE_MEASUREMENT_REPORT every UE_Measurement_Report_Interval to the connected gNB. UE_Measurement_Report_Interval is by default set as 120ms in NetSim and is a user configurable parameter
2. At some time, neighbor cell RSRP (measured as SNR in NetSim) becomes offset higher than serving cell RSRP. 3. Immediately after receiving the next UE_MEASUREMENT_REPORT, source gNB (also sometimes called serving gNB) sends a HANDOVER REQUEST to the target (neighbor) gNB. This packet is sent through the Xn interface via a 5G-Core Switch. All the links in the 5G Core are by default 10 Gbps.
3. The Target gNB sends back HANDOVER REQUEST ACK to serving gNB,again via the Xn interface. If the HANDOVER REQUEST or the HANDOVER REQUEST ACK are errored then if the target gNB signal strength continues to be offset higher than source gNB signal strength, step 1 is repeated at the next UE_MEASUREMENT_REPORT.
4. After receiving HANDOVER REQUEST ACK the serving gNB sends the HANDOVER COMMAND to UE.
5. Then HANDOVER COMMAND packet is send by source gNB to the UE.
6. The target gNB then sends RRC Reconfiguration msg to UE. If UE is in RRC Connected mode than the target gNB is assigned as new source gNB for the UE.
7. The target gNB will send the PATH SWITCH packet to the AMF through the N1-N2 interface (via a core switch).
8. When the AMF receives the PATH SWITCH packet, it sends MODIFY BEARER REQUEST to the SMF. This is over the N11 interface.
9. The SMF on receiving the MODIFY BEARER REQUEST sends back the MODIFY BEARER RESPONSE 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. This is over the N1-N2 interface, via a 5GC switch.
11. The target gNB the sends a UE CONTEXT RELEASE to source gNB, and the source gNB sends back UE CONTEXT RELEASE ACK to target gNB. The context release request and ack packets are sent between the source and target gNB via the Xn interface.
12. Then RRC Reconfiguration takes place between target gNB and UE.
13. UE starts sending the UE MEASUREMENT REPORT to the new source gNB

### Handover Interruption Time#

Handover Interruption time is the shortest period supported by the mobile network during the handover process from the serving cell to the target. During this period the UE can neither transmit nor receive user data. Handover Interruption time can be configured in the Datalink layer properties of the gNB as shown below

Figure 3 49: Screen shot showing handover interruption time in gNB properties

The value can range from 0.0 to 500.0 milliseconds. The handover process in NetSim is based on event A3 i.e., the target signal strength is offset (3 dB) higher than the source signal strength. Handover interruption time (HIT) is added at the time of handover command is delivered to the UE. During this time there is no data plane traffic flow to the UE from the source/target. The time at which the path switch is sent from the target cell to the AMF will get delayed by the Handover interruption time. This can be observed in the packet trace log file.

### LTENR Results, Packet Trace and Plots#

Parameter                             Description
AppID Application ID
QFI QOS Flow ID
SDAP Entity SDAP Entity
SrcID Source ID
DestID Destination ID
SrcIP:Port Tuple of Source IP and Port Number
DestIP:Port Tuple of Source IP and Port Number
Packet Tx Total packets transmitted for a QFI
Packet Rx Total packets received for a QFI
Delay Average delay of all received packets within an average window
PER (Packet Error Rate) Packet Error Rate Plot
PDB (Packet Delay Budget) Packet Delay Budget Plot

#### LTE NR Packet trace#

The LTE NR packet trace file has in its last column the field LTENR_PACKET_INFO. This field has information relating to PDCP header and RLC header. The packet trace file can be opened from results dashboard.

#### PDCP and RLC Headers logged in Packet#

The PDCP and RLC header fields are logged in the LTENR_PACKET_INFO field of NetSim’s packet trace.

• D/C field termed as dCBit in NetSim. This is 0 for control PDU and 1 for Data PDU
• SN field termed SN in NetSim. This provides the sequence number of the PDCP PDU

• Header Type: If the packet is TMD, UMD or AMD PDU
• Segment Information (SI) field: The meaning of each possible SI field value is defined in the table below Table 3-11.

Value Description
SI=ALL Data field contains all bytes of RLC SDU
SI=FIRST Data field contains first segment of an RLC SDU
SI=LAST Data field contains last segment of an RLC SDU
SI=MIDDLE Data field contains neither the first nor the last segment of RLC SDU
• SN: The SN field indicates the sequence number of the corresponding RLC SDU. For RLC AM, the sequence number is incremented by one for every RLC SDU. For RLC UM, the sequence number is incremented by one for every segmented RLC SDU. RLC service data units (SDUs) coming from the upper layer are segmented or concatenated to RLC protocol data units (PDUs) which has a predefined size. Each PDU is assigned its own sequence number (SN). RLC AM on receiver side will reassemble these PDUs into SDUs using the sequence number.

• SO: The SO field indicates the position of the RLC SDU segment in bytes within the original RLC SDU. Specifically, the SO field indicates the position within the original RLC SDU to which the first byte of the RLC SDU segment in the Data field corresponds.
• Pollbit: The P field indicates whether or not the transmitting side of an AM RLC entity requests a STATUS report from its peer AM RLC entity. 0 indicates that the Status report is not requested, while 1 indicates that the Status report is requested.

#### LTENR Event Trace#

##### Sub event types#
1. LTENR_StartFrame
• There is one set of frames in the uplink and one set of frames in the downlink on a carrier.
• This event is triggered when a frame is formed.
• As frame length is 10ms, the event gets triggered every 10ms.
2. LTENR_Start_Subframe
• Each frame consists of 10 subframes.
• Event gets triggered every 1 ms
3. LTENR_StartSlot
• Sub frames are divided into slots.
• Slot size depends on Numerology (µ)
• Event gets triggered every $\frac{1}{2^\mu}$ms
4. LTENR_Generate_RRC_MIB
• The timer event triggered every 80ms to generate and broadcast MIB packets from gNBs to all UEs.
(LTE-NR->LTENR_GNBRRC.c->fn_NetSim_LTENR_GNBRRC_GenerateMIB())
5. LTENR_Generate_RRC_SIB1
• The timer event triggered every 160ms to generate and broadcast SIB1 packets from gNB to all UEs. (LTE-NR-> LTENR_GNBRRC.c-> fn_NetSim_LTENR_GNBRRC_GenerateSIB1())
6. LTENR_Generate_RRC_SI
• Timer event triggered when the selected gNB broadcasts RRC_SI packets to all the UEs.
• This event is triggered only once, at 160.9ms, during the initial attachment process. (LTE-NR->LTENR_GNBRRC.c->fn_NETSIM_LTENR_SUBEVENT_GENERATE_SI())
7. LTENR_Generate_RRC_Setup_Request
• Triggered when RRC setup request gets transmitted by UE to connected gNB
8. LTENR_RRC_T300
• The timer event triggered when RRC_Setup_Request is sent by UE to gNB.
• The timer T300 stops when the RRC_setup message is received by the UE
(LTENR->LTEGNBRRC.c->LTENR_RRC_START_T300()and LTENR_RRC_STOP_T300() (line #1290))
9. LTENR_Generate_RRC_Setup
• Event triggered when RRC_Setup message is sent by the selected gNB to the UE.
• The RRC_Setup message is generated to establish the RRC connection between the UE and the gNB.
(LTENR->LTEGNBRRC.c->fn_NetSIM_LTENR_RRC_GENERATE_RRCSETUP())
10. LTENR_Generate_RRC_Setup_Complete
• Timer event triggered during the successful establishment of RRC connection.
11. LTENR_Generate_RRC_UE_Measurement_Report_Request
• Timer event triggered every 120ms, when the gNB sends measurement report request to UE.
12. LTENR_Generate_RRC_UE_Mesurement_Report
• Timer event triggered when UE sends measurement report to the serving gNB which contains SINR information from all the gNBs.
• Triggered at 240ms after RRC connection establishment and then triggered every 120ms.
• When the discardTimer expires for a PDCP SDU, or the successful delivery of a PDCP SDU is confirmed by PDCP status report, the transmitting PDCP entity shall discard the PDCP SDU along with the corresponding PDCP Data PDU
• Discarding a PDCP SDU already associated with a PDCP SN causes a SN gap in the transmitted PDCP Data PDUs, which increases PDCP reordering delay in the receiving PDCP entity.
14. LTENR_Generate_NAS_Handover_Request
• Timer event triggered when the initial Handover_Request is sent by the serving gNB. The handover request is triggered when the SNR from target gNB exceeds the serving gNB by a margin of 3db.
15. Handover_Request_Ack
• Timer event triggered when the target gNB receives handover request from the serving gNB and sends back an acknowledgement for the handover request.
16. Handover_Request_Command
• Triggered when gNB sends Handover_Command to UE after receipt of Handover Request Ack
17. Handover_Request_Command_Handle
• Event triggered when UE dissociates from interface of serving gNB and associates with interface of target gNB during a handover.
• Functions like FindInterface(), pathswitch() and RRC_Reconfiguration() are called in this function
(LTENR->LTENR_NAS.c->fn_NetSim_LTENR_NAS_GENERATE_HANDOVER_COMMAND_HANDLE())
18. Path_Switch
• Triggered when the target gNB sends the pathswitch packet to the EPC in order to transfer the data path from serving gNB to target gNB.
19. Path_Switch_Ack
• Triggered when EPC sends acknowledgement to the target gNB on the receipt of the path-switch request.
20. UE_Context_Release
• Event triggered after successful handover procedure.
• Triggered when target gNB sends context release packet to the serving gNB
21. UE_Context_Release_Ack
• Triggered when acknowledgement is provided by serving gNB to the target gNB on receipt of context release packet.

### Enable detailed logs in 5G NR#

A detailed 5G NR log can be enabled by a user, by going to the file LTE_NR.c, and then onto the function bool get_ltenr_log_status(), and changing the return status to true.

Then rebuild the code and run the simulation.

The log file will be available under Log Files menu in the left panel of the Results Window

Among various values noted in the log file is the CQI and MCS information. For example, a user would see in the log file:

CQI Table
15 256QAM 948 7.406300

MCS Table
27 256QAM 8 948.000000 7.406300

The CQI information is according to the 38-214 Table 5.2.2.1-2, 5.2.2.1-3, 5.2.2.1-4. And in the above example:

• CQI Index: 15
• Modulation: 256QAM
• Code Rate $\times$ [1024]: 948
• Efficiency: 7.406300

The MCS information is according to the 38-214 Table 5.1.3.1-1, 5.1.3.1-2, 5.1.3.1-3. And in the above example:

• MCS Index:27
• Modulation: 256QAM
• Modulation Order: 8
• Target code Rate $\times$ [1024]: 948.000000
• Spectral efficiency: 7.406300