5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrErrorModel Class Referenceabstract

Interface for calculating the error probability for a transport block. More...

#include "nr-error-model.h"

+ Inheritance diagram for ns3::NrErrorModel:
+ Collaboration diagram for ns3::NrErrorModel:

Public Types

enum  Mode { DL , UL }
 Indicate the mode (UL or DL) More...
 
typedef std::vector< Ptr< NrErrorModelOutput > > NrErrorModelHistory
 Vector of previous output.
 

Public Member Functions

 NrErrorModel ()
 NrErrorModel default constructor.
 
 ~NrErrorModel () override
 deconstructor
 
virtual NrSinrMatrix ComputeAvgSinrMimo (const std::vector< MimoSinrChunk > &sinrChunks)
 Compute an average SINR matrix.
 
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}.
 
virtual uint32_t GetMaxCbSize (uint32_t tbSize, uint8_t mcs) const =0
 Get the maximum codeblock size.
 
virtual uint8_t GetMaxMcs () const =0
 Get the maximum MCS.
 
virtual uint32_t GetPayloadSize (uint32_t usefulSc, uint8_t mcs, uint8_t rank, uint32_t rbNum, Mode mode) const =0
 Get the payload size (in bytes) for a given mcs and resource block number.
 
virtual double GetSpectralEfficiencyForCqi (uint8_t cqi)=0
 Get the SpectralEfficiency for a given CQI.
 
virtual double GetSpectralEfficiencyForMcs (uint8_t mcs) const =0
 Get the SpectralEfficiency for a given MCS.
 
virtual Ptr< NrErrorModelOutputGetTbDecodificationStats (const SpectrumValue &sinr, const std::vector< int > &map, uint32_t size, uint8_t mcs, const NrErrorModelHistory &history)=0
 Get an output for the decodification error probability of a given transport block.
 
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.
 

Static Public Member Functions

static TypeId GetTypeId ()
 GetTypeId.
 

Detailed Description

Interface for calculating the error probability for a transport block.

Any error model that wishes to work in Spectrum or in AMC should use this class as a base class.

Configuration

The type of the error model can be configured through the helper method NrHelper::SetUlErrorModel() or NrHelper::SetDlErrorModel().

The types of error model that can be used are the following: NrEesmIrT2, NrEesmIrT1, NrEesmCcT1, NrEesmCcT2, NrLteMiErrorModel.

See also
GetTbDecodificationStats
NrEesmIrT2
NrEesmIrT1
NrEesmCcT1
NrEesmCcT2
NrLteMiErrorModel

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 56 bytes (on a 64-bit architecture).

Definition at line 71 of file nr-error-model.h.

Member Typedef Documentation

◆ NrErrorModelHistory

Vector of previous output.

Used in case of HARQ: any result will be stored in this vector and used to decode next retransmissions.

Definition at line 109 of file nr-error-model.h.

Member Enumeration Documentation

◆ Mode

Indicate the mode (UL or DL)

In some methods, the error model has to know if the asked value is for UL or DL.

Enumerator
DL 

DL.

UL 

UL.

Definition at line 96 of file nr-error-model.h.

Constructor & Destructor Documentation

◆ NrErrorModel()

ns3::NrErrorModel::NrErrorModel ( )

NrErrorModel default constructor.

Definition at line 15 of file nr-error-model.cc.

◆ ~NrErrorModel()

ns3::NrErrorModel::~NrErrorModel ( )
override

deconstructor

Definition at line 21 of file nr-error-model.cc.

Member Function Documentation

◆ ComputeAvgSinrMimo()

NrSinrMatrix ns3::NrErrorModel::ComputeAvgSinrMimo ( const std::vector< MimoSinrChunk > &  sinrChunks)
virtual

Compute an average SINR matrix.

Parameters
mimoChunksvector of SINR chunks containing MIMO SINR matrices
Returns
A 2D matrix of the average SINR for this TB reception, dimensions nMimoLayers x nRbs

Definition at line 60 of file nr-error-model.cc.

Referenced by GetTbDecodificationStatsMimo().

+ Here is the caller graph for this function:

◆ CreateVectorizedRbMap()

std::vector< int > ns3::NrErrorModel::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}.

