A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::ThreeGppChannelModel Class Reference

ThreeGppChannelModel extends MatrixBasedChannelModel and represents a channel model based on 3GPP specifications, including functionality for managing channel conditions, scenarios, and frequency requirements. More...

#include "three-gpp-channel-model.h"

Inheritance diagram for ns3::ThreeGppChannelModel:
Collaboration diagram for ns3::ThreeGppChannelModel:

Classes

struct  LargeScaleParameters
 Large-scale channel parameters (3GPP TR 38.901). More...
struct  ParamsTable
 Data structure that stores the parameters of 3GPP TR 38.901, Table 7.5-6, for a certain scenario. More...
struct  ThreeGppChannelParams
 Extends the struct ChannelParams by including information that is used within the ThreeGppChannelModel class. More...

Public Member Functions

 ThreeGppChannelModel ()
 Constructor.
 ~ThreeGppChannelModel () override
 Destructor.
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
void DoDispose () override
 Destructor implementation.
Ptr< const ChannelMatrixGetChannel (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna) override
 Looks for the channel matrix associated with the aMob and bMob pair in m_channelMatrixMap.
Ptr< ChannelConditionModelGetChannelConditionModel () const
 Get the associated channel condition model.
double GetFrequency () const
 Returns the center frequency.
Ptr< const ChannelParamsGetParams (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const override
 Looks for the channel params associated with the aMob and bMob pair in m_channelParamsMap.
std::string GetScenario () const
 Returns the propagation scenario.
virtual Ptr< const ParamsTableGetThreeGppTable (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const ChannelCondition > channelCondition) const
 Get the parameters needed to apply the channel generation procedure.
void SetChannelConditionModel (Ptr< ChannelConditionModel > model)
 Set the channel condition model.
void SetFrequency (double f)
 Sets the center frequency of the model.
void SetScenario (const std::string &scenario)
 Sets the propagation scenario.
Public Member Functions inherited from ns3::MatrixBasedChannelModel
 ~MatrixBasedChannelModel () override
 Destructor for MatrixBasedChannelModel.
Public Member Functions inherited from ns3::Object
 Object ()
 Caller graph was not generated because of its size.
 ~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 final
 Get the most derived TypeId for this Object.
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
template<typename T>
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) 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.
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.
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, bool permissive=false) 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.
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 std::pair< double, doubleWrapAngles (double azimuthRad, double inclinationRad)
 Wrap an (azimuth, inclination) angle pair in a valid range.
Static Public Member Functions inherited from ns3::MatrixBasedChannelModel
static uint64_t GetKey (uint32_t a, uint32_t b)
 Generate a unique value for the pair of unsigned integer of 32 bits, where the order does not matter, i.e., the same value will be returned for (a,b) and (b,a).
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

void AdjustClusterDelaysForLosCondition (DoubleVector *clusterDelays, const uint8_t reducedClusterNumber, const double kFactor) const
 Adjusts cluster delays for LOS channel condition based on the K-factor.
bool AntennaSetupChanged (Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna, Ptr< const ChannelMatrix > channelMatrix) const
 Check if the channel matrix has to be updated due to changes in the number of antenna ports.
void ApplyAttenuationToClusterPowers (Double2DVector *nonSelfBlocking, DoubleVector *clusterPowers, DoubleVector *attenuation_dB, Ptr< const ThreeGppChannelParams > channelParams, const DoubleVector &clusterAoa, const DoubleVector &clusterZoa, Ptr< const ParamsTable > table3gpp) const
 Applies blockage-based attenuation to the cluster powers according to the 3GPP TR 38.901 blockage model (Section 7.6.4.1).
Vector ApplyVelocityRotation (double alphaRad, double betaRad, double gammaRad, double etaRad, const Vector &speed, const int Xn) const
 Rotate a 3D velocity vector by specified angles, around y-axis and z-axis.
void CalcAttenuationOfBlockage (Double2DVector *nonSelfBlocking, DoubleVector *powerAttenuation, Ptr< const ThreeGppChannelParams > channelParams, const DoubleVector &clusterAOA, const DoubleVector &clusterZOA, Ptr< const ParamsTable > table3gpp) const
 Calculates the per-cluster power attenuation (in dB) due to self-blocking and non-self-blocking effects, based on the 3GPP TR 38.901 blockage model (Section 7.6.4.1).
