A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~ThreeGppSpectrumPropagationLossModel () override
 Destructor.
 
Ptr< SpectrumSignalParametersDoCalcRxPowerSpectralDensity (Ptr< const SpectrumSignalParameters > spectrumSignalParams, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
 Computes the received PSD.
 
void DoDispose () override
 Destructor implementation.
 
Ptr< MatrixBasedChannelModelGetChannelModel () const
 Get the channel model object.
 
void GetChannelModelAttribute (const std::string &name, AttributeValue &value) const
 Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
 
void SetChannelModel (Ptr< MatrixBasedChannelModel > channel)
 Set the channel model object.
 
void SetChannelModelAttribute (const std::string &name, const AttributeValue &value)
 Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
 
- Public Member Functions inherited from ns3::PhasedArraySpectrumPropagationLossModel
 PhasedArraySpectrumPropagationLossModel ()
 
 ~PhasedArraySpectrumPropagationLossModel () override
 
int64_t AssignStreams (int64_t stream)
 If this loss model uses objects of type RandomVariableStream, set the stream numbers to the integers starting with the offset 'stream'.
 
Ptr< SpectrumSignalParametersCalcRxPowerSpectralDensity (Ptr< const SpectrumSignalParameters > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
 This method is to be called to calculate.
 
Ptr< PhasedArraySpectrumPropagationLossModelGetNext () const
 Return the pointer to the next PhasedArraySpectrumPropagationLossModel, if any.
 
void SetNext (Ptr< PhasedArraySpectrumPropagationLossModel > next)
 Used to chain various instances of PhasedArraySpectrumPropagationLossModel.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

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

Protected Member Functions

Ptr< SpectrumSignalParametersCalcBeamformingGain (Ptr< const SpectrumSignalParameters > params, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, const Vector &sSpeed, const Vector &uSpeed, uint8_t numTxPorts, uint8_t numRxPorts, bool isReverse) const
 Computes the beamforming gain and applies it to the TX PSD.
 
Ptr< const MatrixBasedChannelModel::Complex3DVectorCalcLongTerm (Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt) const
 Computes the long term component.
 
std::complex< doubleCalculateLongTermComponent (Ptr< const MatrixBasedChannelModel::ChannelMatrix > params, Ptr< const PhasedArrayModel > sAnt, Ptr< const PhasedArrayModel > uAnt, uint16_t sPortIdx, uint16_t uPortIdx, uint16_t cIndex) const
 Computes a longTerm component from a specific port of s device to the specific port of u device and for a specific cluster index.
 
int64_t DoAssignStreams (int64_t stream) override
 Assign a fixed random variable stream number to the random variables used by this model.
 
Ptr< MatrixBasedChannelModel::Complex3DVectorGenSpectrumChannelMatrix (Ptr< SpectrumValue > inPsd, Ptr< const MatrixBasedChannelModel::Complex3DVector > longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, PhasedArrayModel::ComplexVector doppler, uint8_t numTxPorts, uint8_t numRxPorts, bool isReverse) const
 Computes the frequency-domain channel matrix with the dimensions numRxPorts*numTxPorts*numRBs.
 
double GetFrequency () const
 Get the operating frequency.
 
Ptr< const MatrixBasedChannelModel::Complex3DVectorGetLongTerm (Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
 Looks for the long term component in m_longTermMap.
 
virtual int64_t DoAssignStreams (int64_t stream)=0
 Assign a fixed random variable stream number to the random variables used by this model.
 
void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Protected Attributes

Ptr< MatrixBasedChannelModelm_channelModel
 the model to generate the channel matrix
 
std::unordered_map< uint64_t, Ptr< const LongTerm > > m_longTermMap
 map containing the long term components
 

Friends

class ::ThreeGppCalcLongTermMultiPortTest
 
class ::ThreeGppMimoPolarizationTest
 

Additional Inherited Members

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

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

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

Constructor & Destructor Documentation

◆ ThreeGppSpectrumPropagationLossModel()

ns3::ThreeGppSpectrumPropagationLossModel::ThreeGppSpectrumPropagationLossModel ( )

Constructor.

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

References NS_LOG_FUNCTION.

◆ ~ThreeGppSpectrumPropagationLossModel()

ns3::ThreeGppSpectrumPropagationLossModel::~ThreeGppSpectrumPropagationLossModel ( )
override

Destructor.

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

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CalcBeamformingGain()

Ptr< SpectrumSignalParameters > ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain ( Ptr< const SpectrumSignalParameters params,
Ptr< const MatrixBasedChannelModel::Complex3DVector longTerm,
Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
Ptr< const MatrixBasedChannelModel::ChannelParams channelParams,
const Vector &  sSpeed,
const Vector &  uSpeed,
uint8_t  numTxPorts,
uint8_t  numRxPorts,
bool  isReverse 
) const
protected

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

Parameters
paramsSpectrumSignalParameters holding TX PSD
longTermthe long term component
channelMatrixthe channel matrix structure
channelParamsthe channel params structure
sSpeedthe speed of the first node
uSpeedthe speed of the second node
numTxPortsthe number of the ports of the first node
numRxPortsthe number of the porst of the second node
isReverseindicator that tells whether the channel matrix is reverse
Returns

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

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, GenSpectrumChannelMatrix(), GetFrequency(), ns3::ValArray< T >::GetNumRows(), ns3::Time::GetSeconds(), ns3::ValArray< T >::GetSize(), ns3::MatrixArray< T >::HermitianTranspose(), ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, 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()

Ptr< const MatrixBasedChannelModel::Complex3DVector > ns3::ThreeGppSpectrumPropagationLossModel::CalcLongTerm ( Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
Ptr< const PhasedArrayModel sAnt,
Ptr< const PhasedArrayModel uAnt 
) const
protected

Computes the long term component.

Parameters
channelMatrixthe channel matrix H
sAntthe pointer to the antenna of the s device
uAntthe pointer to the antenna of the u device
Returns
the long term component

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

References CalculateLongTermComponent(), ns3::ValArray< T >::GetSize(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by GetLongTerm().

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

◆ CalculateLongTermComponent()

std::complex< double > ns3::ThreeGppSpectrumPropagationLossModel::CalculateLongTermComponent ( Ptr< const MatrixBasedChannelModel::ChannelMatrix params,
Ptr< const PhasedArrayModel sAnt,
Ptr< const PhasedArrayModel uAnt,
uint16_t  sPortIdx,
uint16_t  uPortIdx,
uint16_t  cIndex 
) const
protected

Computes a longTerm component from a specific port of s device to the specific port of u device and for a specific cluster index.

Parameters
paramsThe params that include the channel matrix
sAntpointer to first antenna
uAntuAnt pointer to second antenna
sPortIdxthe port index of the s device
uPortIdxthe port index of the u device
cIndexthe cluster index
Returns
longTerm component for port pair and for a specific cluster index

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

References NS_LOG_FUNCTION.

Referenced by CalcLongTerm().

+ Here is the caller graph for this function:

◆ DoAssignStreams()

int64_t ns3::ThreeGppSpectrumPropagationLossModel::DoAssignStreams ( int64_t  stream)
overrideprotectedvirtual

Assign a fixed random variable stream number to the random variables used by this model.

Subclasses must implement this; those not using random variables can return zero.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implements ns3::PhasedArraySpectrumPropagationLossModel.

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

◆ DoCalcRxPowerSpectralDensity()

Ptr< SpectrumSignalParameters > ns3::ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity ( Ptr< const SpectrumSignalParameters spectrumSignalParams,
Ptr< const MobilityModel a,
Ptr< const MobilityModel b,
Ptr< const PhasedArrayModel aPhasedArrayModel,
Ptr< const PhasedArrayModel bPhasedArrayModel 
) 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
spectrumSignalParamsspectrum signal tx parameters
afirst node mobility model
bsecond node mobility model
aPhasedArrayModelthe antenna array of the first node
bPhasedArrayModelthe antenna array of the second node
Returns
the received PSD

Implements ns3::PhasedArraySpectrumPropagationLossModel.

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

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

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::ThreeGppSpectrumPropagationLossModel::DoDispose ( )
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::PhasedArraySpectrumPropagationLossModel.

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

References m_channelModel, and m_longTermMap.

◆ GenSpectrumChannelMatrix()

Ptr< MatrixBasedChannelModel::Complex3DVector > ns3::ThreeGppSpectrumPropagationLossModel::GenSpectrumChannelMatrix ( Ptr< SpectrumValue inPsd,
Ptr< const MatrixBasedChannelModel::Complex3DVector longTerm,
Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
Ptr< const MatrixBasedChannelModel::ChannelParams channelParams,
PhasedArrayModel::ComplexVector  doppler,
uint8_t  numTxPorts,
uint8_t  numRxPorts,
bool  isReverse 
) const
protected

Computes the frequency-domain channel matrix with the dimensions numRxPorts*numTxPorts*numRBs.

Parameters
inPsdthe input PSD
longTermthe long term component
channelMatrixthe channel matrix structure
channelParamsthe channel parameters, including delays
dopplerthe doppler for each cluster
numTxPortsthe number of antenna ports at the transmitter
numRxPortsthe number of antenna ports at the receiver
isReversetrue if params and longTerm were computed with RX->TX switched
Returns
3D spectrum channel matrix with dimensions numRxPorts * numTxPorts * numRBs

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

Referenced by CalcBeamformingGain().

+ Here is the caller graph for this function:

◆ 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 87 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
valuewhere the result should be stored

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

References m_channelModel.

◆ GetFrequency()

double ns3::ThreeGppSpectrumPropagationLossModel::GetFrequency ( ) const
protected

Get the operating frequency.

Returns
the operating frequency in Hz

Definition at line 93 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()

Ptr< const MatrixBasedChannelModel::Complex3DVector > ns3::ThreeGppSpectrumPropagationLossModel::GetLongTerm ( Ptr< const MatrixBasedChannelModel::ChannelMatrix channelMatrix,
Ptr< const PhasedArrayModel aPhasedArrayModel,
Ptr< const PhasedArrayModel bPhasedArrayModel 
) const
protected

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
channelMatrixthe channel matrix
aPhasedArrayModelthe antenna array of the tx device
bPhasedArrayModelthe antenna array of the rx device
Returns
vector containing the long term component for each cluster

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

References CalcLongTerm(), ns3::MatrixBasedChannelModel::GetKey(), m_longTermMap, 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 ( )
static

Get the type ID.

Returns
the object TypeId

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

References GetChannelModel(), 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 81 of file three-gpp-spectrum-propagation-loss-model.cc.

References 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 101 of file three-gpp-spectrum-propagation-loss-model.cc.

References m_channelModel.

Friends And Related Function Documentation

◆ ::ThreeGppCalcLongTermMultiPortTest

◆ ::ThreeGppMimoPolarizationTest

friend class ::ThreeGppMimoPolarizationTest
friend

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

Member Data Documentation

◆ m_channelModel

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

◆ m_longTermMap

std::unordered_map<uint64_t, Ptr<const LongTerm> > ns3::ThreeGppSpectrumPropagationLossModel::m_longTermMap
mutableprotected

map containing the long term components

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

Referenced by DoDispose(), and GetLongTerm().


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