6705
|
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 |
*/
|
|
20 |
|
|
21 |
#ifndef LTE_SPECTRUM_VALUE_HELPER_H
|
|
22 |
#define LTE_SPECTRUM_VALUE_HELPER_H
|
|
23 |
|
|
24 |
|
|
25 |
#include <ns3/spectrum-value.h>
|
|
26 |
#include <vector>
|
|
27 |
|
|
28 |
namespace ns3 {
|
|
29 |
|
|
30 |
|
|
31 |
/**
|
|
32 |
* \brief This class defines all functions to create spectrum model for lte
|
|
33 |
*/
|
|
34 |
class LteSpectrumValueHelper
|
|
35 |
{
|
|
36 |
public:
|
7993
|
37 |
|
|
38 |
|
|
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 MHz
|
|
47 |
*/
|
|
48 |
static double GetCarrierFrequency (uint16_t earfcn);
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Calculates the dowlink carrier frequency from the E-UTRA Absolute
|
|
52 |
* Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS
|
|
53 |
* 36.101 section 5.7.3 "Carrier frequency and EARFCN".
|
|
54 |
*
|
|
55 |
* \param earfcn the EARFCN
|
|
56 |
*
|
|
57 |
* \return the dowlink carrier frequency in MHz
|
|
58 |
*/
|
|
59 |
static double GetDownlinkCarrierFrequency (uint16_t earfcn);
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Calculates the uplink carrier frequency from the E-UTRA Absolute
|
|
63 |
* Radio Frequency Channel Number (EARFCN) using the formula in 3GPP TS
|
|
64 |
* 36.101 section 5.7.3 "Carrier frequency and EARFCN".
|
|
65 |
*
|
|
66 |
* \param earfcn the EARFCN
|
|
67 |
*
|
|
68 |
* \return the uplink carrier frequency in MHz
|
|
69 |
*/
|
|
70 |
static double GetUplinkCarrierFrequency (uint16_t earfcn);
|
|
71 |
|
6705
|
72 |
/**
|
|
73 |
* \brief create spectrum value
|
|
74 |
* \param powerTx the power transmission in dBm
|
|
75 |
* \param channels the list of sub channels where the signal will be sent
|
|
76 |
* \return a Ptr to a newly created SpectrumValue instance
|
|
77 |
*/
|
7886
|
78 |
static Ptr<SpectrumValue> CreateDownlinkTxPowerSpectralDensity (double powerTx, std::vector <int> channels);
|
6705
|
79 |
|
|
80 |
/**
|
|
81 |
* \brief create spectrum value
|
|
82 |
* \param powerTx the power transmission in dBm
|
|
83 |
* \param channels the list of sub channels where the signal will be sent
|
|
84 |
* \return a Ptr to a newly created SpectrumValue instance
|
|
85 |
*/
|
7886
|
86 |
static Ptr<SpectrumValue> CreateUplinkTxPowerSpectralDensity (double powerTx, std::vector <int> channels);
|
6705
|
87 |
|
|
88 |
|
|
89 |
/**
|
7981
|
90 |
* create a SpectrumValue that models the power spectral density of AWGN
|
|
91 |
*
|
|
92 |
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
|
|
93 |
*
|
6705
|
94 |
* \return a Ptr to a newly created SpectrumValue instance
|
|
95 |
*/
|
7981
|
96 |
static Ptr<SpectrumValue> CreateDownlinkNoisePowerSpectralDensity (double noiseFigure);
|
6705
|
97 |
|
|
98 |
/**
|
7981
|
99 |
* create a SpectrumValue that models the power spectral density of AWGN
|
|
100 |
*
|
|
101 |
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
|
|
102 |
*
|
6705
|
103 |
* \return a Ptr to a newly created SpectrumValue instance
|
|
104 |
*/
|
7981
|
105 |
static Ptr<SpectrumValue> CreateUplinkNoisePowerSpectralDensity (double noiseFigure);
|
6705
|
106 |
|
7981
|
107 |
/**
|
|
108 |
* create a SpectrumValue that models the power spectral density of AWGN
|
|
109 |
*
|
|
110 |
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
|
|
111 |
* \param spectrumModel the SpectrumModel instance to be used
|
|
112 |
*
|
|
113 |
* \return a Ptr to a newly created SpectrumValue instance
|
|
114 |
*/
|
|
115 |
static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (double noiseFigure, Ptr<SpectrumModel> spectrumModel);
|
6705
|
116 |
|
|
117 |
};
|
|
118 |
|
|
119 |
|
|
120 |
} // namespace ns3
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
#endif /* LTE_SPECTRUM_VALUE_HELPER_H */
|