Revised lte-cell-selection test vector

This commit is contained in:
Budiarto Herman
2013-09-11 13:35:10 +03:00
parent c788e2ff5b
commit fb55f9a6b3
4 changed files with 99 additions and 65 deletions

View File

@@ -1017,8 +1017,9 @@ Initial cell selection
----------------------
The test suite `lte-cell-selection` is responsible for verifying the
:ref:`sec-initial-cell-selection` procedure. 3 short test cases are included in
the suite.
:ref:`sec-initial-cell-selection` procedure. Included in the suite are 3 short
test cases using ideal RRC protocol and the same test cases but using real RRC
protocol.
Each test case is a simulation of a small network of 4 cells. Each eNodeB is
equipped with directional antenna (parabolic model) and is arranged so that some
@@ -1062,24 +1063,19 @@ while the rest are not. The resulting simulation is depicted in Figure
It shows that CSG members may attach to either CSG or non-CSG cells, and simply
choose the stronger one. On the other hand, non-members can only attach to
non-CSG cells, even when they are actually receive stronger signal from a CSG
non-CSG cells, even when they are actually receiving stronger signal from a CSG
cell.
Note that a real life CSG deployment typically implements interference
coordination. Section 5.1 of [TS36922]_ describes frequency, time, and spatial
partitioning as possible approaches to interference coordination. However, none
of these approaches are implemented in this test suite.
The CSG scenario reveals an interference issue experienced by the UE highlighted
in the figure above. The UE is positioned within the coverage of a CSG cell but
it is not a member of the CSG. The CSG cell becomes a source of major
interference to the UE and causing difficulties (i.e. low SINR) to the UE in its
attempt to attach (i.e. receiving MIB and SIB1) to the closest non-CSG cell.
As "expected", interference issues occur in the simulation. The issue is more
apparent in the CSG scenario, as experienced by the UE (highlighted in Figure
:ref:`fig-lte-cell-selection-closed-access` above) which is well positioned
within the coverage of a CSG cell but not a member of the CSG. After the UE
fails to attach to the CSG cell, the cell becomes a major interference to the UE
and causing difficulties to the UE in attempting to attach to the closest
non-CSG cell. In other words, the UE is experiencing low SINR when receiving
transmission from the non-CSG cell. As a result, the UE takes longer time to
attach to the non-CSG cell because it often fails to receive system information
messages (e.g. MIB, SIB1, and SIB2) from the non-CSG cell.
A real life CSG deployment typically implements interference coordination to
remedy such issue. Section 5.1 of [TS36922]_ describes frequency, time, and
spatial partitioning as possible approaches to interference coordination.
However, none of these approaches are implemented in this test suite.

View File