bool ChannelUpdateNeeded (Ptr< const ThreeGppChannelParams > channelParams, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const
 Check if spatial-consistency requires updating channel parameters.
double ComputeEndpointDisplacement2d (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, const Vector &lastPositionFirst, const Vector &lastPositionSecond) const
 Compute the effective 2D displacement of a link with respect to previously stored endpoint positions.
void ComputeRayAngles (Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ParamsTable > table3gpp, Double2DVector *rayAoaRadian, Double2DVector *rayAodRadian, Double2DVector *rayZoaRadian, Double2DVector *rayZodRadian) const
 Compute per-ray angles (no shuffling), centered on cluster means.
void FindStrongestClusters (Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ParamsTable > table3gpp, uint8_t *cluster1st, uint8_t *cluster2nd, DoubleVector *clusterDelay, Double2DVector *angles, DoubleVector *alpha, DoubleVector *dTerm, DoubleVector *clusterPower) const
 Identify the two strongest base clusters and append their derived subclusters.
Ptr< ThreeGppChannelParamsGenerateChannelParameters (Ptr< const ChannelCondition > channelCondition, Ptr< const ParamsTable > table3gpp, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const
 Prepare 3gpp channel parameters among the nodes a and b.
void GenerateClusterAngles (Ptr< const ThreeGppChannelParams > channelParams, const DoubleVector &clusterPowerForAngles, double powerMax, double cPhi, double cTheta, const LargeScaleParameters &lsps, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const ParamsTable > table3gpp, Double2DVector *clusterAngles) const
 Generate cluster angles for a 3GPP channel model based on provided parameters.
void GenerateClusterDelays (const double DS, Ptr< const ParamsTable > table3gpp, double *minTau, DoubleVector *clusterDelays) const
 Generate the cluster delays.
void GenerateClusterPowers (const DoubleVector &clusterDelays, const double DS, Ptr< const ParamsTable > table3gpp, const DoubleVector &clusterShadowing, DoubleVector *clusterPowers) const
 Generate cluster powers.
void GenerateClusterShadowingTerm (Ptr< const ParamsTable > table3gpp, DoubleVector *clusterShadowing) const
 Generate per-cluster shadowing terms (in dB) as specified by 3GPP TR 38.901.
void GenerateClusterXnNLos (const uint8_t clusterNumber, std::vector< int > *clusterSign) const
 Generate a random sign (+1 or -1) for each cluster for XN for NLOS computation for channel consistency updates.
void GenerateCrossPolPowerRatiosAndInitialPhases (Double2DVector *crossPolarizationPowerRatios, Double3DVector *clusterPhase, const uint8_t reducedClusterNumber, Ptr< const ParamsTable > table3gpp) const
 Generate cross-polarization power ratios and initial per-ray phases.
void GenerateDopplerTerms (const uint8_t reducedClusterNumber, DoubleVector *dopplerTermAlpha, DoubleVector *dopplerTermD) const
 Generate additional Doppler terms for delayed (reflected) paths.
LargeScaleParameters GenerateLSPs (const ChannelCondition::LosConditionValue losCondition, Ptr< const ParamsTable > table3gpp) const
 Generate large-scale parameters (LSPs) for the current channel state.
virtual Ptr< ChannelMatrixGetNewChannel (Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ParamsTable > table3gpp, Ptr< const MobilityModel > sMob, Ptr< const MobilityModel > uMob, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna) const
 Compute the channel matrix between two nodes a and b, and their antenna arrays aAntenna and bAntenna using the procedure described in 3GPP TR 38.901.
bool NewChannelMatrixNeeded (uint64_t channelMatrixKey, Ptr< const ThreeGppChannelParams > channelParams, Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna) const
 Check if channel matrix needs update based on parameter changes or the update period expired.
bool NewChannelParamsNeeded (const uint64_t channelParamsKey, Ptr< const ChannelCondition > condition, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const
 Check if the channel params has to be updated.
void PrecomputeAnglesSinCos (Ptr< const ThreeGppChannelParams > channelParams, std::vector< std::vector< std::pair< double, double > > > *cachedAngleSinCos) const
 Precomputes the sine and cosine values for angles.
void RandomRaysCoupling (Ptr< const ThreeGppChannelParams > channelParams, Double2DVector *rayAoaRadian, Double2DVector *rayAodRadian, Double2DVector *rayZoaRadian, Double2DVector *rayZodRadian) const
 Randomly couples rays within each cluster by shuffling per-ray angles.
DoubleVector RemoveWeakClusters (DoubleVector *clusterPowers, DoubleVector *clusterDelays, const ChannelCondition::LosConditionValue losCondition, Ptr< const ParamsTable > table3gpp, const double kFactor, double *powerMax) const
 Remove the clusters with less power.
void ShiftRayAnglesToUpdatedClusterMeans (Ptr< const ParamsTable > table3gpp, Ptr< const ThreeGppChannelParams > channelParams, const Double2DVector &prevClusterAngles, Double2DVector *rayAodRadian, Double2DVector *rayAoaRadian, Double2DVector *rayZodRadian, Double2DVector *rayZoaRadian) const
 Shift per-ray angles to follow updated cluster mean angles while preserving intra-cluster offsets and existing random coupling.
void TrimToBaseClusters (const uint8_t reducedClusterNumber, DoubleVector *delay, Double2DVector *angles, std::vector< std::vector< std::pair< double, double > > > *cachedAngleSincos, DoubleVector *alpha, DoubleVector *dTerm, DoubleVector *clusterPower) const
 Trim per-cluster vectors back to the base (reduced) cluster set.
void UpdateChannelParameters (Ptr< ThreeGppChannelParams > channelParams, Ptr< const ChannelCondition > channelCondition, Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const
 Update channel parameters for spatial consistency using 3GPP TR 38.901 procedure A.
void UpdateClusterAngles (Ptr< const ThreeGppChannelParams > channelParams, Double2DVector *clusterAngles, const DoubleVector &prevClusterDelay) const
 Update cluster angles based on node mobility according to 3GPP TR 38.901.
void UpdateClusterDelay (DoubleVector *clusterDelay, DoubleVector *delayConsistency, Ptr< const ThreeGppChannelParams > channelParams) const
 Updates the cluster delays for the 3GPP channel model based on the channel parameters and consistency requirements.
void UpdateClusterShadowingTerm (Ptr< const ParamsTable > table3gpp, DoubleVector *clusterShadowing, const double displacementLength) const
 Update shadowing per cluster by using the normalized auto correlation function R, which is defined as an exponential function in ITU-R P.1816 and used by 38.901 in 7.4-5 equation for the correlation of shadowing.
void UpdateLinkGeometry (Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, double *distance2D, double *distance3D, double *endpointDisplacement2D, double *relativeDisplacement2D, Vector *lastPositionFirst, Vector *lastPositionSecond, Vector2D *lastRelativePosition2D) const
 Update distance- and displacement-related values between two nodes.
Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
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.

Static Protected Member Functions

static double CalculateCphi (const ChannelCondition::LosConditionValue losCondition, Ptr< const ParamsTable > table3gpp, const double kFactor)
 Calculates the cPhi parameter for azimuth angular spread modeling.
static double CalculateCtheta (const ChannelCondition::LosConditionValue losCondition, Ptr< const ParamsTable > table3gpp, const double kFactor)
 Calculates the cTheta parameter for zenith angular spread modeling.

Protected Attributes

bool m_blockage
 enables the blockage model A
double m_blockerSpeed
 the blocker speed
Ptr< ChannelConditionModelm_channelConditionModel
 the channel condition model
std::unordered_map< uint64_t, Ptr< ChannelMatrix > > m_channelMatrixMap
 map containing the channel realizations per a pair of PhasedAntennaArray instances; the key of this map is reciprocal uniquely identifies a pair of PhasedAntennaArrays
std::unordered_map< uint64_t, Ptr< ThreeGppChannelParams > > m_channelParamsMap
 map containing the common channel parameters per a pair of nodes, the key of this map is reciprocal and uniquely identifies a pair of nodes
double m_frequency
 the operating frequency
Ptr< NormalRandomVariablem_normalRv
 normal random variable
uint16_t m_numNonSelfBlocking
 number of non-self-blocking regions
bool m_portraitMode
 true if portrait mode, false if landscape
std::string m_scenario
 the 3GPP scenario
Ptr< UniformRandomVariablem_uniformRv
 uniform random variable
Ptr< UniformRandomVariablem_uniformRvDoppler
 Uniform random variable, used to compute the additional Doppler contribution.
Ptr< UniformRandomVariablem_uniformRvShuffle
 uniform random variable used to shuffle an array in GetNewChannel
Time m_updatePeriod
 the channel update period enables spatial consistency, procedure A
double m_vScatt
 Variable used to compute the additional Doppler contribution for the delayed (reflected) paths, as described in 3GPP TR 37.885 v15.3.0, Sec.

Static Protected Attributes

static constexpr uint8_t PHI_INDEX = 0
 index of the PHI value in the m_nonSelfBlocking array
static constexpr uint8_t R_INDEX = 4
 index of the R value in the m_nonSelfBlocking array
static constexpr uint8_t THETA_INDEX = 2
 index of the THETA value in the m_nonSelfBlocking array
static constexpr uint8_t X_INDEX = 1
 index of the X value in the m_nonSelfBlocking array
static constexpr uint8_t Y_INDEX = 3
 index of the Y value in the m_nonSelfBlocking array

Additional Inherited Members

Public Types inherited from ns3::MatrixBasedChannelModel
using Complex2DVector = ComplexMatrixArray
 Create an alias for 2D complex vectors.
using Complex3DVector = ComplexMatrixArray
 Create an alias for 3D complex vectors.
using Double2DVector = std::vector<DoubleVector>
 Type definition for matrices of doubles.
using Double3DVector = std::vector<Double2DVector>
 Type definition for 3D matrices of doubles.
using DoubleVector = std::vector<double>
 Type definition for vectors of doubles.
Static Public Attributes inherited from ns3::MatrixBasedChannelModel
static const uint8_t AOA_INDEX = 0
 index of the AOA value in the m_angle array
static const uint8_t AOD_INDEX = 2
 index of the AOD value in the m_angle array
static const uint8_t ZOA_INDEX = 1
 index of the ZOA value in the m_angle array
static const uint8_t ZOD_INDEX = 3
 index of the ZOD value in the m_angle array

Detailed Description

ThreeGppChannelModel extends MatrixBasedChannelModel and represents a channel model based on 3GPP specifications, including functionality for managing channel conditions, scenarios, and frequency requirements.

Introspection did not find any typical Config paths

Attributes

  • Blockage: Enable blockage model A (sec 7.6.4.1)
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • BlockerSpeed: The speed of moving blockers, the unit is m/s
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • ChannelConditionModel: Pointer to the channel condition model
  • Frequency: The operating Frequency in Hz
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 5e+08
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NumNonselfBlocking: number of non-self-blocking regions
    • Set with class: ns3::IntegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 4
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • PortraitMode: true for portrait mode, false for landscape mode
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Scenario: The 3GPP scenario (RMa, UMa, UMi-StreetCanyon, InH-OfficeOpen, InH-OfficeMixed, NTN-DenseUrban, NTN-Urban, NTN-Suburban, NTN-Rural)
    • Set with class: ns3::StringValue
    • Underlying type: std::string
    • Initial value: UMa
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • UpdatePeriod: Spatial-consistency update period. When non-zero, ns-3 attempts to evolve cached channel parameters using update equations aligned with 3GPP TR 38.901 Procedure A (Sec. 7.6.3.2) whenever the channel is evaluated and the period has elapsed. If the 1 m step-size constraint is violated at an update attempt, the model re-generates channel parameters (new realization).
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • 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: constructwriteread
    • Support level: SUPPORTED

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

Definition at line 30 of file three-gpp-channel-model.h.

Constructor & Destructor Documentation

◆ ThreeGppChannelModel()

ns3::ThreeGppChannelModel::ThreeGppChannelModel ( )

Constructor.

Definition at line 1116 of file three-gpp-channel-model.cc.

References ns3::CreateObject(), m_normalRv, m_uniformRv, m_uniformRvDoppler, m_uniformRvShuffle, and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ ~ThreeGppChannelModel()

ns3::ThreeGppChannelModel::~ThreeGppChannelModel ( )
override

Destructor.

Definition at line 1128 of file three-gpp-channel-model.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AdjustClusterDelaysForLosCondition()

void ns3::ThreeGppChannelModel::AdjustClusterDelaysForLosCondition ( DoubleVector * clusterDelays,
const uint8_t reducedClusterNumber,
const double kFactor ) const
protected

Adjusts cluster delays for LOS channel condition based on the K-factor.

This function scales the initial NLOS cluster delays to reflect LOS conditions as described in 3GPP TR 38.901. The delays are normalized using a correction factor cTau that depends on the Rician K-factor, as defined in Table 7.5-3.

The formula used to compute cTau is:

\‍[c_{\tau} = 0.7705 - 0.0433K + 0.0002K^2 + 0.000017K^3
\‍]

Each cluster delay $\tau_i$ is then scaled by:

\‍[tau_i^{\text{LOS}} = \frac{\tau_i^{\text{NLOS}}}{c_{\tau}}
\‍]

(see Equation 7.5-4)

Parameters
clusterDelaysPointer to a vector of initial (NLOS) cluster delays, which will be updated in place.
reducedClusterNumberThe number of clusters to be considered (can be < total clusters).
kFactorThe Rician K-factor, used to adjust the delay scaling factor cTau.

Definition at line 2818 of file three-gpp-channel-model.cc.

References NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ AntennaSetupChanged()

bool ns3::ThreeGppChannelModel::AntennaSetupChanged ( Ptr< const PhasedArrayModel > aAntenna,
Ptr< const PhasedArrayModel > bAntenna,
Ptr< const ChannelMatrix > channelMatrix ) const
protected

Check if the channel matrix has to be updated due to changes in the number of antenna ports.

Parameters
aAntennathe antenna array of node a
bAntennathe antenna array of node b
channelMatrixchannel matrix structure
Returns
true if the channel matrix has to be updated, false otherwise

Definition at line 2480 of file three-gpp-channel-model.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by NewChannelMatrixNeeded().

Here is the caller graph for this function:

◆ ApplyAttenuationToClusterPowers()

void ns3::ThreeGppChannelModel::ApplyAttenuationToClusterPowers ( Double2DVector * nonSelfBlocking,
DoubleVector * clusterPowers,
DoubleVector * attenuation_dB,
Ptr< const ThreeGppChannelParams > channelParams,
const DoubleVector & clusterAoa,
const DoubleVector & clusterZoa,
Ptr< const ParamsTable > table3gpp ) const
protected

Applies blockage-based attenuation to the cluster powers according to the 3GPP TR 38.901 blockage model (Section 7.6.4.1).

This method attenuates the power of each multipath cluster based on whether it is blocked by self- or non-self-blocking regions. The attenuation is calculated using the CalcAttenuationOfBlockage() method and applied in dB to each cluster power.

If the m_blockage flag is enabled, each cluster is checked for intersection with:

  • Self-blocking regions, defined based on device orientation.
  • Non-self-blocking regions, generated or updated using spatial correlation and scenario-specific parameters.

The attenuation is subtracted from the cluster powers using:

\‍[ P' = \frac{P}{10^{A_{\text{dB}}/10}}
\‍]

where $ A_{\text{dB}} $ is the blockage attenuation for the cluster.

Parameters
[in,out]nonSelfBlockingPointer to the 2D vector of non-self-blocking regions to be generated. Each inner vector contains the parameters for a single blocker as defined in 3GPP Table 7.6.4.1-2.
[in,out]clusterPowersPointer to the vector of cluster powers (linear scale), modified in-place with the applied attenuation (one per cluster).
[out]attenuation_dBPointer to the output vector containing the per-cluster attenuation values in dB. This is filled using CalcAttenuationOfBlockage().
[in]channelParamsPointer to the channel parameters (e.g., UT location, time of generation), used for computing motion-based updates to non-self-blocking regions.
[in]clusterAoaAzimuth angles of arrival (AOA) for each cluster, in degrees.
[in]clusterZoaZenith angles of arrival (ZOA) for each cluster, in degrees.
[in]table3gppTable with 3GPP scenario dependent parameters
Note
  • If m_blockage is false, no attenuation is applied, and attenuation_dB contains a single 0.
  • This function assumes the vectors are pre-sized and match reducedClusterNumber.
  • Internally uses CalcAttenuationOfBlockage() to compute spatial intersection with blockers.
See also
ThreeGppChannelModel::CalcAttenuationOfBlockage
3GPP TR 38.901 v15.x.x or v16.x.x, Section 7.6.4.1

Definition at line 3226 of file three-gpp-channel-model.cc.

References CalcAttenuationOfBlockage(), m_blockage, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters(), and UpdateChannelParameters().

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

◆ ApplyVelocityRotation()

Vector ns3::ThreeGppChannelModel::ApplyVelocityRotation ( double alphaRad,
double betaRad,
double gammaRad,
double etaRad,
const Vector & speed,
const int Xn ) const
protected

Rotate a 3D velocity vector by specified angles, around y-axis and z-axis.

Rotation matrices being used are the ones defined in 38.901 in Equation (7.1-2). The formula being applied is the one from Procedure A, Rn,rx and Rn,ry from formula 7.6-10b and 7.6-10c:

                                 [[ 1,  0,  0 ],

R = Rz (alphaRad) * Ry (betaRad) * [ 0, Xn, 0 ], * Ry (gammaRad) * Rz (etaRad) [ 0, 0, 1 ]]

NOTE: Currently, only x and y components are calculated, the z component is not used.

Parameters
alphaRadthe first angle from the rotation formula R [rad]
betaRadthe second angle from the rotation formula R [rad]
gammaRadthe third angle from the rotation formula R [rad]
etaRadthe fourth angle from the rotation formula R [rad]
speedInput velocity vector in the original (unrotated) frame [m/s].
XnDirection sign indicator; use +1 to keep orientation, −1 to flip.
Returns
The rotated (and possibly sign-flipped) velocity vector in the target frame [m/s].

Definition at line 3099 of file three-gpp-channel-model.cc.

References NS_LOG_FUNCTION.

Referenced by UpdateClusterAngles().

Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::ThreeGppChannelModel::AssignStreams ( int64_t stream)

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

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

Definition at line 4631 of file three-gpp-channel-model.cc.

References m_normalRv, m_uniformRv, m_uniformRvDoppler, m_uniformRvShuffle, and NS_LOG_FUNCTION.

◆ CalcAttenuationOfBlockage()

void ns3::ThreeGppChannelModel::CalcAttenuationOfBlockage ( Double2DVector * nonSelfBlocking,
DoubleVector * powerAttenuation,
Ptr< const ThreeGppChannelParams > channelParams,
const DoubleVector & clusterAOA,
const DoubleVector & clusterZOA,
Ptr< const ParamsTable > table3gpp ) const
protected

Calculates the per-cluster power attenuation (in dB) due to self-blocking and non-self-blocking effects, based on the 3GPP TR 38.901 blockage model (Section 7.6.4.1).

This method applies the spatial blockage attenuation to each cluster of the channel model by determining whether the corresponding azimuth (AOA) and zenith (ZOA) angles fall into predefined self-blocking or randomly generated non-self-blocking regions. The resulting attenuation values are returned as a vector.

  • Self-blocking simulates the user’s own body blocking the signal. The region is defined using fixed or portrait-mode-specific parameters (Table 7.6.4.1-1).
  • Non-self-blocking simulates environmental blockers (e.g., furniture, walls) and is modeled using correlated random variables for blocker location and size, based on scenario-specific rules from Table 7.6.4.1-2 and spatial correlation models (Tables 7.6.4.1-3, 7.6.4.1-4).
Parameters
[in,out]nonSelfBlockingPointer to a 2D vector representing the existing or to-be-generated non-self-blocking regions. Each inner vector contains the parameters for a single blocker: [phi_k, x_k, theta_k, y_k, r_k], as defined in 3GPP Table 7.6.4.1-2.
[in,out]powerAttenuationA vector of attenuation values in decibels (dB), with one value per cluster to be generated.
[in]channelParamsPointer to the channel parameters, including UT location and generation time, used to calculate spatial correlation and motion updates for non-self-blocking regions.
[in]clusterAOAA vector of azimuth angles of arrival (AOA) in degrees for each cluster. Must be in the range [0°, 360°].
[in]clusterZOAA vector of zenith angles of arrival (ZOA) in degrees for each cluster. Must be in the range [0°, 180°].
[in]table3gppTable with 3GPP parameters
Note
  • Follows the 3GPP TR 38.901 blockage model precisely, including the transformation from normally-distributed to uniformly distributed random variables with correlated updates.
  • Uses scenario-specific correlation distances and blocker dimensions.
  • Attenuation for non-self-blocking is computed using the formulas (7.6-22) to (7.6-27).
  • A cluster can be affected by both self-blocking and non-self-blocking.
See also
3GPP TR 38.901 v15.x.x or v16.x.x, Section 7.6.4.1

Definition at line 4406 of file three-gpp-channel-model.cc.

References ns3::DegreesToRadians(), m_blockerSpeed, m_frequency, m_normalRv, m_numNonSelfBlocking, m_portraitMode, m_scenario, m_uniformRv, ns3::Now(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, PHI_INDEX, R_INDEX, THETA_INDEX, X_INDEX, and Y_INDEX.

Referenced by ApplyAttenuationToClusterPowers().

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

◆ CalculateCphi()

double ns3::ThreeGppChannelModel::CalculateCphi ( const ChannelCondition::LosConditionValue losCondition,
Ptr< const ParamsTable > table3gpp,
const double kFactor )
staticprotected

Calculates the cPhi parameter for azimuth angular spread modeling.

This function computes the cPhi coefficient used to model the azimuth angular spread (ASA or ASD) for a given channel condition and cluster configuration.

  • In NLOS conditions, the value is taken directly from the cNlosTablePhi.
  • In LOS conditions, the NLOS value is adjusted using a polynomial function of the Rician K-factor, as defined in Table 7.5-10 of 3GPP TR 38.901.

The formula applied under LOS is:

\‍[c_{\phi,\text{LOS}} = c_{\phi,\text{NLOS}} \cdot (1.1035 - 0.028K - 0.002K^2 + 0.0001K^3)
\‍]

Parameters
losConditionIndicates whether the channel is LOS or NLOS.
table3gppPointer to the table containing the number of clusters.
kFactorThe Rician K-factor, used to scale cPhi in LOS conditions.
Returns
The computed cPhi value.
Warning
NS_FATAL_ERROR if the number of clusters is invalid or not found in the lookup table.

Definition at line 2833 of file three-gpp-channel-model.cc.

References ns3::cNlosTablePhi, ns3::ChannelCondition::LOS, and NS_FATAL_ERROR.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ CalculateCtheta()

double ns3::ThreeGppChannelModel::CalculateCtheta ( const ChannelCondition::LosConditionValue losCondition,
Ptr< const ParamsTable > table3gpp,
const double kFactor )
staticprotected

Calculates the cTheta parameter for zenith angular spread modeling.

This function computes the cTheta coefficient used to model the zenith angular spread (ZSA or ZSD) for a given channel condition and cluster configuration.

  • In NLOS conditions, the value is taken directly from the cNlosTableTheta.
  • In LOS conditions, the NLOS value is adjusted using a polynomial function of the Rician K-factor, as defined in Table 7.5-15 of 3GPP TR 38.901.

The formula applied under LOS is:

\‍[c_{\theta,\text{LOS}} = c_{\theta,\text{NLOS}} \cdot (1.3086 + 0.0339K - 0.0077K^2 +
0.0002K^3) \‍]

Parameters
losConditionIndicates whether the channel is LOS or NLOS.
table3gppPointer to the table containing the number of clusters.
kFactorThe Rician K-factor, used to scale cTheta in LOS conditions.
Returns
The computed cTheta value.
Warning
NS_FATAL_ERROR if the number of clusters is invalid or not found in the lookup table.

Definition at line 2854 of file three-gpp-channel-model.cc.

References ns3::cNlosTableTheta, ns3::ChannelCondition::LOS, and NS_FATAL_ERROR.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ ChannelUpdateNeeded()

bool ns3::ThreeGppChannelModel::ChannelUpdateNeeded ( Ptr< const ThreeGppChannelParams > channelParams,
Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob ) const
protected

Check if spatial-consistency requires updating channel parameters.

Returns true when spatial consistency is enabled, and the update period (UpdatePeriod) has elapsed since the parameters were generated.

Parameters
channelParamsChannel parameters whose generation time is checked.
aMobmobility model of the device a
bMobmobility model of the device b
Returns
true if a parameter update is needed; false otherwise.

Definition at line 2442 of file three-gpp-channel-model.cc.

References ComputeEndpointDisplacement2d(), ns3::kMaxConsistencyStepMeters, ns3::kNoDisplacementEpsMeters, m_updatePeriod, ns3::Simulator::Now(), ns3::Time::NS, NS_ABORT_MSG_IF, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by GetChannel().

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

◆ ComputeEndpointDisplacement2d()

double ns3::ThreeGppChannelModel::ComputeEndpointDisplacement2d ( Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob,
const Vector & lastPositionFirst,
const Vector & lastPositionSecond ) const
protected

Compute the effective 2D displacement of a link with respect to previously stored endpoint positions.

The channel parameters are stored using a reciprocal key, therefore endpoint-specific state is handled using a canonical ordering by node ID (min ID / max ID). The returned endpoint displacement is the maximum of the two endpoint displacements, so that the channel can evolve even when the change in inter-node distance between consecutive updates is close to zero (e.g., parallel motion in V2V).

Parameters
aMobThe mobility model of the first node (unordered).
bMobThe mobility model of the second node (unordered).
lastPositionFirstPreviously stored position of the endpoint with the smallest node ID.
lastPositionSecondPreviously stored position of the endpoint with the largest node ID.
Returns
The effective 2D displacement (in meters).

Definition at line 3599 of file three-gpp-channel-model.cc.

References ns3::Node::GetId().

Referenced by ChannelUpdateNeeded(), and NewChannelParamsNeeded().

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

◆ ComputeRayAngles()

void ns3::ThreeGppChannelModel::ComputeRayAngles ( Ptr< const ThreeGppChannelParams > channelParams,
Ptr< const ParamsTable > table3gpp,
Double2DVector * rayAoaRadian,
Double2DVector * rayAodRadian,
Double2DVector * rayZoaRadian,
Double2DVector * rayZodRadian ) const
protected

Compute per-ray angles (no shuffling), centered on cluster means.

Initializes and fills per-ray AOA/AOD/ZOA/ZOD angles in radians for each cluster according to 3GPP intra-cluster offsets. Angles are wrapped to valid ranges via WrapAngles.

Parameters
channelParamsChannel parameters (provides reduced cluster count).
table3gpp3GPP parameters table (provides rays per cluster and spread constants).
[out]rayAoaRadianPer-ray azimuth-of-arrival angles [rad] as [numClusters][raysPerCluster].
[out]rayAodRadianPer-ray azimuth-of-departure angles [rad] as [numClusters][raysPerCluster].
[out]rayZoaRadianPer-ray zenith-of-arrival angles [rad] as [numClusters][raysPerCluster].
[out]rayZodRadianPer-ray zenith-of-departure angles [rad] as [numClusters][raysPerCluster].

Definition at line 3258 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ns3::DegreesToRadians(), NS_LOG_FUNCTION, ns3::offSetAlpha, WrapAngles(), ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by GenerateChannelParameters().

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

◆ DoDispose()

void ns3::ThreeGppChannelModel::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.

Caller graph was not generated because of its size.

Reimplemented from ns3::Object.

Definition at line 1134 of file three-gpp-channel-model.cc.

References m_channelConditionModel, m_channelMatrixMap, m_channelParamsMap, and NS_LOG_FUNCTION.

◆ FindStrongestClusters()

void ns3::ThreeGppChannelModel::FindStrongestClusters ( Ptr< const ThreeGppChannelParams > channelParams,
Ptr< const ParamsTable > table3gpp,
uint8_t * cluster1st,
uint8_t * cluster2nd,
DoubleVector * clusterDelay,
Double2DVector * angles,
DoubleVector * alpha,
DoubleVector * dTerm,
DoubleVector * clusterPower ) const
protected

Identify the two strongest base clusters and append their derived subclusters.

Finds the indices of the strongest and second-strongest clusters (by power) within the base (reduced) cluster set, and appends the corresponding subclusters by extending the per-cluster delay/angle vectors according to the 3GPP strongest-cluster subclustering rule. The associated Doppler terms (alpha and dTerm) are appended in the same order, inheriting the parent cluster values for each appended subcluster.

Parameters
channelParamsCurrent channel parameters (cluster powers and reduced cluster count).
table3gpp3GPP parameters table (e.g., cDS).
[out]cluster1stIndex of the strongest base cluster.
[out]cluster2ndIndex of the second-strongest base cluster.
[in,out]clusterDelayPer-cluster delays [s]; subcluster delays are appended.
[in,out]anglesPer-cluster angles [deg]; subcluster angles are appended/duplicated.
[in,out]alphaPer-cluster Doppler alpha terms; subcluster terms are appended.
[in,out]dTermPer-cluster Doppler D terms; subcluster terms are appended.
[in,out]clusterPowerPer-cluster power; subcluster powers are appended.

Definition at line 3361 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, dir, NS_ABORT_IF, NS_LOG_FUNCTION, NS_LOG_INFO, v, ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by GenerateChannelParameters(), and UpdateChannelParameters().

Here is the caller graph for this function:

◆ GenerateChannelParameters()

Ptr< ThreeGppChannelModel::ThreeGppChannelParams > ns3::ThreeGppChannelModel::GenerateChannelParameters ( Ptr< const ChannelCondition > channelCondition,
Ptr< const ParamsTable > table3gpp,
Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob ) const
protected

Prepare 3gpp channel parameters among the nodes a and b.

The function does the following steps described in 3GPP 38.901:

Step 4: Generate large scale parameters. All LSPs are uncorrelated. Step 5: Generate Delays. Step 6: Generate cluster powers. Step 7: Generate arrival and departure angles for both azimuth and elevation. Step 8: Coupling of rays within a cluster for both azimuth and elevation shuffle all the arrays to perform random coupling Step 9: Generate the cross-polarization power ratios Step 10: Draw initial phases

All relevant generated parameters are added then to ThreeGppChannelParams which is the return value of this function.

Parameters
channelConditionthe channel condition
table3gppthe 3gpp parameters from the table
aMobthe a node mobility model
bMobthe b node mobility model
Returns
ThreeGppChannelParams structure with all the channel parameters generated according 38.901 steps from 4 to 10.

Definition at line 3687 of file three-gpp-channel-model.cc.

References AdjustClusterDelaysForLosCondition(), ns3::MatrixBasedChannelModel::AOA_INDEX, ApplyAttenuationToClusterPowers(), CalculateCphi(), CalculateCtheta(), ComputeRayAngles(), ns3::Create(), ns3::ThreeGppChannelModel::LargeScaleParameters::DS, FindStrongestClusters(), GenerateClusterAngles(), GenerateClusterDelays(), GenerateClusterPowers(), GenerateClusterShadowingTerm(), GenerateCrossPolPowerRatiosAndInitialPhases(), GenerateDopplerTerms(), GenerateLSPs(), ns3::ThreeGppChannelModel::LargeScaleParameters::kFactor, ns3::ChannelCondition::LOS, ns3::Simulator::Now(), NS_LOG_FUNCTION, PrecomputeAnglesSinCos(), RandomRaysCoupling(), RemoveWeakClusters(), UpdateLinkGeometry(), and ns3::MatrixBasedChannelModel::ZOA_INDEX.

Referenced by GetChannel().

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

◆ GenerateClusterAngles()

void ns3::ThreeGppChannelModel::GenerateClusterAngles ( Ptr< const ThreeGppChannelParams > channelParams,
const DoubleVector & clusterPowerForAngles,
double powerMax,
double cPhi,
double cTheta,
const LargeScaleParameters & lsps,
Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob,
Ptr< const ParamsTable > table3gpp,
Double2DVector * clusterAngles ) const
protected

Generate cluster angles for a 3GPP channel model based on provided parameters.

This method computes angles such as Angle of Arrival (AoA), Angle of Departure (AoD), Zenith Angle of Arrival (ZoA), and Zenith Angle of Departure (ZoD) for each cluster.

Parameters
channelParamsPointer to the structure containing channel parameters.
clusterPowerForAnglesA vector containing the power of clusters used for angle generation.
powerMaxThe maximum power among clusters.
cPhiConstant used for calculating azimuthal angles.
cThetaConstant used for calculating zenith angles.
lspsReference to the structure holding large-scale parameters.
aMobPointer to the mobility model of Node A.
bMobPointer to the mobility model of Node B.
table3gppPointer to the table containing 3GPP-specific parameters.
clusterAnglesPer-cluster angles [deg]; duplicated for sub-clusters.

Definition at line 2895 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ns3::ThreeGppChannelModel::LargeScaleParameters::ASA, ns3::ThreeGppChannelModel::LargeScaleParameters::ASD, ns3::Angles::GetAzimuth(), ns3::Angles::GetInclination(), ns3::ChannelCondition::LOS, m_normalRv, m_uniformRv, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::ChannelCondition::O2I, ns3::RadiansToDegrees(), ns3::MatrixBasedChannelModel::ZOA_INDEX, ns3::MatrixBasedChannelModel::ZOD_INDEX, ns3::ThreeGppChannelModel::LargeScaleParameters::ZSA, and ns3::ThreeGppChannelModel::LargeScaleParameters::ZSD.

Referenced by GenerateChannelParameters().

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

◆ GenerateClusterDelays()

void ns3::ThreeGppChannelModel::GenerateClusterDelays ( const double DS,
Ptr< const ParamsTable > table3gpp,
double * minTau,
DoubleVector * clusterDelays ) const
protected

Generate the cluster delays.

Parameters
DSDelay Spread
table3gpp3GPP parameters from the table
minTauthe minimum delay
clusterDelaysoutput vector for cluster delays

Definition at line 2651 of file three-gpp-channel-model.cc.

References m_uniformRv, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ GenerateClusterPowers()

void ns3::ThreeGppChannelModel::GenerateClusterPowers ( const DoubleVector & clusterDelays,
const double DS,
Ptr< const ParamsTable > table3gpp,
const DoubleVector & clusterShadowing,
DoubleVector * clusterPowers ) const
protected

Generate cluster powers.

Parameters
clusterDelayscluster delays
DSDelay Spread
table3gpp3GPP parameters from the table
clusterShadowingthe shadowing realization per each cluster, representing the intrinsic random strength of each cluster
clusterPowersoutput vector for cluster powers

Definition at line 2716 of file three-gpp-channel-model.cc.

References ns3::Simulator::Now(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters(), and UpdateChannelParameters().

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

◆ GenerateClusterShadowingTerm()

void ns3::ThreeGppChannelModel::GenerateClusterShadowingTerm ( Ptr< const ParamsTable > table3gpp,
DoubleVector * clusterShadowing ) const
protected

Generate per-cluster shadowing terms (in dB) as specified by 3GPP TR 38.901.

Draws one large-scale shadowing realization per cluster using the scenario-specific per-cluster shadowing standard deviation from the provided 3GPP table. These terms represent the intrinsic random strength of each cluster and are later used when computing and updating cluster powers.

Behavior:

  • The output vector is resized to the number of clusters defined by the table.
  • Each entry is an independent zero-mean Gaussian random variable with standard deviation equal to table3gpp->m_perClusterShadowingStd (units: dB).
Parameters
table3gppPointer to the 3GPP parameters table (provides number of clusters and per-cluster shadowing std-dev).
clusterShadowingOutput vector filled with per-cluster shadowing values (dB); size equals the number of clusters.

Definition at line 2684 of file three-gpp-channel-model.cc.

References m_normalRv, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ GenerateClusterXnNLos()

void ns3::ThreeGppChannelModel::GenerateClusterXnNLos ( const uint8_t clusterNumber,
std::vector< int > * clusterSign ) const
protected

Generate a random sign (+1 or -1) for each cluster for XN for NLOS computation for channel consistency updates.

Fills the provided vector with one sign per cluster, where each sign is independently drawn from a fair Bernoulli distribution over {+1, -1}. The output vector is cleared and reserved to the specified size.

Parameters
clusterNumberNumber of clusters to generate signs for.
clusterSignOutput pointer to the vector that will contain the signs (size = clusterNumber), each element being either +1 or -1.

Definition at line 2875 of file three-gpp-channel-model.cc.

References m_uniformRv, and NS_LOG_FUNCTION.

Referenced by UpdateChannelParameters().

Here is the caller graph for this function:

◆ GenerateCrossPolPowerRatiosAndInitialPhases()

void ns3::ThreeGppChannelModel::GenerateCrossPolPowerRatiosAndInitialPhases ( Double2DVector * crossPolarizationPowerRatios,
Double3DVector * clusterPhase,
const uint8_t reducedClusterNumber,
Ptr< const ParamsTable > table3gpp ) const
protected

Generate cross-polarization power ratios and initial per-ray phases.

For each cluster and ray, draws the cross-polarization power ratio (XPR) according to the 3GPP parameters and initializes four polarization-dependent phases uniformly in [-pi, pi]. The outputs are resized/filled by this function.

Parameters
[out]crossPolarizationPowerRatiosMatrix [numClusters][raysPerCluster] with XPR values (linear scale).
[out]clusterPhase3D array [numClusters][raysPerCluster][4] with initial phases (radians).
reducedClusterNumberNumber of (possibly reduced) clusters to generate.
table3gppPointer to the 3GPP parameters table (uXpr, sigXpr, rays per cluster).

Definition at line 3324 of file three-gpp-channel-model.cc.

References m_normalRv, and m_uniformRv.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ GenerateDopplerTerms()

void ns3::ThreeGppChannelModel::GenerateDopplerTerms ( const uint8_t reducedClusterNumber,
DoubleVector * dopplerTermAlpha,
DoubleVector * dopplerTermD ) const
protected

Generate additional Doppler terms for delayed (reflected) paths.

Produces per-cluster Doppler parameters used to model moving scatterers as per TR 37.885. v15.3.0, Sec. 6.2.3. These terms account for an additional Doppler contribution due to the presence of moving objects in the surrounding environment, such as in vehicular scenarios. This contribution is applied only to the delayed (reflected) paths and must be properly configured by setting the value of m_vScatt, which is defined as "maximum speed of the vehicle in the layout".

Parameters
reducedClusterNumberNumber of (possibly reduced) clusters.
[out]dopplerTermAlphaPer-cluster alpha terms in [-1, 1].
[out]dopplerTermDPer-cluster Doppler speed terms in [-vScatt, vScatt] [m/s].

Definition at line 3583 of file three-gpp-channel-model.cc.

References m_uniformRvDoppler, m_vScatt, and NS_ABORT_IF.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ GenerateLSPs()

ThreeGppChannelModel::LargeScaleParameters ns3::ThreeGppChannelModel::GenerateLSPs ( const ChannelCondition::LosConditionValue losCondition,
Ptr< const ParamsTable > table3gpp ) const
protected

Generate large-scale parameters (LSPs) for the current channel state.

Draws correlated large-scale parameters according to the 3GPP table and the specified LOS/NLOS condition, including delay spread (DS), angular spreads (ASD/ASA/ZSD/ZSA), and K-factor for LOS.

Parameters
losConditionLine-of-sight condition (LOS or NLOS).
table3gppPointer to the 3GPP parameters table (means, std-devs, sqrt correlation).
Returns
LargeScaleParameters structure containing the generated LSPs.

Definition at line 2596 of file three-gpp-channel-model.cc.

References ns3::ThreeGppChannelModel::LargeScaleParameters::ASA, ns3::ThreeGppChannelModel::LargeScaleParameters::ASD, ns3::ThreeGppChannelModel::LargeScaleParameters::DS, ns3::ThreeGppChannelModel::LargeScaleParameters::kFactor, ns3::ChannelCondition::LOS, m_normalRv, NS_LOG_FUNCTION, NS_LOG_INFO, ns3::ThreeGppChannelModel::LargeScaleParameters::ZSA, and ns3::ThreeGppChannelModel::LargeScaleParameters::ZSD.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ GetChannel()

Ptr< const MatrixBasedChannelModel::ChannelMatrix > ns3::ThreeGppChannelModel::GetChannel ( Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob,
Ptr< const PhasedArrayModel > aAntenna,
Ptr< const PhasedArrayModel > bAntenna )
overridevirtual

Looks for the channel matrix associated with the aMob and bMob pair in m_channelMatrixMap.

If found, it checks if it has to be updated. If not found or if it has to be updated, it generates a new uncorrelated channel matrix using the method GetNewChannel and updates m_channelMap.

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

Implements ns3::MatrixBasedChannelModel.

Definition at line 2510 of file three-gpp-channel-model.cc.

References ChannelUpdateNeeded(), GenerateChannelParameters(), ns3::Node::GetId(), ns3::MatrixBasedChannelModel::GetKey(), GetNewChannel(), GetThreeGppTable(), m_channelConditionModel, m_channelMatrixMap, m_channelParamsMap, NewChannelMatrixNeeded(), NewChannelParamsNeeded(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and UpdateChannelParameters().

Here is the call graph for this function:

◆ GetChannelConditionModel()

Ptr< ChannelConditionModel > ns3::ThreeGppChannelModel::GetChannelConditionModel ( ) const

Get the associated channel condition model.

Returns
a pointer to the ChannelConditionModel object

Definition at line 1224 of file three-gpp-channel-model.cc.

References m_channelConditionModel, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ GetFrequency()

double ns3::ThreeGppChannelModel::GetFrequency ( ) const

Returns the center frequency.

Returns
the center frequency in Hz

Definition at line 1240 of file three-gpp-channel-model.cc.

References m_frequency, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ GetNewChannel()

Ptr< MatrixBasedChannelModel::ChannelMatrix > ns3::ThreeGppChannelModel::GetNewChannel ( Ptr< const ThreeGppChannelParams > channelParams,
Ptr< const ParamsTable > table3gpp,
Ptr< const MobilityModel > sMob,
Ptr< const MobilityModel > uMob,
Ptr< const PhasedArrayModel > sAntenna,
Ptr< const PhasedArrayModel > uAntenna ) const
protectedvirtual

Compute the channel matrix between two nodes a and b, and their antenna arrays aAntenna and bAntenna using the procedure described in 3GPP TR 38.901.

Parameters
channelParamsthe channel parameters previously generated for the pair of nodes a and b
table3gppthe 3gpp parameters table
sMobthe mobility model of node s
uMobthe mobility model of node u
sAntennathe antenna array of node s
uAntennathe antenna array of node u
Returns
the channel realization

Definition at line 3966 of file three-gpp-channel-model.cc.

References ns3::Create(), ns3::Angles::GetAzimuth(), ns3::Node::GetId(), ns3::Angles::GetInclination(), ns3::ValArray< T >::GetNumCols(), ns3::ValArray< T >::GetNumPages(), ns3::ValArray< T >::GetNumRows(), ns3::ChannelCondition::LOS, m_frequency, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by GetChannel().

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

◆ GetParams()

Ptr< const MatrixBasedChannelModel::ChannelParams > ns3::ThreeGppChannelModel::GetParams ( Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob ) const
overridevirtual

Looks for the channel params associated with the aMob and bMob pair in m_channelParamsMap.

If not found, it will return a nullptr.

Parameters
aMobmobility model of the a device
bMobmobility model of the b device
Returns
the channel params

Implements ns3::MatrixBasedChannelModel.

Definition at line 2579 of file three-gpp-channel-model.cc.

References ns3::Node::GetId(), ns3::MatrixBasedChannelModel::GetKey(), m_channelParamsMap, NS_LOG_FUNCTION, and NS_LOG_WARN.

Here is the call graph for this function:

◆ GetScenario()

std::string ns3::ThreeGppChannelModel::GetScenario ( ) const

Returns the propagation scenario.

Returns
the propagation scenario

Definition at line 1262 of file three-gpp-channel-model.cc.

References m_scenario, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ GetThreeGppTable()

Ptr< const ThreeGppChannelModel::ParamsTable > ns3::ThreeGppChannelModel::GetThreeGppTable ( Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob,
Ptr< const ChannelCondition > channelCondition ) const
virtual

Get the parameters needed to apply the channel generation procedure.

Parameters
aMobthe mobility model of node A
bMobthe mobility model of node B
channelConditionthe channel condition
Returns
the parameters table

Definition at line 1269 of file three-gpp-channel-model.cc.

References ns3::cASA, ns3::cASD, ns3::cDS, ns3::ConstCast(), ns3::Create(), ns3::cZSA, ns3::DynamicCast(), m_frequency, m_scenario, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_UNCOND, NS_LOG_WARN, ns3::NTNDenseUrbanLOS, ns3::NTNDenseUrbanNLOS, ns3::NTNRuralLOS, ns3::NTNRuralNLOS, ns3::NTNSuburbanLOS, ns3::NTNSuburbanNLOS, ns3::NTNUrbanLOS, ns3::NTNUrbanNLOS, ns3::numOfCluster, ns3::perClusterShadowingStd, ns3::raysPerCluster, ns3::rTau, ns3::sigK, ns3::sigLgASA, ns3::sigLgASD, ns3::sigLgDS, ns3::sigLgZSA, ns3::sigLgZSD, ns3::sigXpr, ns3::sqrtC_NTN_DenseUrban_LOS, ns3::sqrtC_NTN_DenseUrban_NLOS, ns3::sqrtC_NTN_Rural_LOS, ns3::sqrtC_NTN_Rural_NLOS_Ka, ns3::sqrtC_NTN_Rural_NLOS_S, ns3::sqrtC_NTN_Suburban_LOS, ns3::sqrtC_NTN_Suburban_NLOS, ns3::sqrtC_NTN_Urban_LOS, ns3::sqrtC_NTN_Urban_NLOS, ns3::sqrtC_office_LOS, ns3::sqrtC_office_NLOS, ns3::sqrtC_RMa_LOS, ns3::sqrtC_RMa_NLOS, ns3::sqrtC_RMa_O2I, ns3::sqrtC_UMa_LOS, ns3::sqrtC_UMa_NLOS, ns3::sqrtC_UMa_O2I, ns3::sqrtC_UMi_LOS, ns3::sqrtC_UMi_NLOS, ns3::sqrtC_UMi_O2I, ns3::uK, ns3::uLgASA, ns3::uLgASD, ns3::uLgDS, ns3::uLgZSA, ns3::uLgZSD, and ns3::uXpr.

Referenced by GetChannel(), and UpdateChannelParameters().

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

◆ GetTypeId()

◆ NewChannelMatrixNeeded()

bool ns3::ThreeGppChannelModel::NewChannelMatrixNeeded ( uint64_t channelMatrixKey,
Ptr< const ThreeGppChannelParams > channelParams,
Ptr< const PhasedArrayModel > aAntenna,
Ptr< const PhasedArrayModel > bAntenna ) const
protected

Check if channel matrix needs update based on parameter changes or the update period expired.

This method determines whether a new channel matrix should be generated by comparing the generation times of the current channel parameters and existing channel matrix. It also considers any potential changes in antenna configurations.

Parameters
channelMatrixKeyChannel matrix key
channelParamsCurrent channel parameters to check against
aAntennaTransmitting antenna model configuration
bAntennaReceiving antenna model configuration
Returns
whether the channel matrix needs an update

Definition at line 2402 of file three-gpp-channel-model.cc.

References AntennaSetupChanged(), ns3::Time::As(), m_channelMatrixMap, ns3::Time::NS, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by GetChannel().

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

◆ NewChannelParamsNeeded()

bool ns3::ThreeGppChannelModel::NewChannelParamsNeeded ( const uint64_t channelParamsKey,
Ptr< const ChannelCondition > condition,
Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob ) const
protected

Check if the channel params has to be updated.

Parameters
channelParamsKeythe channel params key
conditionthe pointer to the channel condition instance
aMobmobility model of the device a
bMobmobility model of the device b
Returns
true if the channel params has to be updated, false otherwise

Definition at line 2362 of file three-gpp-channel-model.cc.

References ComputeEndpointDisplacement2d(), ns3::kMaxConsistencyStepMeters, m_channelParamsMap, m_updatePeriod, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by GetChannel().

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

◆ PrecomputeAnglesSinCos()

void ns3::ThreeGppChannelModel::PrecomputeAnglesSinCos ( Ptr< const ThreeGppChannelParams > channelParams,
std::vector< std::vector< std::pair< double, double > > > * cachedAngleSinCos ) const
protected

Precomputes the sine and cosine values for angles.

This method precomputes the sine and cosine values of specified angles, storing them in a vector of pairs. The computation is based on provided channel parameters.

Parameters
channelParamsPointer to the constant ThreeGppChannelParams object containing channel-specific parameters.
cachedAngleSinCosPointer to the vector where precomputed sine and cosine values will be stored.

Definition at line 3564 of file three-gpp-channel-model.cc.

References ns3::DEG2RAD, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters(), and UpdateChannelParameters().

Here is the caller graph for this function:

◆ RandomRaysCoupling()

void ns3::ThreeGppChannelModel::RandomRaysCoupling ( Ptr< const ThreeGppChannelParams > channelParams,
Double2DVector * rayAoaRadian,
Double2DVector * rayAodRadian,
Double2DVector * rayZoaRadian,
Double2DVector * rayZodRadian ) const
protected

Randomly couples rays within each cluster by shuffling per-ray angles.

Applies in-place shuffling of per-ray AOA/AOD/ZOA/ZOD arrays independently for each cluster, realizing random intra-cluster ray coupling.

Parameters
channelParamsChannel parameters (provides reduced cluster count).
[in,out]rayAoaRadianPer-ray AOA angles [rad] as [numClusters][raysPerCluster].
[in,out]rayAodRadianPer-ray AOD angles [rad] as [numClusters][raysPerCluster].
[in,out]rayZoaRadianPer-ray ZOA angles [rad] as [numClusters][raysPerCluster].
[in,out]rayZodRadianPer-ray ZOD angles [rad] as [numClusters][raysPerCluster].

Definition at line 3307 of file three-gpp-channel-model.cc.

References m_uniformRvShuffle, NS_LOG_FUNCTION, and ns3::Shuffle().

Referenced by GenerateChannelParameters().

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

◆ RemoveWeakClusters()

MatrixBasedChannelModel::DoubleVector ns3::ThreeGppChannelModel::RemoveWeakClusters ( DoubleVector * clusterPowers,
DoubleVector * clusterDelays,
const ChannelCondition::LosConditionValue losCondition,
Ptr< const ParamsTable > table3gpp,
const double kFactor,
double * powerMax ) const
protected

Remove the clusters with less power.

Parameters
clusterPowersinput/output vector of cluster powers (will be modified)
clusterDelaysinput/output vector of cluster delays (will be modified)
losConditionLOS condition
table3gpp3GPP parameters from the table
kFactorK factor
powerMaxoutput for maximum power
Returns
Vector of per-cluster powers used for angle generation, after removing clusters more than 25 dB below the strongest cluster.

Definition at line 2756 of file three-gpp-channel-model.cc.

References ns3::ChannelCondition::LOS, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters().

Here is the caller graph for this function:

◆ SetChannelConditionModel()

void ns3::ThreeGppChannelModel::SetChannelConditionModel ( Ptr< ChannelConditionModel > model)

Set the channel condition model.

Parameters
modela pointer to the ChannelConditionModel object

Definition at line 1217 of file three-gpp-channel-model.cc.

References m_channelConditionModel, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ SetFrequency()

void ns3::ThreeGppChannelModel::SetFrequency ( double f)

Sets the center frequency of the model.

Parameters
fthe center frequency in Hz

Definition at line 1231 of file three-gpp-channel-model.cc.

References m_frequency, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ SetScenario()

void ns3::ThreeGppChannelModel::SetScenario ( const std::string & scenario)

Sets the propagation scenario.

Parameters
scenariothe propagation scenario

Definition at line 1247 of file three-gpp-channel-model.cc.

References m_scenario, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

Here is the caller graph for this function:

◆ ShiftRayAnglesToUpdatedClusterMeans()

void ns3::ThreeGppChannelModel::ShiftRayAnglesToUpdatedClusterMeans ( Ptr< const ParamsTable > table3gpp,
Ptr< const ThreeGppChannelParams > channelParams,
const Double2DVector & prevClusterAngles,
Double2DVector * rayAodRadian,
Double2DVector * rayAoaRadian,
Double2DVector * rayZodRadian,
Double2DVector * rayZoaRadian ) const
protected

Shift per-ray angles to follow updated cluster mean angles while preserving intra-cluster offsets and existing random coupling.

This is used during Spatial Consistency Procedure A updates when cluster means change, but ray coupling, XPR, and initial phases must remain the same.

Parameters
table3gppTable of 3GPP parameters.
channelParamsChannel parameters to update (rays stored inside will be modified).
prevClusterAnglesPrevious cluster angles {AOA, ZOA, AOD, ZOD}
rayAoaRadianRay AOA in radian to be updated.
rayAodRadianRay AOD in radian to be updated.
rayZodRadianRay ZOD in radian to be updated.
rayZoaRadianRay ZOA in radian to be updated.

Definition at line 4371 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ns3::DegreesToRadians(), NS_LOG_FUNCTION, WrapAngles(), ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by UpdateChannelParameters().

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

◆ TrimToBaseClusters()

void ns3::ThreeGppChannelModel::TrimToBaseClusters ( const uint8_t reducedClusterNumber,
DoubleVector * delay,
Double2DVector * angles,
std::vector< std::vector< std::pair< double, double > > > * cachedAngleSincos,
DoubleVector * alpha,
DoubleVector * dTerm,
DoubleVector * clusterPower ) const
protected

Trim per-cluster vectors back to the base (reduced) cluster set.

After channel generation/update, two or four derived subclusters may be appended at the end of the per-cluster vectors (to represent the additional strongest-cluster subclusters). This helper removes any such appended tail so that the vectors contain exactly reducedClusterNumber base clusters.

Parameters
reducedClusterNumberNumber of base clusters (after weak-cluster removal).
delayPer-cluster delays (tail subclusters, if present, are removed).
anglesPer-cluster angles (AOA/ZOA/AOD/ZOD; tail subclusters, if present, are removed).
cachedAngleSincosOptional cached sin/cos pairs per cluster angle (tail subclusters, if present, are removed).
alphaOptional Doppler alpha terms per cluster (tail subclusters, if present, are removed).
dTermOptional Doppler D terms per cluster (tail subclusters, if present, are removed).
clusterPowerPer cluster power (tail subclusters, if present, are removed).

Definition at line 3492 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, dir, NS_ABORT_IF, NS_ABORT_MSG_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by UpdateChannelParameters().

Here is the caller graph for this function:

◆ UpdateChannelParameters()

void ns3::ThreeGppChannelModel::UpdateChannelParameters ( Ptr< ThreeGppChannelParams > channelParams,
Ptr< const ChannelCondition > channelCondition,
Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob ) const
protected

Update channel parameters for spatial consistency using 3GPP TR 38.901 procedure A.

This function updates existing channel parameters to maintain spatial and temporal consistency when nodes move. It reuses most of the functions from GenerateChannelParameters but applies spatial correlation to LSPs and temporal evolution to phases.

Following 3GPP TR 38.901 Procedure A, the function:

  • Updates Large Scale Parameters (LSPs)
  • Regenerates cluster delays and powers
  • Filters weak clusters
  • Updates angles and phases with continuity from previous channel state
  • Maintains Doppler terms and cross-polarization ratios for consistency
  • Preserves phase evolution according to 3GPP specifications
Parameters
channelParamsexisting channel parameters to update
channelConditioncurrent channel condition
aMobmobility model of device A
bMobmobility model of device B

Definition at line 3843 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ApplyAttenuationToClusterPowers(), FindStrongestClusters(), GenerateClusterPowers(), GenerateClusterXnNLos(), ns3::Node::GetId(), GetThreeGppTable(), ns3::ChannelCondition::LOS, ns3::Simulator::Now(), NS_ABORT_IF, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, PrecomputeAnglesSinCos(), ShiftRayAnglesToUpdatedClusterMeans(), TrimToBaseClusters(), UpdateClusterAngles(), UpdateClusterDelay(), UpdateClusterShadowingTerm(), UpdateLinkGeometry(), and ns3::MatrixBasedChannelModel::ZOA_INDEX.

Referenced by GetChannel().

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

◆ UpdateClusterAngles()

void ns3::ThreeGppChannelModel::UpdateClusterAngles ( Ptr< const ThreeGppChannelParams > channelParams,
Double2DVector * clusterAngles,
const DoubleVector & prevClusterDelay ) const
protected

Update cluster angles based on node mobility according to 3GPP TR 38.901.

This function implements the spatial consistency procedure for updating cluster angles when nodes move, as specified in 3GPP TR 38.901 Section 7.6.3. The cluster angles are updated based on the relative velocity between transmitter and receiver nodes, considering both Line-of-Sight (LOS) and Non-Line-of-Sight (NLOS) conditions.

The update equations are based on 3GPP TR 38.901 equations (7.6-11) to (7.6-14):

  • For LOS: Simple relative velocity calculation
  • For NLOS: Complex velocity transformation considering cluster-specific directions
Parameters
channelParamsPointer to the channel parameters containing node velocities, LOS condition, and reduced cluster number. Must contain valid m_rxSpeed, m_txSpeed, m_losCondition, and m_reducedClusterNumber.
clusterAnglesCluster angles {AOA, ZOA, AOD, ZOD}
prevClusterDelayVector containing the previous cluster delays in seconds. Used in the angle update calculations. Size must equal channelParams->m_reducedClusterNumber.

Definition at line 3139 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ApplyVelocityRotation(), ns3::DegreesToRadians(), ns3::Time::GetSeconds(), ns3::ChannelCondition::LOS, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::RadiansToDegrees(), ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by UpdateChannelParameters().

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

◆ UpdateClusterDelay()

void ns3::ThreeGppChannelModel::UpdateClusterDelay ( DoubleVector * clusterDelay,
DoubleVector * delayConsistency,
Ptr< const ThreeGppChannelParams > channelParams ) const
protected

Updates the cluster delays for the 3GPP channel model based on the channel parameters and consistency requirements.

Parameters
clusterDelayPointer to the vector that stores the current cluster delays to be updated.
delayConsistencyPointer to the vector capturing the consistency of the delays.
channelParamsSmart pointer to a constant ThreeGppChannelParams object containing the necessary channel parameters for update computations.

Definition at line 3047 of file three-gpp-channel-model.cc.

References ns3::MatrixBasedChannelModel::AOA_INDEX, ns3::MatrixBasedChannelModel::AOD_INDEX, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, ns3::MatrixBasedChannelModel::ZOA_INDEX, and ns3::MatrixBasedChannelModel::ZOD_INDEX.

Referenced by UpdateChannelParameters().

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

◆ UpdateClusterShadowingTerm()

void ns3::ThreeGppChannelModel::UpdateClusterShadowingTerm ( Ptr< const ParamsTable > table3gpp,
DoubleVector * clusterShadowing,
const double displacementLength ) const
protected

Update shadowing per cluster by using the normalized auto correlation function R, which is defined as an exponential function in ITU-R P.1816 and used by 38.901 in 7.4-5 equation for the correlation of shadowing.

Parameters
table3gppThe 3GPP parameters
clusterShadowingThe previous values of the per-cluster shadowing.
displacementLengthThe displacement length between the nodes.

Definition at line 2698 of file three-gpp-channel-model.cc.

References m_normalRv, and NS_LOG_FUNCTION.

Referenced by UpdateChannelParameters().

Here is the caller graph for this function:

◆ UpdateLinkGeometry()

void ns3::ThreeGppChannelModel::UpdateLinkGeometry ( Ptr< const MobilityModel > aMob,
Ptr< const MobilityModel > bMob,
double * distance2D,
double * distance3D,
double * endpointDisplacement2D,
double * relativeDisplacement2D,
Vector * lastPositionFirst,
Vector * lastPositionSecond,
Vector2D * lastRelativePosition2D ) const
protected

Update distance- and displacement-related values between two nodes.

The function computes the current 2D and 3D distances between two mobility models.

It also computes two 2D displacement measures with respect to previously stored state. Since channel parameters are stored using a reciprocal key, endpoint-specific state is handled using a canonical ordering by node ID (min ID / max ID). endpointDisplacement2D is the maximum 2D displacement of the two endpoints since the last channel parameter generation/update. relativeDisplacement2D is the 2D displacement of the canonical relative position vector between the endpoints since the last generation/update.

Parameters
aMobThe mobility model of the first node (unordered).
bMobThe mobility model of the second node (unordered).
distance2DOutput parameter that stores the 2D distance between the two nodes.
distance3DOutput parameter that stores the 3D distance between the two nodes.
endpointDisplacement2DOutput parameter that stores the effective 2D displacement (in meters).
relativeDisplacement2DOutput parameter that stores the 2D displacement (in meters) of the canonical relative position vector between the two endpoints since the last channel parameter generation/update.
lastPositionFirstPosition of the endpoint with the smallest node ID at the time of the last channel parameter generation/update.
lastPositionSecondPosition of the endpoint with the largest node ID at the time of the last channel parameter generation/update.
lastRelativePosition2DPreviously stored canonical 2D relative position vector (first endpoint minus second endpoint) at the time of the last channel parameter generation/update.

Definition at line 3624 of file three-gpp-channel-model.cc.

References ns3::Node::GetId(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by GenerateChannelParameters(), and UpdateChannelParameters().

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

◆ WrapAngles()

std::pair< double, double > ns3::ThreeGppChannelModel::WrapAngles ( double azimuthRad,
double inclinationRad )
static

Wrap an (azimuth, inclination) angle pair in a valid range.

Specifically, inclination must be in [0, M_PI] and azimuth in [0, 2*M_PI). If the inclination angle is outside its range, the azimuth angle is rotated by M_PI. This method aims specifically at solving the problem of generating angles at the boundaries of the angle domain, specifically, generating angle distributions close to inclinationRad=0 and inclinationRad=M_PI.

Parameters
azimuthRadthe azimuth angle in radians
inclinationRadthe inclination angle in radians
Returns
the wrapped (azimuth, inclination) angle pair in radians

Definition at line 4350 of file three-gpp-channel-model.cc.

References NS_ASSERT_MSG, and ns3::WrapTo2Pi().

Referenced by ComputeRayAngles(), and ShiftRayAnglesToUpdatedClusterMeans().

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

Member Data Documentation

◆ m_blockage

bool ns3::ThreeGppChannelModel::m_blockage
protected

enables the blockage model A

Definition at line 1128 of file three-gpp-channel-model.h.

Referenced by ApplyAttenuationToClusterPowers(), and GetTypeId().

◆ m_blockerSpeed

double ns3::ThreeGppChannelModel::m_blockerSpeed
protected

the blocker speed

Definition at line 1134 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage(), and GetTypeId().

◆ m_channelConditionModel

Ptr<ChannelConditionModel> ns3::ThreeGppChannelModel::m_channelConditionModel
protected

the channel condition model

Definition at line 1110 of file three-gpp-channel-model.h.

Referenced by DoDispose(), GetChannel(), GetChannelConditionModel(), and SetChannelConditionModel().

◆ m_channelMatrixMap

std::unordered_map<uint64_t, Ptr<ChannelMatrix> > ns3::ThreeGppChannelModel::m_channelMatrixMap
protected

map containing the channel realizations per a pair of PhasedAntennaArray instances; the key of this map is reciprocal uniquely identifies a pair of PhasedAntennaArrays

Definition at line 1096 of file three-gpp-channel-model.h.

Referenced by DoDispose(), GetChannel(), and NewChannelMatrixNeeded().

◆ m_channelParamsMap

std::unordered_map<uint64_t, Ptr<ThreeGppChannelParams> > ns3::ThreeGppChannelModel::m_channelParamsMap
protected

map containing the common channel parameters per a pair of nodes, the key of this map is reciprocal and uniquely identifies a pair of nodes

Definition at line 1102 of file three-gpp-channel-model.h.

Referenced by DoDispose(), GetChannel(), GetParams(), and NewChannelParamsNeeded().

◆ m_frequency

double ns3::ThreeGppChannelModel::m_frequency
protected

the operating frequency

Definition at line 1106 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage(), GetFrequency(), GetNewChannel(), GetThreeGppTable(), and SetFrequency().

◆ m_normalRv

◆ m_numNonSelfBlocking

uint16_t ns3::ThreeGppChannelModel::m_numNonSelfBlocking
protected

number of non-self-blocking regions

Definition at line 1130 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage(), and GetTypeId().

◆ m_portraitMode

bool ns3::ThreeGppChannelModel::m_portraitMode
protected

true if portrait mode, false if landscape

Definition at line 1132 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage(), and GetTypeId().

◆ m_scenario

std::string ns3::ThreeGppChannelModel::m_scenario
protected

the 3GPP scenario

Definition at line 1108 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage(), GetScenario(), GetThreeGppTable(), and SetScenario().

◆ m_uniformRv

◆ m_uniformRvDoppler

Ptr<UniformRandomVariable> ns3::ThreeGppChannelModel::m_uniformRvDoppler
protected

Uniform random variable, used to compute the additional Doppler contribution.

Definition at line 1125 of file three-gpp-channel-model.h.

Referenced by ThreeGppChannelModel(), AssignStreams(), and GenerateDopplerTerms().

◆ m_uniformRvShuffle

Ptr<UniformRandomVariable> ns3::ThreeGppChannelModel::m_uniformRvShuffle
protected

uniform random variable used to shuffle an array in GetNewChannel

Definition at line 1116 of file three-gpp-channel-model.h.

Referenced by ThreeGppChannelModel(), AssignStreams(), and RandomRaysCoupling().

◆ m_updatePeriod

Time ns3::ThreeGppChannelModel::m_updatePeriod
protected

the channel update period enables spatial consistency, procedure A

Definition at line 1104 of file three-gpp-channel-model.h.

Referenced by ChannelUpdateNeeded(), GetTypeId(), and NewChannelParamsNeeded().

◆ m_vScatt

double ns3::ThreeGppChannelModel::m_vScatt
protected

Variable used to compute the additional Doppler contribution for the delayed (reflected) paths, as described in 3GPP TR 37.885 v15.3.0, Sec.

6.2.3.

Definition at line 1121 of file three-gpp-channel-model.h.

Referenced by GenerateDopplerTerms(), and GetTypeId().

◆ PHI_INDEX

uint8_t ns3::ThreeGppChannelModel::PHI_INDEX = 0
staticconstexprprotected

index of the PHI value in the m_nonSelfBlocking array

Definition at line 1137 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage().

◆ R_INDEX

uint8_t ns3::ThreeGppChannelModel::R_INDEX = 4
staticconstexprprotected

index of the R value in the m_nonSelfBlocking array

Definition at line 1145 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage().

◆ THETA_INDEX

uint8_t ns3::ThreeGppChannelModel::THETA_INDEX = 2
staticconstexprprotected

index of the THETA value in the m_nonSelfBlocking array

Definition at line 1141 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage().

◆ X_INDEX

uint8_t ns3::ThreeGppChannelModel::X_INDEX = 1
staticconstexprprotected

index of the X value in the m_nonSelfBlocking array

Definition at line 1139 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage().

◆ Y_INDEX

uint8_t ns3::ThreeGppChannelModel::Y_INDEX = 3
staticconstexprprotected

index of the Y value in the m_nonSelfBlocking array

Definition at line 1143 of file three-gpp-channel-model.h.

Referenced by CalcAttenuationOfBlockage().


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