5G-LENA  nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
ns3::NrEesmErrorModel Class Referenceabstract

Eesm error model. More...

#include "nr-eesm-error-model.h"

+ Inheritance diagram for ns3::NrEesmErrorModel:
+ Collaboration diagram for ns3::NrEesmErrorModel:

Public Types

typedef std::tuple< DoubleVector, DoubleVector > DoubleTuple
 
typedef std::vector< double > DoubleVector
 
typedef std::vector< std::vector< std::map< uint32_t, DoubleTuple > > > SimulatedBlerFromSINR
 
- Public Types inherited from ns3::NrErrorModel
enum  Mode { DL , UL }
 Indicate the mode (UL or DL) More...
 
typedef std::vector< Ptr< NrErrorModelOutput > > NrErrorModelHistory
 Vector of previous output. More...
 

Public Member Functions

 NrEesmErrorModel ()
 NrEesmErrorModel constructor.
 
 ~NrEesmErrorModel () override
 ~NrEesmErrorModel
 
TypeId GetInstanceTypeId () const override
 Get the type ID of this instance. More...
 
uint32_t GetMaxCbSize (uint32_t tbSize, uint8_t mcs) const override
 Get the maximum code block size in Bytes, as per NR. It depends on the LDPC base graph type. More...
 
uint8_t GetMaxMcs () const override
 Get the maximum MCS. It depends on NR tables being used.
 
uint32_t GetPayloadSize (uint32_t usefulSc, uint8_t mcs, uint8_t rank, uint32_t rbNum, Mode mode) const override
 Get the payload size in Bytes, following the MCSs in NR. It follows TS 38.214 Section 5.1.3.2 (DL) and 6.1.4.2 (UL) but without including quantizations and and limits (i.e., only up to Step 2) More...
 
double GetSpectralEfficiencyForCqi (uint8_t cqi) override
 Get the SE for a given CQI, following the CQIs in NR Table1/Table2 in TS38.214.
 
double GetSpectralEfficiencyForMcs (uint8_t mcs) const override
 Get the SE for a given MCS, following the MCSs in NR Table1/Table2 in TS38.214.
 
Ptr< NrErrorModelOutputGetTbDecodificationStats (const SpectrumValue &sinr, const std::vector< int > &map, uint32_t size, uint8_t mcs, const NrErrorModelHistory &sinrHistory) override
 Get an output for the decodification error probability of a given transport block, assuming the EESM method, NR LDPC coding and block segmentation, MCSs Table1/Table2 in NR, and HARQ based on CC. More...
 
- Public Member Functions inherited from ns3::NrErrorModel
 NrErrorModel ()
 NrErrorModel default constructor.
 
 ~NrErrorModel () override
 deconstructor
 
virtual NrSinrMatrix ComputeAvgSinrMimo (const std::vector< MimoSinrChunk > &sinrChunks)
 Compute an average SINR matrix. More...
 
std::vector< int > CreateVectorizedRbMap (std::vector< int > map, uint8_t rank)
 Create an equivalent RB index map for vectorized SINR values Matches layer-to-codeword mapping in TR 38.211, Table 7.3.1.3-1 If map contains index "j", the output vectorized map contains {j * rank, j * rank + 1, ..., j * rank + rank - 1}. Example: input RB map = {0, 1, 7, 11}, rank = 2 vectorizedMap = {0, 1, 2, 3, 14, 15, 22, 23}. More...
 
SpectrumValue CreateVectorizedSpecVal (const NrSinrMatrix &sinrMat)
 Linearize a 2D matrix into a vector, and convert that vector to a SpectrumValue Matches layer-to-codeword mapping in TR 38.211, Table 7.3.1.3-1. More...
 
TypeId GetInstanceTypeId () const override
 Get the type ID of this instance. More...
 
virtual Ptr< NrErrorModelOutputGetTbDecodificationStatsMimo (const std::vector< MimoSinrChunk > &mimoChunks, const std::vector< int > &map, uint32_t size, uint8_t mcs, uint8_t rank, const NrErrorModelHistory &history)
 Get an output for the decoding error probability of a given transport block. This method is not purely virtual. If derived ErrorModel does not override, the MIMO matrix is converted to a linear SpectrumValue, and the non-MIMO method is called. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 GetTypeId. More...
 
- Static Public Member Functions inherited from ns3::NrErrorModel
static TypeId GetTypeId ()
 GetTypeId. More...
 

Public Attributes

friend NrL2smEesmTestCase
 

Protected Member Functions

virtual double ComputeSINR (const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs, uint32_t sizeBit, const NrErrorModel::NrErrorModelHistory &sinrHistory) const =0
 Compute the effective SINR after retransmission combining. More...
 
virtual const std::vector< double > * GetBetaTable () const =0
 
virtual const std::vector< double > * GetMcsEcrTable () const =0
 
virtual double GetMcsEq (uint8_t mcsTx) const =0
 Get the "Equivalent MCS" after retransmission combining. More...
 
virtual const std::vector< uint8_t > * GetMcsMTable () const =0
 
