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 map from RB index to transmit power in dBm.
132
* Each mapped value is interpreted like powerTx, i.e., as total transmit
133
* power over the configured bandwidth, and is used instead of powerTx to
134
* compute the PSD for that RB. RBs not present in the map use powerTx.
135
* This is used, for example, when the LTE eNB transmits PDSCH RBs, and
136
* it needs to apply UE specific downlink power offsets from
137
* PdschConfigDedicated::Pa.
138
* @param activeRbs the list of Active Resource Blocks (PRBs)
139
*
140
* @return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral
141
* Density in W/Hz for each Resource Block
142
*/
143
static
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
(
uint32_t
earfcn,
144
uint16_t bandwidth,
145
double
powerTx,
146
std::map<int, double> powerTxMap,
147
std::vector<int> activeRbs);
148
149
/**
150
* create a spectrum value representing the uplink power spectral
151
* density of a signal to be transmitted. See 3GPP TS 36.101 for
152
* a definition of most of the parameters described here.
153
* This function splits the power over the active RBs instead of
154
* the entire bandwidth
155
* @param earfcn the carrier frequency (EARFCN) of the transmission
156
* @param bandwidth the Transmission Bandwidth Configuration in
157
* number of resource blocks
158
* @param powerTx the total power in dBm over the whole bandwidth
159
* @param activeRbs the list of Active Resource Blocks (PRBs)
160
*
161
* @return a pointer to a newly allocated SpectrumValue representing the TX Power Spectral
162
* Density in W/Hz for each Resource Block
163
*/
164
static
Ptr<SpectrumValue>
CreateUlTxPowerSpectralDensity
(uint16_t earfcn,
165
uint16_t bandwidth,
166
double
powerTx,
167
std::vector<int> activeRbs);
168
169
/**
170
* create a SpectrumValue that models the power spectral density of AWGN
171
*
172
* @param earfcn the carrier frequency (EARFCN) at which reception
173
* is made
174
* @param bandwidth the Transmission Bandwidth Configuration in
175
* number of resource blocks
176
* @param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
177
*
178
* @return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
179
* Density in W/Hz for each Resource Block
180
*/
181
static
Ptr<SpectrumValue>
CreateNoisePowerSpectralDensity
(
uint32_t
earfcn,
182
uint16_t bandwidth,
183
double
noiseFigure);
184
185
/**
186
* create a SpectrumValue that models the power spectral density of AWGN
187
*
188
* @param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
189
* @param spectrumModel the SpectrumModel instance to be used
190
*
191
* @return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
192
* Density in W/Hz for each Resource Block
193
*/
194
static
Ptr<SpectrumValue>
CreateNoisePowerSpectralDensity
(
double
noiseFigure,
195
Ptr<SpectrumModel>
spectrumModel);
196
};
197
198
}
// namespace ns3
199
200
#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
ptr.h:70
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
for ns-3 by
1.16.1