5G-LENA  nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
cttc-error-model-amc.cc File Reference

Error model example with adaptive modulation and coding: 1 gNB and 1 UE, multiple packets with non-varying fading conditions. More...

#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 <ns3/antenna-module.h>
#include <chrono>
+ Include dependency graph for cttc-error-model-amc.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 ([[maybe_unused]] std::string context, Ptr< const Packet > pkt)
 

Variables

static std::vector< uint64_t > packetsTime
 

Detailed Description

Error model example with adaptive modulation and coding: 1 gNB and 1 UE, multiple packets with non-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 adaptive modulation and coding (AMC). It allows the user to set 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.

The AMC model defaults to the Error-model based AMC, but can be changed through to use the Shannon-based model, through the AmcModel attribute, manually.

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 5 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". There are no channel updates (the channel update period is 0 ms), so that we allow for proper MCS adaptation.

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-amc

Definition in file cttc-error-model-amc.cc.