virtual const SimulatedBlerFromSINR * GetSimulatedBlerFromSINR () const =0
 
virtual const std::vector< double > * GetSpectralEfficiencyForCqi () const =0
 
virtual const std::vector< double > * GetSpectralEfficiencyForMcs () const =0
 
std::string PrintMap (const std::vector< int > &map) const
 function to print the RB map More...
 
double SinrEff (const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs, double a, double b) const
 compute the effective SINR for the specified MCS and SINR, according to the EESM method. More...
 
double SinrExp (const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs) const
 compute the sum of exponential SINRs for the specified MCS and SINR, according to the EESM method, used in HARQ-IR More...
 

Detailed Description

Eesm error model.

This class provides the BLER estimation based on EESM metrics, assuming LDPC coding with block segmentation as per TS 38.212 Sect. 5.2.2, and modulation and coding of MCS Table1/Table2 in TS 38.214 including up to 256-QAM. The MCS and CQI Tables of NR (Table1/Table2) are specified in McsTable. The BLER-SINR curves are obtained from a link level simulator (from ID) that uses LDPC coding and said MCSs. In case of HARQ, the model currently follows HARQ with Chase Combining, so that the SINReff is updated, but not the ECR, as per IEEE 802.16m-08/004r2.

The classes to use in your simulations are:

We provide the implementation of the Chase Combining-HARQ and the IR-HARQ in NrEesmCc and NrEesmIr, respectively.

See also
NrEesmIrT1
NrEesmIrT2
NrEesmCcT1
NrEesmCcT2

Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 32 bytes (on a 64-bit architecture).

Definition at line 79 of file nr-eesm-error-model.h.

Member Function Documentation

◆ ComputeSINR()

virtual double ns3::NrEesmErrorModel::ComputeSINR ( const SpectrumValue &  sinr,
const std::vector< int > &  map,
uint8_t  mcs,
uint32_t  sizeBit,
const NrErrorModel::NrErrorModelHistory sinrHistory 
) const
protectedpure virtual

Compute the effective SINR after retransmission combining.

Parameters
sinrSINR of the new transmission
mapRB map
mcsMCS of the transmission
sizeBitsize (in bit) of the transmission
sinrHistoryhistory of the SINR of the previous transmission
Returns
the single SINR value

Called in GetTbBitDecodificationStats(). Please implement this function in a way that calculating the SINR of the new transmission takes in consideration the sinr history.

See also
NrEesmIr
NrEesmCc

Implemented in ns3::NrEesmIr, and ns3::NrEesmCc.

◆ GetBetaTable()

virtual const std::vector<double>* ns3::NrEesmErrorModel::GetBetaTable ( ) const
protectedpure virtual
Returns
pointer to a static vector that represents the beta table

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

Referenced by SinrEff(), and SinrExp().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::NrEesmErrorModel::GetInstanceTypeId ( ) const
override

Get the type ID of this instance.

Returns
the Type ID of this instance

Definition at line 53 of file nr-eesm-error-model.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetMaxCbSize()

uint32_t ns3::NrEesmErrorModel::GetMaxCbSize ( uint32_t  tbSize,
uint8_t  mcs 
) const
overridevirtual

Get the maximum code block size in Bytes, as per NR. It depends on the LDPC base graph type.

Parameters
tbSizeTransport block size in Bytes
mcsMCS

Implements ns3::NrErrorModel.

Definition at line 402 of file nr-eesm-error-model.cc.

◆ GetMcsEcrTable()

virtual const std::vector<double>* ns3::NrEesmErrorModel::GetMcsEcrTable ( ) const
protectedpure virtual
Returns
pointer to a static vector that represents the MCS-ECR table

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

Referenced by ns3::NrEesmIr::ComputeSINR(), GetMaxMcs(), ns3::NrEesmIr::GetMcsEq(), and GetPayloadSize().

+ Here is the caller graph for this function:

◆ GetMcsEq()

virtual double ns3::NrEesmErrorModel::GetMcsEq ( uint8_t  mcsTx) const
protectedpure virtual

Get the "Equivalent MCS" after retransmission combining.

Parameters
mcsTxMCS of the transmission
Returns
the equivalent MCS

Called in GetTbDecodificationStats()

See also
NrEesmIr
NrEesmCc

Implemented in ns3::NrEesmIr, and ns3::NrEesmCc.

◆ GetMcsMTable()

virtual const std::vector<uint8_t>* ns3::NrEesmErrorModel::GetMcsMTable ( ) const
protectedpure virtual
Returns
pointer to a static vector that represents the MCS-M table

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

Referenced by ns3::NrEesmIr::GetMcsEq(), and GetPayloadSize().

+ Here is the caller graph for this function:

◆ GetPayloadSize()

uint32_t ns3::NrEesmErrorModel::GetPayloadSize ( uint32_t  usefulSc,
uint8_t  mcs,
uint8_t  rank,
uint32_t  rbNum,
Mode  mode 
) const
overridevirtual

