A Discrete-Event Network Simulator
API
ns3::MatrixBasedChannelModel Class Referenceabstract

This is an interface for a channel model that can be described by a channel matrix, e.g., the 3GPP Spatial Channel Models, which is generally used in combination with antenna arrays. More...

#include "matrix-based-channel-model.h"

+ Inheritance diagram for ns3::MatrixBasedChannelModel:
+ Collaboration diagram for ns3::MatrixBasedChannelModel:

Classes

struct  ChannelMatrix
 Data structure that stores a channel realization. More...
 

Public Types

typedef std::vector< ThreeGppAntennaArrayModel::ComplexVectorComplex2DVector
 type definition for complex matrices More...
 
typedef std::vector< Complex2DVectorComplex3DVector
 type definition for complex 3D matrices More...
 
typedef std::vector< DoubleVectorDouble2DVector
 type definition for matrices of doubles More...
 
typedef std::vector< Double2DVectorDouble3DVector
 type definition for 3D matrices of doubles More...
 
typedef std::vector< double > DoubleVector
 type definition for vectors of doubles More...
 

Public Member Functions

virtual ~MatrixBasedChannelModel ()
 Destructor for MatrixBasedChannelModel. More...
 
virtual Ptr< const ChannelMatrixGetChannel (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const ThreeGppAntennaArrayModel > aAntenna, Ptr< const ThreeGppAntennaArrayModel > bAntenna)=0
 Returns a matrix with a realization of the channel between the nodes with mobility objects passed as input parameters. 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 constexpr uint32_t GetKey (uint32_t x1, uint32_t x2)
 Calculate the channel key using the Cantor function. 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...
 

Static Public Attributes

static const uint8_t AOA_INDEX = 0
 index of the AOA value in the m_angle array More...
 
static const uint8_t AOD_INDEX = 2
 index of the AOD value in the m_angle array More...
 
static const uint8_t ZOA_INDEX = 1
 index of the ZOA value in the m_angle array More...
 
static const uint8_t ZOD_INDEX = 3
 index of the ZOD value in the m_angle array More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. 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

This is an interface for a channel model that can be described by a channel matrix, e.g., the 3GPP Spatial Channel Models, which is generally used in combination with antenna arrays.

Definition at line 43 of file matrix-based-channel-model.h.

Member Typedef Documentation

◆ Complex2DVector

type definition for complex matrices

Definition at line 54 of file matrix-based-channel-model.h.

◆ Complex3DVector

type definition for complex 3D matrices

Definition at line 55 of file matrix-based-channel-model.h.

◆ Double2DVector

type definition for matrices of doubles

Definition at line 52 of file matrix-based-channel-model.h.

◆ Double3DVector

type definition for 3D matrices of doubles

Definition at line 53 of file matrix-based-channel-model.h.

◆ DoubleVector

typedef std::vector<double> ns3::MatrixBasedChannelModel::DoubleVector

type definition for vectors of doubles

Definition at line 51 of file matrix-based-channel-model.h.

Constructor & Destructor Documentation

◆ ~MatrixBasedChannelModel()

ns3::MatrixBasedChannelModel::~MatrixBasedChannelModel ( )
virtual

Destructor for MatrixBasedChannelModel.

Definition at line 26 of file matrix-based-channel-model.cc.

Member Function Documentation

◆ GetChannel()

virtual Ptr<const ChannelMatrix> ns3::MatrixBasedChannelModel::GetChannel ( Ptr< const MobilityModel aMob,
Ptr< const MobilityModel bMob,
Ptr< const ThreeGppAntennaArrayModel aAntenna,
Ptr< const ThreeGppAntennaArrayModel bAntenna 
)
pure virtual

Returns a matrix with a realization of the channel between the nodes with mobility objects passed as input parameters.

We assume channel reciprocity between each node pair (i.e., H_ab = H_ba^T), therefore GetChannel (a, b) and GetChannel (b, a) will return the same ChannelMatrix object. To understand if the channel matrix corresponds to H_ab or H_ba, we provide the method ChannelMatrix::IsReverse. For instance, if the channel matrix corresponds to H_ab, a call to IsReverse (idA, idB) will return false, conversely, IsReverse (idB, idA) will return true.

Parameters
aMobmobility model of the a device
bMobmobility model of the b device
aAntennaantenna of the a device
bAntennaantenna of the b device
Returns
the channel matrix

Implemented in ns3::ThreeGppChannelModel.

◆ GetKey()

static constexpr uint32_t ns3::MatrixBasedChannelModel::GetKey ( uint32_t  x1,
uint32_t  x2 
)
inlinestatic

Calculate the channel key using the Cantor function.

Parameters
x1first value
x2second value
Returns
$ (((x1 + x2) * (x1 + x2 + 1))/2) + x2; $

Definition at line 120 of file matrix-based-channel-model.h.

Referenced by ns3::ThreeGppChannelModel::GetChannel(), and ns3::ThreeGppSpectrumPropagationLossModel::GetLongTerm().

+ Here is the caller graph for this function:

Member Data Documentation

◆ AOA_INDEX

const uint8_t ns3::MatrixBasedChannelModel::AOA_INDEX = 0
static

index of the AOA value in the m_angle array

Definition at line 125 of file matrix-based-channel-model.h.

Referenced by ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain().

◆ AOD_INDEX

const uint8_t ns3::MatrixBasedChannelModel::AOD_INDEX = 2
static

index of the AOD value in the m_angle array

Definition at line 127 of file matrix-based-channel-model.h.

Referenced by ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain().

◆ ZOA_INDEX

const uint8_t ns3::MatrixBasedChannelModel::ZOA_INDEX = 1
static

index of the ZOA value in the m_angle array

Definition at line 126 of file matrix-based-channel-model.h.

Referenced by ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain().

◆ ZOD_INDEX

const uint8_t ns3::MatrixBasedChannelModel::ZOD_INDEX = 3
static

index of the ZOD value in the m_angle array

Definition at line 128 of file matrix-based-channel-model.h.

Referenced by ns3::ThreeGppSpectrumPropagationLossModel::CalcBeamformingGain().


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