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"
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 ChannelMatrix > | GetChannel (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< ChannelConditionModel > | GetChannelConditionModel () const |
| Get the associated channel condition model. | |
| double | GetFrequency () const |
| Returns the center frequency. | |
| Ptr< const ChannelParams > | GetParams (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 ParamsTable > | GetThreeGppTable (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< Object > | GetObject () 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< Object > | GetObject (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. | |
| SimpleRefCount & | operator= (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, double > | WrapAngles (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< ThreeGppChannelParams > | GenerateChannelParameters (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< ChannelMatrix > | 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 |
| 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< ChannelConditionModel > | m_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< NormalRandomVariable > | m_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< UniformRandomVariable > | m_uniformRv |
| uniform random variable | |
| Ptr< UniformRandomVariable > | m_uniformRvDoppler |
| Uniform random variable, used to compute the additional Doppler contribution. | |
| Ptr< UniformRandomVariable > | m_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 | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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
std::string Time -9.22337e+18ns:+9.22337e+18ns 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.
| 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.
|
override |
|
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
\]](../../form_219.png)
Each cluster delay 
![\[tau_i^{\text{LOS}} = \frac{\tau_i^{\text{NLOS}}}{c_{\tau}}
\]](../../form_221.png)
(see Equation 7.5-4)
| clusterDelays | Pointer to a vector of initial (NLOS) cluster delays, which will be updated in place. |
| reducedClusterNumber | The number of clusters to be considered (can be < total clusters). |
| kFactor | The 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().
|
protected |
Check if the channel matrix has to be updated due to changes in the number of antenna ports.
| aAntenna | the antenna array of node a |
| bAntenna | the antenna array of node b |
| channelMatrix | channel matrix structure |
Definition at line 2480 of file three-gpp-channel-model.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by NewChannelMatrixNeeded().
|
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:
The attenuation is subtracted from the cluster powers using:
![\[ P' = \frac{P}{10^{A_{\text{dB}}/10}}
\]](../../form_224.png)
where 
| [in,out] | nonSelfBlocking | Pointer 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] | clusterPowers | Pointer to the vector of cluster powers (linear scale), modified in-place with the applied attenuation (one per cluster). |
| [out] | attenuation_dB | Pointer to the output vector containing the per-cluster attenuation values in dB. This is filled using CalcAttenuationOfBlockage(). |
| [in] | channelParams | Pointer to the channel parameters (e.g., UT location, time of generation), used for computing motion-based updates to non-self-blocking regions. |
| [in] | clusterAoa | Azimuth angles of arrival (AOA) for each cluster, in degrees. |
| [in] | clusterZoa | Zenith angles of arrival (ZOA) for each cluster, in degrees. |
| [in] | table3gpp | Table with 3GPP scenario dependent parameters |
Definition at line 3226 of file three-gpp-channel-model.cc.
References CalcAttenuationOfBlockage(), m_blockage, and NS_LOG_FUNCTION.
Referenced by GenerateChannelParameters(), and UpdateChannelParameters().
|
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.
| alphaRad | the first angle from the rotation formula R [rad] |
| betaRad | the second angle from the rotation formula R [rad] |
| gammaRad | the third angle from the rotation formula R [rad] |
| etaRad | the fourth angle from the rotation formula R [rad] |
| speed | Input velocity vector in the original (unrotated) frame [m/s]. |
| Xn | Direction sign indicator; use +1 to keep orientation, −1 to flip. |
Definition at line 3099 of file three-gpp-channel-model.cc.
References NS_LOG_FUNCTION.
Referenced by UpdateClusterAngles().
| int64_t ns3::ThreeGppChannelModel::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
| stream | first stream index to use |
Definition at line 4631 of file three-gpp-channel-model.cc.
References m_normalRv, m_uniformRv, m_uniformRvDoppler, m_uniformRvShuffle, and NS_LOG_FUNCTION.
|
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.
| [in,out] | nonSelfBlocking | Pointer 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] | powerAttenuation | A vector of attenuation values in decibels (dB), with one value per cluster to be generated. |
| [in] | channelParams | Pointer to the channel parameters, including UT location and generation time, used to calculate spatial correlation and motion updates for non-self-blocking regions. |
| [in] | clusterAOA | A vector of azimuth angles of arrival (AOA) in degrees for each cluster. Must be in the range [0°, 360°]. |
| [in] | clusterZOA | A vector of zenith angles of arrival (ZOA) in degrees for each cluster. Must be in the range [0°, 180°]. |
| [in] | table3gpp | Table with 3GPP parameters |
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().
|
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.
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)
\]](../../form_222.png)
| losCondition | Indicates whether the channel is LOS or NLOS. |
| table3gpp | Pointer to the table containing the number of clusters. |
| kFactor | The Rician K-factor, used to scale cPhi in LOS conditions. |
Definition at line 2833 of file three-gpp-channel-model.cc.
References ns3::cNlosTablePhi, ns3::ChannelCondition::LOS, and NS_FATAL_ERROR.
Referenced by GenerateChannelParameters().
|
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.
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) \]](../../form_223.png)
| losCondition | Indicates whether the channel is LOS or NLOS. |
| table3gpp | Pointer to the table containing the number of clusters. |
| kFactor | The Rician K-factor, used to scale cTheta in LOS conditions. |
Definition at line 2854 of file three-gpp-channel-model.cc.
References ns3::cNlosTableTheta, ns3::ChannelCondition::LOS, and NS_FATAL_ERROR.
Referenced by GenerateChannelParameters().
|
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.
| channelParams | Channel parameters whose generation time is checked. |
| aMob | mobility model of the device a |
| bMob | mobility model of the device b |
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().
|
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).
| aMob | The mobility model of the first node (unordered). |
| bMob | The mobility model of the second node (unordered). |
| lastPositionFirst | Previously stored position of the endpoint with the smallest node ID. |
| lastPositionSecond | Previously stored position of the endpoint with the largest node ID. |
Definition at line 3599 of file three-gpp-channel-model.cc.
References ns3::Node::GetId().
Referenced by ChannelUpdateNeeded(), and NewChannelParamsNeeded().
|
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.
| channelParams | Channel parameters (provides reduced cluster count). | |
| table3gpp | 3GPP parameters table (provides rays per cluster and spread constants). | |
| [out] | rayAoaRadian | Per-ray azimuth-of-arrival angles [rad] as [numClusters][raysPerCluster]. |
| [out] | rayAodRadian | Per-ray azimuth-of-departure angles [rad] as [numClusters][raysPerCluster]. |
| [out] | rayZoaRadian | Per-ray zenith-of-arrival angles [rad] as [numClusters][raysPerCluster]. |
| [out] | rayZodRadian | Per-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().
|
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.
|
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.
| channelParams | Current channel parameters (cluster powers and reduced cluster count). | |
| table3gpp | 3GPP parameters table (e.g., cDS). | |
| [out] | cluster1st | Index of the strongest base cluster. |
| [out] | cluster2nd | Index of the second-strongest base cluster. |
| [in,out] | clusterDelay | Per-cluster delays [s]; subcluster delays are appended. |
| [in,out] | angles | Per-cluster angles [deg]; subcluster angles are appended/duplicated. |
| [in,out] | alpha | Per-cluster Doppler alpha terms; subcluster terms are appended. |
| [in,out] | dTerm | Per-cluster Doppler D terms; subcluster terms are appended. |
| [in,out] | clusterPower | Per-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().
|
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.
| channelCondition | the channel condition |
| table3gpp | the 3gpp parameters from the table |
| aMob | the a node mobility model |
| bMob | the b node mobility model |
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().
|
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.
| channelParams | Pointer to the structure containing channel parameters. |
| clusterPowerForAngles | A vector containing the power of clusters used for angle generation. |
| powerMax | The maximum power among clusters. |
| cPhi | Constant used for calculating azimuthal angles. |
| cTheta | Constant used for calculating zenith angles. |
| lsps | Reference to the structure holding large-scale parameters. |
| aMob | Pointer to the mobility model of Node A. |
| bMob | Pointer to the mobility model of Node B. |
| table3gpp | Pointer to the table containing 3GPP-specific parameters. |
| clusterAngles | Per-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().
|
protected |
Generate the cluster delays.
| DS | Delay Spread |
| table3gpp | 3GPP parameters from the table |
| minTau | the minimum delay |
| clusterDelays | output 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().
|
protected |
Generate cluster powers.
| clusterDelays | cluster delays |
| DS | Delay Spread |
| table3gpp | 3GPP parameters from the table |
| clusterShadowing | the shadowing realization per each cluster, representing the intrinsic random strength of each cluster |
| clusterPowers | output 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().
|
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:
| table3gpp | Pointer to the 3GPP parameters table (provides number of clusters and per-cluster shadowing std-dev). |
| clusterShadowing | Output 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().
|
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.
| clusterNumber | Number of clusters to generate signs for. |
| clusterSign | Output 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().
|
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.
| [out] | crossPolarizationPowerRatios | Matrix [numClusters][raysPerCluster] with XPR values (linear scale). |
| [out] | clusterPhase | 3D array [numClusters][raysPerCluster][4] with initial phases (radians). |
| reducedClusterNumber | Number of (possibly reduced) clusters to generate. | |
| table3gpp | Pointer 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().
|
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".
| reducedClusterNumber | Number of (possibly reduced) clusters. | |
| [out] | dopplerTermAlpha | Per-cluster alpha terms in [-1, 1]. |
| [out] | dopplerTermD | Per-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().
|
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.
| losCondition | Line-of-sight condition (LOS or NLOS). |
| table3gpp | Pointer to the 3GPP parameters table (means, std-devs, sqrt correlation). |
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().
|
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.
| aMob | mobility model of the a device |
| bMob | mobility model of the b device |
| aAntenna | antenna of the a device |
| bAntenna | antenna of the b device |
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().
| Ptr< ChannelConditionModel > ns3::ThreeGppChannelModel::GetChannelConditionModel | ( | ) | const |
Get the associated channel condition model.
Definition at line 1224 of file three-gpp-channel-model.cc.
References m_channelConditionModel, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
| double ns3::ThreeGppChannelModel::GetFrequency | ( | ) | const |
Returns the center frequency.
Definition at line 1240 of file three-gpp-channel-model.cc.
References m_frequency, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
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.
| channelParams | the channel parameters previously generated for the pair of nodes a and b |
| table3gpp | the 3gpp parameters table |
| sMob | the mobility model of node s |
| uMob | the mobility model of node u |
| sAntenna | the antenna array of node s |
| uAntenna | the antenna array of node u |
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().
|
overridevirtual |
Looks for the channel params associated with the aMob and bMob pair in m_channelParamsMap.
If not found, it will return a nullptr.
| aMob | mobility model of the a device |
| bMob | mobility model of the b device |
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.
| std::string ns3::ThreeGppChannelModel::GetScenario | ( | ) | const |
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().
|
virtual |
Get the parameters needed to apply the channel generation procedure.
| aMob | the mobility model of node A |
| bMob | the mobility model of node B |
| channelCondition | the channel condition |
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().
|
static |
Get the type ID.
Definition at line 1147 of file three-gpp-channel-model.cc.
References GetChannelConditionModel(), GetFrequency(), GetScenario(), m_blockage, m_blockerSpeed, m_numNonSelfBlocking, m_portraitMode, m_updatePeriod, m_vScatt, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeIntegerAccessor(), ns3::MakeIntegerChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeStringAccessor(), ns3::MakeStringChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MilliSeconds(), SetChannelConditionModel(), SetFrequency(), ns3::TypeId::SetGroupName(), ns3::TypeId::SetParent(), and SetScenario().
|
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.
| channelMatrixKey | Channel matrix key |
| channelParams | Current channel parameters to check against |
| aAntenna | Transmitting antenna model configuration |
| bAntenna | Receiving antenna model configuration |
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().
|
protected |
Check if the channel params has to be updated.
| channelParamsKey | the channel params key |
| condition | the pointer to the channel condition instance |
| aMob | mobility model of the device a |
| bMob | mobility model of the device b |
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().
|
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.
| channelParams | Pointer to the constant ThreeGppChannelParams object containing channel-specific parameters. |
| cachedAngleSinCos | Pointer 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().
|
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.
| channelParams | Channel parameters (provides reduced cluster count). | |
| [in,out] | rayAoaRadian | Per-ray AOA angles [rad] as [numClusters][raysPerCluster]. |
| [in,out] | rayAodRadian | Per-ray AOD angles [rad] as [numClusters][raysPerCluster]. |
| [in,out] | rayZoaRadian | Per-ray ZOA angles [rad] as [numClusters][raysPerCluster]. |
| [in,out] | rayZodRadian | Per-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().
|
protected |
Remove the clusters with less power.
| clusterPowers | input/output vector of cluster powers (will be modified) |
| clusterDelays | input/output vector of cluster delays (will be modified) |
| losCondition | LOS condition |
| table3gpp | 3GPP parameters from the table |
| kFactor | K factor |
| powerMax | output for maximum power |
Definition at line 2756 of file three-gpp-channel-model.cc.
References ns3::ChannelCondition::LOS, and NS_LOG_FUNCTION.
Referenced by GenerateChannelParameters().
| void ns3::ThreeGppChannelModel::SetChannelConditionModel | ( | Ptr< ChannelConditionModel > | model | ) |
Set the channel condition model.
| model | a 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().
| void ns3::ThreeGppChannelModel::SetFrequency | ( | double | f | ) |
Sets the center frequency of the model.
| f | the 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().
| void ns3::ThreeGppChannelModel::SetScenario | ( | const std::string & | scenario | ) |
Sets the propagation scenario.
| scenario | the 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().
|
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.
| table3gpp | Table of 3GPP parameters. |
| channelParams | Channel parameters to update (rays stored inside will be modified). |
| prevClusterAngles | Previous cluster angles {AOA, ZOA, AOD, ZOD} |
| rayAoaRadian | Ray AOA in radian to be updated. |
| rayAodRadian | Ray AOD in radian to be updated. |
| rayZodRadian | Ray ZOD in radian to be updated. |
| rayZoaRadian | Ray 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().
|
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.
| reducedClusterNumber | Number of base clusters (after weak-cluster removal). |
| delay | Per-cluster delays (tail subclusters, if present, are removed). |
| angles | Per-cluster angles (AOA/ZOA/AOD/ZOD; tail subclusters, if present, are removed). |
| cachedAngleSincos | Optional cached sin/cos pairs per cluster angle (tail subclusters, if present, are removed). |
| alpha | Optional Doppler alpha terms per cluster (tail subclusters, if present, are removed). |
| dTerm | Optional Doppler D terms per cluster (tail subclusters, if present, are removed). |
| clusterPower | Per 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().
|
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:
| channelParams | existing channel parameters to update |
| channelCondition | current channel condition |
| aMob | mobility model of device A |
| bMob | mobility 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().
|
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):
| channelParams | Pointer 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. |
| clusterAngles | Cluster angles {AOA, ZOA, AOD, ZOD} |
| prevClusterDelay | Vector 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().
|
protected |
Updates the cluster delays for the 3GPP channel model based on the channel parameters and consistency requirements.
| clusterDelay | Pointer to the vector that stores the current cluster delays to be updated. |
| delayConsistency | Pointer to the vector capturing the consistency of the delays. |
| channelParams | Smart 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().
|
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.
| table3gpp | The 3GPP parameters |
| clusterShadowing | The previous values of the per-cluster shadowing. |
| displacementLength | The 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().
|
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.
| aMob | The mobility model of the first node (unordered). |
| bMob | The mobility model of the second node (unordered). |
| distance2D | Output parameter that stores the 2D distance between the two nodes. |
| distance3D | Output parameter that stores the 3D distance between the two nodes. |
| endpointDisplacement2D | Output parameter that stores the effective 2D displacement (in meters). |
| relativeDisplacement2D | Output 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. |
| lastPositionFirst | Position of the endpoint with the smallest node ID at the time of the last channel parameter generation/update. |
| lastPositionSecond | Position of the endpoint with the largest node ID at the time of the last channel parameter generation/update. |
| lastRelativePosition2D | Previously 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().
|
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.
| azimuthRad | the azimuth angle in radians |
| inclinationRad | the inclination angle 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().
|
protected |
enables the blockage model A
Definition at line 1128 of file three-gpp-channel-model.h.
Referenced by ApplyAttenuationToClusterPowers(), and GetTypeId().
|
protected |
the blocker speed
Definition at line 1134 of file three-gpp-channel-model.h.
Referenced by CalcAttenuationOfBlockage(), and GetTypeId().
|
protected |
the channel condition model
Definition at line 1110 of file three-gpp-channel-model.h.
Referenced by DoDispose(), GetChannel(), GetChannelConditionModel(), and SetChannelConditionModel().
|
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().
|
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().
|
protected |
the operating frequency
Definition at line 1106 of file three-gpp-channel-model.h.
Referenced by CalcAttenuationOfBlockage(), GetFrequency(), GetNewChannel(), GetThreeGppTable(), and SetFrequency().
|
protected |
normal random variable
Definition at line 1114 of file three-gpp-channel-model.h.
Referenced by ThreeGppChannelModel(), AssignStreams(), CalcAttenuationOfBlockage(), GenerateClusterAngles(), GenerateClusterShadowingTerm(), GenerateCrossPolPowerRatiosAndInitialPhases(), GenerateLSPs(), and UpdateClusterShadowingTerm().
|
protected |
number of non-self-blocking regions
Definition at line 1130 of file three-gpp-channel-model.h.
Referenced by CalcAttenuationOfBlockage(), and GetTypeId().
|
protected |
true if portrait mode, false if landscape
Definition at line 1132 of file three-gpp-channel-model.h.
Referenced by CalcAttenuationOfBlockage(), and GetTypeId().
|
protected |
the 3GPP scenario
Definition at line 1108 of file three-gpp-channel-model.h.
Referenced by CalcAttenuationOfBlockage(), GetScenario(), GetThreeGppTable(), and SetScenario().
|
protected |
uniform random variable
Definition at line 1112 of file three-gpp-channel-model.h.
Referenced by ThreeGppChannelModel(), AssignStreams(), CalcAttenuationOfBlockage(), GenerateClusterAngles(), GenerateClusterDelays(), GenerateClusterXnNLos(), and GenerateCrossPolPowerRatiosAndInitialPhases().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().