Get the payload size in Bytes, following the MCSs in NR. It follows TS 38.214 Section 5.1.3.2 (DL) and 6.1.4.2 (UL) but without including quantizations and and limits (i.e., only up to Step 2)

Parameters
usefulScthe number of useful subcarrier per RB, subtracting DMRS overhead
mcsMCS
rankthe MIMO rank
rbNumthe number of RBs (time x frequency)
modeMode

Implements ns3::NrErrorModel.

Definition at line 384 of file nr-eesm-error-model.cc.

References GetMcsEcrTable(), and GetMcsMTable().

+ Here is the call graph for this function:

◆ GetSimulatedBlerFromSINR()

virtual const SimulatedBlerFromSINR* ns3::NrEesmErrorModel::GetSimulatedBlerFromSINR ( ) const
protectedpure virtual
Returns
pointer to a table of BLER vs SINR

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

◆ GetSpectralEfficiencyForCqi()

virtual const std::vector<double>* ns3::NrEesmErrorModel::GetSpectralEfficiencyForCqi ( ) const
protectedpure virtual
Returns
pointer to a static vector that represents the spectral efficiency for CQI

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

Referenced by GetSpectralEfficiencyForCqi().

+ Here is the caller graph for this function:

◆ GetSpectralEfficiencyForMcs()

virtual const std::vector<double>* ns3::NrEesmErrorModel::GetSpectralEfficiencyForMcs ( ) const
protectedpure virtual
Returns
pointer to a static vector that represents the spectral efficiency for MCS

Implemented in ns3::NrEesmIrT2, ns3::NrEesmIrT1, ns3::NrEesmCcT2, and ns3::NrEesmCcT1.

Referenced by GetSpectralEfficiencyForMcs().

+ Here is the caller graph for this function:

◆ GetTbDecodificationStats()

Ptr< NrErrorModelOutput > ns3::NrEesmErrorModel::GetTbDecodificationStats ( const SpectrumValue &  sinr,
const std::vector< int > &  map,
uint32_t  size,
uint8_t  mcs,
const NrErrorModelHistory sinrHistory 
)
overridevirtual

Get an output for the decodification error probability of a given transport block, assuming the EESM method, NR LDPC coding and block segmentation, MCSs Table1/Table2 in NR, and HARQ based on CC.

Parameters
sinrSINR vector
mapRB map
sizeTransport block size in Bytes
mcsMCS
sinrHistoryHistory of the retransmission
Returns
A pointer to an output, with the tbler and SINR vector, effective SINR, RB map, code bits, and info bits.

Implements ns3::NrErrorModel.

Definition at line 260 of file nr-eesm-error-model.cc.

◆ GetTypeId()

TypeId ns3::NrEesmErrorModel::GetTypeId ( )
static

GetTypeId.

Returns
the type id of the object

Definition at line 46 of file nr-eesm-error-model.cc.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ PrintMap()

std::string ns3::NrEesmErrorModel::PrintMap ( const std::vector< int > &  map) const
protected

function to print the RB map

Parameters
mapthe RB map
Returns
a string that contains the RB map in a readable way

Definition at line 270 of file nr-eesm-error-model.cc.

Referenced by ns3::NrEesmCc::ComputeSINR().

+ Here is the caller graph for this function:

◆ SinrEff()

double ns3::NrEesmErrorModel::SinrEff ( const SpectrumValue &  sinr,
const std::vector< int > &  map,
uint8_t  mcs,
double  a,
double  b 
) const
protected

compute the effective SINR for the specified MCS and SINR, according to the EESM method.

The effective SINR computation follows a general formula, valid for HARQ-CC and HARQ-IR: SINReff = - beta * ln [1/b * (sum (exp (-sinr/beta)) + a)]. Its implementation here is parametrized based on two parameters, a and b, whose value will depend on the HARQ method. For HARQ-CC, "a" MUST be 0.0, and "b" corresponds to the number of REGs to combine. For HARQ-IR, "a" corresponds to the sum of exponential SINRs up to previous retransmission, and "b" is the sum of REGs over the different retx.

Parameters
sinrthe perceived sinrs in the whole bandwidth (vector, per RB)
mapthe actives RBs for the TB
mcsthe MCS of the TB
athe sum term to the exponential SINR
bthe denominator for the exponentials sum
Returns
the effective SINR

Definition at line 59 of file nr-eesm-error-model.cc.

References GetBetaTable(), and SinrExp().

Referenced by ns3::NrEesmCc::ComputeSINR(), and ns3::NrEesmIr::ComputeSINR().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SinrExp()

double ns3::NrEesmErrorModel::SinrExp ( const SpectrumValue &  sinr,
const std::vector< int > &  map,
uint8_t  mcs 
) const
protected

compute the sum of exponential SINRs for the specified MCS and SINR, according to the EESM method, used in HARQ-IR

Parameters
sinrthe perceived sinrs in the whole bandwidth (vector, per RB)
mapthe actives RBs for the TB
mcsthe MCS of the TB
Returns
the sum of exponential SINR

Definition at line 79 of file nr-eesm-error-model.cc.

References GetBetaTable().

Referenced by SinrEff().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: