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 * 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
17namespace ns3
18{
19
20/**
21 * @ingroup lte
22 *
23 * @brief This class defines all functions to create spectrum model for lte
24 */
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 */
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 */
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 */
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 */
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 */
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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.