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. More... | |
~ThreeGppMimoPolarizationTest () override | |
Destructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
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. More... | |
void | DoRun () override |
Build the test scenario. More... | |
Private Attributes | |
Vector | m_rxLoc |
Position of the RX device. More... | |
MimoPolarizationAntennaParams | m_rxParams |
Parameters used to configure the RX antenna array. More... | |
std::valarray< std::complex< double > > | m_testChannel |
The test value for the matrix representing the strongest cluster. More... | |
double | m_tolerance |
The tolerance to be used when comparing the channel matrix with the test matrix. More... | |
Vector | m_txLoc |
Position of the TX device. More... | |
MimoPolarizationAntennaParams | m_txParams |
Parameters used to configure the TX antenna array. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { 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. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
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. More... | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
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 1029 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 1081 of file three-gpp-channel-test-suite.cc.
|
override |
Destructor.
Definition at line 1099 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 1104 of file three-gpp-channel-test-suite.cc.
References NS_LOG_FUNCTION, and two-ray-to-three-gpp-ch-calibration::params.
Referenced by DoRun().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 1136 of file three-gpp-channel-test-suite.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::NodeContainer::Create(), CreateAndConfigureAntenna(), ns3::NodeContainer::Get(), ns3::PhasedArrayModel::GetBeamformingVector(), ns3::ValArray< T >::GetNumCols(), ns3::ValArray< T >::GetNumRows(), ns3::ValArray< T >::GetPagePtr(), ns3::MobilityModel::GetPosition(), ns3::ValArray< T >::IsAlmostEqual(), ns3::MatrixBasedChannelModel::ChannelMatrix::m_channel, m_rxLoc, m_rxParams, m_testChannel, m_tolerance, m_txLoc, m_txParams, nodes, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, ns3::PhasedArrayModel::SetBeamformingVector(), and ns3::MobilityModel::SetPosition().
|
private |
Position of the RX device.
Definition at line 1073 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Parameters used to configure the RX antenna array.
Definition at line 1074 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 1076 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 1077 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Position of the TX device.
Definition at line 1071 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
private |
Parameters used to configure the TX antenna array.
Definition at line 1072 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().