A Discrete-Event Network Simulator
API
ns3::ThreeGppSpectrumPropagationLossModel Class Reference

3GPP Spectrum Propagation Loss Model More...

#include "three-gpp-spectrum-propagation-loss-model.h"

+ Inheritance diagram for ns3::ThreeGppSpectrumPropagationLossModel:
+ Collaboration diagram for ns3::ThreeGppSpectrumPropagationLossModel:

Classes

struct  LongTerm
 Data structure that stores the long term component for a tx-rx pair. More...
 

Public Member Functions

 ThreeGppSpectrumPropagationLossModel ()
 Constructor. More...
 
 ~ThreeGppSpectrumPropagationLossModel ()
 Destructor. More...
 
void AddDevice (Ptr< NetDevice > n, Ptr< const PhasedArrayModel > a)
 Add a device-antenna pair. More...
 
Ptr< SpectrumValueDoCalcRxPowerSpectralDensity (Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
 Computes the received PSD. More...
 
void DoDispose () override
 Destructor implementation. More...
 
Ptr< MatrixBasedChannelModelGetChannelModel () const
 Get the channel model object. More...
 
void GetChannelModelAttribute (const std::string &name, AttributeValue &value) const
 Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance. More...
 
void SetChannelModel (Ptr< MatrixBasedChannelModel > channel)
 Set the channel model object. More...
 
void SetChannelModelAttribute (const std::string &name, const AttributeValue &value)
 Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance. More...
 
- Public Member Functions inherited from ns3::SpectrumPropagationLossModel
 SpectrumPropagationLossModel ()
 
virtual ~SpectrumPropagationLossModel ()
 
Ptr< SpectrumValueCalcRxPowerSpectralDensity (Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
 This method is to be called to calculate. More...
 
void SetNext (Ptr< SpectrumPropagationLossModel > next)
 Used to chain various instances of SpectrumPropagationLossModel. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject () const
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::SpectrumPropagationLossModel
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

Ptr< SpectrumValueCalcBeamformingGain (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. More...
 
PhasedArrayModel::ComplexVector CalcLongTerm (Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &sW, const PhasedArrayModel::ComplexVector &uW) const
 Computes the long term component. More...
 
double GetFrequency () const
 Get the operating frequency. More...
 
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. More...
 

Private Attributes

Ptr< MatrixBasedChannelModelm_channelModel
 the model to generate the channel matrix More...
 
std::unordered_map< uint32_t, Ptr< const PhasedArrayModel > > m_deviceAntennaMap
 map containig the <node, antenna> associations More...
 
std::unordered_map< uint32_t, Ptr< const LongTerm > > m_longTermMap
 map containing the long term components More...
 
Ptr< UniformRandomVariablem_uniformRv
 uniform random variable, used to compute the additional Doppler contribution More...
 
double m_vScatt
 value used to compute the additional Doppler contribution for the delayed paths More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

3GPP Spectrum Propagation Loss Model


Introspection did not find any typical Config paths.

This class models the frequency dependent propagation phenomena in the way described by 3GPP TR 38.901 document. The main method is DoCalcRxPowerSpectralDensity, which takes as input the power spectral density (PSD) of the transmitted signal, the mobility models of the transmitting node and receiving node, and returns the PSD of the received signal.

See also
MatrixBasedChannelModel
PhasedArrayModel
ChannelCondition


Attributes

  • ChannelModel: The channel model. It needs to implement the MatrixBasedChannelModel interface
  • vScatt: Maximum speed of the vehicle in the layout (see 3GPP TR 37.885 v15.3.0, Sec. 6.2.3).Used to compute the additional contribution for the Doppler ofdelayed (reflected) paths
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 0
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 176 bytes (on a 64-bit architecture).

Definition at line 52 of file three-gpp-spectrum-propagation-loss-model.h.

Constructor & Destructor Documentation

◆ ThreeGppSpectrumPropagationLossModel()

ns3::ThreeGppSpectrumPropagationLossModel::ThreeGppSpectrumPropagationLossModel ( )

Constructor.

Definition at line 41 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_uniformRv, and NS_LOG_FUNCTION.

◆ ~ThreeGppSpectrumPropagationLossModel()

ns3::ThreeGppSpectrumPropagationLossModel::~ThreeGppSpectrumPropagationLossModel ( )

Destructor.

Definition at line 47 of file three-gpp-spectrum-propagation-loss-model.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddDevice()

void ns3::ThreeGppSpectrumPropagationLossModel::AddDevice ( Ptr< NetDevice n,
Ptr< const PhasedArrayModel a 
)

Add a device-antenna pair.

Parameters
na pointer to the NetDevice
aa pointer to the associated PhasedArrayModel

Definition at line 98 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_deviceAntennaMap, sample-rng-plot::n, and NS_ASSERT_MSG.

◆ CalcBeamformingGain()

Ptr< SpectrumValue > ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain ( Ptr< SpectrumValue txPsd,
PhasedArrayModel::ComplexVector  longTerm,
Ptr< const MatrixBasedChannelModel::ChannelMatrix params,
const Vector &  sSpeed,
const Vector &  uSpeed 
) const
private

Computes the beamforming gain and applies it to the tx PSD.

Parameters
txPsdthe tx PSD
longTermthe long term component
paramsThe channel matrix
sSpeedspeed of the first node
uSpeedspeed of the second node
Returns
the rx PSD

Definition at line 158 of file three-gpp-spectrum-propagation-loss-model.cc.

References sample-rng-plot::alpha, ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ns3::SpectrumValue::ConstBandsBegin(), GetFrequency(), ns3::Time::GetSeconds(), ns3::UniformRandomVariable::GetValue(), m_uniformRv, m_vScatt, MRG32k3a::norm, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::SpectrumValue::ValuesBegin(), ns3::SpectrumValue::ValuesEnd(), ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by DoCalcRxPowerSpectralDensity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcLongTerm()

PhasedArrayModel::ComplexVector ns3::ThreeGppSpectrumPropagationLossModel::CalcLongTerm ( Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
const PhasedArrayModel::ComplexVector sW,
const PhasedArrayModel::ComplexVector uW 
) const
private

Computes the long term component.

Parameters
channelMatrixthe channel matrix H
sWthe beamforming vector of the s device
uWthe beamforming vector of the u device
Returns
the long term component

Definition at line 125 of file three-gpp-spectrum-propagation-loss-model.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by GetLongTerm().

+ Here is the caller graph for this function:

◆ DoCalcRxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity ( Ptr< const SpectrumValue txPsd,
Ptr< const MobilityModel a,
Ptr< const MobilityModel b 
) const
overridevirtual

Computes the received PSD.

This function computes the received PSD by applying the 3GPP fast fading model and the beamforming gain. In particular, it retrieves the matrix representing the channel between node a and node b, computes the corresponding long term component, i.e., the product between the cluster matrices and the TX and RX beamforming vectors (w_rx^T H^n_ab w_tx), and accounts for the Doppler component and the propagation delay. To reduce the computational load, the long term component associated with a certain channel is cached and recomputed only when the channel realization is updated, or when the beamforming vectors change.

Parameters
txPsdtx PSD
afirst node mobility model
bsecond node mobility model
Returns
the received PSD

Implements ns3::SpectrumPropagationLossModel.

Definition at line 299 of file three-gpp-spectrum-propagation-loss-model.cc.

References CalcBeamformingGain(), GetLongTerm(), m_channelModel, m_deviceAntennaMap, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ThreeGppSpectrumPropagationLossModelTest::CheckLongTermUpdate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::ThreeGppSpectrumPropagationLossModel::DoDispose ( void  )
overridevirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::SpectrumPropagationLossModel.

Definition at line 53 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_channelModel, m_deviceAntennaMap, and m_longTermMap.

◆ GetChannelModel()

Ptr< MatrixBasedChannelModel > ns3::ThreeGppSpectrumPropagationLossModel::GetChannelModel ( ) const

Get the channel model object.

Returns
a pointer to the object implementing the MatrixBasedChannelModel interface

Definition at line 92 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_channelModel.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetChannelModelAttribute()

void ns3::ThreeGppSpectrumPropagationLossModel::GetChannelModelAttribute ( const std::string &  name,
AttributeValue value 
) const

Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.

Parameters
namename of the attribute
wherethe result should be stored

Definition at line 119 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_channelModel.

◆ GetFrequency()

double ns3::ThreeGppSpectrumPropagationLossModel::GetFrequency ( void  ) const
private

Get the operating frequency.

Returns
the operating frequency in Hz

Definition at line 105 of file three-gpp-spectrum-propagation-loss-model.cc.

References ns3::DoubleValue::Get(), and m_channelModel.

Referenced by CalcBeamformingGain().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLongTerm()

PhasedArrayModel::ComplexVector ns3::ThreeGppSpectrumPropagationLossModel::GetLongTerm ( uint32_t  aId,
uint32_t  bId,
Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
const PhasedArrayModel::ComplexVector aW,
const PhasedArrayModel::ComplexVector bW 
) const
private

Looks for the long term component in m_longTermMap.

If found, checks whether it has to be updated. If not found or if it has to be updated, calls the method CalcLongTerm to compute it.

Parameters
aIdid of the first node
bIdid of the second node
channelMatrixthe channel matrix
aWthe beamforming vector of the first device
bWthe beamforming vector of the second device
Returns
vector containing the long term compoenent for each cluster

Definition at line 230 of file three-gpp-spectrum-propagation-loss-model.cc.

References CalcLongTerm(), ns3::MatrixBasedChannelModel::GetKey(), ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_channel, ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_longTerm, m_longTermMap, ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_sW, ns3::ThreeGppSpectrumPropagationLossModel::LongTerm::m_uW, max, min, and NS_LOG_DEBUG.

Referenced by DoCalcRxPowerSpectralDensity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::ThreeGppSpectrumPropagationLossModel::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 62 of file three-gpp-spectrum-propagation-loss-model.cc.

References GetChannelModel(), m_vScatt, ns3::MakeDoubleAccessor(), ns3::MakePointerAccessor(), SetChannelModel(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ SetChannelModel()

void ns3::ThreeGppSpectrumPropagationLossModel::SetChannelModel ( Ptr< MatrixBasedChannelModel channel)

Set the channel model object.

Parameters
channela pointer to an object implementing the MatrixBasedChannelModel interface

Definition at line 86 of file three-gpp-spectrum-propagation-loss-model.cc.

References third::channel, and m_channelModel.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetChannelModelAttribute()

void ns3::ThreeGppSpectrumPropagationLossModel::SetChannelModelAttribute ( const std::string &  name,
const AttributeValue value 
)

Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.

Parameters
namename of the attribute
valuethe attribute value

Definition at line 113 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_channelModel.

Member Data Documentation

◆ m_channelModel

Ptr<MatrixBasedChannelModel> ns3::ThreeGppSpectrumPropagationLossModel::m_channelModel
private

◆ m_deviceAntennaMap

std::unordered_map<uint32_t, Ptr<const PhasedArrayModel> > ns3::ThreeGppSpectrumPropagationLossModel::m_deviceAntennaMap
private

map containig the <node, antenna> associations

Definition at line 191 of file three-gpp-spectrum-propagation-loss-model.h.

Referenced by AddDevice(), DoCalcRxPowerSpectralDensity(), and DoDispose().

◆ m_longTermMap

std::unordered_map< uint32_t, Ptr<const LongTerm> > ns3::ThreeGppSpectrumPropagationLossModel::m_longTermMap
mutableprivate

map containing the long term components

Definition at line 192 of file three-gpp-spectrum-propagation-loss-model.h.

Referenced by DoDispose(), and GetLongTerm().

◆ m_uniformRv

Ptr<UniformRandomVariable> ns3::ThreeGppSpectrumPropagationLossModel::m_uniformRv
private

uniform random variable, used to compute the additional Doppler contribution

Definition at line 198 of file three-gpp-spectrum-propagation-loss-model.h.

Referenced by CalcBeamformingGain(), and ThreeGppSpectrumPropagationLossModel().

◆ m_vScatt

double ns3::ThreeGppSpectrumPropagationLossModel::m_vScatt
private

value used to compute the additional Doppler contribution for the delayed paths

Definition at line 197 of file three-gpp-spectrum-propagation-loss-model.h.

Referenced by CalcBeamformingGain(), and GetTypeId().


The documentation for this class was generated from the following files: