Merge
This commit is contained in:
@@ -784,7 +784,7 @@ According to [TS36214]_, the UE has to report a set of measurements of the eNBs
|
||||
The UE has to report the measurements jointly with the physical cell identity (PCI) of the cell. Both measurements are performed during the reception of the RS, while the PCI is obtained with the Primary Synchronization Signal (PSS). The PSS is sent by the eNB each 5 subframes and in detail in the subframes 1 and 6. According to [TS36133]_ sections 9.1.4 and 9.1.7, RSRP is reported by PHY lauer in dBm while RSRQ in dB. The values of RSRP and RSRQ are provided to higher layers through the C-PHY SAP (by means of ``UeMeasurementsParameters`` struct) every 200 ms as defined in [TS36331]_ by averaging the all the measurements collected during the last window slot. The periodicity of reporting can be adjusted for research purposes by means of ``LteUePhy::UeMeasurementsFilterPeriod`` attribute.
|
||||
|
||||
|
||||
Considering to the constraints of the PHY reception chain implementation and in order to maintain the level of computational complexity low, only RSRP can be directly obtained. This is due to the fact that ``LteInterference`` is designed for evaluating the interference only respect to the signal of the eNB attached to. For what concern RSRQ, it can be extracted by the current information available of the cell and the RSRP as detailed in the following:
|
||||
Considering to the constraints of the PHY reception chain implementation and in order to maintain the level of computational complexity low, only RSRP can be directly obtained for all the cells. This is due to the fact that ``LteSpectrumPhy`` is designed for evaluating the interference only respect to the signal of the serving eNB. This implies that the PHY layer is otimized for managing the power signals information with the serving eNB as a reference. However, RSRP and RSRQ can be extracted by the current information available of the serving cell :math:`j` as detailed in the following:
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -794,7 +794,7 @@ Considering to the constraints of the PHY reception chain implementation and in
|
||||
|
||||
RSRQ_i^j = K \times RSRP_i / RSSI_i^j
|
||||
|
||||
wherem :math:`RSRP_i` is the RSRP of cell :math:`i`, :math:`P_i(k)` is the power perceived at the RB :math:`k`, :math:`K` is the total number of RBs, :math:`RSSI_i^j` is the RSSI of the cell :math:`i` when the UE is attached to :math:`j`, :math:`I_j(k)` is the total interference perceived by UE when attached to cell :math:`i` (obtained by the ``LteInterferencePowerChunkProcessor``) in the RB :math:`k`, :math:`P_j(k)` is the power of the perceived of cell :math:`j` in the RB :math:`k` and :math:`N` is the power noise spectral density. The sample is considered as valid in case of the RSRQ evaluated is above the ``LteUePhy::RsrqUeMeasThreshold`` attribute.
|
||||
wherem :math:`RSRP_i` is the RSRP of the neighbor cell :math:`i`, :math:`P_i(k)` is the power perceived at the RB :math:`k`, :math:`K` is the total number of RBs, :math:`RSSI_i^j` is the RSSI of the neighbor cell :math:`i` when the UE is attached to cell :math:`j`, :math:`I_j(k)` is the total interference perceived by UE when attached to cell :math:`i` (obtained by the ``LteInterferencePowerChunkProcessor``) in the RB :math:`k`, :math:`P_j(k)` is the power of the perceived of cell :math:`j` in the RB :math:`k` and :math:`N` is the power noise spectral density. The sample is considered as valid in case of the RSRQ evaluated is above the ``LteUePhy::RsrqUeMeasThreshold`` attribute.
|
||||
|
||||
.. only:: latex
|
||||
|
||||
|
||||
@@ -190,7 +190,21 @@ the link budget calculations (including interference) corresponding to the topol
|
||||
test case, and outputs the resulting SINR and spectral efficiency. The
|
||||
latter is then used to determine (using the same procedure adopted for
|
||||
:ref:`sec-lte-amc-tests`. We note that the test vector
|
||||
contains separate values for uplink and downlink.
|
||||
contains separate values for uplink and downlink.
|
||||
|
||||
|
||||
|
||||
UE Measurements Tests
|
||||
-----------------------------
|
||||
|
||||
The test suite `lte-ue-measurements`` provides system tests recreating an
|
||||
inter-cell interference scenario identical of the one defined for `lte-interference`` test-suite. However, in this test the quantities to be tested are represented by RSRP and RSRQ measurements performed by the UE in two different points of the stack: the source, which is UE PHY layer, and the destination, that is the eNB RRC.
|
||||
|
||||
The test vectors are obtained by use of a dedicated octave script
|
||||
(available in
|
||||
`src/lte/test/reference/lte-ue-measurements.m`), which does
|
||||
the link budget calculations (including interference) corresponding to the topology of each
|
||||
test case, and outputs the resulting RSRP and RSRQ. The obtained values are then used for checking the correctness of the UE Measurements at PHY layer, while they have to converted according to 3GPP formatting for checking they correctness at eNB RRC level.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,10 +35,12 @@
|
||||
|
||||
#include "ns3/lte-ue-phy.h"
|
||||
#include "ns3/lte-ue-net-device.h"
|
||||
#include <ns3/lte-enb-rrc.h>
|
||||
|
||||
#include "lte-test-ue-measurements.h"
|
||||
|
||||
#include "lte-test-sinr-chunk-processor.h"
|
||||
#include <ns3/lte-common.h>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LteUeMeasurementsTest");
|
||||
|
||||
@@ -52,6 +54,13 @@ ReportUeMeasurementsCallback (LteUeMeasurementsTestCase *testcase, std::string p
|
||||
testcase->ReportUeMeasurements (rnti, cellId, rsrp, rsrq, servingCell);
|
||||
}
|
||||
|
||||
void
|
||||
RecvMeasurementReportCallback (LteUeMeasurementsTestCase *testcase, std::string path,
|
||||
uint64_t imsi, uint16_t rnti, uint16_t cellId, LteRrcSap::MeasurementReport meas)
|
||||
{
|
||||
testcase->RecvMeasurementReport (imsi, rnti, cellId, meas);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TestSuite
|
||||
@@ -88,10 +97,10 @@ LteUeMeasurementsTestCase::LteUeMeasurementsTestCase (std::string name, double d
|
||||
: TestCase (name),
|
||||
m_d1 (d1),
|
||||
m_d2 (d2),
|
||||
m_rsrpDbmUe1 (rsrpDbmUe1),
|
||||
m_rsrpDbmUe2 (rsrpDbmUe2),
|
||||
m_rsrqDbUe1 (rsrqDbUe1),
|
||||
m_rsrqDbUe2 (rsrqDbUe2)
|
||||
m_rsrpDbmUeServingCell (rsrpDbmUe1),
|
||||
m_rsrpDbmUeNeighborCell (rsrpDbmUe2),
|
||||
m_rsrqDbUeServingCell (rsrqDbUe1),
|
||||
m_rsrqDbUeNeighborCell (rsrqDbUe2)
|
||||
{
|
||||
NS_LOG_INFO ("Test UE Measurements d1 = " << d1 << " m. and d2 = " << d2 << " m.");
|
||||
}
|
||||
@@ -113,7 +122,7 @@ LteUeMeasurementsTestCase::DoRun (void)
|
||||
lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
|
||||
lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (false));
|
||||
|
||||
// LogComponentEnable ("LteUeMeasurementsTest", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("LteUeMeasurementsTest", LOG_LEVEL_ALL);
|
||||
|
||||
// Create Nodes: eNodeB and UE
|
||||
NodeContainer enbNodes;
|
||||
@@ -175,6 +184,8 @@ LteUeMeasurementsTestCase::DoRun (void)
|
||||
|
||||
Config::Connect ("/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
|
||||
MakeBoundCallback (&ReportUeMeasurementsCallback, this));
|
||||
Config::Connect ("/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
|
||||
MakeBoundCallback (&RecvMeasurementReportCallback, this));
|
||||
|
||||
// same as above for eNB2 and UE2
|
||||
|
||||
@@ -188,6 +199,8 @@ LteUeMeasurementsTestCase::DoRun (void)
|
||||
|
||||
Config::Connect ("/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
|
||||
MakeBoundCallback (&ReportUeMeasurementsCallback, this));
|
||||
Config::Connect ("/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
|
||||
MakeBoundCallback (&RecvMeasurementReportCallback, this));
|
||||
|
||||
|
||||
// need to allow for RRC connection establishment + SRS
|
||||
@@ -207,15 +220,37 @@ LteUeMeasurementsTestCase::ReportUeMeasurements (uint16_t rnti, uint16_t cellId,
|
||||
{
|
||||
if (servingCell)
|
||||
{
|
||||
NS_LOG_DEBUG ("UE serving cellId " << cellId << " Rxed RSRP " << rsrp << " thr " << m_rsrpDbmUe1 << " RSRQ " << rsrq << " thr " << m_rsrqDbUe1);
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrpDbmUe1, rsrp, 0.2, "Wrong RSRP UE 1");
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrqDbUe1, rsrq, 0.2 , "Wrong RSRQ UE 1");
|
||||
NS_LOG_DEBUG ("UE serving cellId " << cellId << " Rxed RSRP " << rsrp << " thr " << m_rsrpDbmUeServingCell << " RSRQ " << rsrq << " thr " << m_rsrqDbUeServingCell);
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrpDbmUeServingCell, rsrp, 0.2, "Wrong RSRP UE 1");
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrqDbUeServingCell, rsrq, 0.2 , "Wrong RSRQ UE 1");
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_LOG_DEBUG ("UE neighbor cellId " << cellId << " Rxed RSRP " << rsrp << " thr " << m_rsrpDbmUe2 << " RSRQ " << rsrq << " thr " << m_rsrqDbUe2);
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrpDbmUe2, rsrp, 0.2 , "Wrong RSRP UE 2");
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrqDbUe2, rsrq, 0.2 , "Wrong RSRQ UE ");
|
||||
NS_LOG_DEBUG ("UE neighbor cellId " << cellId << " Rxed RSRP " << rsrp << " thr " << m_rsrpDbmUeNeighborCell << " RSRQ " << rsrq << " thr " << m_rsrqDbUeNeighborCell);
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrpDbmUeNeighborCell, rsrp, 0.2 , "Wrong RSRP UE 2");
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (m_rsrqDbUeNeighborCell, rsrq, 0.2 , "Wrong RSRQ UE ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteUeMeasurementsTestCase::RecvMeasurementReport (uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
|
||||
{
|
||||
// need to allow for RRC connection establishment + CQI feedback reception + UE measurements filtering (200 ms)
|
||||
if (Simulator::Now () > MilliSeconds (400))
|
||||
{
|
||||
if (cellId == imsi)
|
||||
{
|
||||
NS_LOG_DEBUG ("Serving Cell: received IMSI " << imsi << " CellId " << cellId << " RNTI " << rnti << " thr " << (uint16_t)EutranMeasurementMapping::Dbm2RsrpRange (m_rsrpDbmUeServingCell) << " RSRP " << (uint16_t)meas.measResults.rsrpResult << " RSRQ " << (uint16_t)meas.measResults.rsrqResult << " thr " << (uint16_t)EutranMeasurementMapping::Db2RsrqRange (m_rsrqDbUeServingCell));
|
||||
NS_TEST_ASSERT_MSG_EQ (meas.measResults.rsrpResult, EutranMeasurementMapping::Dbm2RsrpRange (m_rsrpDbmUeServingCell), "Wrong RSRP ");
|
||||
NS_TEST_ASSERT_MSG_EQ (meas.measResults.rsrqResult, EutranMeasurementMapping::Db2RsrqRange (m_rsrqDbUeServingCell), "Wrong RSRQ ");
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_LOG_DEBUG ("Neighbor cell: received IMSI " << imsi << " CellId " << cellId << " RNTI " << rnti << " thr " << (uint16_t)EutranMeasurementMapping::Dbm2RsrpRange (m_rsrpDbmUeNeighborCell) << " RSRP " << (uint16_t)meas.measResults.rsrpResult << " RSRQ " << (uint16_t)meas.measResults.rsrqResult << " thr " << (uint16_t)EutranMeasurementMapping::Db2RsrqRange (m_rsrqDbUeNeighborCell));
|
||||
NS_TEST_ASSERT_MSG_EQ (meas.measResults.rsrpResult, EutranMeasurementMapping::Dbm2RsrpRange (m_rsrpDbmUeNeighborCell), "Wrong RSRP ");
|
||||
NS_TEST_ASSERT_MSG_EQ (meas.measResults.rsrqResult, EutranMeasurementMapping::Db2RsrqRange (m_rsrqDbUeNeighborCell), "Wrong RSRQ ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
#ifndef LTE_TEST_UE_MEASUREMENTS_H
|
||||
#define LTE_TEST_UE_MEASUREMENTS_H
|
||||
|
||||
#include "ns3/test.h"
|
||||
#include <ns3/test.h>
|
||||
#include <ns3/lte-rrc-sap.h>
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
@@ -49,16 +50,18 @@ public:
|
||||
|
||||
void ReportUeMeasurements (uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell);
|
||||
|
||||
void RecvMeasurementReport (uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas);
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
|
||||
double m_d1;
|
||||
double m_d2;
|
||||
double m_rsrpDbmUe1;
|
||||
double m_rsrpDbmUe2;
|
||||
double m_rsrqDbUe1;
|
||||
double m_rsrqDbUe2;
|
||||
double m_rsrpDbmUeServingCell;
|
||||
double m_rsrpDbmUeNeighborCell;
|
||||
double m_rsrqDbUeServingCell;
|
||||
double m_rsrqDbUeNeighborCell;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@ private:
|
||||
std::vector<UeData> m_ueDataVector;
|
||||
|
||||
const Time m_maxHoDuration;
|
||||
const Time m_statsDuration;
|
||||
const Time m_statsDuration;
|
||||
const Time m_udpClientInterval;
|
||||
const uint32_t m_udpClientPktSize;
|
||||
|
||||
};
|
||||
|
||||
@@ -132,7 +134,10 @@ LteX2HandoverTestCase::LteX2HandoverTestCase (uint32_t nUes, uint32_t nDedicated
|
||||
m_admitHo (admitHo),
|
||||
m_useIdealRrc (useIdealRrc),
|
||||
m_maxHoDuration (Seconds (0.1)),
|
||||
m_statsDuration (Seconds (0.5))
|
||||
m_statsDuration (Seconds (0.1)),
|
||||
m_udpClientInterval (Seconds (0.01)),
|
||||
m_udpClientPktSize (100)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
@@ -142,9 +147,9 @@ LteX2HandoverTestCase::DoRun ()
|
||||
NS_LOG_FUNCTION (this << BuildNameString (m_nUes, m_nDedicatedBearers, m_handoverEventListName, m_useUdp, m_schedulerType, m_admitHo, m_useIdealRrc));
|
||||
|
||||
Config::Reset ();
|
||||
Config::SetDefault ("ns3::UdpClient::Interval", TimeValue (MilliSeconds(100)));
|
||||
Config::SetDefault ("ns3::UdpClient::MaxPackets", UintegerValue(1000000));
|
||||
Config::SetDefault ("ns3::UdpClient::PacketSize", UintegerValue(100));
|
||||
Config::SetDefault ("ns3::UdpClient::Interval", TimeValue (m_udpClientInterval));
|
||||
Config::SetDefault ("ns3::UdpClient::MaxPackets", UintegerValue (1000000));
|
||||
Config::SetDefault ("ns3::UdpClient::PacketSize", UintegerValue (m_udpClientPktSize));
|
||||
|
||||
int64_t stream = 1;
|
||||
|
||||
@@ -405,20 +410,18 @@ LteX2HandoverTestCase::DoRun ()
|
||||
enbDevices.Get (m_admitHo ? hoEventIt->targetEnbDeviceIndex : hoEventIt->sourceEnbDeviceIndex));
|
||||
Simulator::Schedule (hoEndTime, &LteX2HandoverTestCase::SaveStatsAfterHandover,
|
||||
this, hoEventIt->ueDeviceIndex);
|
||||
|
||||
Time checkStatsAfterHoTime = hoEndTime + m_statsDuration;
|
||||
Simulator::Schedule (checkStatsAfterHoTime, &LteX2HandoverTestCase::CheckStatsAWhileAfterHandover,
|
||||
this, hoEventIt->ueDeviceIndex);
|
||||
if (stopTime <= hoEndTime)
|
||||
if (stopTime <= checkStatsAfterHoTime)
|
||||
{
|
||||
stopTime = hoEndTime + MilliSeconds (1);
|
||||
stopTime = checkStatsAfterHoTime + MilliSeconds (1);
|
||||
}
|
||||
}
|
||||
|
||||
m_lteHelper->EnableRlcTraces ();
|
||||
Ptr<RadioBearerStatsCalculator> rlcStats = m_lteHelper->GetRlcStats ();
|
||||
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (0.101)));
|
||||
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (0.1)));
|
||||
m_lteHelper->EnablePdcpTraces();
|
||||
// m_lteHelper->EnableRlcTraces ();
|
||||
// m_lteHelper->EnablePdcpTraces();
|
||||
|
||||
|
||||
Simulator::Stop (stopTime);
|
||||
@@ -517,9 +520,8 @@ LteX2HandoverTestCase::CheckStatsAWhileAfterHandover (uint32_t ueIndex)
|
||||
++it)
|
||||
{
|
||||
uint32_t dlRx = it->dlSink->GetTotalRx () - it->dlOldTotalRx;
|
||||
uint32_t ulRx = it->ulSink->GetTotalRx () - it->ulOldTotalRx;
|
||||
// udpclient pktsize interval
|
||||
uint32_t expectedBytes = 100.0 * (0.100 / m_statsDuration.GetSeconds ());
|
||||
uint32_t ulRx = it->ulSink->GetTotalRx () - it->ulOldTotalRx;
|
||||
uint32_t expectedBytes = m_udpClientPktSize * (m_statsDuration.GetSeconds () / m_udpClientInterval.GetSeconds ());
|
||||
// tolerance
|
||||
NS_TEST_ASSERT_MSG_GT (dlRx, 0.500 * expectedBytes, "too few RX bytes in DL, ue=" << ueIndex << ", b=" << b);
|
||||
NS_TEST_ASSERT_MSG_GT (ulRx, 0.500 * expectedBytes, "too few RX bytes in UL, ue=" << ueIndex << ", b=" << b);
|
||||
|
||||
Reference in New Issue
Block a user