Applicable versionsNetSim StandardNetsim Pro

 

Applicable Releasesv13


In this article, we explain what happens to an IP packet as it flows through the 5G stack. This includes the addition of overheads, segmentation, aggregation etc. NetSim implements the various layers per the 3GPP standard and hence replicates the behavior of a real stack. 


Given below is an example 5G network model created in NetSim. Traffic flows server to the core to gNB to UE. CBR gen rate > gNB-UE link capacity which is the bottleneck link. Hence its DL full buffer at the gNB



We use the following simulation parameters

 

Simulation Parameters

Values

Tx Power (dBm)

40 dBm

CA Type (TDD)

Single Band (n78)

DL:UL Ratio

4:1

Channel Bandwidth (MHz)

40

Tx*Rx Antenna Count

1*1

Pathloss Model

3GPP

LOS Probability 

1

Outdoor Scenario

Urban Macro

Shadow fading

Off

Beamforming

Off

Mobility

No Mobility 

gNB – UE Distance (m)

1500 

MCS Selection

Ideal Shannon Theorem

Application Type

UDP

Traffic

Full Buffer


Now let us see what happens to the packet at each layer/function in the 5G stack.

  • We have set the application layer packet size as 1460B 
    • UDP header is added (8 B), and the IP header is added (20 B). After the IP layer, the packet size is 1488B
    • SDAP header of 1B is added. After the SDAP layer, the packet size is 1489B 
    • PDCP header of 16B is added. After the PDCP layer, the packet size is 1505B
    • RLC Header of 1B is added. After the RLC layer, the packet size is 1506B
  • MAC Scheduler allocates the PRBs. 
    • Based on the allocated PRBs and MCS, the TB size is calculated 
    • In our case with settings, 3.5 GHz band, 40 MHz BW, SCS 15 KHz, MCS 17 & full buffer traffic, the total PRB count is 216.
    • With 216 PRBs we get a TB size of 130,240 bits.
    • 10 i.e., (130240/(1506∗8)), full RLC-SDUs and 1220 B of the last fragmented RLC-SDU are sent in this TB.
  • Let's next turn to the PHY.


The PHY parameters are


ParameterValue

PRB Count

216

Overheads

14%

Symbols per slot

14

Subcarriers per PRB

12

Num of Res Elements Min (156, 14*12)

156

Modulation for MCS 17 is 64 QAM. Bits per symbol

6

Code rate for MCS 17 is 772/1024

0.75

Bits per PRB 

6*772*(1-0.14)/1024

604.04

TB size = Bits per PRB * Number of PRBs

130,240 

(after applying ciel/floor functions)

 

3GPP PHY standard calculations for BG selection and CB size determination


Packet flow through the PHY (no error case)



Per the MAC TB size and per the PHY implementation details provided in the depictions above.


In summary:

  1. Packets are thus grouped in a TB. 
  2. TB is split into CBs. 
  3. CBs grouped into a CBG. 
  4. CBGs are transmitted over the air.


Useful Resources


1. NetSim 5G library overview: https://www.tetcos.com/5g.html

2. NetSim (v13.3) 5G library documentation: https://www.tetcos.com/help/v13.3/Technology-Libraries/5G-NR.html