author | Manuel Requena <manuel.requena@cttc.es> |
Tue, 26 Mar 2013 10:41:49 +0100 | |
changeset 10019 | 6efd95740e39 |
parent 8253 | 6faee3d1d1d0 |
child 9105 | 760da66d6f5c |
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 |
* |
|
18 |
* Author: Giuseppe Piro <g.piro@poliba.it> |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef LTE_SPECTRUM_VALUE_HELPER_H |
|
22 |
#define LTE_SPECTRUM_VALUE_HELPER_H |
|
23 |
||
24 |
||
25 |
#include <ns3/spectrum-value.h> |
|
26 |
#include <vector> |
|
27 |
||
28 |
namespace ns3 { |
|
29 |
||
30 |
||
31 |
/** |
|
7238
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
32 |
* \ingroup lte |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
33 |
* |
6705 | 34 |
* \brief This class defines all functions to create spectrum model for lte |
35 |
*/ |
|
36 |
class LteSpectrumValueHelper |
|
37 |
{ |
|
38 |
public: |
|
39 |
/** |
|
7993 | 40 |
* Calculates the carrier frequency from the E-UTRA Absolute |
41 |
* Radio Frequency Channel Number (EARFCN) according to 3GPP TS |
|
42 |
* 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
|
43 |
* |
|
44 |
* \param earfcn the EARFCN |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
45 |
* |
8015 | 46 |
* \return the carrier frequency in Hz |
6705 | 47 |
*/ |
7993 | 48 |
static double GetCarrierFrequency (uint16_t earfcn); |
49 |
||
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
50 |
/** |
7993 | 51 |
* Calculates the dowlink carrier frequency from the E-UTRA Absolute |
52 |
* Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS |
|
53 |
* 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
|
54 |
* |
|
55 |
* \param earfcn the EARFCN |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
56 |
* |
8015 | 57 |
* \return the dowlink carrier frequency in Hz |
7993 | 58 |
*/ |
59 |
static double GetDownlinkCarrierFrequency (uint16_t earfcn); |
|
6705 | 60 |
|
61 |
/** |
|
7993 | 62 |
* Calculates the uplink carrier frequency from the E-UTRA Absolute |
63 |
* Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS |
|
64 |
* 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
|
65 |
* |
|
66 |
* \param earfcn the EARFCN |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
67 |
* |
8015 | 68 |
* \return the uplink carrier frequency in Hz |
6705 | 69 |
*/ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
70 |
static double GetUplinkCarrierFrequency (uint16_t earfcn); |
7993 | 71 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
72 |
/** |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
73 |
* |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
74 |
* |
8015 | 75 |
* \param txBandwidthConf the tranmission bandwidth |
76 |
* configuration in number of resource blocks |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
77 |
* |
8015 | 78 |
* \return the nominal channel bandwidth in Hz as per 3GPP TS 36.101 |
79 |
*/ |
|
80 |
static double GetChannelBandwidth (uint8_t txBandwidthConf); |
|
81 |
||
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
82 |
/** |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
83 |
* |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
84 |
* \param earfcn the carrier frequency (EARFCN) at which reception |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
85 |
* is made |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
86 |
* \param bandwidth the Transmission Bandwidth Configuration in |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
87 |
* number of resource blocks |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
88 |
* |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
89 |
* \return the static SpectrumModel instance corresponding to the |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
90 |
* given carrier frequency and transmission bandwidth |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
91 |
* configuration. If such SpectrumModel does not exist, it is |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
92 |
* created. |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
93 |
*/ |
8015 | 94 |
static Ptr<SpectrumModel> GetSpectrumModel (uint16_t earfcn, uint8_t bandwdith); |
6705 | 95 |
|
96 |
||
97 |
/** |
|
8015 | 98 |
* create a spectrum value representing the power spectral |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
99 |
* density of a signal to be transmitted. See 3GPP TS 36.101 for |
8015 | 100 |
* a definition of most of the parameters described here. |
101 |
* |
|
102 |
* \param earfcn the carrier frequency (EARFCN) of the transmission |
|
103 |
* \param bandwidth the Transmission Bandwidth Configuration in |
|
104 |
* number of resource blocks |
|
105 |
* \param txPower the total power in dBm over the whole bandwidth |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
106 |
* \param ActiveRbs the list of Active Resource Blocks (PRBs) |
8015 | 107 |
* |
8038
af227a7ab3d4
fixed minor typos in doxygen
Nicola Baldo <nbaldo@cttc.es>
parents:
8036
diff
changeset
|
108 |
* \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block |
6705 | 109 |
*/ |
8015 | 110 |
static Ptr<SpectrumValue> CreateTxPowerSpectralDensity (uint16_t earfcn, uint8_t bandwdith, double powerTx, std::vector <int> activeRbs); |
6705 | 111 |
|
112 |
||
113 |
/** |
|
7981 | 114 |
* create a SpectrumValue that models the power spectral density of AWGN |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
115 |
* |
8015 | 116 |
* \param earfcn the carrier frequency (EARFCN) at which reception |
117 |
* is made |
|
118 |
* \param bandwidth the Transmission Bandwidth Configuration in |
|
119 |
* number of resource blocks |
|
7981 | 120 |
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
121 |
* |
8038
af227a7ab3d4
fixed minor typos in doxygen
Nicola Baldo <nbaldo@cttc.es>
parents:
8036
diff
changeset
|
122 |
* \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral Density in W/Hz for each Resource Block |
6705 | 123 |
*/ |
8015 | 124 |
static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (uint16_t earfcn, uint8_t bandwdith, double noiseFigure); |
6705 | 125 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
126 |
/** |
7981 | 127 |
* create a SpectrumValue that models the power spectral density of AWGN |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
128 |
* |
7981 | 129 |
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K |
130 |
* \param spectrumModel the SpectrumModel instance to be used |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
131 |
* |
8038
af227a7ab3d4
fixed minor typos in doxygen
Nicola Baldo <nbaldo@cttc.es>
parents:
8036
diff
changeset
|
132 |
* \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral Density in W/Hz for each Resource Block |
7981 | 133 |
*/ |
134 |
static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (double noiseFigure, Ptr<SpectrumModel> spectrumModel); |
|
6705 | 135 |
|
136 |
}; |
|
137 |
||
138 |
||
139 |
} // namespace ns3 |
|
140 |
||
141 |
||
142 |
||
143 |
#endif /* LTE_SPECTRUM_VALUE_HELPER_H */ |