A Discrete-Event Network Simulator
API
three-gpp-spectrum-propagation-loss-model.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering,
4  * New York University
5  * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
6  * University of Padova
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation;
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */
21 
22 #ifndef THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
23 #define THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
24 
25 #include "ns3/spectrum-propagation-loss-model.h"
26 #include <complex.h>
27 #include <map>
28 #include <unordered_map>
29 #include "ns3/matrix-based-channel-model.h"
30 #include "ns3/random-variable-stream.h"
31 
32 namespace ns3 {
33 
34 class NetDevice;
35 class ChannelConditionModel;
36 class ChannelCondition;
37 
53 {
54 public:
59 
64 
65  void DoDispose () override;
66 
71  static TypeId GetTypeId ();
72 
78 
84 
91 
92 
99  void SetChannelModelAttribute (const std::string &name, const AttributeValue &value);
100 
107  void GetChannelModelAttribute (const std::string &name, AttributeValue &value) const;
108 
131  Ptr<const MobilityModel> b) const override;
132 
133 private:
137  struct LongTerm : public SimpleRefCount<LongTerm>
138  {
143  };
144 
149  double GetFrequency () const;
150 
162  PhasedArrayModel::ComplexVector GetLongTerm (uint32_t aId, uint32_t bId,
165  const PhasedArrayModel::ComplexVector &bW) const;
175  const PhasedArrayModel::ComplexVector &uW) const;
176 
189  const Vector &sSpeed, const Vector &uSpeed) const;
190 
191  std::unordered_map <uint32_t, Ptr<const PhasedArrayModel> > m_deviceAntennaMap;
192  mutable std::unordered_map < uint32_t, Ptr<const LongTerm> > m_longTermMap;
194 
195  // Variable used to compute the additional Doppler contribution for the delayed
196  // (reflected) paths, as described in 3GPP TR 37.885 v15.3.0, Sec. 6.2.3.
197  double m_vScatt;
199 };
200 } // namespace ns3
201 
202 #endif /* THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::ThreeGppSpectrumPropagationLossModel::GetChannelModelAttribute
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Definition: three-gpp-spectrum-propagation-loss-model.cc:119
ns3::ThreeGppSpectrumPropagationLossModel::AddDevice
void AddDevice(Ptr< NetDevice > n, Ptr< const PhasedArrayModel > a)
Add a device-antenna pair.
Definition: three-gpp-spectrum-propagation-loss-model.cc:98
ns3::ThreeGppSpectrumPropagationLossModel::ThreeGppSpectrumPropagationLossModel
ThreeGppSpectrumPropagationLossModel()
Constructor.
Definition: three-gpp-spectrum-propagation-loss-model.cc:41
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain
Ptr< SpectrumValue > CalcBeamformingGain(Ptr< SpectrumValue > txPsd, PhasedArrayModel::ComplexVector longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > params, const Vector &sSpeed, const Vector &uSpeed) const
Computes the beamforming gain and applies it to the tx PSD.
Definition: three-gpp-spectrum-propagation-loss-model.cc:158
ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_longTerm
PhasedArrayModel::ComplexVector m_longTerm
vector containing the long term component for each cluster
Definition: three-gpp-spectrum-propagation-loss-model.h:139
ns3::ThreeGppSpectrumPropagationLossModel::DoDispose
void DoDispose() override
Destructor implementation.
Definition: three-gpp-spectrum-propagation-loss-model.cc:53
ns3::AttributeValue
Hold a value for an Attribute.
Definition: attribute.h:69
third.channel
channel
Definition: third.py:92
ns3::ThreeGppSpectrumPropagationLossModel::SetChannelModel
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
Definition: three-gpp-spectrum-propagation-loss-model.cc:86
ns3::SimpleRefCount
A template-based reference counting class.
Definition: simple-ref-count.h:74
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition: spectrum-propagation-loss-model.h:45
ns3::ThreeGppSpectrumPropagationLossModel::~ThreeGppSpectrumPropagationLossModel
~ThreeGppSpectrumPropagationLossModel()
Destructor.
Definition: three-gpp-spectrum-propagation-loss-model.cc:47
ns3::ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the received PSD.
Definition: three-gpp-spectrum-propagation-loss-model.cc:299
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::ThreeGppSpectrumPropagationLossModel::m_longTermMap
std::unordered_map< uint32_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
Definition: three-gpp-spectrum-propagation-loss-model.h:192
ns3::ThreeGppSpectrumPropagationLossModel::GetLongTerm
PhasedArrayModel::ComplexVector GetLongTerm(uint32_t aId, uint32_t bId, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &aW, const PhasedArrayModel::ComplexVector &bW) const
Looks for the long term component in m_longTermMap.
Definition: three-gpp-spectrum-propagation-loss-model.cc:230
ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_sW
PhasedArrayModel::ComplexVector m_sW
the beamforming vector for the node s used to compute the long term
Definition: three-gpp-spectrum-propagation-loss-model.h:141
ns3::ThreeGppSpectrumPropagationLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: three-gpp-spectrum-propagation-loss-model.cc:62
ns3::ThreeGppSpectrumPropagationLossModel::m_uniformRv
Ptr< UniformRandomVariable > m_uniformRv
uniform random variable, used to compute the additional Doppler contribution
Definition: three-gpp-spectrum-propagation-loss-model.h:198
ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_uW
PhasedArrayModel::ComplexVector m_uW
the beamforming vector for the node u used to compute the long term
Definition: three-gpp-spectrum-propagation-loss-model.h:142
ns3::ThreeGppSpectrumPropagationLossModel::CalcLongTerm
PhasedArrayModel::ComplexVector CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &sW, const PhasedArrayModel::ComplexVector &uW) const
Computes the long term component.
Definition: three-gpp-spectrum-propagation-loss-model.cc:125
ns3::ThreeGppSpectrumPropagationLossModel::GetFrequency
double GetFrequency() const
Get the operating frequency.
Definition: three-gpp-spectrum-propagation-loss-model.cc:105
ns3::ThreeGppSpectrumPropagationLossModel::m_vScatt
double m_vScatt
value used to compute the additional Doppler contribution for the delayed paths
Definition: three-gpp-spectrum-propagation-loss-model.h:197
ns3::ThreeGppSpectrumPropagationLossModel::LongTerm
Data structure that stores the long term component for a tx-rx pair.
Definition: three-gpp-spectrum-propagation-loss-model.h:138
ns3::ThreeGppSpectrumPropagationLossModel::m_channelModel
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
Definition: three-gpp-spectrum-propagation-loss-model.h:193
ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_channel
Ptr< const MatrixBasedChannelModel::ChannelMatrix > m_channel
pointer to the channel matrix used to compute the long term
Definition: three-gpp-spectrum-propagation-loss-model.h:140
ns3::ThreeGppSpectrumPropagationLossModel::m_deviceAntennaMap
std::unordered_map< uint32_t, Ptr< const PhasedArrayModel > > m_deviceAntennaMap
map containig the <node, antenna> associations
Definition: three-gpp-spectrum-propagation-loss-model.h:191
ns3::ThreeGppSpectrumPropagationLossModel
3GPP Spectrum Propagation Loss Model
Definition: three-gpp-spectrum-propagation-loss-model.h:53
ns3::PhasedArrayModel::ComplexVector
std::vector< std::complex< double > > ComplexVector
type definition for complex vectors
Definition: phased-array-model.h:54
ns3::ThreeGppSpectrumPropagationLossModel::SetChannelModelAttribute
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Definition: three-gpp-spectrum-propagation-loss-model.cc:113
ns3::ThreeGppSpectrumPropagationLossModel::GetChannelModel
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
Definition: three-gpp-spectrum-propagation-loss-model.cc:92
sample-rng-plot.n
n
Definition: sample-rng-plot.py:37