Understand 5G Simulation flow through LTENR log file

Open NetSim, Select Examples ->5G NR ->5G Log File and Packet Trace then click on the tile in the middle panel to load the example as shown in below screenshot

Figure 4‑1: List of scenarios for the example: 5G Log File and Packet Trace

The following network diagram illustrates, what the NetSim UI displays when you open the example configuration file.

Figure 4‑2: Network set up for studying the 5G Log File and Packet Trace

Settings done in example config file:

1. CBR application source id as 10 and destination id as 8 with Packet_Size as 1460 and InterArrival_Time as 20000 (Generation rate of 0.584 Mbps). Transport Protocol is set to UDP.

2. Set other properties to default.

3. The log file can enable per the information provided in Section 3.18.

4. Enable Plots, Packet Trace and Run Simulation for 10s.

To view and study the 5GNR design/flow of the simulation, use the LTENR.log file which can be opened post simulation from Results Window > Log Files.

For logging additional information relating to Buffer-status-notification, open the source code and inside the LTE NR project, uncomment the lines given below in LTE_NR.h

LTE_NR.h

#define LTENR_LOG_DEV

#define LTENR_PDCP_LOG

#define LTENR_RLC_BUFFERSTATUSREPORTING_LOG

• *

Rebuild the code to enable logs per Section 3.18 in the 5G-NR manual. Note that log files would generally be quite large (>10 MB of size). In the GUI enable packet trace and event trace before running the simulation. Run the simulation. Open the packet trace and ltenr.log file from the results window.

1. The Physical Resource Block (PRB) list is formed at the beginning of the log file. This corresponds to 1 slot $\left( \frac{1}{2^{\mu}}\ ms \right)$ in time-domain and 15 * 12 * 2μ kHz in frequency domain.

Figure 4‑4: LTE NR Log File: PRB List

1. The naming convention used in the ltenr log file is gNB \<gnb ID>:\<Interface>. For example, gNB 7:4 means gNB 7 interface 4.

2. For each numerology and carrier, a resource grid of (max. number of > resource blocks for that numerology) * (number of sub-carriers > per resource block) and (number of symbols per sub-frame of that > numerology) is defined.

3. In this example the GUI settings (gNB 5G-RAN interface Physical > Layer) are:

• μ (numerology) is set 0.

• No. of resource blocks (PRB count) = 52

• No. of sub-carriers per PRB = 12

• No. of symbols per sub-frame of numerology (0) = 1.

4. The log file explains the PRB list for gNB (7) on interface (4):

• The lowest (F_Low_MHz) and highest frequency (F_High_MHz) for > the Uplink/Downlink operating bands are logged first along > with the channel bandwidth (MHz), PRB bandwidth(kHz) and guard > bandwidth(kHz).

• The list defines the lower frequency, upper frequency, and > central frequency in MHz for each physical resource block of > the PRB count.

Figure 4‑5: LTE NR Log File: Lower, Higher and Central Frequencies for PRB List

1. The UE association/dissociation is done which is logged. UE (8) on interface (1) associates with gNB (7) on interface (4). During UE association:

• AMC information: Links Spectral efficiency is calculated and > based on this Channel quality indicator (CQI) (Includes the > CQI index, modulation, code rate and efficiency) and > Modulation coding scheme (MCS) (Includes the MCS index, > modulation, modulation order, code rate and spectral > efficiency) is read from the standard table and setup for both > Downlink and Uplink.

Figure 4‑6: LTE NR Log File: UE Association

1. The numerology is equal to 0, hence the slots/sub-frame = 1 and there will be 10 sub-frames per frame. Accordingly, the frames, sub-frames and slots are created as shown below:

2. A new frame gets started for the gNB, where the frame id=1, start > time and the end time of the frame are logged.

3. After the frame-1 starts, the sub-frame for the same gnb is started > within the frame. The frame id=1, sub-frame id=1, start time and > end time are logged

4. Within frame-1, sub-frame-1 a slot is started. This slot’s ID (1), > slot type (Uplink), start time and end time are logged.

Figure 4‑7: LTE NR Log File: Frame and Sub Frame list with start time and end time

1. The RLC-sublayer will check the UE buffer for packets. Based on the logical channel (DTCH) and the transmission mode (UM, AM), the entity is identified, and the buffer size of each mode is read. The combined buffer size of all the modes gives the total buffer size (number of bytes to be processed).

2. The RLC sub-layer then processes the transmission status notification for downlink:

3. Initially the RLC transmission for the control takes place, where > the transmission status for each of the control logical channels > i.e., BCCH, CCCH, DCCH and PCCH is calculated based on the mode > (TM & AM) they support.

4. While calculating the transmission status for control, the RLC sends > the Physical Data Unit (PDU) based on the mode (TM or AM).

5. Later the RLC transmission for the data packet happens, where the > transmission status for traffic logical channel i.e., DTCH is > calculated based on the AM and UM mode it supports.

6. DTCH channel supports Un-Ack mode (UM). It checks for the buffer and > if the buffer isn’t NULL:

• It will find the buffer that matches the logical channel, and it > only proceeds further if the size of the PDU is within the > minimum RLC PDU size.

• If the message packet is NULL (or) message type is user data & > the payload of PDU is greater than size of PDU, it fragments > the UM data buffer packet (or else) the buffer is marked for > removal.

• Then the RLC sends the PDU to the MAC layer. And then the RLC > buffer gets updated.

7. At time 1000502.4 µs packet arrives at the Service Data Adaptation Protocol (SDAP) sub layer in the gNB:

8. As the packet arrives at the SDAP sub-layer, the SDAP header is > appended to the Packet with header size.

9. SDAP sets the RLC mode (here, acknowledge mode) based on QoS, and > the logical channel (DTCH) is chosen.

10. The packet is passed to the Packet Data Convergence Protocol (PDCP) sub-layer at gNB:

11. Packet is enqueued to the transmission (Tx) buffer and discard time > is started.

12. PDCP header is added, and packet is passed to the RLC sub-layer.

13. The packet is then passed to the Radio Link Control (RLC) sub-layer at gNB and is added to the transmission buffer.

Figure 4‑8: LTE NR Log File: SDAP, PDCP and RLC sublayers

1. Now a new sub frame id - 2 with slot id - 1 gets created for the frame id - 1. Here the slot type (Downlink)

Figure 4‑9: LTE NR Log File: Frame Id and slot Id

1. The RRC related packets like RRC_MIB, RRC_SIB1 arrives are RLC Sub-layer and the packets are added to the transmission buffer.

Figure 4‑10: LTE NR Log File: RRC Packet details

1. The data packet is sent from the transmission buffer in DTCH logical channel (for downlink) from gNB to UE. This packet is sent to the MAC sub-layer and the packet is then added to the transmitted buffer.

2. The packet enters the Radio Link Control (RLC) protocol sub-layer in the MAC layer at the UE:

3. The PDU (Physical Data Unit) is received at the UE, specific to RLC > mode:

4. The AMPDU header of the packet is received and logged. If the > sequence number of the PDU is outside the receiving window, the > PDU is discarded.

5. It checks if the PDU is already present in the reception buffer. If > present it drops the PDU and if the PDU is not present in the > reception buffer, then it is added to the reception buffer: The > sequence index (SI), sequence number (SN), and sequence order (SO) > for the corresponding mode also get updated.

6. Checks if all the Service Data Unit (SDU) byte segments of the PDU > packet have been received. If not, it waits for the remaining > SDU’s before transmitting packet. The reassembly is done for all > the SDU if all the SDU byte segments of PDU packet are received.

7. Checks if the reassembly timer is started or not and stops if > started and vice-versa.

8. And the status report of RLC-AM is set as delayed.

Figure 4‑11: LTE NR Log File: MAC sublayer, AMDPDU Header

1. If the header exists, the STATUSPDU is constructed, else the status will be marked as delayed and the packet will pass to TM mode for transmission. PDU is handed over to RLC TM mode and packet gets added to transmission buffer.

Figure 4‑12: LTE NR Log File: STATUSPDU Construction

1. The packet is received by the PDCP sub-layer. The PDCP state variables like the receive sequence number(sn), receive hyper frame number(hfn) and the receive count are calculated.

2. Next the STATUSPDU gets transmitted from the UE to the gNB (See Packet Trace)

Figure 4‑13: 5G NR Packet Trace

1. The packet enters the Radio Link Control (RLC) protocol sub-layer in the MAC layer at the UE. Specific to the RLC mode (TM), it receives the Physical Data Unit (PDU) at the UE:

2. Based on the control data type of the packet, the case is chosen.

3. Since it is STATUSPDU type, the STATUSPDU packet is received > accordingly at the gNB. And the RLCAM transmitted buffer is > cleared, and poll retransmit timer is stopped.