A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lte-amc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Original Author: Giuseppe Piro <g.piro@poliba.it>
7
* Modified by: Nicola Baldo <nbaldo@cttc.es>
8
* Modified by: Marco Miozzo <mmiozzo@cttc.es>
9
*/
10
11
#ifndef AMCMODULE_H
12
#define AMCMODULE_H
13
14
#include <ns3/object.h>
15
#include <ns3/ptr.h>
16
17
#include <vector>
18
19
namespace
ns3
20
{
21
22
class
SpectrumValue;
23
24
/**
25
* @ingroup lte
26
* Implements the Adaptive Modulation And Coding Scheme. As proposed in 3GPP
27
* TSG-RAN WG1 [R1-081483 Conveying MCS and TB size via PDCCH]
28
* (http://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_52b/Docs/R1-081483.zip).
29
*/
30
class
LteAmc
:
public
Object
31
{
32
public
:
33
/**
34
* @brief Get the type ID.
35
* @return the object TypeId
36
*/
37
static
TypeId
GetTypeId
();
38
39
LteAmc
();
40
~LteAmc
()
override
;
41
42
/// Types of AMC model.
43
enum
AmcModel
44
{
45
/**
46
* @details
47
* An AMC model based on Piro, G.; Grieco, L.A; Boggia, G.; Camarda, P.,
48
* "A two-level scheduling algorithm for QoS support in the downlink of
49
* LTE cellular networks," _Wireless Conference (EW), 2010 European_,
50
* pp.246,253, 12-15 April 2010.
51
*/
52
PiroEW2010
,
53
/**
54
* An AMC model based on 10% of BER according to LteMiErrorModel.
55
*/
56
MiErrorModel
57
};
58
59
/**
60
* @brief Get the Modulation and Coding Scheme for
61
* a CQI value
62
* @param cqi the cqi value
63
* @return the MCS value
64
*/
65
int
GetMcsFromCqi
(
int
cqi);
66
67
/**
68
* @brief Get the Transport Block Size for a selected MCS and number of PRB (table 7.1.7.2.1-1
69
* of 36.213)
70
* @param mcs the MCS index
71
* @param nprb the no. of PRB
72
* @return the Transport Block Size in bits
73
*/
74
int
GetDlTbSizeFromMcs
(
int
mcs,
int
nprb);
75
76
/**
77
* @brief Get the Transport Block Size for a selected MCS and number of PRB (table 8.6.1-1
78
* of 36.213)
79
* @param mcs the MCS index
80
* @param nprb the no. of PRB
81
* @return the Transport Block Size in bits
82
*/
83
int
GetUlTbSizeFromMcs
(
int
mcs,
int
nprb);
84
85
/**
86
* @brief Get the spectral efficiency value associated
87
* to the received CQI
88
* @param cqi the cqi value
89
* @return the spectral efficiency in (bit/s)/Hz
90
*/
91
double
GetSpectralEfficiencyFromCqi
(
int
cqi);
92
93
/**
94
* @brief Create a message with CQI feedback
95
* @param sinr the SpectrumValue vector of SINR for evaluating the CQI
96
* @param rbgSize size of RB group (in RBs) for evaluating subband/wideband CQI
97
* @return a vector of CQI feedbacks
98
*/
99
std::vector<int>
CreateCqiFeedbacks
(
const
SpectrumValue
& sinr, uint8_t rbgSize = 0);
100
101
/**
102
* @brief Get a proper CQI for the spectral efficiency value.
103
* In order to assure a lower block error rate, the AMC chooses the lower CQI value
104
* for a given spectral efficiency
105
* @param s the spectral efficiency
106
* @return the CQI value
107
*/
108
int
GetCqiFromSpectralEfficiency
(
double
s);
109
110
private
:
111
/**
112
* The `Ber` attribute.
113
*
114
* The requested BER in assigning MCS (default is 0.00005).
115
*/
116
double
m_ber
;
117
118
/**
119
* The `AmcModel` attribute.
120
*
121
* AMC model used to assign CQI.
122
*/
123
AmcModel
m_amcModel
;
124
125
};
// end of `class LteAmc`
126
127
}
// namespace ns3
128
129
#endif
/* AMCMODULE_H */
ns3::LteAmc
Implements the Adaptive Modulation And Coding Scheme.
Definition
lte-amc.h:31
ns3::LteAmc::GetCqiFromSpectralEfficiency
int GetCqiFromSpectralEfficiency(double s)
Get a proper CQI for the spectral efficiency value.
Definition
lte-amc.cc:479
ns3::LteAmc::~LteAmc
~LteAmc() override
Definition
lte-amc.cc:452
ns3::LteAmc::GetDlTbSizeFromMcs
int GetDlTbSizeFromMcs(int mcs, int nprb)
Get the Transport Block Size for a selected MCS and number of PRB (table 7.1.7.2.1-1 of 36....
Definition
lte-amc.cc:508
ns3::LteAmc::AmcModel
AmcModel
Types of AMC model.
Definition
lte-amc.h:44
ns3::LteAmc::MiErrorModel
@ MiErrorModel
An AMC model based on 10% of BER according to LteMiErrorModel.
Definition
lte-amc.h:56
ns3::LteAmc::PiroEW2010
@ PiroEW2010
Definition
lte-amc.h:52
ns3::LteAmc::LteAmc
LteAmc()
Definition
lte-amc.cc:448
ns3::LteAmc::GetMcsFromCqi
int GetMcsFromCqi(int cqi)
Get the Modulation and Coding Scheme for a CQI value.
Definition
lte-amc.cc:493
ns3::LteAmc::CreateCqiFeedbacks
std::vector< int > CreateCqiFeedbacks(const SpectrumValue &sinr, uint8_t rbgSize=0)
Create a message with CQI feedback.
Definition
lte-amc.cc:541
ns3::LteAmc::GetUlTbSizeFromMcs
int GetUlTbSizeFromMcs(int mcs, int nprb)
Get the Transport Block Size for a selected MCS and number of PRB (table 8.6.1-1 of 36....
Definition
lte-amc.cc:520
ns3::LteAmc::m_ber
double m_ber
The Ber attribute.
Definition
lte-amc.h:116
ns3::LteAmc::GetSpectralEfficiencyFromCqi
double GetSpectralEfficiencyFromCqi(int cqi)
Get the spectral efficiency value associated to the received CQI.
Definition
lte-amc.cc:532
ns3::LteAmc::m_amcModel
AmcModel m_amcModel
The AmcModel attribute.
Definition
lte-amc.h:123
ns3::LteAmc::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-amc.cc:457
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition
spectrum-value.h:50
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-amc.h
Generated on Mon Dec 2 2024 18:20:43 for ns-3 by
1.11.0