A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ThreeGppChannelConsistencyTest Class Reference

Test case for channel consistency Procedure A (according to 3GPP 38.901 Section 7.6.3.). More...

Inheritance diagram for ThreeGppChannelConsistencyTest:
Collaboration diagram for ThreeGppChannelConsistencyTest:

Classes

struct  ChannelConsistencyMetrics
 ChannelConsistencyMetrics structure contains the metrics that are needed to test the channel consistency. More...

Public Member Functions

 ThreeGppChannelConsistencyTest (ChannelCondition::LosConditionValue losCondition, double speedKmh, double freqHz)
 Constructor.
 ~ThreeGppChannelConsistencyTest () override
 Destructor.
ChannelConsistencyMetrics ComputeDeltas (ChannelConsistencyMetrics metrics1, ChannelConsistencyMetrics metrics2)
 Used for the calculation of the delta of all the metrics between 2 channel consistency metric objects.
Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 Caller graph was not generated because of its size.
virtual ~TestCase ()
 Destructor.
std::string GetName () const
TestCaseoperator= (const TestCase &)=delete

Private Member Functions

void DoComputeConsistencyMetrics (Ptr< ThreeGppChannelModel > channelModel, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< PhasedArrayModel > txAntenna, Ptr< PhasedArrayModel > rxAntenna, std::vector< ChannelConsistencyMetrics > *metricsVectorToBeUsed, std::vector< ChannelConsistencyMetrics > *distancesVectorToBeUsed)
 Compute the channel consistency metrics to evaluate the varying rate of general channel metrics like:
void DoRun () override
 Build the test scenario.

Private Attributes

std::vector< ChannelConsistencyMetricsm_consistencyMetricsChannelUpdates
 consistency metrics for the channel updates
std::vector< ChannelConsistencyMetricsm_consistencyMetricsDeltasChannelUpdates
 consistency metric deltas for the channel updates
std::vector< ChannelConsistencyMetricsm_consistencyMetricsDeltasNewChannelRealizations
 consistency metric deltas for the new channel realizations
std::vector< ChannelConsistencyMetricsm_consistencyMetricsNewChannelRealizations
 consistency metrics for the new channel realizations
double m_freqHz {4.0e9}
 The carrier frequency to be used in the test case.
ChannelCondition::LosConditionValue m_losCondition {ChannelCondition::LOS}
 The type of channel condition to be set; can be LOS or NLOS.
uint32_t m_rxAntennaElements {4}
 number of rows and columns of rx antenna array
double m_speedKmh {30.0}
 The speed of the user to be used in the test case.
uint32_t m_txAntennaElements {4}
 number of rows and columns of tx antenna array

Additional Inherited Members

Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
TestCaseGetParent () const
 Get the parent of this TestCase.
bool IsStatusFailure () const
 Check if any tests failed.
bool IsStatusSuccess () const
 Check if all tests passed.
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase.
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.

Detailed Description

Test case for channel consistency Procedure A (according to 3GPP 38.901 Section 7.6.3.).

This test verifies that the consistent channel updates produce smoother changes in the channel matrix than generating a completely new channel. The test checks both channel condition LOS and NLOS. This is very important because, according to the Procedure A, the per-cluster variables updates are performed differently for LOS and NLOS. For example, there are different formulas for different channel conditions for cluster delay update (eq. 7.6-9) and cluster departure/arrival angles (eq. 7.6-10b and 7.6-10c). The test allows configuring different speeds and frequencies. Based on these parameters is calculated the channel coherence time and the channel update period is set based on this value.

The test verifies that the evolution of the general metric like the Frobenius channel norm, and per-cluster variables such as cluster delay, cluster power, and cluster angles (AOA and ZOA) is smoother with channel updates than with the new channel realizations. For the cluster metrics is selected the third cluster as defined in Table 7.8.5 for the calibration of the channel consistency.

The test checks that the channel consistent updates according 3GPP 38.901 Procedure A result in a channel that evolves more smoothly than generating a completely new channel. Variations are at least 5 times lower than these of new channel realizations.

To be able to get the results not only for the updated channel but also for the new channel realizations, we create new nodes that are tracking the update positions of the original node for which the channel updates are being generated. New nodes are forcing new channel realizations.

Definition at line 535 of file three-gpp-channel-test-suite.cc.

Constructor & Destructor Documentation

◆ ThreeGppChannelConsistencyTest()

ThreeGppChannelConsistencyTest::ThreeGppChannelConsistencyTest ( ChannelCondition::LosConditionValue losCondition,
double speedKmh,
double freqHz )

Constructor.

ThreeGppChannelConsistency constructor.

Parameters
losConditionthe LOS condition to be used in the test setup
speedKmhthe speed of the user to be used in the test setup
freqHzthe central carrier frequency to be used in the test setup

Definition at line 733 of file three-gpp-channel-test-suite.cc.

References ns3::TestCase::TestCase(), m_freqHz, m_losCondition, and m_speedKmh.

Here is the call graph for this function:

◆ ~ThreeGppChannelConsistencyTest()

ThreeGppChannelConsistencyTest::~ThreeGppChannelConsistencyTest ( )
override

Destructor.

