A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-spectrum-value-helper.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 * Author: Giuseppe Piro <g.piro@poliba.it>
18 */
19
20#ifndef LTE_SPECTRUM_VALUE_HELPER_H
21#define LTE_SPECTRUM_VALUE_HELPER_H
22
23#include <ns3/spectrum-value.h>
24
25#include <map>
26#include <vector>
27
28namespace ns3
29{
30
31/**
32 * \ingroup lte
33 *
34 * \brief This class defines all functions to create spectrum model for lte
35 */
37{
38 public:
39 /**
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
45 *
46 * \return the carrier frequency in Hz
47 */
48 static double GetCarrierFrequency(uint32_t earfcn);
49
50 /**
51 * Converts downlink EARFCN to corresponding LTE frequency band number.
52 *
53 * \param nDl the EARFCN
54 *
55 * \return the downlink carrier band
56 */
57 static uint16_t GetDownlinkCarrierBand(uint32_t nDl);
58
59 /**
60 * Converts uplink EARFCN to corresponding LTE frequency band number.
61 *
62 * \param nUl the EARFCN
63 *
64 * \return the uplink carrier band
65 */
66 static uint16_t GetUplinkCarrierBand(uint32_t nUl);
67
68 /**
69 * Calculates the downlink carrier frequency from the E-UTRA Absolute
70 * Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS
71 * 36.101 section 5.7.3 "Carrier frequency and EARFCN".
72 *
73 * \param earfcn the EARFCN
74 *
75 * \return the downlink carrier frequency in Hz
76 */
77 static double GetDownlinkCarrierFrequency(uint32_t earfcn);
78
79 /**
80 * Calculates the uplink carrier frequency from the E-UTRA Absolute
81 * Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS
82 * 36.101 section 5.7.3 "Carrier frequency and EARFCN".
83 *
84 * \param earfcn the EARFCN
85 *
86 * \return the uplink carrier frequency in Hz
87 */
88 static double GetUplinkCarrierFrequency(uint32_t earfcn);
89
90 /**
91 *
92 *
93 * \param txBandwidthConf the transmission bandwidth
94 * configuration in number of resource blocks
95 *
96 * \return the nominal channel bandwidth in Hz as per 3GPP TS 36.101
97 */
98 static double GetChannelBandwidth(uint16_t txBandwidthConf);
99
100 /**
101 *
102 * \param earfcn the carrier frequency (EARFCN) at which reception
103 * is made
104 * \param bandwidth the Transmission Bandwidth Configuration in
105 * number of resource blocks
106 *
107 * \return the static SpectrumModel instance corresponding to the
108 * given carrier frequency and transmission bandwidth
109 * configuration. If such SpectrumModel does not exist, it is
110 * created.
111 */
112 static Ptr<SpectrumModel> GetSpectrumModel(uint32_t earfcn, uint16_t bandwidth);
113
114 /**
115 * create a spectrum value representing the power spectral
116 * density of a signal to be transmitted. See 3GPP TS 36.101 for
117 * a definition of most of the parameters described here.
118 *
119 * \param earfcn the carrier frequency (EARFCN) of the transmission
120 * \param bandwidth the Transmission Bandwidth Configuration in
121 * number of resource blocks
122 * \param powerTx the total power in dBm over the whole bandwidth
123 * \param activeRbs the list of Active Resource Blocks (PRBs)
124 *
125 * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral
126 * Density in W/Hz for each Resource Block
127 */
129 uint16_t bandwidth,
130 double powerTx,
131 std::vector<int> activeRbs);
132
133 /**
134 * create a spectrum value representing the power spectral
135 * density of a signal to be transmitted. See 3GPP TS 36.101 for
136 * a definition of most of the parameters described here.
137 *
138 * \param earfcn the carrier frequency (EARFCN) of the transmission
139 * \param bandwidth the Transmission Bandwidth Configuration in
140 * number of resource blocks
141 * \param powerTx the total power in dBm over the whole bandwidth
142 * \param powerTxMap the map of power in dBm for each RB,
143 * if map contain power for RB, powerTx is not used for this RB,
144 * otherwise powerTx is set for this RB
145 * \param activeRbs the list of Active Resource Blocks (PRBs)
146 *
147 * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral
148 * Density in W/Hz for each Resource Block
149 */
151 uint16_t bandwidth,
152 double powerTx,
153 std::map<int, double> powerTxMap,
154 std::vector<int> activeRbs);
155
156 /**
157 * create a spectrum value representing the uplink power spectral
158 * density of a signal to be transmitted. See 3GPP TS 36.101 for
159 * a definition of most of the parameters described here.
160 * This function splits the power over the active RBs instead of
161 * the entire bandwidth
162 * \param earfcn the carrier frequency (EARFCN) of the transmission
163 * \param bandwidth the Transmission Bandwidth Configuration in
164 * number of resource blocks
165 * \param powerTx the total power in dBm over the whole bandwidth
166 * \param activeRbs the list of Active Resource Blocks (PRBs)
167 *
168 * \return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral
169 * Density in W/Hz for each Resource Block
170 */
172 uint16_t bandwidth,
173 double powerTx,
174 std::vector<int> activeRbs);
175
176 /**
177 * create a SpectrumValue that models the power spectral density of AWGN
178 *
179 * \param earfcn the carrier frequency (EARFCN) at which reception
180 * is made
181 * \param bandwidth the Transmission Bandwidth Configuration in
182 * number of resource blocks
183 * \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
184 *
185 * \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
186 * Density in W/Hz for each Resource Block
187 */
189 uint16_t bandwidth,
190 double noiseFigure);
191
192 /**
193 * create a SpectrumValue that models the power spectral density of AWGN
194 *
195 * \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
196 * \param spectrumModel the SpectrumModel instance to be used
197 *
198 * \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
199 * Density in W/Hz for each Resource Block
200 */
201 static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity(double noiseFigure,
202 Ptr<SpectrumModel> spectrumModel);
203};
204
205} // namespace ns3
206
207#endif /* LTE_SPECTRUM_VALUE_HELPER_H */
This class defines all functions to create spectrum model for lte.
static Ptr< SpectrumValue > CreateUlTxPowerSpectralDensity(uint16_t earfcn, uint16_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the uplink power spectral density of a signal to be transmitted.
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t earfcn, uint16_t bandwidth, double noiseFigure)
create a SpectrumValue that models the power spectral density of AWGN
static Ptr< SpectrumValue > CreateTxPowerSpectralDensity(uint32_t earfcn, uint16_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the power spectral density of a signal to be transmitted.
static uint16_t GetUplinkCarrierBand(uint32_t nUl)
Converts uplink EARFCN to corresponding LTE frequency band number.
static uint16_t GetDownlinkCarrierBand(uint32_t nDl)
Converts downlink EARFCN to corresponding LTE frequency band number.
static double GetChannelBandwidth(uint16_t txBandwidthConf)
static double GetUplinkCarrierFrequency(uint32_t earfcn)
Calculates the uplink carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EARF...
static double GetCarrierFrequency(uint32_t earfcn)
Calculates the carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EARFCN) acc...
static Ptr< SpectrumModel > GetSpectrumModel(uint32_t earfcn, uint16_t bandwidth)
static double GetDownlinkCarrierFrequency(uint32_t earfcn)
Calculates the downlink carrier frequency from the E-UTRA Absolute Radio Frequency Channel Number (EA...
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.