A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-mi-error-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 SIGNET LAB. Department of Information Engineering (DEI), University of Padua
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 *
7 * Original Work Authors:
8 * Marco Mezzavilla <mezzavil@dei.unipd.it>
9 * Giovanni Tomasi <tomasigv@gmail.com>
10 * Original Work Acknowldegments:
11 * This work was supported by the MEDIEVAL (MultiMEDia transport
12 * for mobIlE Video AppLications) project, which is a
13 * medium-scale focused research project (STREP) of the 7th
14 * Framework Programme (FP7)
15 *
16 * Subsequent integration in LENA and extension done by:
17 * Marco Miozzo <marco.miozzo@cttc.es>
18 */
19
20#ifndef LTE_MI_ERROR_MODEL_H
21#define LTE_MI_ERROR_MODEL_H
22
23#include "lte-harq-phy.h"
24
25#include <ns3/ptr.h>
26#include <ns3/spectrum-value.h>
27
28#include <list>
29#include <stdint.h>
30#include <vector>
31
32namespace ns3
33{
34
35/// PDCCH PCFICH curve size
36const uint16_t PDCCH_PCFICH_CURVE_SIZE = 46;
37/// MI map QPSK size
38const uint16_t MI_MAP_QPSK_SIZE = 797;
39/// MI map 16QAM size
40const uint16_t MI_MAP_16QAM_SIZE = 994;
41/// MI map 64QAM size
42const uint16_t MI_MAP_64QAM_SIZE = 752;
43/// MI QPSK maximum ID
44const uint16_t MI_QPSK_MAX_ID = 9;
45/// MI 16QAM maximum ID
46const uint16_t MI_16QAM_MAX_ID = 16;
47/// MI 64QAM maximum ID
48const uint16_t MI_64QAM_MAX_ID = 28; // 29,30 and 31 are reserved
49/// MI QPSK BLER maximum ID
50const uint16_t MI_QPSK_BLER_MAX_ID = 12; // MI_QPSK_MAX_ID + 3 RETX
51/// MI 16QAM BLER maximum ID
52const uint16_t MI_16QAM_BLER_MAX_ID = 22;
53/// MI 64QAM BLER maximum ID
54const uint16_t MI_64QAM_BLER_MAX_ID = 37;
55
56/// TbStats_t structure
58{
59 double tbler; ///< Transport block BLER
60 double mi; ///< Mutual information
61};
62
63/**
64 * This class provides the BLER estimation based on mutual information metrics
65 */
67{
68 public:
69 /**
70 * \brief find the mmib (mean mutual information per bit) for different modulations of the
71 * specified TB
72 * \param sinr the perceived sinr values in the whole bandwidth in Watt
73 * \param map the active RBs for the TB
74 * \param mcs the MCS of the TB
75 * \return the mmib
76 */
77 static double Mib(const SpectrumValue& sinr, const std::vector<int>& map, uint8_t mcs);
78 /**
79 * \brief map the mmib (mean mutual information per bit) for different MCS
80 * \param mib mean mutual information per bit of a code-block
81 * \param ecrId Effective Code Rate ID
82 * \param cbSize the size of the CB
83 * \return the code block error rate
84 */
85 static double MappingMiBler(double mib, uint8_t ecrId, uint16_t cbSize);
86
87 /**
88 * \brief run the error-model algorithm for the specified TB
89 * \param sinr the perceived sinr values in the whole bandwidth in Watt
90 * \param map the active RBs for the TB
91 * \param size the size in bytes of the TB
92 * \param mcs the MCS of the TB
93 * \param miHistory MI of past transmissions (in case of retx)
94 * \return the TB error rate and MI
95 */
97 const std::vector<int>& map,
98 uint16_t size,
99 uint8_t mcs,
100 HarqProcessInfoList_t miHistory);
101
102 /**
103 * \brief run the error-model algorithm for the specified PCFICH+PDCCH channels
104 * \param sinr the perceived sinr values in the whole bandwidth in Watt
105 * \return the decodification error of the PCFICH+PDCCH channels
106 */
107 static double GetPcfichPdcchError(const SpectrumValue& sinr);
108
109 // private:
110};
111
112} // namespace ns3
113
114#endif /* LTE_MI_ERROR_MODEL_H */
This class provides the BLER estimation based on mutual information metrics.
static double MappingMiBler(double mib, uint8_t ecrId, uint16_t cbSize)
map the mmib (mean mutual information per bit) for different MCS
static TbStats_t GetTbDecodificationStats(const SpectrumValue &sinr, const std::vector< int > &map, uint16_t size, uint8_t mcs, HarqProcessInfoList_t miHistory)
run the error-model algorithm for the specified TB
static double GetPcfichPdcchError(const SpectrumValue &sinr)
run the error-model algorithm for the specified PCFICH+PDCCH channels
static double Mib(const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs)
find the mmib (mean mutual information per bit) for different modulations of the specified TB
Set of values corresponding to a given SpectrumModel.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const uint16_t MI_QPSK_MAX_ID
MI QPSK maximum ID.
const uint16_t PDCCH_PCFICH_CURVE_SIZE
PDCCH PCFICH curve size.
const uint16_t MI_MAP_64QAM_SIZE
MI map 64QAM size.
const uint16_t MI_64QAM_BLER_MAX_ID
MI 64QAM BLER maximum ID.
const uint16_t MI_QPSK_BLER_MAX_ID
MI QPSK BLER maximum ID.
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
HarqProcessInfoList_t typedef.
const uint16_t MI_MAP_16QAM_SIZE
MI map 16QAM size.
const uint16_t MI_MAP_QPSK_SIZE
MI map QPSK size.
const uint16_t MI_16QAM_BLER_MAX_ID
MI 16QAM BLER maximum ID.
const uint16_t MI_64QAM_MAX_ID
MI 64QAM maximum ID.
const uint16_t MI_16QAM_MAX_ID
MI 16QAM maximum ID.
TbStats_t structure.
double mi
Mutual information.
double tbler
Transport block BLER.