Test case for channel consistency Procedure A (according to 3GPP 38.901 Section 7.6.3.). More...
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 |
| TestCase & | operator= (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< ChannelConsistencyMetrics > | m_consistencyMetricsChannelUpdates |
| consistency metrics for the channel updates | |
| std::vector< ChannelConsistencyMetrics > | m_consistencyMetricsDeltasChannelUpdates |
| consistency metric deltas for the channel updates | |
| std::vector< ChannelConsistencyMetrics > | m_consistencyMetricsDeltasNewChannelRealizations |
| consistency metric deltas for the new channel realizations | |
| std::vector< ChannelConsistencyMetrics > | m_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. | |
| TestCase * | GetParent () 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. | |
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.
| ThreeGppChannelConsistencyTest::ThreeGppChannelConsistencyTest | ( | ChannelCondition::LosConditionValue | losCondition, |
| double | speedKmh, | ||
| double | freqHz ) |
Constructor.
ThreeGppChannelConsistency constructor.
| losCondition | the LOS condition to be used in the test setup |
| speedKmh | the speed of the user to be used in the test setup |
| freqHz | the 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.
|
override |
Destructor.
Definition at line 747 of file three-gpp-channel-test-suite.cc.
|
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.
| metrics1 | The first channel consistency metrics object. |
| metrics2 | The second channel consistency metrics 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().
|
private |
Compute the channel consistency metrics to evaluate the varying rate of general channel metrics like:
| channelModel | the ThreeGppChannelModel object used to generate the channel matrix |
| txMob | the mobility model of the first node |
| rxMob | the mobility model of the second node |
| txAntenna | the antenna object associated to the first node |
| rxAntenna | the antenna object associated to the second node |
| metricsVectorToBeUsed | the metrics vector to be used as the output of the function |
| distancesVectorToBeUsed | the 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().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 822 of file three-gpp-channel-test-suite.cc.
References ThreeGppChannelConsistencyTest::ChannelConsistencyMetrics::abs(), ns3::Object::AggregateObject(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::CreateObjectWithAttributes(), ns3::Simulator::Destroy(), DoComputeConsistencyMetrics(), ns3::NodeContainer::Get(), ns3::ChannelCondition::LOS, m_consistencyMetricsChannelUpdates, m_consistencyMetricsDeltasChannelUpdates, m_consistencyMetricsDeltasNewChannelRealizations, m_consistencyMetricsNewChannelRealizations, m_freqHz, m_losCondition, m_rxAntennaElements, m_speedKmh, m_txAntennaElements, ns3::NanoSeconds(), NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::RngSeedManager::SetRun(), and ns3::RngSeedManager::SetSeed().
|
private |
consistency metrics for the channel updates
Definition at line 709 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
consistency metric deltas for the channel updates
Definition at line 713 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
consistency metric deltas for the new channel realizations
Definition at line 715 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
consistency metrics for the new channel realizations
Definition at line 711 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
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().
|
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().
|
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().
|
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().
|
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().