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

This test tests that the channel matrix is correctly generated when dual-polarized antennas are being used at TX and RX. More...

+ Inheritance diagram for ThreeGppMimoPolarizationTest:
+ Collaboration diagram for ThreeGppMimoPolarizationTest:

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
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

Ptr< PhasedArrayModelCreateAndConfigureAntenna (const MimoPolarizationAntennaParams &params)
 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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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.
 
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

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.

Constructor & Destructor Documentation

◆ ThreeGppMimoPolarizationTest()

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.

Parameters
testCaseNamethe test case name
txLocthe position of the transmitter
txAntennaParamsthe antenna parameters of the transmitter
rxLocthe position of the receiver
rxAntennaParamsthe antenna parameters of the receiver
testChannelthe test matrix that represent the strongest cluster
tolerancethe tolerance to be used when testing

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

◆ ~ThreeGppMimoPolarizationTest()

ThreeGppMimoPolarizationTest::~ThreeGppMimoPolarizationTest ( )
override

Destructor.

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

Member Function Documentation

◆ CreateAndConfigureAntenna()

Ptr< PhasedArrayModel > ThreeGppMimoPolarizationTest::CreateAndConfigureAntenna ( const MimoPolarizationAntennaParams params)
private

Function that can be used to configure the antenna using the set of parameters.

Parameters
paramsThe parameters to be set to the antenna
Returns
A pointer to the antenna that is created and configured by using input params

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

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void ThreeGppMimoPolarizationTest::DoRun ( )
overrideprivatevirtual

Member Data Documentation

◆ m_rxLoc

Vector ThreeGppMimoPolarizationTest::m_rxLoc
private

Position of the RX device.

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

Referenced by DoRun().

◆ m_rxParams

MimoPolarizationAntennaParams ThreeGppMimoPolarizationTest::m_rxParams
private

Parameters used to configure the RX antenna array.

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

Referenced by DoRun().

◆ m_testChannel

std::valarray<std::complex<double> > ThreeGppMimoPolarizationTest::m_testChannel
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().

◆ m_tolerance

double ThreeGppMimoPolarizationTest::m_tolerance
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().

◆ m_txLoc

Vector ThreeGppMimoPolarizationTest::m_txLoc
private

Position of the TX device.

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

Referenced by DoRun().

◆ m_txParams

MimoPolarizationAntennaParams ThreeGppMimoPolarizationTest::m_txParams
private

Parameters used to configure the TX antenna array.

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

Referenced by DoRun().


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