This test tests that the channel matrix is correctly generated when dual-polarized antennas are being used at TX and RX. More...
Public Member Functions | |
ThreeGppMimoPolarizationTest (std::string testCaseName, Vector txLoc, const MimoPolarizationAntennaParams &txAntennaParams, Vector rxLoc, const MimoPolarizationAntennaParams &rxAntennaParams, std::valarray< std::complex< double > > testChannel, double tolerance) | |
Constructor that receives MIMO polarization parameters of TX and RX devices. | |
~ThreeGppMimoPolarizationTest () override | |
Destructor. | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
Ptr< PhasedArrayModel > | CreateAndConfigureAntenna (const MimoPolarizationAntennaParams ¶ms) |
Function that can be used to configure the antenna using the set of parameters. | |
void | DoRun () override |
Build the test scenario. | |
Private Attributes | |
Vector | m_rxLoc |
Position of the RX device. | |
MimoPolarizationAntennaParams | m_rxParams |
Parameters used to configure the RX antenna array. | |
std::valarray< std::complex< double > > | m_testChannel |
The test value for the matrix representing the strongest cluster. | |
double | m_tolerance |
The tolerance to be used when comparing the channel matrix with the test matrix. | |
Vector | m_txLoc |
Position of the TX device. | |
MimoPolarizationAntennaParams | m_txParams |
Parameters used to configure the 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... | |
Static Public Attributes inherited from ns3::TestCase | |
static constexpr auto | QUICK = Duration::QUICK |
Deprecated test duration simple enums. | |
static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
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. | |
This test tests that the channel matrix is correctly generated when dual-polarized antennas are being used at TX and RX.
In the conditions in which the channel between the TX and Rx device is LOS channel, and the beams of the transmitter and the receiver are pointing one towards the other, then in the presence of multiple ports at the TX and RX, and the antenna array at the TX and RX are dual polarized, the channel matrix should exhibit the strong symmetry between the two polarizations. E.g. if we have 1x2 antenna elements and two polarizations at both TX and RX, and the 1x2 ports at the TX and RX, then the channel matrix will have the structure as:
ch00 ch01 |ch02 ch03
Hvv Hvh ch10 ch11 |ch12 ch13 = -----------------— Hhv Hhh ch20 ch21 |ch22 ch23 ch30 ch31 |ch32 ch33
We test different cases of the polarization slant angles of the TX and RX, e.g., 0, 30, 45, 90. In each of these setups we check if the channel matrix in its strongest cluster experiences strong symmetry, and if the values appear in pairs. We also test additional cases in which we change the bearing angle and the height of the TX. In these cases we also observe strong symmetry, with the difference that in these cases we can observe different values in the pairs. We can still observe strong impact of the dual polarization on the channel matrix.
Definition at line 1246 of file three-gpp-channel-test-suite.cc.
ThreeGppMimoPolarizationTest::ThreeGppMimoPolarizationTest | ( | std::string | testCaseName, |
Vector | txLoc, | ||
const MimoPolarizationAntennaParams & | txAntennaParams, | ||
Vector | rxLoc, | ||
const MimoPolarizationAntennaParams & | rxAntennaParams, | ||
std::valarray< std::complex< double > > | testChannel, | ||
double | tolerance ) |
Constructor that receives MIMO polarization parameters of TX and RX devices.
testCaseName | the test case name |
txLoc | the position of the transmitter |
txAntennaParams | the antenna parameters of the transmitter |
rxLoc | the position of the receiver |
rxAntennaParams | the antenna parameters of the receiver |
testChannel | the test matrix that represent the strongest cluster |
tolerance | the tolerance to be used when testing |
Definition at line 1298 of file three-gpp-channel-test-suite.cc.
|
override |
Destructor.
Definition at line 1316 of file three-gpp-channel-test-suite.cc.
|
private |
Function that can be used to configure the antenna using the set of parameters.
params | The parameters to be set to the antenna |
Definition at line 1321 of file three-gpp-channel-test-suite.cc.
References ns3::CreateObject(), ns3::CreateObjectWithAttributes(), and NS_LOG_FUNCTION.
Referenced by DoRun().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 1353 of file three-gpp-channel-test-suite.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::NodeContainer::Create(), CreateAndConfigureAntenna(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::NodeContainer::Get(), ns3::ValArray< T >::IsAlmostEqual(), m_rxLoc, m_rxParams, m_testChannel, m_tolerance, m_txLoc, m_txParams, nodes, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::RngSeedManager::SetRun(), and ns3::RngSeedManager::SetSeed().
|
private |
Position of the RX device.
Definition at line 1290 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Parameters used to configure the RX antenna array.
Definition at line 1291 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
The test value for the matrix representing the strongest cluster.
Definition at line 1293 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
The tolerance to be used when comparing the channel matrix with the test matrix.
Definition at line 1294 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Position of the TX device.
Definition at line 1288 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Parameters used to configure the TX antenna array.
Definition at line 1289 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().