author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Fri, 26 Sep 2014 15:51:00 -0700 | |
changeset 10968 | 2d29fee2b7b8 |
parent 10425 | 1867d8c25aa7 |
child 10983 | 087597a150da |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Mileti? <rivanvx@gmail.com>
parents:
7238
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6705 | 2 |
/* |
3 |
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License version 2 as |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
7886 | 18 |
* Original Author: Giuseppe Piro <g.piro@poliba.it> |
19 |
* Modified by: Nicola Baldo <nbaldo@cttc.es> |
|
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
20 |
* Modified by: Marco Miozzo <mmiozzo@cttc.es> |
6705 | 21 |
*/ |
22 |
||
23 |
#ifndef AMCMODULE_H |
|
24 |
#define AMCMODULE_H |
|
25 |
||
26 |
#include <vector> |
|
7886 | 27 |
#include <ns3/ptr.h> |
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
28 |
#include <ns3/object.h> |
6705 | 29 |
|
30 |
namespace ns3 { |
|
31 |
||
7886 | 32 |
class SpectrumValue; |
6705 | 33 |
|
34 |
/** |
|
7238
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
35 |
* \ingroup lte |
7887 | 36 |
* \brief The LteAmc class implements the Adaptive Modulation And Coding Scheme |
6705 | 37 |
* as proposed in 3GPP TSG-RAN WG1 - R1-081483 |
38 |
* http://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_52b/Docs/R1-081483.zip |
|
7886 | 39 |
* |
40 |
* \note All the methods of this class are static, so you'll never |
|
41 |
* need to create and manage instances of this class. |
|
6705 | 42 |
*/ |
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
43 |
class LteAmc : public Object |
6705 | 44 |
{ |
45 |
||
46 |
public: |
|
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
47 |
static TypeId GetTypeId (void); |
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
48 |
|
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
49 |
LteAmc (); |
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
50 |
virtual ~LteAmc(); |
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
51 |
|
8644
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
52 |
enum AmcModel |
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
53 |
{ |
8648
b73a8905c1eb
Remove LteAmc::Ber parameter from LteAmc::MiErrorModel for avoiding misunderstanding
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8646
diff
changeset
|
54 |
PiroEW2010, |
8646
4b341d8f2f61
Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8644
diff
changeset
|
55 |
// model based on Piro, G.; Grieco, L.A.; Boggia, G.; Camarda, P.; |
4b341d8f2f61
Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8644
diff
changeset
|
56 |
//A two-level scheduling algorithm for QoS support in the downlink of |
4b341d8f2f61
Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8644
diff
changeset
|
57 |
//LTE cellular networks European Wireless Conference (EW), 2010 |
4b341d8f2f61
Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8644
diff
changeset
|
58 |
MiErrorModel // model based on 10% of BER according to LteMiErrorModel |
8644
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
59 |
}; |
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
60 |
|
6705 | 61 |
/** |
62 |
* \brief Get the Modulation anc Coding Scheme for |
|
63 |
* a CQI value |
|
64 |
* \param cqi the cqi value |
|
65 |
* \return the MCS value |
|
66 |
*/ |
|
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
67 |
/*static*/ int GetMcsFromCqi (int cqi); |
6705 | 68 |
|
7886 | 69 |
/** |
70 |
* \brief Get the Transport Block Size for a selected MCS and number of PRB (table 7.1.7.2.1-1 of 36.213) |
|
71 |
* \param mcs the mcs index |
|
72 |
* \param nprb the no. of PRB |
|
8120
126ab426750b
added a few comments to lte-amc
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
73 |
* \return the Transport Block Size in bits |
7886 | 74 |
*/ |
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
75 |
/*static*/ int GetTbSizeFromMcs (int mcs, int nprb); |
6705 | 76 |
|
77 |
/** |
|
78 |
* \brief Get the spectral efficiency value associated |
|
79 |
* to the received CQI |
|
80 |
* \param cqi the cqi value |
|
8120
126ab426750b
added a few comments to lte-amc
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
81 |
* \return the spectral efficiency in (bit/s)/Hz |
6705 | 82 |
*/ |
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
83 |
/*static*/ double GetSpectralEfficiencyFromCqi (int cqi); |
6705 | 84 |
|
85 |
/** |
|
7886 | 86 |
* \brief Create a message with CQI feedback |
8644
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
87 |
* \param sinr the SpectrumValue vector of SINR for evaluating the CQI |
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
88 |
* \param rbgSize size of RB group (in RBs) for evaluating subband/wideband CQI |
10425
1867d8c25aa7
doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
8648
diff
changeset
|
89 |
* \return a vector of CQI feedbacks |
6705 | 90 |
*/ |
10425
1867d8c25aa7
doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
8648
diff
changeset
|
91 |
/*static*/ std::vector<int> CreateCqiFeedbacks (const SpectrumValue& sinr, |
1867d8c25aa7
doxygen warnings for lte module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
8648
diff
changeset
|
92 |
uint8_t rbgSize = 0); |
6705 | 93 |
|
94 |
/** |
|
95 |
* \brief Get a proper CQI for the spectrale efficiency value. |
|
96 |
* In order to assure a fewer block error rate, the AMC chooses the lower CQI value |
|
97 |
* for a given spectral efficiency |
|
98 |
* \param s the spectral efficiency |
|
99 |
* \return the CQI value |
|
100 |
*/ |
|
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
101 |
/*static*/ int GetCqiFromSpectralEfficiency (double s); |
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
102 |
|
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
103 |
private: |
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
104 |
|
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
105 |
double m_ber; |
8644
83faaf37b22c
Add missing files of Hybrid and Simple BuildingsPropagationLossModel
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8515
diff
changeset
|
106 |
AmcModel m_amcModel; |
8515
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
107 |
|
245c032fb764
Convert LteAmc to Object and add BER parameter
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8253
diff
changeset
|
108 |
|
6705 | 109 |
|
110 |
}; |
|
111 |
||
112 |
||
113 |
} |
|
114 |
||
115 |
#endif /* AMCMODULE_H */ |