Definition at line 747 of file three-gpp-channel-test-suite.cc.

Member Function Documentation

◆ ComputeDeltas()

ChannelConsistencyMetrics ThreeGppChannelConsistencyTest::ComputeDeltas ( ChannelConsistencyMetrics metrics1,
ChannelConsistencyMetrics metrics2 )
inline

Used for the calculation of the delta of all the metrics between 2 channel consistency metric objects.

Returns a new object containing these delta values for each of the metrics.

Parameters
metrics1The first channel consistency metrics object.
metrics2The second channel consistency metrics object.
Returns
The channel consistency object containing the deltas of each of the metrics between the first and the second object.

Definition at line 660 of file three-gpp-channel-test-suite.cc.

References ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::channelNorm, ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::thirdClusterAoa, ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::thirdClusterDelay, ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::thirdClusterPower_dB, and ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::thirdClusterZoa.

Referenced by DoComputeConsistencyMetrics().

Here is the caller graph for this function:

◆ DoComputeConsistencyMetrics()

void ThreeGppChannelConsistencyTest::DoComputeConsistencyMetrics ( Ptr< ThreeGppChannelModel > channelModel,
Ptr< MobilityModel > txMob,
Ptr< MobilityModel > rxMob,
Ptr< PhasedArrayModel > txAntenna,
Ptr< PhasedArrayModel > rxAntenna,
std::vector< ChannelConsistencyMetrics > * metricsVectorToBeUsed,
std::vector< ChannelConsistencyMetrics > * distancesVectorToBeUsed )
private

Compute the channel consistency metrics to evaluate the varying rate of general channel metrics like:

  • Frobenius norm of the channel matrix and stores it in m_normVector, and per-cluster metrics like:
  • Cluster power (of the third cluster as per Table 7.8.5 from 38.901 for the calibration of the channel consistency)
  • Cluster delay (of the third cluster as per Table 7.8.5 from 38.901 for the calibration of the channel consistency)
  • Cluster AOA and ZOA (of the third cluster as per Table 7.8.5 from 38.901 for the calibration of the channel consistency)
Parameters
channelModelthe ThreeGppChannelModel object used to generate the channel matrix
txMobthe mobility model of the first node
rxMobthe mobility model of the second node
txAntennathe antenna object associated to the first node
rxAntennathe antenna object associated to the second node
metricsVectorToBeUsedthe metrics vector to be used as the output of the function
distancesVectorToBeUsedthe metrics distances vector to be used as the output of the function

Definition at line 752 of file three-gpp-channel-test-suite.cc.

References ComputeDeltas(), and ns3::DynamicCast().

Referenced by DoRun().

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

◆ DoRun()

Member Data Documentation

◆ m_consistencyMetricsChannelUpdates

std::vector<ChannelConsistencyMetrics> ThreeGppChannelConsistencyTest::m_consistencyMetricsChannelUpdates
private

consistency metrics for the channel updates

Definition at line 709 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().

◆ m_consistencyMetricsDeltasChannelUpdates

std::vector<ChannelConsistencyMetrics> ThreeGppChannelConsistencyTest::m_consistencyMetricsDeltasChannelUpdates
private

consistency metric deltas for the channel updates

Definition at line 713 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().

◆ m_consistencyMetricsDeltasNewChannelRealizations

std::vector<ChannelConsistencyMetrics> ThreeGppChannelConsistencyTest::m_consistencyMetricsDeltasNewChannelRealizations
private

consistency metric deltas for the new channel realizations

Definition at line 715 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().

◆ m_consistencyMetricsNewChannelRealizations

std::vector<ChannelConsistencyMetrics> ThreeGppChannelConsistencyTest::m_consistencyMetricsNewChannelRealizations
private

consistency metrics for the new channel realizations

Definition at line 711 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().

◆ m_freqHz

double ThreeGppChannelConsistencyTest::m_freqHz {4.0e9}
private

The carrier frequency to be used in the test case.

Definition at line 724 of file three-gpp-channel-test-suite.cc.

Referenced by ThreeGppChannelConsistencyTest(), and DoRun().

◆ m_losCondition

ChannelCondition::LosConditionValue ThreeGppChannelConsistencyTest::m_losCondition {ChannelCondition::LOS}
private

The type of channel condition to be set; can be LOS or NLOS.

Definition at line 720 of file three-gpp-channel-test-suite.cc.

Referenced by ThreeGppChannelConsistencyTest(), and DoRun().

◆ m_rxAntennaElements

uint32_t ThreeGppChannelConsistencyTest::m_rxAntennaElements {4}
private

number of rows and columns of rx antenna array

Definition at line 718 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().

◆ m_speedKmh

double ThreeGppChannelConsistencyTest::m_speedKmh {30.0}
private

The speed of the user to be used in the test case.

Definition at line 722 of file three-gpp-channel-test-suite.cc.

Referenced by ThreeGppChannelConsistencyTest(), and DoRun().

◆ m_txAntennaElements

uint32_t ThreeGppChannelConsistencyTest::m_txAntennaElements {4}
private

number of rows and columns of tx antenna array

Definition at line 717 of file three-gpp-channel-test-suite.cc.

Referenced by DoRun().


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