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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Original Author: Giuseppe Piro <g.piro@poliba.it>
18
* Modified by: Nicola Baldo <nbaldo@cttc.es>
19
* Modified by: Marco Miozzo <mmiozzo@cttc.es>
20
*/
21
22
#ifndef AMCMODULE_H
23
#define AMCMODULE_H
24
25
#include <ns3/object.h>
26
#include <ns3/ptr.h>
27
28
#include <vector>
29
30
namespace
ns3
31
{
32
33
class
SpectrumValue;
34
35
/**
36
* \ingroup lte
37
* Implements the Adaptive Modulation And Coding Scheme. As proposed in 3GPP
38
* TSG-RAN WG1 [R1-081483 Conveying MCS and TB size via PDCCH]
39
* (http://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_52b/Docs/R1-081483.zip).
40
*/
41
class
LteAmc
:
public
Object
42
{
43
public
:
44
/**
45
* \brief Get the type ID.
46
* \return the object TypeId
47
*/
48
static
TypeId
GetTypeId
();
49
50
LteAmc
();
51
~LteAmc
()
override
;
52
53
/// Types of AMC model.
54
enum
AmcModel
55
{
56
/**
57
* \details
58
* An AMC model based on Piro, G.; Grieco, L.A; Boggia, G.; Camarda, P.,
59
* "A two-level scheduling algorithm for QoS support in the downlink of
60
* LTE cellular networks," _Wireless Conference (EW), 2010 European_,
61
* pp.246,253, 12-15 April 2010.
62
*/
63
PiroEW2010
,
64
/**
65
* An AMC model based on 10% of BER according to LteMiErrorModel.
66
*/
67
MiErrorModel
68
};
69
70
/**
71
* \brief Get the Modulation and Coding Scheme for
72
* a CQI value
73
* \param cqi the cqi value
74
* \return the MCS value
75
*/
76
int
GetMcsFromCqi
(
int
cqi);
77
78
/**
79
* \brief Get the Transport Block Size for a selected MCS and number of PRB (table 7.1.7.2.1-1
80
* of 36.213)
81
* \param mcs the MCS index
82
* \param nprb the no. of PRB
83
* \return the Transport Block Size in bits
84
*/
85
int
GetDlTbSizeFromMcs
(
int
mcs,
int
nprb);
86
87
/**
88
* \brief Get the Transport Block Size for a selected MCS and number of PRB (table 8.6.1-1
89
* of 36.213)
90
* \param mcs the MCS index
91
* \param nprb the no. of PRB
92
* \return the Transport Block Size in bits
93
*/
94
int
GetUlTbSizeFromMcs
(
int
mcs,
int
nprb);
95
96
/**
97
* \brief Get the spectral efficiency value associated
98
* to the received CQI
99
* \param cqi the cqi value
100
* \return the spectral efficiency in (bit/s)/Hz
101
*/
102
double
GetSpectralEfficiencyFromCqi
(
int
cqi);
103
104
/**
105
* \brief Create a message with CQI feedback
106
* \param sinr the SpectrumValue vector of SINR for evaluating the CQI
107
* \param rbgSize size of RB group (in RBs) for evaluating subband/wideband CQI
108
* \return a vector of CQI feedbacks
109
*/
110
std::vector<int>
CreateCqiFeedbacks
(
const
SpectrumValue
& sinr, uint8_t rbgSize = 0);
111
112
/**
113
* \brief Get a proper CQI for the spectral efficiency value.
114
* In order to assure a lower block error rate, the AMC chooses the lower CQI value
115
* for a given spectral efficiency
116
* \param s the spectral efficiency
117
* \return the CQI value
118
*/
119
int
GetCqiFromSpectralEfficiency
(
double
s);
120
121
private
:
122
/**
123
* The `Ber` attribute.
124
*
125
* The requested BER in assigning MCS (default is 0.00005).
126
*/
127
double
m_ber
;
128
129
/**
130
* The `AmcModel` attribute.
131
*
132
* AMC model used to assign CQI.
133
*/
134
AmcModel
m_amcModel
;
135
136
};
// end of `class LteAmc`
137
138
}
// namespace ns3
139
140
#endif
/* AMCMODULE_H */
ns3::LteAmc
Implements the Adaptive Modulation And Coding Scheme.
Definition:
lte-amc.h:42
ns3::LteAmc::GetCqiFromSpectralEfficiency
int GetCqiFromSpectralEfficiency(double s)
Get a proper CQI for the spectral efficiency value.
Definition:
lte-amc.cc:490
ns3::LteAmc::~LteAmc
~LteAmc() override
Definition:
lte-amc.cc:463
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:519
ns3::LteAmc::AmcModel
AmcModel
Types of AMC model.
Definition:
lte-amc.h:55
ns3::LteAmc::MiErrorModel
@ MiErrorModel
An AMC model based on 10% of BER according to LteMiErrorModel.
Definition:
lte-amc.h:67
ns3::LteAmc::PiroEW2010
@ PiroEW2010
Definition:
lte-amc.h:63
ns3::LteAmc::LteAmc
LteAmc()
Definition:
lte-amc.cc:459
ns3::LteAmc::GetMcsFromCqi
int GetMcsFromCqi(int cqi)
Get the Modulation and Coding Scheme for a CQI value.
Definition:
lte-amc.cc:504
ns3::LteAmc::CreateCqiFeedbacks
std::vector< int > CreateCqiFeedbacks(const SpectrumValue &sinr, uint8_t rbgSize=0)
Create a message with CQI feedback.
Definition:
lte-amc.cc:552
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:531
ns3::LteAmc::m_ber
double m_ber
The Ber attribute.
Definition:
lte-amc.h:127
ns3::LteAmc::GetSpectralEfficiencyFromCqi
double GetSpectralEfficiencyFromCqi(int cqi)
Get the spectral efficiency value associated to the received CQI.
Definition:
lte-amc.cc:543
ns3::LteAmc::m_amcModel
AmcModel m_amcModel
The AmcModel attribute.
Definition:
lte-amc.h:134
ns3::LteAmc::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
lte-amc.cc:468
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:61
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-amc.h
Generated on Tue May 28 2024 23:37:13 for ns-3 by
1.9.6