@@ -41,7 +41,6 @@
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-ue-rrc.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-enb-phy.h>
NS_LOG_COMPONENT_DEFINE ("LteCellSelectionTest");
@@ -56,19 +55,10 @@ namespace ns3 {
LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
: TestSuite ("lte-cell-selection", SYSTEM)
{
//LogComponentEnable ("LteCellSelectionTest", LOG_PREFIX_ALL);
//LogComponentEnable ("LteCellSelectionTest", LOG_FUNCTION);
//LogComponentEnable ("LteUePhy", LOG_INFO);
//LogComponentEnable ("LteUePhy", LOG_WARN);
//LogComponentEnable ("LteUePhy", LOG_DEBUG);
//LogComponentEnable ("LteUePhy", LOG_FUNCTION);
//LogComponentEnable ("LteSpectrumValueHelper", LOG_FUNCTION);
//LogComponentEnable ("LteSpectrumPhy", LOG_LOGIC);
//LogComponentEnable ("LteSpectrumPhy", LOG_FUNCTION);
//LogComponentEnable ("LteEnbPhy", LOG_FUNCTION);
//LogComponentEnable ("LteUeRrc", LOG_PREFIX_ALL);
//LogComponentEnable ("LteUeRrc", LOG_LOGIC);
//LogComponentEnable ("LteUeRrc", LOG_WARN);
// LogComponentEnable ("LteCellSelectionTest", LOG_PREFIX_ALL);
// LogComponentEnable ("LteCellSelectionTest", LOG_FUNCTION);
// LogComponentEnable ("LteSpectrumPhy", LOG_PREFIX_ALL);
// LogComponentEnable ("LteSpectrumPhy", LOG_DEBUG);
std::vector<LteCellSelectionTestCase::UeSetup_t> x;
@@ -87,49 +77,69 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 3));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 1));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 2));
AddTestCase (new LteCellSelectionTestCase ("[EPC] Open access",
true, false, x, MilliSeconds (261)),
AddTestCase (new LteCellSelectionTestCase ("[EPC, ideal RRC] Open access",
true, true, false, x,
MilliSeconds (261)),
TestCase::QUICK);
AddTestCase (new LteCellSelectionTestCase ("[EPC, real RRC] Open access",
true, false, false, x,
MilliSeconds (279)),
TestCase::QUICK);
/*
* <-- <--
* ue1---CELL3 ue2---CELL4 ue3
* (1) (1) (1) / (0) /(1)
* /-------------/ /
* / --> / --> /
* / /
* --> / --> /
* ue4 CELL1 ue5 CELL2---ue6
* (0) (1) (0) (0) (0)
*
* DL error rate of ue4 when attached to CELL3 = 0
* when attached to CELL4 = 0.734758
*/
x.clear (); // position x y z, csg expectedCellId
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 1, 3));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 1, 4));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 1, 2));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 4));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 0));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 4));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 2));
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG 1",
true, true, x, MilliSeconds (361)),
TestCase::QUICK);
AddTestCase (new LteCellSelectionTestCase ("[EPC, ideal RRC] Some CSG 1",
true, true, true, x,
MilliSeconds (261)),
TestCase::EXTENSIVE);
AddTestCase (new LteCellSelectionTestCase ("[EPC, real RRC] Some CSG 1",
true, false, true, x,
MilliSeconds (279)),
TestCase::EXTENSIVE);
/*
* /-------------\
* / <-- \ <--
* <-- <--
* ue1 CELL3 ue2---CELL4 ue3
* (0) / (1) (0) (0) /(0)
* / /
* / --> --> /
* ue4 CELL1---ue5 CELL2---ue6
* (1) (1) (1) (0) (1)
*
* DL error rate of ue1 when attached to CELL3 = 0
* when attached to CELL4 = 0.777789
*/
x.clear (); // position x y z, csg expectedCellId
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 4));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 0));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 4));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 2));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 1, 3));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 1, 1));
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 1, 2));
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG 2",
true, true, x, MilliSeconds (361)),
AddTestCase (new LteCellSelectionTestCase ("[EPC, ideal RRC] Some CSG 2",
true, true, true, x,
MilliSeconds (261)),
TestCase::EXTENSIVE);
AddTestCase (new LteCellSelectionTestCase ("[EPC, real RRC] Some CSG 2",
true, false, true, x,
MilliSeconds (279)),
TestCase::EXTENSIVE);
} // end of LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
@@ -147,20 +157,25 @@ static LteCellSelectionTestSuite g_lteCellSelectionTestSuite;
LteCellSelectionTestCase::UeSetup_t::UeSetup_t (Vector position,
uint32_t csgIdentity,
uint16_t expectedCellId)
: position (position), csgIdentity (csgIdentity),
: position (position),
csgIdentity (csgIdentity),
expectedCellId (expectedCellId)
{
}
LteCellSelectionTestCase::LteCellSelectionTestCase (
std::string name, bool isEpcMode, bool hasCsgDiversity,
std::string name, bool isEpcMode, bool isIdealRrc, bool hasCsgDiversity,
std::vector<UeSetup_t> ueSetupList, Time duration)
: TestCase (name), m_isEpcMode (isEpcMode),
m_hasCsgDiversity (hasCsgDiversity), m_ueSetupList (ueSetupList),
m_duration (duration), m_lastState (LteUeRrc::NUM_STATES)
: TestCase (name),
m_isEpcMode (isEpcMode),
m_isIdealRrc (isIdealRrc),
m_hasCsgDiversity (hasCsgDiversity),
m_ueSetupList (ueSetupList),
m_duration (duration)
{
NS_LOG_FUNCTION (this << GetName ());
m_lastState.resize (m_ueSetupList.size (), LteUeRrc::NUM_STATES);
}
@@ -178,7 +193,7 @@ LteCellSelectionTestCase::DoRun ()
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
lteHelper->SetAttribute ("PathlossModel",
StringValue ("ns3::FriisSpectrumPropagationLossModel"));
lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (true));
lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (m_isIdealRrc));
Ptr<EpcHelper> epcHelper;
@@ -242,7 +257,7 @@ LteCellSelectionTestCase::DoRun ()
NetDeviceContainer ueDevs;
ueDevs = lteHelper->InstallUeDevice (ueNodes);
// Set the PLMN and CSG ID
// Set the CSG ID
if (m_hasCsgDiversity)
{
lteHelper->SetEnbCsgId (enbDevs.Get (0), 1, true);
@@ -318,6 +333,8 @@ LteCellSelectionTestCase::DoRun ()
MakeCallback (&LteCellSelectionTestCase::InitialCellSelectionEndOkCallback, this));
Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/InitialCellSelectionEndError",
MakeCallback (&LteCellSelectionTestCase::InitialCellSelectionEndErrorCallback, this));
Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished",
MakeCallback (&LteCellSelectionTestCase::ConnectionEstablishedCallback, this));
// Enable Idle mode cell selection
lteHelper->Attach (ueDevs);
@@ -339,22 +356,27 @@ LteCellSelectionTestCase::DoRun ()
NS_TEST_ASSERT_MSG_EQ (actualCellId, expectedCellId,
"IMSI " << ueDev->GetImsi ()
<< " has attached to an unexpected cell");
if (expectedCellId > 0)
{
NS_TEST_ASSERT_MSG_EQ (m_lastState.at (ueDev->GetImsi () - 1),
LteUeRrc::CONNECTED_NORMALLY,
"UE " << ueDev->GetImsi ()
<< " is not at CONNECTED_NORMALLY state");
}
}
NS_TEST_ASSERT_MSG_EQ (m_lastState, LteUeRrc::CONNECTED_NORMALLY,
"UE is not at CONNECTED_NORMALLY state");
Simulator::Destroy ();
} // end of void LteCellSelectionTestCase::DoRun ()
void
LteCellSelectionTestCase::MibReceivedCallback (
std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
uint16_t sourceCellId)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << sourceCellId);
NS_LOG_FUNCTION (this << imsi << cellId << rnti << sourceCellId);
}
@@ -363,7 +385,7 @@ LteCellSelectionTestCase::Sib1ReceivedCallback (
std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
uint16_t sourceCellId)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti << sourceCellId);
NS_LOG_FUNCTION (this << imsi << cellId << rnti << sourceCellId);
}
@@ -371,7 +393,7 @@ void
LteCellSelectionTestCase::Sib2ReceivedCallback (
std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti);
NS_LOG_FUNCTION (this << imsi << cellId << rnti);
}
@@ -383,9 +405,8 @@ LteCellSelectionTestCase::StateTransitionCallback (std::string context,
LteUeRrc::State oldState,
LteUeRrc::State newState)
{
NS_LOG_FUNCTION (this << context << imsi << cellId << rnti
<< oldState << newState);
m_lastState = newState;
NS_LOG_FUNCTION (this << imsi << cellId << rnti << oldState << newState);
m_lastState.at (imsi - 1) = newState;
}
@@ -393,7 +414,7 @@ void
LteCellSelectionTestCase::InitialCellSelectionEndOkCallback (
std::string context, uint64_t imsi, uint16_t cellId)
{
NS_LOG_FUNCTION (this << context << imsi << cellId);
NS_LOG_FUNCTION (this << imsi << cellId);
}
@@ -401,7 +422,15 @@ void
LteCellSelectionTestCase::InitialCellSelectionEndErrorCallback (
std::string context, uint64_t imsi, uint16_t cellId)
{
NS_LOG_FUNCTION (this << context << imsi << cellId);
NS_LOG_FUNCTION (this << imsi << cellId);
}
void
LteCellSelectionTestCase::ConnectionEstablishedCallback (
std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
{
NS_LOG_FUNCTION (this << imsi << cellId << rnti);
}

View File

@@ -71,7 +71,8 @@ public:
* \param ueSetupList an array of UE setup parameters
* \param duration length of simulation
*/
LteCellSelectionTestCase (std::string name, bool isEpcMode, bool hasCsgDiversity,
LteCellSelectionTestCase (std::string name, bool isEpcMode,
bool isIdealRrc, bool hasCsgDiversity,
std::vector<UeSetup_t> ueSetupList, Time duration);
virtual ~LteCellSelectionTestCase ();
@@ -98,12 +99,20 @@ private:
uint16_t cellId);
void InitialCellSelectionEndErrorCallback (std::string context, uint64_t imsi,
uint16_t cellId);
void ConnectionEstablishedCallback (std::string context, uint64_t imsi,
uint16_t cellId, uint16_t rnti);
/**
* \brief If true, then the simulation should be set up with EPC enabled.
*/
bool m_isEpcMode;
/**
* \brief If true, then the simulation should be set up with ideal RRC
* protocol, otherwise real RRC protocol is used.
*/
bool m_isIdealRrc;
/**
* \brief If true, then the west cells in the simulation will be CSG cell,
* while the east cells will be non-CSG cells.
@@ -121,14 +130,14 @@ private:
* The shortest possible simulation length for testing initial cell selection
* is 206 milliseconds. If RRC_CONNECTED state is required, then the length
* should be extended to 261 milliseconds in ideal RRC protocol, or at least
* 277 milliseconds in real RRC protocol. Moreover, scenarios which expect
* 278 milliseconds in real RRC protocol. Moreover, scenarios which expect
* failure in initial cell selection procedure might want to extend this even
* further to give the UE the chance to retry the procedure.
*/
Time m_duration;
/// The current UE RRC state.
LteUeRrc::State m_lastState;
std::vector<LteUeRrc::State> m_lastState;
}; // end of class LteCellSelectionTestCase