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