Parameters
mapThe indices of used RBs for this transmission (the columns of the SINR matrix)
rankThe number of MIMO layers
Returns
the indices corresponding to "map" when the SINR matrix is vectorized Note: result will be used in OSS function which require vector<int> type

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

Referenced by GetTbDecodificationStatsMimo().

+ Here is the caller graph for this function:

◆ GetMaxCbSize()

virtual uint32_t ns3::NrErrorModel::GetMaxCbSize ( uint32_t  tbSize,
uint8_t  mcs 
) const
pure virtual

Get the maximum codeblock size.

Parameters
tbSizeTransport block size for which calculate the CB size
mcsMCS of the transmission
Returns
the codeblock size

Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.

◆ GetMaxMcs()

virtual uint8_t ns3::NrErrorModel::GetMaxMcs ( ) const
pure virtual

Get the maximum MCS.

Returns
the maximum MCS that is permitted with the error model

Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.

◆ GetPayloadSize()

virtual uint32_t ns3::NrErrorModel::GetPayloadSize ( uint32_t  usefulSc,
uint8_t  mcs,
uint8_t  rank,
uint32_t  rbNum,
Mode  mode 
) const
pure virtual

Get the payload size (in bytes) for a given mcs and resource block number.

Parameters
usefulScUseful subcarriers
mcsMCS
rbNumNumber of resource blocks (even in more than 1 symbol)
modeUL or DL mode
Returns
The payload size of the resource blocks, in bytes

Implemented in ns3::LenaErrorModel, ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.

◆ GetSpectralEfficiencyForCqi()

virtual double ns3::NrErrorModel::GetSpectralEfficiencyForCqi ( uint8_t  cqi)
pure virtual

Get the SpectralEfficiency for a given CQI.

Parameters
cqiCQI to take into consideration
Returns
the spectral efficiency

Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.

◆ GetSpectralEfficiencyForMcs()

virtual double ns3::NrErrorModel::GetSpectralEfficiencyForMcs ( uint8_t  mcs) const
pure virtual

Get the SpectralEfficiency for a given MCS.

Parameters
mcsMCS to take into consideration
Returns
the spectral efficiency

Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.

◆ GetTbDecodificationStats()

virtual Ptr< NrErrorModelOutput > ns3::NrErrorModel::GetTbDecodificationStats ( const SpectrumValue &  sinr,
const std::vector< int > &  map,
uint32_t  size,
uint8_t  mcs,
const NrErrorModelHistory history 
)
pure virtual

Get an output for the decodification error probability of a given transport block.

The subclasses can store more information by subclassing the NrErrorModelOutput class, and returning a casted instance. The error model should take into consideration the history, even if some time (e.g., when called by the AMC or when called the first time by the spectrum model) the history will be empty.

This method should not return a nullptr, ever.

Parameters
sinrSINR vector
mapRB map
sizeTransport block size
mcsMCS
historyHistory of the retransmission
Returns
A pointer to an output, with the tbler and other customized values

Implemented in ns3::NrLteMiErrorModel, and ns3::NrEesmErrorModel.

Referenced by GetTbDecodificationStatsMimo().

+ Here is the caller graph for this function:

◆ GetTbDecodificationStatsMimo()

Ptr< NrErrorModelOutput > ns3::NrErrorModel::GetTbDecodificationStatsMimo ( const std::vector< MimoSinrChunk > &  mimoChunks,
const std::vector< int > &  map,
uint32_t  size,
uint8_t  mcs,
uint8_t  rank,
const NrErrorModelHistory history 
)
virtual

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.

Parameters
mimoChunksvector of SINR chunks containing MIMO SINR matrices
mapRB map (must be vector<int> as created by OSS code)
sizeTransport block size
mcsMCS
historyHistory of the retransmission
Returns
A pointer to an output, with the tbler and other customized values

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 avgSinrMat(NrSinrMatrix) is A 2D matrix of average SINR values, dimensions nMimoLayers x nRbs vectorizedSinr(SpectrumValue) contains the (nRB * nMimoLayers) SINR values

Definition at line 33 of file nr-error-model.cc.

References ComputeAvgSinrMimo(), CreateVectorizedRbMap(), and GetTbDecodificationStats().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::NrErrorModel::GetTypeId ( )
static

GetTypeId.

Returns
the TypeId of the class

Definition at line 26 of file nr-error-model.cc.


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