5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
cttc-error-model.cc File Reference

Error model example with fixed MCS: 1 gNB and 1 UE, multiple packets with varying fading conditions. More...

#include "ns3/antenna-module.h"
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-apps-module.h"
#include "ns3/internet-module.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-module.h"
#include "ns3/nr-helper.h"
#include "ns3/nr-module.h"
#include "ns3/nr-point-to-point-epc-helper.h"
#include "ns3/point-to-point-helper.h"
#include <chrono>
+ Include dependency graph for cttc-error-model.cc:

Go to the source code of this file.

Functions

static Ptr< ListPositionAllocator > GetGnbPositions (double gNbHeight=10.0)
 
static Ptr< ListPositionAllocator > GetUePositions (double ueY, double ueHeight=1.5)
 
static void PrintRxPkt (std::string context, Ptr< const Packet > pkt)
 

Variables

static std::vector< uint64_t > packetsTime
 

Detailed Description

Error model example with fixed MCS: 1 gNB and 1 UE, multiple packets with varying fading conditions.

This example allows the user to test the end-to-end performance with the new NR PHY abstraction model for error modeling by using a fixed MCS. It allows the user to set the MCS, the gNB-UE distance, the MCS table, the error model type, and the HARQ method.

The NR error model can be set as "--errorModel=ns3::NrEesmCcT1", for HARQ-CC and MCS Table1, while "--errorModel=ns3::NrLteMiErrorModel" configures the LTE error model. For NR, you can choose between different types of error model, which use different tables and different methods to process the HARQ history, e.g., "--errorModel=ns3::NrEesmIrT1", for HARQ-IR and MCS Table2. You can fix also the MCS index to use with "--mcs=7" (7 in this case), which refers to the configured MCS table.

The scenario consists of a single gNB and a single UE, placed at positions (0.0, 0.0, 10), and (0.0, ueY, 1.5), respectively. ueY can be configured by the user, e.g. "ueY=20", and defaults to 30 m.

By default, the program uses the 3GPP channel model, Urban Micro scenario, without shadowing and with probabilistic line of sight / non-line of sight option. The program runs for 50 seconds and one packet is transmitted every 200 ms from gNB to UE (donwlink direction). The packet size can be configured by using the following parameter: "--packetSize=1000". The channel update period is 150 ms, so that every packet encounters a different fading condition.

This simulation prints the output to the terminal. The output statistics are averaged among all the transmitted packets.

To run the simulation with the default configuration one shall run the following in the command line:

./ns3 run cttc-error-model

Definition in file cttc-error-model.cc.

Function Documentation

◆ GetGnbPositions()

static Ptr< ListPositionAllocator > GetGnbPositions ( double  gNbHeight = 10.0)
static

Definition at line 63 of file cttc-error-model.cc.

◆ GetUePositions()

static Ptr< ListPositionAllocator > GetUePositions ( double  ueY,
double  ueHeight = 1.5 
)
static

Definition at line 72 of file cttc-error-model.cc.

◆ PrintRxPkt()

static void PrintRxPkt ( std::string  context,
Ptr< const Packet >  pkt 
)
static

Definition at line 83 of file cttc-error-model.cc.

Variable Documentation

◆ packetsTime

std::vector<uint64_t> packetsTime
static

Definition at line 80 of file cttc-error-model.cc.