OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 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 * Modified by: NIST |
| 20 */ |
| 21 |
| 22 #ifndef NIST_LTE_SPECTRUM_VALUE_HELPER_H |
| 23 #define NIST_LTE_SPECTRUM_VALUE_HELPER_H |
| 24 |
| 25 |
| 26 #include <ns3/spectrum-value.h> |
| 27 #include <vector> |
| 28 |
| 29 namespace ns3 { |
| 30 |
| 31 |
| 32 /** |
| 33 * \ingroup lte |
| 34 * |
| 35 * \brief This class defines all functions to create spectrum model for lte |
| 36 */ |
| 37 class NistLteSpectrumValueHelper |
| 38 { |
| 39 public: |
| 40 /** |
| 41 * Calculates the carrier frequency from the E-UTRA Absolute |
| 42 * Radio Frequency Channel Number (EARFCN) according to 3GPP TS |
| 43 * 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
| 44 * |
| 45 * \param earfcn the EARFCN |
| 46 * |
| 47 * \return the carrier frequency in Hz |
| 48 */ |
| 49 static double GetCarrierFrequency (uint16_t earfcn); |
| 50 |
| 51 /** |
| 52 * Calculates the dowlink carrier frequency from the E-UTRA Absolute |
| 53 * Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS |
| 54 * 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
| 55 * |
| 56 * \param earfcn the EARFCN |
| 57 * |
| 58 * \return the dowlink carrier frequency in Hz |
| 59 */ |
| 60 static double GetDownlinkCarrierFrequency (uint16_t earfcn); |
| 61 |
| 62 /** |
| 63 * Calculates the uplink carrier frequency from the E-UTRA Absolute |
| 64 * Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS |
| 65 * 36.101 section 5.7.3 "Carrier frequency and EARFCN". |
| 66 * |
| 67 * \param earfcn the EARFCN |
| 68 * |
| 69 * \return the uplink carrier frequency in Hz |
| 70 */ |
| 71 static double GetUplinkCarrierFrequency (uint16_t earfcn); |
| 72 |
| 73 /** |
| 74 * |
| 75 * |
| 76 * \param txBandwidthConf the tranmission bandwidth |
| 77 * configuration in number of resource blocks |
| 78 * |
| 79 * \return the nominal channel bandwidth in Hz as per 3GPP TS 36.101 |
| 80 */ |
| 81 static double GetChannelBandwidth (uint8_t txBandwidthConf); |
| 82 |
| 83 /** |
| 84 * |
| 85 * \param earfcn the carrier frequency (EARFCN) at which reception |
| 86 * is made |
| 87 * \param bandwidth the Transmission Bandwidth Configuration in |
| 88 * number of resource blocks |
| 89 * |
| 90 * \return the static SpectrumModel instance corresponding to the |
| 91 * given carrier frequency and transmission bandwidth |
| 92 * configuration. If such SpectrumModel does not exist, it is |
| 93 * created. |
| 94 */ |
| 95 static Ptr<SpectrumModel> GetSpectrumModel (uint16_t earfcn, uint8_t bandwidth
); |
| 96 |
| 97 |
| 98 /** |
| 99 * create a spectrum value representing the power spectral |
| 100 * density of a signal to be transmitted. See 3GPP TS 36.101 for |
| 101 * a definition of most of the parameters described here. |
| 102 * |
| 103 * \param earfcn the carrier frequency (EARFCN) of the transmission |
| 104 * \param bandwidth the Transmission Bandwidth Configuration in |
| 105 * number of resource blocks |
| 106 * \param powerTx the total power in dBm over the whole bandwidth |
| 107 * \param activeRbs the list of Active Resource Blocks (PRBs) |
| 108 * |
| 109 * \return a pointer to a newly allocated SpectrumValue representing the TX Po
wer Spectral Density in W/Hz for each Resource Block |
| 110 */ |
| 111 static Ptr<SpectrumValue> CreateTxPowerSpectralDensity (uint16_t earfcn, |
| 112 uint8_t bandwidth, |
| 113 double powerTx, |
| 114 std::vector <int> acti
veRbs); |
| 115 |
| 116 /** |
| 117 * create a spectrum value representing the power spectral |
| 118 * density of a signal to be transmitted. See 3GPP TS 36.101 for |
| 119 * a definition of most of the parameters described here. |
| 120 * This function splits the power over the active RBs instead of the entire ba
ndwidth |
| 121 * \param earfcn the carrier frequency (EARFCN) of the transmission |
| 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 Po
wer Spectral Density in W/Hz for each Resource Block |
| 126 */ |
| 127 static Ptr<SpectrumValue> CreateUlTxPowerSpectralDensity (uint16_t earfcn, |
| 128 uint8_t bandwidth, |
| 129 double powerTx, |
| 130 std::vector <int> acti
veRbs); |
| 131 /** |
| 132 * create a spectrum value representing the power spectral |
| 133 * density of a signal to be transmitted. See 3GPP TS 36.101 for |
| 134 * a definition of most of the parameters described here. |
| 135 * |
| 136 * \param earfcn the carrier frequency (EARFCN) of the transmission |
| 137 * \param bandwidth the Transmission Bandwidth Configuration in |
| 138 * number of resource blocks |
| 139 * \param powerTx the total power in dBm over the whole bandwidth |
| 140 * \param powerTxMap the map of power in dBm for each RB, |
| 141 * if map contain power for RB, powerTx is not used for this RB, |
| 142 * otherwise powerTx is set for this RB |
| 143 * \param activeRbs the list of Active Resource Blocks (PRBs) |
| 144 * |
| 145 * \return a pointer to a newly allocated SpectrumValue representing the TX Po
wer Spectral Density in W/Hz for each Resource Block |
| 146 */ |
| 147 static Ptr<SpectrumValue> CreateTxPowerSpectralDensity (uint16_t earfcn, |
| 148 uint8_t bandwidth, |
| 149 double powerTx, |
| 150 std::map<int, double>
powerTxMap, |
| 151 std::vector <int> acti
veRbs); |
| 152 |
| 153 /** |
| 154 * create a SpectrumValue that models the power spectral density of AWGN |
| 155 * |
| 156 * \param earfcn the carrier frequency (EARFCN) at which reception |
| 157 * is made |
| 158 * \param bandwidth the Transmission Bandwidth Configuration in |
| 159 * number of resource blocks |
| 160 * \param noiseFigure the noise figure in dB w.r.t. a reference temperature of
290K |
| 161 * |
| 162 * \return a pointer to a newly allocated SpectrumValue representing the noise
Power Spectral Density in W/Hz for each Resource Block |
| 163 */ |
| 164 static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (uint16_t earfcn, ui
nt8_t bandwidth, double noiseFigure); |
| 165 |
| 166 /** |
| 167 * create a SpectrumValue that models the power spectral density of AWGN |
| 168 * |
| 169 * \param noiseFigure the noise figure in dB w.r.t. a reference temperature
of 290K |
| 170 * \param spectrumModel the SpectrumModel instance to be used |
| 171 * |
| 172 * \return a pointer to a newly allocated SpectrumValue representing the noise
Power Spectral Density in W/Hz for each Resource Block |
| 173 */ |
| 174 static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (double noiseFigure,
Ptr<SpectrumModel> spectrumModel); |
| 175 |
| 176 }; |
| 177 |
| 178 |
| 179 } // namespace ns3 |
| 180 |
| 181 |
| 182 |
| 183 #endif /* NIST_LTE_SPECTRUM_VALUE_HELPER_H */ |
OLD | NEW |