![]() |
5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
|
Interface for calculating the error probability for a transport block. More...
#include "nr-error-model.h"
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< NrErrorModelOutput > | GetTbDecodificationStats (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< NrErrorModelOutput > | GetTbDecodificationStatsMimo (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. | |
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.
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.
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.
typedef std::vector<Ptr<NrErrorModelOutput> > ns3::NrErrorModel::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.
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.
ns3::NrErrorModel::NrErrorModel | ( | ) |
NrErrorModel default constructor.
Definition at line 15 of file nr-error-model.cc.
|
override |
deconstructor
Definition at line 21 of file nr-error-model.cc.
|
virtual |
Compute an average SINR matrix.
mimoChunks | vector of SINR chunks containing MIMO SINR matrices |
Definition at line 60 of file nr-error-model.cc.
Referenced by GetTbDecodificationStatsMimo().
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}.
map | The indices of used RBs for this transmission (the columns of the SINR matrix) |
rank | The number of MIMO layers |
Definition at line 83 of file nr-error-model.cc.
Referenced by GetTbDecodificationStatsMimo().
|
pure virtual |
Get the maximum codeblock size.
tbSize | Transport block size for which calculate the CB size |
mcs | MCS of the transmission |
Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.
|
pure virtual |
Get the maximum MCS.
Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.
|
pure virtual |
Get the payload size (in bytes) for a given mcs and resource block number.
usefulSc | Useful subcarriers |
mcs | MCS |
rbNum | Number of resource blocks (even in more than 1 symbol) |
mode | UL or DL mode |
Implemented in ns3::LenaErrorModel, ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.
|
pure virtual |
Get the SpectralEfficiency for a given CQI.
cqi | CQI to take into consideration |
Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.
|
pure virtual |
Get the SpectralEfficiency for a given MCS.
mcs | MCS to take into consideration |
Implemented in ns3::NrEesmErrorModel, and ns3::NrLteMiErrorModel.
|
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.
sinr | SINR vector |
map | RB map |
size | Transport block size |
mcs | MCS |
history | History of the retransmission |
Implemented in ns3::NrLteMiErrorModel, and ns3::NrEesmErrorModel.
Referenced by GetTbDecodificationStatsMimo().
|
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.
mimoChunks | vector of SINR chunks containing MIMO SINR matrices |
map | RB map (must be vector<int> as created by OSS code) |
size | Transport block size |
mcs | MCS |
history | History of the retransmission |
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().
|
static |