--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -19,9 +19,12 @@
* Modification: Dizhi Zhou <dizhi.zhou@gmail.com> // modify codes related to downlink scheduler
*/
+#ifdef __FreeBSD__
+#define log2(x) (log (x) / M_LN2)
+#endif /* __FreeBSD__ */
+
#include <ns3/log.h>
#include <ns3/pointer.h>
-#include <ns3/math.h>
#include <ns3/simulator.h>
#include <ns3/lte-amc.h>
@@ -408,11 +411,14 @@
}
else
{
- // update MBR and GBR
- uint64_t mbrDlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateDl / 8;
- uint64_t mbrUlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateUl / 8;
- m_flowStatsDl[(*it).first].tokenGenerationRate = mbrDlInBytes;
- m_flowStatsUl[(*it).first].tokenGenerationRate = mbrUlInBytes;
+ //NS_LOG_ERROR ("RNTI already exists");
+
+ // update MBR and GBR from UeManager::SetupDataRadioBearer ()
+ uint64_t mbrDlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateDl / 8; // byte/s
+ uint64_t mbrUlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateUl / 8; // byte/s
+ m_flowStatsDl[(*it).first].tokenGenerationRate = mbrDlInBytes;
+ m_flowStatsUl[(*it).first].tokenGenerationRate = mbrUlInBytes;
+
}
}
@@ -513,7 +519,7 @@
FdTbfqFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params)
{
NS_LOG_FUNCTION (this);
- NS_FATAL_ERROR ("method not implemented");
+ // TODO: Implementation of the API
return;
}
@@ -521,7 +527,7 @@
FdTbfqFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params)
{
NS_LOG_FUNCTION (this);
- NS_FATAL_ERROR ("method not implemented");
+ // TODO: Implementation of the API
return;
}
@@ -1038,7 +1044,7 @@
}
continue;
}
-
+
if (LcActivePerFlow ((*it).first) == 0)
{
continue;
@@ -1221,6 +1227,7 @@
{
(*itMap).second.push_back (rbgIndex);
}
+ rbgMap.at (rbgIndex) = true; // Mark this RBG as allocated
RbgPerRnti = (*itMap).second.size();
@@ -1284,6 +1291,7 @@
allocatedRbg.erase (rbgIndex);
bytesTxed = bytesTxedTmp; // recovery bytesTxed
totalRbg--;
+ rbgMap.at (rbgIndex) = false; // unmark this RBG
}
// update UE stats
@@ -1925,6 +1933,7 @@
FdTbfqFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ // TODO: Implementation of the API
return;
}
@@ -1932,6 +1941,7 @@
FdTbfqFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ // TODO: Implementation of the API
return;
}
--- a/src/lte/model/pss-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/model/pss-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -393,7 +393,13 @@
}
else
{
- NS_LOG_ERROR ("RNTI already exists");
+ //NS_LOG_ERROR ("RNTI already exists");
+
+ // update GBR from UeManager::SetupDataRadioBearer ()
+ double tbrDlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabGuaranteedBitrateDl / 8; // byte/s
+ double tbrUlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabGuaranteedBitrateUl / 8; // byte/s
+ m_flowStatsDl[(*it).first].targetThroughput = tbrDlInBytes;
+ m_flowStatsUl[(*it).first].targetThroughput = tbrUlInBytes;
}
}
--- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -19,9 +19,12 @@
* Modification: Dizhi Zhou <dizhi.zhou@gmail.com> // modify codes related to downlink scheduler
*/
+#ifdef __FreeBSD__
+#define log2(x) (log (x) / M_LN2)
+#endif /* __FreeBSD__ */
+
#include <ns3/log.h>
#include <ns3/pointer.h>
-#include <ns3/math.h>
#include <ns3/simulator.h>
#include <ns3/lte-amc.h>
@@ -408,11 +411,14 @@
}
else
{
- // update MBR and GBR
- uint64_t mbrDlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateDl / 8;
- uint64_t mbrUlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateUl / 8;
- m_flowStatsDl[(*it).first].tokenGenerationRate = mbrDlInBytes;
- m_flowStatsUl[(*it).first].tokenGenerationRate = mbrUlInBytes;
+ //NS_LOG_ERROR ("RNTI already exists");
+
+ // update MBR and GBR from UeManager::SetupDataRadioBearer ()
+ uint64_t mbrDlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateDl / 8; // byte/s
+ uint64_t mbrUlInBytes = params.m_logicalChannelConfigList.at (i).m_eRabMaximulBitrateUl / 8; // byte/s
+ m_flowStatsDl[(*it).first].tokenGenerationRate = mbrDlInBytes;
+ m_flowStatsUl[(*it).first].tokenGenerationRate = mbrUlInBytes;
+
}
}
@@ -513,7 +519,7 @@
TdTbfqFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters& params)
{
NS_LOG_FUNCTION (this);
- NS_FATAL_ERROR ("method not implemented");
+ // TODO: Implementation of the API
return;
}
@@ -521,7 +527,7 @@
TdTbfqFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters& params)
{
NS_LOG_FUNCTION (this);
- NS_FATAL_ERROR ("method not implemented");
+ // TODO: Implementation of the API
return;
}
@@ -1034,10 +1040,12 @@
continue;
}
+ /*
if (LcActivePerFlow ((*it).first) == 0)
{
- continue;
+ continue;
}
+ */
double metric = ( ( (double)(*it).second.counter ) / ( (double)(*it).second.tokenGenerationRate ) );
@@ -1068,11 +1076,15 @@
{
if ( rbgMap.at (i) == true) // this RBG is allocated in RACH procedure
continue;
+
tempMap.push_back (i);
+ rbgMap.at (i) = true;
}
allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
}
+
+
// generate the transmission opportunities by grouping the RBGs of the same RNTI and
// creating the correspondent DCIs
std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
@@ -1224,6 +1236,23 @@
(*itHarqTimer).second.at (newDci.m_harqProcess) = 0;
}
+
+ // update UE stats
+ if ( bytesTxed <= (*itMax).second.tokenPoolSize )
+ {
+ (*itMax).second.tokenPoolSize -= bytesTxed;
+ }
+ else
+ {
+ (*itMax).second.counter = (*itMax).second.counter - ( bytesTxed - (*itMax).second.tokenPoolSize );
+ (*itMax).second.tokenPoolSize = 0;
+ if (bankSize <= ( bytesTxed - (*itMax).second.tokenPoolSize ))
+ bankSize = 0;
+ else
+ bankSize = bankSize - ( bytesTxed - (*itMax).second.tokenPoolSize );
+ }
+
+
// ...more parameters -> ingored in this version
ret.m_buildDataList.push_back (newEl);
@@ -1696,6 +1725,7 @@
TdTbfqFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ // TODO: Implementation of the API
return;
}
@@ -1703,6 +1733,7 @@
TdTbfqFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ // TODO: Implementation of the API
return;
}
--- a/src/lte/model/tdtbfq-ff-mac-scheduler.h Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/model/tdtbfq-ff-mac-scheduler.h Fri Apr 05 21:05:55 2013 -0300
@@ -75,7 +75,7 @@
*/
/**
* \ingroup TdTbfqFfMacScheduler
- * \brief Implements the SCHED SAP and CSCHED SAP for a Time Domain Token Bank Fair Queue scheduler
+ * \brief Implements the SCHED SAP and CSCHED SAP for a Time Domain Token Bank Fair Queue scheduler
*
* This class implements the interface defined by the FfMacScheduler abstract class
*/
--- a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -58,7 +58,7 @@
#include "lte-test-fdtbfq-ff-mac-scheduler.h"
-NS_LOG_COMPONENT_DEFINE ("LenaTestFdTbfqFfMacCheduler");
+NS_LOG_COMPONENT_DEFINE ("LenaTestFdTbfqFfMacScheduler");
namespace ns3 {
@@ -67,6 +67,8 @@
{
NS_LOG_INFO ("creating LenaTestFdTbfqFfMacSchedulerSuite");
+ bool errorModel = false;
+
// General config
// Traffic: UDP traffic with fixed rate
// Token generation rate = traffic rate
@@ -75,7 +77,6 @@
// Throughput in this file is calculated in RLC layer
//Test Case 1: homogeneous flow test in FDTBFQ (same distance)
-
// DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
@@ -90,148 +91,126 @@
// 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
// 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
// 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1), TestCase::EXTENSIVE);
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1,errorModel));
+ //AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 3000 -> MCS 24 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
- // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
+ // DOWNLINK - DISTANCE 4800 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
- // UPLINK - DISTANCE 3000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 18 -> 1239 -> 1239000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 18 -> 389 -> 389000 > 232000 -> throughput = 232000 bytes/sec
- // 6 users -> 4 PRB at Itbs 18 -> 193 -> 193000 < 232000 -> throughput = 193000 bytes/sec
- // 12 users -> 2 PRB at Itbs 18 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,3000,230500,193000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,3000,115250,97000,200,1), TestCase::EXTENSIVE);
-
- // DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
+ // Totol bandwidth: 24 PRB at Itbs 15 -> 1383 -> 903000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
+ // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
+ // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
+ // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput = 62000 bytes/sec
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,4800,150500,125000,200,1,errorModel));
+ //AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,4800,75250,62000,200,1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail
+
+ // DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 15 -> 903 -> 903000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 775000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129167 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
+
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
+ // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- // 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 < 232000 -> throughput = 47000 bytes/sec
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,6000,150500,97000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,6000,75250,47000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput = 48667 bytes/sec
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,6000,129167,97000,200,1,errorModel));
+ //AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,6000,64583,48667,200,1, errorModel)); // simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 9000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
+ // DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 11 -> 597 -> 597000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 597000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 597000 -> througphut = 597000 / 3 = 199000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 597000 -> throughput = 597000 / 6 = 99500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 597000 -> throughput = 597000 / 12 = 49750 byte/sec
- // UPLINK - DISTANCE 9000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
+ // Totol bandwidth: 24 PRB at Itbs 8 -> 421 -> 421000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 421000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 > 421000 -> througphut = 421000 / 3 = 140333 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 421000 -> throughput = 421000 / 6 = 70166 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 421000 -> throughput = 421000 / 12 = 35083 byte/sec
+ // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
// 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
- // 12 users -> 2 PRB at Itbs 8 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,9000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,9000,199000,137000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,9000,99500,67000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,9000,49750,32000,200,1), TestCase::EXTENSIVE);
-
- // DONWLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // Traffic info
- // UDP traffic: payload size = 200 bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 6 -> 309 -> 309000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 309000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 309000 -> througphut = 309000 / 3 = 103000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 309000 -> throughput = 309000 / 6 = 51500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 309000 -> throughput = 309000 / 12 = 25750 byte/sec
- // UPLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 6 -> 233 -> 233000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 6 -> 69 -> 69000 < 232000 -> throughput = 69000 bytes/sec
- // 6 users -> 4 PRB at Itbs 6 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- // 12 users -> 2 PRB at Itbs 6 -> 15 -> 15000 < 232000 -> throughput = 15000 bytes/sec
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,15000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,15000,103000,69000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,15000,51500,32000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,15000,25750,15000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667 bytes/sec
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (1,0,10000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (3,0,10000,140333,137000,200,1,errorModel));
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (6,0,10000,70166,67000,200,1,errorModel));
+ //AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase1 (12,0,10000,35083,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
// Test Case 2: homogeneous flow test in FDTBFQ (different distance)
// Traffic1 info
// UDP traffic: payload size = 100 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 132000 * 5 = 660000 < 694720 -> estimated throughput in downlink = 132000 byte/sec
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 132000 * 4 = 528000 < 720930 -> estimated throughput in downlink = 132000 byte/sec
std::vector<uint16_t> dist1;
- dist1.push_back (0); // User 0 distance --> MCS 28
- dist1.push_back (3000); // User 1 distance --> MCS 24
- dist1.push_back (6000); // User 2 distance --> MCS 16
- dist1.push_back (9000); // User 3 distance --> MCS 12
- dist1.push_back (15000); // User 4 distance --> MCS 6
+ dist1.push_back (0); // User 0 distance --> MCS 28
+ dist1.push_back (4800); // User 1 distance --> MCS 16
+ dist1.push_back (6000); // User 2 distance --> MCS 14
+ dist1.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize1;
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
- packetSize1.push_back (100);
std::vector<uint32_t> estThrFdTbfqDl1;
estThrFdTbfqDl1.push_back (132000); // User 0 estimated TTI throughput from FDTBFQ
estThrFdTbfqDl1.push_back (132000); // User 1 estimated TTI throughput from FDTBFQ
estThrFdTbfqDl1.push_back (132000); // User 2 estimated TTI throughput from FDTBFQ
estThrFdTbfqDl1.push_back (132000); // User 3 estimated TTI throughput from FDTBFQ
- estThrFdTbfqDl1.push_back (132000); // User 4 estimated TTI throughput from FDTBFQ
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist1,estThrFdTbfqDl1,packetSize1,1), TestCase::EXTENSIVE);
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist1,estThrFdTbfqDl1,packetSize1,1,errorModel));
// Traffic2 info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 232000 * 5 = 1160000 > 694720 -> estimated throughput in downlink = 694720 / 5 = 138944 byte/sec
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 232000 * 4 = 928000 > 720930 -> estimated throughput in downlink = 720930 / 4 = 180232 byte/sec
std::vector<uint16_t> dist2;
- dist2.push_back (0); // User 0 distance --> MCS 28
- dist2.push_back (3000); // User 1 distance --> MCS 24
- dist2.push_back (6000); // User 2 distance --> MCS 16
- dist2.push_back (9000); // User 3 distance --> MCS 12
- dist2.push_back (15000); // User 4 distance --> MCS 6
+ dist2.push_back (0); // User 0 distance --> MCS 28
+ dist2.push_back (4800); // User 1 distance --> MCS 16
+ dist2.push_back (6000); // User 2 distance --> MCS 14
+ dist2.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize2;
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
- packetSize2.push_back (200);
std::vector<uint32_t> estThrFdTbfqDl2;
- estThrFdTbfqDl2.push_back (138944); // User 0 estimated TTI throughput from FDTBFQ
- estThrFdTbfqDl2.push_back (138944); // User 1 estimated TTI throughput from FDTBFQ
- estThrFdTbfqDl2.push_back (138944); // User 2 estimated TTI throughput from FDTBFQ
- estThrFdTbfqDl2.push_back (138944); // User 3 estimated TTI throughput from FDTBFQ
- estThrFdTbfqDl2.push_back (138944); // User 4 estimated TTI throughput from FDTBFQ
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist2,estThrFdTbfqDl2,packetSize2,1), TestCase::EXTENSIVE);
+ estThrFdTbfqDl2.push_back (180232); // User 0 estimated TTI throughput from FDTBFQ
+ estThrFdTbfqDl2.push_back (180232); // User 1 estimated TTI throughput from FDTBFQ
+ estThrFdTbfqDl2.push_back (180232); // User 2 estimated TTI throughput from FDTBFQ
+ estThrFdTbfqDl2.push_back (180232); // User 3 estimated TTI throughput from FDTBFQ
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist2,estThrFdTbfqDl2,packetSize2,1,errorModel));
// Test Case 3: heterogeneous flow test in FDTBFQ
// UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 ) = 1312417 byte/s
- // 132000 + 232000 + 332000 = 696000 < 1312417 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
+ // Maximum throughput = 3 / ( 1/2196000 + 1/903000 + 1/621000 ) = 945450 byte/s
+ // 132000 + 232000 + 332000 = 696000 < 945450 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
std::vector<uint16_t> dist3;
dist3.push_back (0); // User 0 distance --> MCS 28
- dist3.push_back (3000); // User 1 distance --> MCS 24
- dist3.push_back (6000); // User 2 distance --> MCS 16
+ dist3.push_back (4800); // User 1 distance --> MCS 16
+ dist3.push_back (6000); // User 2 distance --> MCS 14
std::vector<uint16_t> packetSize3;
packetSize3.push_back (100);
packetSize3.push_back (200);
@@ -240,7 +219,7 @@
estThrFdTbfqDl3.push_back (132000); // User 0 estimated TTI throughput from FDTBFQ
estThrFdTbfqDl3.push_back (232000); // User 1 estimated TTI throughput from FDTBFQ
estThrFdTbfqDl3.push_back (332000); // User 2 estimated TTI throughput from FDTBFQ
- AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist3,estThrFdTbfqDl3,packetSize3,1), TestCase::QUICK);
+ AddTestCase (new LenaFdTbfqFfMacSchedulerTestCase2 (dist3,estThrFdTbfqDl3,packetSize3,1,errorModel));
}
@@ -258,7 +237,7 @@
}
-LenaFdTbfqFfMacSchedulerTestCase1::LenaFdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval)
+LenaFdTbfqFfMacSchedulerTestCase1::LenaFdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (nUser, dist)),
m_nUser (nUser),
m_nLc (nLc),
@@ -266,7 +245,8 @@
m_packetSize (packetSize),
m_interval (interval),
m_thrRefDl (thrRefDl),
- m_thrRefUl (thrRefUl)
+ m_thrRefUl (thrRefUl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -279,10 +259,20 @@
{
NS_LOG_FUNCTION (this << GetName ());
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
+ //LogComponentEnable ("FdTbfqFfMacScheduler", LOG_DEBUG);
+
Ptr<Node> pgw = epcHelper->GetPgwNode ();
// Create a single RemoteHost
@@ -308,12 +298,12 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
+ //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
+ //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestFdTbfqFfMacCheduler", LOG_LEVEL_ALL);
@@ -419,12 +409,13 @@
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
- double statsDuration = 2.0;
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
+ double statsDuration = 1;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
lteHelper->EnableRlcTraces ();
+ lteHelper->EnableMacTraces ();
Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
@@ -496,13 +487,14 @@
}
-LenaFdTbfqFfMacSchedulerTestCase2::LenaFdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrFdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval)
+LenaFdTbfqFfMacSchedulerTestCase2::LenaFdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrFdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (dist.size (), dist)),
m_nUser (dist.size ()),
m_dist (dist),
m_packetSize (packetSize),
m_interval (interval),
- m_estThrFdTbfqDl (estThrFdTbfqDl)
+ m_estThrFdTbfqDl (estThrFdTbfqDl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -513,6 +505,16 @@
void
LenaFdTbfqFfMacSchedulerTestCase2::DoRun (void)
{
+
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
@@ -542,12 +544,6 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
-
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestFdTbfqFfMacCheduler", LOG_LEVEL_ALL);
@@ -661,7 +657,7 @@
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
double statsDuration = 1.0;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
--- a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h Fri Apr 05 21:05:55 2013 -0300
@@ -42,7 +42,7 @@
class LenaFdTbfqFfMacSchedulerTestCase1 : public TestCase
{
public:
- LenaFdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval);
+ LenaFdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaFdTbfqFfMacSchedulerTestCase1 ();
private:
@@ -55,13 +55,14 @@
uint16_t m_interval; // ms
double m_thrRefDl;
double m_thrRefUl;
+ bool m_errorModelEnabled;
};
class LenaFdTbfqFfMacSchedulerTestCase2 : public TestCase
{
public:
- LenaFdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrFdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval);
+ LenaFdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrFdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaFdTbfqFfMacSchedulerTestCase2 ();
private:
@@ -72,6 +73,7 @@
std::vector<uint16_t> m_packetSize; // byte
uint16_t m_interval; // ms
std::vector<uint32_t> m_estThrFdTbfqDl;
+ bool m_errorModelEnabled;
};
--- a/src/lte/test/lte-test-pss-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-pss-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -58,7 +58,7 @@
#include "lte-test-pss-ff-mac-scheduler.h"
-NS_LOG_COMPONENT_DEFINE ("LenaTestPssFfMacCheduler");
+NS_LOG_COMPONENT_DEFINE ("LenaTestPssFfMacScheduler");
namespace ns3 {
@@ -67,6 +67,8 @@
{
NS_LOG_INFO ("creating LenaTestPssFfMacSchedulerSuite");
+ bool errorModel = false;
+
// General config
// Traffic: UDP traffic with fixed rate
// Token generation rate = traffic rate
@@ -75,7 +77,6 @@
// Throughput in this file is calculated in RLC layer
//Test Case 1: homogeneous flow test in PSS (same distance)
-
// DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
@@ -90,185 +91,136 @@
// 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
// 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
// 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1), TestCase::EXTENSIVE);
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1,errorModel));
+ //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 3000 -> MCS 24 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
- // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
+ // DOWNLINK - DISTANCE 4800 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
- // UPLINK - DISTANCE 3000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 18 -> 1239 -> 1239000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 18 -> 389 -> 389000 > 232000 -> throughput = 232000 bytes/sec
- // 6 users -> 4 PRB at Itbs 18 -> 193 -> 193000 < 232000 -> throughput = 193000 bytes/sec
- // 12 users -> 2 PRB at Itbs 18 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,3000,230500,193000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,3000,115250,97000,200,1), TestCase::EXTENSIVE);
-
- // DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
+ // Totol bandwidth: 24 PRB at Itbs 15 -> 1383 -> 903000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
+ // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
+ // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
+ // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput = 62000 bytes/sec
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,4800,150500,125000,200,1,errorModel));
+ //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,4800,75250,62000,200,1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail
+
+ // DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 15 -> 903 -> 903000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 775000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129167 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
+
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
+ // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- // 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 < 232000 -> throughput = 47000 bytes/sec
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,6000,150500,97000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,6000,75250,47000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput = 48667 bytes/sec
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,6000,129167,97000,200,1,errorModel));
+ //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,6000,64583,48667,200,1, errorModel)); // simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 9000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
+ // DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 11 -> 597 -> 597000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 597000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 597000 -> througphut = 597000 / 3 = 199000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 597000 -> throughput = 597000 / 6 = 99500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 597000 -> throughput = 597000 / 12 = 49750 byte/sec
- // UPLINK - DISTANCE 9000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
+ // Totol bandwidth: 24 PRB at Itbs 8 -> 421 -> 421000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 421000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 > 421000 -> througphut = 421000 / 3 = 140333 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 421000 -> throughput = 421000 / 6 = 70166 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 421000 -> throughput = 421000 / 12 = 35083 byte/sec
+ // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
// 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
- // 12 users -> 2 PRB at Itbs 8 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,9000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,9000,199000,137000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,9000,99500,67000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,9000,49750,32000,200,1), TestCase::EXTENSIVE);
-
- // DONWLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // Traffic info
- // UDP traffic: payload size = 200 bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 6 -> 309 -> 309000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 309000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 309000 -> througphut = 309000 / 3 = 103000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 309000 -> throughput = 309000 / 6 = 51500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 309000 -> throughput = 309000 / 12 = 25750 byte/sec
- // UPLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 6 -> 233 -> 233000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 6 -> 69 -> 69000 < 232000 -> throughput = 69000 bytes/sec
- // 6 users -> 4 PRB at Itbs 6 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- // 12 users -> 2 PRB at Itbs 6 -> 15 -> 15000 < 232000 -> throughput = 15000 bytes/sec
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,15000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,15000,103000,69000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,15000,51500,32000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,15000,25750,15000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667 bytes/sec
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,0,10000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,10000,140333,137000,200,1,errorModel));
+ AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,10000,70166,67000,200,1,errorModel));
+ //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,10000,35083,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
// Test Case 2: homogeneous flow test in PSS (different distance)
// Traffic1 info
// UDP traffic: payload size = 100 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 132000 * 5 = 660000 < 694720 -> estimated throughput in downlink = 694720/5 = 132000 bytes/sec
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 132000 * 4 = 528000 < 720930 -> estimated throughput in downlink = 132000 byte/sec
std::vector<uint16_t> dist1;
- dist1.push_back (0); // User 0 distance --> MCS 28
- dist1.push_back (3000); // User 1 distance --> MCS 24
- dist1.push_back (6000); // User 2 distance --> MCS 16
- dist1.push_back (9000); // User 3 distance --> MCS 12
- dist1.push_back (15000); // User 4 distance --> MCS 6
+ dist1.push_back (0); // User 0 distance --> MCS 28
+ dist1.push_back (4800); // User 1 distance --> MCS 16
+ dist1.push_back (6000); // User 2 distance --> MCS 14
+ dist1.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize1;
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
- packetSize1.push_back (100);
std::vector<uint32_t> estThrPssDl1;
- estThrPssDl1.push_back (132000);
- estThrPssDl1.push_back (132000);
- estThrPssDl1.push_back (132000);
- estThrPssDl1.push_back (132000);
- estThrPssDl1.push_back (132000);
- AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist1,estThrPssDl1,packetSize1,1), TestCase::EXTENSIVE);
+ estThrPssDl1.push_back (132000); // User 0 estimated TTI throughput from PSS
+ estThrPssDl1.push_back (132000); // User 1 estimated TTI throughput from PSS
+ estThrPssDl1.push_back (132000); // User 2 estimated TTI throughput from PSS
+ estThrPssDl1.push_back (132000); // User 3 estimated TTI throughput from PSS
+ AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist1,estThrPssDl1,packetSize1,1,errorModel));
// Traffic2 info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 232000 * 5 = 1160000 > 694720 -> estimated throughput in downlink = 694720/5 = 138944 bytes/sec
+ // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 232000 * 4 = 928000 > 720930 -> estimated throughput in downlink = 720930 / 4 = 180232 byte/sec
std::vector<uint16_t> dist2;
- dist2.push_back (0); // User 0 distance --> MCS 28
- dist2.push_back (3000); // User 1 distance --> MCS 24
- dist2.push_back (6000); // User 2 distance --> MCS 16
- dist2.push_back (9000); // User 3 distance --> MCS 12
- dist2.push_back (15000); // User 4 distance --> MCS 6
+ dist2.push_back (0); // User 0 distance --> MCS 28
+ dist2.push_back (4800); // User 1 distance --> MCS 16
+ dist2.push_back (6000); // User 2 distance --> MCS 14
+ dist2.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize2;
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
- packetSize2.push_back (200);
std::vector<uint32_t> estThrPssDl2;
- estThrPssDl2.push_back (138944);
- estThrPssDl2.push_back (138944);
- estThrPssDl2.push_back (138944);
- estThrPssDl2.push_back (138944);
- estThrPssDl2.push_back (138944);
- AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist2,estThrPssDl2,packetSize2,1), TestCase::EXTENSIVE);
-
- // Test Case 3: : heterogeneous flow test in PSS (same distance)
- // Traffic3 info:
- // UDP traffic: payload size = [100, 200,300,400,500] bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Maximum throughput = 2196000 byte/sec
- // 132000 + 232000 + 332000 + 432000 + 532000 = 1660000 < 2196000 -> estimated throughput in downlink = [132000, 232000,332000, 432000, 53200] bytes/sec
+ estThrPssDl2.push_back (180232); // User 0 estimated TTI throughput from PSS
+ estThrPssDl2.push_back (180232); // User 1 estimated TTI throughput from PSS
+ estThrPssDl2.push_back (180232); // User 2 estimated TTI throughput from PSS
+ estThrPssDl2.push_back (180232); // User 3 estimated TTI throughput from PSS
+ AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist2,estThrPssDl2,packetSize2,1,errorModel));
+
+ // Test Case 3: heterogeneous flow test in PSS
+ // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
+ // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
+ // Maximum throughput = 3 / ( 1/2196000 + 1/903000 + 1/621000 ) = 945450 byte/s
+ // 132000 + 232000 + 332000 = 696000 < 945450 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
std::vector<uint16_t> dist3;
dist3.push_back (0); // User 0 distance --> MCS 28
- dist3.push_back (0); // User 1 distance --> MCS 24
- dist3.push_back (0); // User 2 distance --> MCS 16
- dist3.push_back (0); // User 3 distance --> MCS 12
- dist3.push_back (0); // User 4 distance --> MCS 6
+ dist3.push_back (4800); // User 1 distance --> MCS 16
+ dist3.push_back (6000); // User 2 distance --> MCS 14
std::vector<uint16_t> packetSize3;
packetSize3.push_back (100);
packetSize3.push_back (200);
packetSize3.push_back (300);
- packetSize3.push_back (400);
- packetSize3.push_back (500);
std::vector<uint32_t> estThrPssDl3;
- estThrPssDl3.push_back (132000);
- estThrPssDl3.push_back (232000);
- estThrPssDl3.push_back (332000);
- estThrPssDl3.push_back (432000);
- estThrPssDl3.push_back (532000);
- AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist3,estThrPssDl3,packetSize3,1), TestCase::EXTENSIVE);
-
+ estThrPssDl3.push_back (132000); // User 0 estimated TTI throughput from PSS
+ estThrPssDl3.push_back (232000); // User 1 estimated TTI throughput from PSS
+ estThrPssDl3.push_back (332000); // User 2 estimated TTI throughput from PSS
+ AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist3,estThrPssDl3,packetSize3,1,errorModel));
- // Test Case 4: heterogeneous flow test in PSS (different distance)
- // Traffic4 info
- // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 ) = 1312417 byte/s
- // 132000 + 232000 + 332000 = 696000 < 1312417 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
- std::vector<uint16_t> dist4;
- dist4.push_back (0); // User 0 distance --> MCS 28
- dist4.push_back (3000); // User 1 distance --> MCS 24
- dist4.push_back (6000); // User 2 distance --> MCS 16
- std::vector<uint16_t> packetSize4;
- packetSize4.push_back (100);
- packetSize4.push_back (200);
- packetSize4.push_back (300);
- std::vector<uint32_t> estThrPssDl4;
- estThrPssDl4.push_back (132000); // User 0 estimated TTI throughput from PSS
- estThrPssDl4.push_back (232000); // User 1 estimated TTI throughput from PSS
- estThrPssDl4.push_back (332000); // User 2 estimated TTI throughput from PSS
- AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist4,estThrPssDl4,packetSize4,1), TestCase::QUICK);
}
static LenaTestPssFfMacSchedulerSuite lenaTestPssFfMacSchedulerSuite;
@@ -285,7 +237,7 @@
}
-LenaPssFfMacSchedulerTestCase1::LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval)
+LenaPssFfMacSchedulerTestCase1::LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (nUser, dist)),
m_nUser (nUser),
m_nLc (nLc),
@@ -293,7 +245,8 @@
m_packetSize (packetSize),
m_interval (interval),
m_thrRefDl (thrRefDl),
- m_thrRefUl (thrRefUl)
+ m_thrRefUl (thrRefUl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -304,10 +257,22 @@
void
LenaPssFfMacSchedulerTestCase1::DoRun (void)
{
+ NS_LOG_FUNCTION (this << GetName ());
+
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
+ //LogComponentEnable ("PssFfMacScheduler", LOG_DEBUG);
+
Ptr<Node> pgw = epcHelper->GetPgwNode ();
// Create a single RemoteHost
@@ -333,12 +298,12 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
+ //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
+ //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL);
@@ -362,7 +327,6 @@
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
- lteHelper->SetSchedulerAttribute("PssFdSchedulerType", StringValue("PFsch"));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);
@@ -405,11 +369,11 @@
{
Ptr<NetDevice> ueDevice = ueDevs.Get (u);
GbrQosInformation qos;
- qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) * 8 * 1; // bit/
- qos.gbrUl = (m_packetSize + 32) * (1000 / m_interval) * 8 * 1;
+ qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
+ qos.gbrUl = (m_packetSize + 32) * (1000 / m_interval) * 8;
qos.mbrDl = 0;
qos.mbrUl = 0;
-
+
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q, qos);
lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
@@ -440,17 +404,18 @@
clientApps.Add (dlClient.Install (remoteHost));
clientApps.Add (ulClient.Install (ueNodes.Get (u)));
- }
+ }
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
- double statsDuration = 2.0;
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
+ double statsDuration = 1;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
lteHelper->EnableRlcTraces ();
+ lteHelper->EnableMacTraces ();
Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
@@ -458,7 +423,7 @@
Simulator::Run ();
/**
- * Check that the downlink assignation is done in a "priority set scheduler" manner
+ * Check that the downlink assignation is done in a "token bank fair queue" manner
*/
NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
@@ -522,13 +487,14 @@
}
-LenaPssFfMacSchedulerTestCase2::LenaPssFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval)
+LenaPssFfMacSchedulerTestCase2::LenaPssFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (dist.size (), dist)),
m_nUser (dist.size ()),
m_dist (dist),
m_packetSize (packetSize),
m_interval (interval),
- m_estThrPssDl (estThrPssDl)
+ m_estThrPssDl (estThrPssDl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -539,6 +505,16 @@
void
LenaPssFfMacSchedulerTestCase2::DoRun (void)
{
+
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
@@ -568,12 +544,6 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
-
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL);
@@ -597,7 +567,6 @@
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
- lteHelper->SetSchedulerAttribute ("PssFdSchedulerType", StringValue ("PFsch"));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);
@@ -635,20 +604,21 @@
lteHelper->Attach (ueDevs, enbDevs.Get (0));
// Activate an EPS bearer on all UEs
+
for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
{
Ptr<NetDevice> ueDevice = ueDevs.Get (u);
GbrQosInformation qos;
- qos.gbrDl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8 * 1; // bit/s, = Target Bit Rate(TBR)
- qos.gbrUl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8 * 1;
+ qos.gbrDl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
+ qos.gbrUl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8;
qos.mbrDl = qos.gbrDl;
qos.mbrUl = qos.gbrUl;
-
+
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q, qos);
lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
+ }
- }
// Install downlind and uplink applications
uint16_t dlPort = 1234;
@@ -680,7 +650,7 @@
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
double statsDuration = 1.0;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
@@ -690,10 +660,11 @@
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
+
Simulator::Run ();
/**
- * Check that the downlink assignation is done in a "priority set scheduler" manner
+ * Check that the downlink assignation is done in a "token bank fair queue" manner
*/
NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)");
--- a/src/lte/test/lte-test-pss-ff-mac-scheduler.h Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-pss-ff-mac-scheduler.h Fri Apr 05 21:05:55 2013 -0300
@@ -36,12 +36,13 @@
* case, the UEs see the same SINR from the eNB; different test cases are
* implemented obtained by using different SINR values and different numbers of
* UEs. The test consists on checking that the obtained throughput performance
-* is equal among users is consistent with the definition of priority set scheduling
+* is equal among users is consistent with the definition of token bank fair
+* queue scheduling
*/
class LenaPssFfMacSchedulerTestCase1 : public TestCase
{
public:
- LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval);
+ LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaPssFfMacSchedulerTestCase1 ();
private:
@@ -54,13 +55,14 @@
uint16_t m_interval; // ms
double m_thrRefDl;
double m_thrRefUl;
+ bool m_errorModelEnabled;
};
class LenaPssFfMacSchedulerTestCase2 : public TestCase
{
public:
- LenaPssFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval);
+ LenaPssFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaPssFfMacSchedulerTestCase2 ();
private:
@@ -71,6 +73,7 @@
std::vector<uint16_t> m_packetSize; // byte
uint16_t m_interval; // ms
std::vector<uint32_t> m_estThrPssDl;
+ bool m_errorModelEnabled;
};
--- a/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc Fri Apr 05 21:05:55 2013 -0300
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Marco Miozzo <marco.miozzo@cttc.es>,
- * Nicola Baldo <nbaldo@cttc.es>,
+ * Nicola Baldo <nbaldo@cttc.es>
* Dizhi Zhou <dizhi.zhou@gmail.com>
*/
@@ -58,7 +58,7 @@
#include "lte-test-tdtbfq-ff-mac-scheduler.h"
-NS_LOG_COMPONENT_DEFINE ("LenaTestTdTbfqFfMacCheduler");
+NS_LOG_COMPONENT_DEFINE ("LenaTestTdTbfqFfMacScheduler");
namespace ns3 {
@@ -67,6 +67,8 @@
{
NS_LOG_INFO ("creating LenaTestTdTbfqFfMacSchedulerSuite");
+ bool errorModel = false;
+
// General config
// Traffic: UDP traffic with fixed rate
// Token generation rate = traffic rate
@@ -75,7 +77,6 @@
// Throughput in this file is calculated in RLC layer
//Test Case 1: homogeneous flow test in TDTBFQ (same distance)
-
// DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
@@ -90,148 +91,126 @@
// 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
// 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
// 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1), TestCase::EXTENSIVE);
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,0,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,0,232000,232000,200,1,errorModel));
+ //AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,0,183000,185000,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 3000 -> MCS 24 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
- // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
+ // DOWNLINK - DISTANCE 4800 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
- // UPLINK - DISTANCE 3000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 18 -> 1239 -> 1239000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 18 -> 389 -> 389000 > 232000 -> throughput = 232000 bytes/sec
- // 6 users -> 4 PRB at Itbs 18 -> 193 -> 193000 < 232000 -> throughput = 193000 bytes/sec
- // 12 users -> 2 PRB at Itbs 18 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,3000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,3000,230500,193000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,3000,115250,97000,200,1), TestCase::EXTENSIVE);
+ // Totol bandwidth: 24 PRB at Itbs 15 -> 1383 -> 903000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
+ // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
+ // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
+ // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput = 62000 bytes/sec
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,4800,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,4800,150500,125000,200,1,errorModel));
+ //AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,4800,75250,62000,200,1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
+ // DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 15 -> 903 -> 903000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 903000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 < 903000 -> througphut = 232000 byte/sec
- // 6 user -> 232000 * 6 = 139200 > 903000 -> throughput = 903000 / 6 = 150500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 903000 / 12 = 75250 byte/sec
+ // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 < 775000 -> througphut = 232000 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129167 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
+
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
+ // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
- // 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 < 232000 -> throughput = 47000 bytes/sec
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,6000,150500,97000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,6000,75250,47000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput = 48667 bytes/sec
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,6000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,6000,232000,201000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,6000,129167,97000,200,1,errorModel));
+ //AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,6000,64583,48667,200,1, errorModel)); // simulation time = 1.5, otherwise, ul test will fail
- // DOWNLINK - DISTANCE 9000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
+ // DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// Traffic info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 11 -> 597 -> 597000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 597000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 597000 -> througphut = 597000 / 3 = 199000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 597000 -> throughput = 597000 / 6 = 99500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 597000 -> throughput = 597000 / 12 = 49750 byte/sec
- // UPLINK - DISTANCE 9000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
+ // Totol bandwidth: 24 PRB at Itbs 8 -> 421 -> 421000 byte/sec
+ // 1 user -> 903000 * 1 = 232000 < 421000 -> throughput = 232000 byte/sec
+ // 3 user -> 232000 * 3 = 696000 > 421000 -> througphut = 421000 / 3 = 140333 byte/sec
+ // 6 user -> 232000 * 6 = 139200 > 421000 -> throughput = 421000 / 6 = 70166 byte/sec
+ // 12 user -> 232000 * 12 = 2784000 > 421000 -> throughput = 421000 / 12 = 35083 byte/sec
+ // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
// 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
// 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
- // 12 users -> 2 PRB at Itbs 8 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,9000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,9000,199000,137000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,9000,99500,67000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,9000,49750,32000,200,1), TestCase::EXTENSIVE);
-
- // DONWLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // Traffic info
- // UDP traffic: payload size = 200 bytes, interval = 1 ms
- // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Totol bandwidth: 24 PRB at Itbs 6 -> 309 -> 309000 byte/sec
- // 1 user -> 232000 * 1 = 232000 < 309000 -> throughput = 232000 byte/sec
- // 3 user -> 232000 * 3 = 696000 > 309000 -> througphut = 309000 / 3 = 103000byte/sec
- // 6 user -> 232000 * 6 = 139200 > 309000 -> throughput = 309000 / 6 = 51500 byte/sec
- // 12 user -> 232000 * 12 = 2784000 > 309000 -> throughput = 309000 / 12 = 25750 byte/sec
- // UPLINK - DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
- // 1 user -> 25 PRB at Itbs 6 -> 233 -> 233000 > 232000 -> throughput = 232000 bytes/sec
- // 3 users -> 8 PRB at Itbs 6 -> 69 -> 69000 < 232000 -> throughput = 69000 bytes/sec
- // 6 users -> 4 PRB at Itbs 6 -> 32 -> 32000 < 232000 -> throughput = 32000 bytes/sec
- // 12 users -> 2 PRB at Itbs 6 -> 15 -> 15000 < 232000 -> throughput = 15000 bytes/sec
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,15000,232000,232000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,15000,103000,69000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,15000,51500,32000,200,1), TestCase::EXTENSIVE);
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,15000,25750,15000,200,1), TestCase::EXTENSIVE);
+ // after the patch enforcing min 3 PRBs per UE:
+ // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667 bytes/sec
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (1,0,10000,232000,232000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (3,0,10000,140333,137000,200,1,errorModel));
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (6,0,10000,70166,67000,200,1,errorModel));
+ //AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,10000,35083,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
// Test Case 2: homogeneous flow test in TDTBFQ (different distance)
// Traffic1 info
// UDP traffic: payload size = 100 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 132000 * 5 = 660000 < 694720 -> estimated throughput in downlink = 132000 byte/sec
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 132000 * 4 = 528000 < 720930 -> estimated throughput in downlink = 132000 byte/sec
std::vector<uint16_t> dist1;
- dist1.push_back (0); // User 0 distance --> MCS 28
- dist1.push_back (3000); // User 1 distance --> MCS 24
- dist1.push_back (6000); // User 2 distance --> MCS 16
- dist1.push_back (9000); // User 3 distance --> MCS 12
- dist1.push_back (15000); // User 4 distance --> MCS 6
+ dist1.push_back (0); // User 0 distance --> MCS 28
+ dist1.push_back (4800); // User 1 distance --> MCS 16
+ dist1.push_back (6000); // User 2 distance --> MCS 14
+ dist1.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize1;
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
packetSize1.push_back (100);
- packetSize1.push_back (100);
std::vector<uint32_t> estThrTdTbfqDl1;
estThrTdTbfqDl1.push_back (132000); // User 0 estimated TTI throughput from TDTBFQ
estThrTdTbfqDl1.push_back (132000); // User 1 estimated TTI throughput from TDTBFQ
estThrTdTbfqDl1.push_back (132000); // User 2 estimated TTI throughput from TDTBFQ
estThrTdTbfqDl1.push_back (132000); // User 3 estimated TTI throughput from TDTBFQ
- estThrTdTbfqDl1.push_back (132000); // User 4 estimated TTI throughput from TDTBFQ
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist1,estThrTdTbfqDl1,packetSize1,1), TestCase::EXTENSIVE);
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist1,estThrTdTbfqDl1,packetSize1,1,errorModel));
// Traffic2 info
// UDP traffic: payload size = 200 bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 + 1/597000 + 1/309000) = 694720 byte/s
- // 232000 * 5 = 1160000 > 694720 -> estimated throughput in downlink = 694720 / 5 = 138944 byte/sec
+ // Maximum throughput = 4 / ( 1/2196000 + 1/903000 + 1/621000 + 1/421000 ) = 720930 byte/s
+ // 232000 * 4 = 928000 > 720930 -> estimated throughput in downlink = 720930 / 4 = 180232 byte/sec
std::vector<uint16_t> dist2;
- dist2.push_back (0); // User 0 distance --> MCS 28
- dist2.push_back (3000); // User 1 distance --> MCS 24
- dist2.push_back (6000); // User 2 distance --> MCS 16
- dist2.push_back (9000); // User 3 distance --> MCS 12
- dist2.push_back (15000); // User 4 distance --> MCS 6
+ dist2.push_back (0); // User 0 distance --> MCS 28
+ dist2.push_back (4800); // User 1 distance --> MCS 16
+ dist2.push_back (6000); // User 2 distance --> MCS 14
+ dist2.push_back (10000); // User 3 distance --> MCS 8
std::vector<uint16_t> packetSize2;
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
packetSize2.push_back (200);
- packetSize2.push_back (200);
std::vector<uint32_t> estThrTdTbfqDl2;
- estThrTdTbfqDl2.push_back (138944); // User 0 estimated TTI throughput from TDTBFQ
- estThrTdTbfqDl2.push_back (138944); // User 1 estimated TTI throughput from TDTBFQ
- estThrTdTbfqDl2.push_back (138944); // User 2 estimated TTI throughput from TDTBFQ
- estThrTdTbfqDl2.push_back (138944); // User 3 estimated TTI throughput from TDTBFQ
- estThrTdTbfqDl2.push_back (138944); // User 4 estimated TTI throughput from TDTBFQ
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist2,estThrTdTbfqDl2,packetSize2,1), TestCase::EXTENSIVE);
+ estThrTdTbfqDl2.push_back (180232); // User 0 estimated TTI throughput from TDTBFQ
+ estThrTdTbfqDl2.push_back (180232); // User 1 estimated TTI throughput from TDTBFQ
+ estThrTdTbfqDl2.push_back (180232); // User 2 estimated TTI throughput from TDTBFQ
+ estThrTdTbfqDl2.push_back (180232); // User 3 estimated TTI throughput from TDTBFQ
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist2,estThrTdTbfqDl2,packetSize2,1,errorModel));
// Test Case 3: heterogeneous flow test in TDTBFQ
// UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
// UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
- // Maximum throughput = 5 / ( 1/2196000 + 1/1383000 + 1/903000 ) = 1312417 byte/s
- // 132000 + 232000 + 332000 = 696000 < 1312417 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
+ // Maximum throughput = 3 / ( 1/2196000 + 1/903000 + 1/621000 ) = 945450 byte/s
+ // 132000 + 232000 + 332000 = 696000 < 945450 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
std::vector<uint16_t> dist3;
dist3.push_back (0); // User 0 distance --> MCS 28
- dist3.push_back (3000); // User 1 distance --> MCS 24
- dist3.push_back (6000); // User 2 distance --> MCS 16
+ dist3.push_back (4800); // User 1 distance --> MCS 16
+ dist3.push_back (6000); // User 2 distance --> MCS 14
std::vector<uint16_t> packetSize3;
packetSize3.push_back (100);
packetSize3.push_back (200);
@@ -240,7 +219,7 @@
estThrTdTbfqDl3.push_back (132000); // User 0 estimated TTI throughput from TDTBFQ
estThrTdTbfqDl3.push_back (232000); // User 1 estimated TTI throughput from TDTBFQ
estThrTdTbfqDl3.push_back (332000); // User 2 estimated TTI throughput from TDTBFQ
- AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist3,estThrTdTbfqDl3,packetSize3,1), TestCase::QUICK);
+ AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase2 (dist3,estThrTdTbfqDl3,packetSize3,1,errorModel));
}
@@ -258,7 +237,7 @@
}
-LenaTdTbfqFfMacSchedulerTestCase1::LenaTdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval)
+LenaTdTbfqFfMacSchedulerTestCase1::LenaTdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (nUser, dist)),
m_nUser (nUser),
m_nLc (nLc),
@@ -266,7 +245,8 @@
m_packetSize (packetSize),
m_interval (interval),
m_thrRefDl (thrRefDl),
- m_thrRefUl (thrRefUl)
+ m_thrRefUl (thrRefUl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -279,10 +259,20 @@
{
NS_LOG_FUNCTION (this << GetName ());
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
+ //LogComponentEnable ("TdTbfqFfMacScheduler", LOG_DEBUG);
+
Ptr<Node> pgw = epcHelper->GetPgwNode ();
// Create a single RemoteHost
@@ -308,12 +298,12 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
+ //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
+ //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestTdTbfqFfMacCheduler", LOG_LEVEL_ALL);
@@ -419,12 +409,13 @@
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
- double statsDuration = 2.0;
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
+ double statsDuration = 1;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
lteHelper->EnableRlcTraces ();
+ lteHelper->EnableMacTraces ();
Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
@@ -496,13 +487,14 @@
}
-LenaTdTbfqFfMacSchedulerTestCase2::LenaTdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrTdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval)
+LenaTdTbfqFfMacSchedulerTestCase2::LenaTdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrTdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval,bool errorModelEnabled)
: TestCase (BuildNameString (dist.size (), dist)),
m_nUser (dist.size ()),
m_dist (dist),
m_packetSize (packetSize),
m_interval (interval),
- m_estThrTdTbfqDl (estThrTdTbfqDl)
+ m_estThrTdTbfqDl (estThrTdTbfqDl),
+ m_errorModelEnabled (errorModelEnabled)
{
}
@@ -513,6 +505,16 @@
void
LenaTdTbfqFfMacSchedulerTestCase2::DoRun (void)
{
+
+ if (!m_errorModelEnabled)
+ {
+ Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
+ Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
+ }
+
+ Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
+
+
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
@@ -542,12 +544,6 @@
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
- Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
- Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
- Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
-
- Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
LogComponentDisableAll (LOG_LEVEL_ALL);
//LogComponentEnable ("LenaTestTdTbfqFfMacCheduler", LOG_LEVEL_ALL);
@@ -630,6 +626,7 @@
lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
}
+
// Install downlind and uplink applications
uint16_t dlPort = 1234;
uint16_t ulPort = 2000;
@@ -660,7 +657,7 @@
serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
- double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
+ double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
double statsDuration = 1.0;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
@@ -670,11 +667,13 @@
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
+
Simulator::Run ();
-
+
/**
- * Check that the assignation is done in a "token bank fair queue" manner
- */
+ * Check that the downlink assignation is done in a "token bank fair queue" manner
+ */
+
NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)");
std::vector <uint64_t> dlDataRxed;
for (int i = 0; i < m_nUser; i++)
--- a/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.h Fri Apr 05 19:05:31 2013 +0200
+++ b/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.h Fri Apr 05 21:05:55 2013 -0300
@@ -42,7 +42,7 @@
class LenaTdTbfqFfMacSchedulerTestCase1 : public TestCase
{
public:
- LenaTdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval);
+ LenaTdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t nLc, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaTdTbfqFfMacSchedulerTestCase1 ();
private:
@@ -55,13 +55,14 @@
uint16_t m_interval; // ms
double m_thrRefDl;
double m_thrRefUl;
+ bool m_errorModelEnabled;
};
class LenaTdTbfqFfMacSchedulerTestCase2 : public TestCase
{
public:
- LenaTdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrTdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval);
+ LenaTdTbfqFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrTdTbfqDl, std::vector<uint16_t> packetSize, uint16_t interval, bool errorModelEnabled);
virtual ~LenaTdTbfqFfMacSchedulerTestCase2 ();
private:
@@ -72,6 +73,7 @@
std::vector<uint16_t> m_packetSize; // byte
uint16_t m_interval; // ms
std::vector<uint32_t> m_estThrTdTbfqDl;
+ bool m_errorModelEnabled;
};