src/lte/model/lte-mi-error-model.cc
changeset 10098 6eae0980db76
parent 10096 e7367028d8a6
child 10232 1fa0b4341dd2
--- a/src/lte/model/lte-mi-error-model.cc	Mon Jul 15 13:38:53 2013 +0200
+++ b/src/lte/model/lte-mi-error-model.cc	Wed Jul 24 13:19:54 2013 +0200
@@ -154,7 +154,7 @@
 double bEcrTable [9][38] = {
   // CB of 40 bits
   {
-    -1.000, -1.000, 0.01572, // QPSK retx
+    0.02472, 0.06352, 0.09516, // QPSK retx
     0.1777, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -163,7 +163,7 @@
   },  
   // CB of 104 bits
   {
-    -1.000, -1.000, 0.01224, // QPSK retx
+    0.01940, 0.05020, 0.07592, // QPSK retx
     0.1423, 0.1753, 0.1882, 0.2499, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -172,7 +172,7 @@
   },
   // CB of 160
   {
-    -1.000, -1.000, 0.01148, // QPSK retx
+    0.01820, 0.04688, 0.07082, // QPSK retx
     0.1354, 0.1655, 0.1812, 0.2351, 0.2873, 0.3462, -1.000, -1.000, -1.000, -1.0000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -181,7 +181,7 @@
   },
   // CB of 256
   {
-    -1.000, -1.000, 0.01094, // QPSK retx
+    0.01728, 0.04488, 0.06786, // QPSK retx
     0.1304, 0.1584, 0.1735, 0.2265, 0.2782, 0.3340, 0.3927, 0.4785, 0.5566, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -190,47 +190,47 @@
   },
   // CB of 512
   {
-    -1.000, -1.000, 0.01048, // QPSK retx
+    0.01658, 0.04332, 0.06550, // QPSK retx
     0.1257, 0.1528, 0.1667, 0.2188, 0.2680, 0.3229, 0.3818, 0.4607, 0.5373, 0.6081, // QPSK
-    0.07198, 0.16632, 0.3737, // 16 QAM retx
+    0.15004, 0.18266, 0.24084, // 16 QAM retx
     0.3783, 0.4049, 0.4472, 0.4975, 0.5556, -1.000, -1.000, //16QAM
     -1.000, -1.000, -1.000, // 64QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000  // 64QAM
   },
   // CB of 1024
   {
-    -1.000, -1.000, 0.01026, // QPSK retx
+    0.01622, 0.04216, 0.06402, // QPSK retx
     0.1224, 0.1497, 0.1638, 0.2139, 0.2636, 0.3195, 0.3768, 0.4520, 0.5269, 0.5963, // QPSK
-    0.07228, 0.1652, 0.36928, // 16QAM retx
+    0.14846, 0.18102, 0.237880, // 16QAM retx
     0.3754, 0.3979, 0.4399, 0.4894, 0.5464, 0.6034, 0.6619, // 16QAM
-    0.21138, 0.42448, 0.77898, // 64QAM retx
+    0.13938, 0.19212, 0.28890, // 64QAM retx
     0.50662, 0.52226, 0.5627, 0.6089, 0.6577, 0.7049, 0.7508, -1.000, -1.000, -1.000, -1.000, -1.000  //64QAM
   },
   // CB of 2560
   {
-     -1.000, -1.000, 0.01008, // QPSK retx
+    0.01600, 0.04164, 0.06320, // QPSK retx
     0.1211, 0.1480, 0.1615, 0.2119, 0.2611, 0.3157, 0.3735, 0.4458, 0.5205, 0.5902, // QPSK
-    0.0592, 0.15188, 0.36016, // 16 QAM retx
+    0.14484, 0.17770, 0.23558, // 16 QAM retx
     0.3729, 0.3939, 0.4351, 0.4851, 0.5416, 0.5976, 0.6554, // 16QAM
-    0.20886, 0.41926, 0.76674, // 64 QAM retx
+    0.13770, 0.18336, 0.27600, // 64 QAM retx
     0.50028, 0.51888, 0.5619, 0.6056, 0.6521, 0.6982, 0.7441, 0.7874, 0.8315, 0.8735, 0.9089, 0.9369  // 64QAM
   },
   // CB of 4032
   {
-    -1.000, -1.000, 0.01008, // QPSK retx
+    0.01598, 0.04164, 0.06300, // QPSK retx
     0.1208, 0.1477, 0.1612, 0.2112, 0.2606, 0.3153, 0.3728, 0.4441, 0.5185, 0.5882,  // QPSK
-    0.06074, 0.1527, 0.36034, // 16 QAM retx
+    0.169280, 0.199820, 0.25520, // 16 QAM retx
     0.3864, 0.3921, 0.4338, 0.4871, 0.5386, 0.5940, 0.6527,  // 16QAM
-    0.2088, 0.41928, 0.76588, // 64QAM retx
+    0.13754, 0.18956, 0.28408, // 64QAM retx
     0.50316, 0.51872, 0.5591, 0.6027, 0.6512, 0.6981, 0.7437, 0.7873, 0.8301, 0.8702, 0.9082, 0.9339  // 64QAM
   },
   // CB of 6144
   {
-    -1.000, -1.000, 0.01006, // QPSK retx
+    0.01598, 0.04154, 0.06288, // QPSK retx
     0.1207, 0.1474, 0.1612, 0.2111, 0.2605, 0.3153, 0.3726, 0.4439, 0.5193, 0.5882,  // QPSK
-    0.06302, 0.15566, 0.36364, // 16QAM retx
+    0.14490, 0.17742, 0.23514, // 16QAM retx
     0.3724, 0.3921, 0.4339, 0.4833, 0.5407, 0.5952, 0.6528, // 16QAM
-    0.20874, 0.41872, 0.76562,  // 64QAM retx
+    0.13752, 0.18244, 0.27578,  // 64QAM retx
     0.49780, 0.51606, 0.5600, 0.6027, 0.6494, 0.6948, 0.7407, 0.7842, 0.8284, 0.8692, 0.9058, 0.9325  // 64QAM
   },
 };
@@ -239,7 +239,7 @@
 double cEcrTable [9][38] = {
   // CB of 40 bits
   {
-    -1.000, -1.000, 0.00359, // QPSK retx
+    0.00543, 0.01337, 0.01969, // QPSK retx
     0.0342, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -248,7 +248,7 @@
   },
   // CB of 104 bits
   {
-    -1.000, -1.000, 0.00193, // QPSK retx
+    0.00301, 0.00749, 0.01071, // QPSK retx
     0.0198, 0.0239, 0.0248, 0.0320, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -257,7 +257,7 @@
   },
   // CB of 160 bits
   {
-    -1.000, -1.000, 0.00159, // QPSK retx
+    0.00245, 0.00589, 0.00843, // QPSK retx
     0.0157, 0.0190, 0.0204, 0.0252, 0.0310, 0.0348, -1.0000, -1.000, -1.000, -1.000, //QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -266,7 +266,7 @@
   },
   // CB of 256 bits
   {
-    -1.000, -1.000, 0.00119, // QPSK retx
+    0.00187, 0.00453, 0.00699, // QPSK retx
     0.0123, 0.0149, 0.0163, 0.0212, 0.0252, 0.0298, 0.0304, 0.0341, 0.0382, -1.000, // QPSK
     -1.000, -1.000, -1.000, // 16QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, // 16QAM
@@ -275,47 +275,47 @@
   },
   // CB of 512 bits
   {
-    -1.000, -1.000, 0.00091, // QPSK retx
+    0.00135, 0.00319, 0.00469, // QPSK retx
     0.0085, 0.0106, 0.0109, 0.0140, 0.0178, 0.0217, 0.0219, 0.0249, 0.0270, 0.0292, // QPSK
-    0.00797, 0.01357, 0.0234, // 16QAM retx
+    0.01027, 0.01197, 0.01485, // 16QAM retx
     0.0202, 0.0206, 0.0220, 0.0235, 0.0236, -1.000, -1.000, // 16 QAM
     -1.000, -1.000, -1.000, // 64QAM retx
     -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
   },
   // CB of 1024 bits
   {
-    -1.000, -1.000, 0.00059, // QPSK retx
+    0.00093, 0.00239, 0.00327, // QPSK retx
     0.0061, 0.0074, 0.0078, 0.0102, 0.0121, 0.0138, 0.0163, 0.0178, 0.0207, 0.0198, // QPSK
-    0.00615, 0.01013, 0.01681, // 16QAM retx
+    0.00725, 0.00879, 0.01015, // 16QAM retx
     0.0141, 0.0137, 0.0154, 0.0164, 0.0175, 0.0188, 0.0188, // 16QAM
-    0.01053, 0.01869, 0.02261, // 64QAM retx
+    0.00705, 0.01111, 0.01359, // 64QAM retx
     0.01661, 0.01655, 0.0157, 0.0169, 0.0185, 0.0189, 0.0200, -1.000, -1.000, -1.000, -1.000, -1.000 // 64QAM
   },
   // CB of 2560 bits
   {
-    -1.000, -1.000, 0.00039, // QPSK retx
+    0.00059, 0.00145, 0.00209, // QPSK retx
     0.0040, 0.0047, 0.0050, 0.0063, 0.0079, 0.0091, 0.0101, 0.0117, 0.0123, 0.0129, // QPSK
-    0.00213, 0.00475, 0.00921, // 16QAM retx
+    0.00419, 0.00515, 0.00649, // 16QAM retx
     0.0083, 0.0091, 0.0095, 0.0102, 0.0112, 0.0114, 0.0119, // 16QAM
-    0.00637, 0.01161, 0.01273, // 64QAM retx
+    0.00451, 0.00597, 0.00791, // 64QAM retx
     0.00951, 0.00943, 0.0096, 0.0104, 0.0109, 0.0108, 0.0118, 0.0122, 0.0117, 0.0110, 0.0097, 0.0085 // 64QAM
   },
   // CB of 4032 bits
   {
-    -1.000, -1.000, 0.00029, // QPSK retx
+    0.00045, 0.00111, 0.00173, // QPSK retx
     0.0032, 0.0038, 0.0039, 0.0051, 0.0063, 0.0072, 0.0079, 0.0084, 0.0100, 0.0106, // QPSK
-    0.00193, 0.00405, 0.00777, // 16QAM retx
+    0.00577, 0.00615, 0.00723, // 16QAM retx
     0.0092, 0.0074, 0.0078, 0.0090, 0.0084, 0.0089, 0.0092, // 16 QAM
-    0.00565, 0.00981, 0.01143, // 64QAM retx
+    0.00369, 0.00565, 0.00737, // 64QAM retx
     0.00795, 0.0080, 0.0080, 0.0081, 0.0090, 0.0091, 0.0095, 0.0096, 0.0094, 0.0086, 0.0078, 0.0071 // 64QAM
   },
   // CB of 6144 bits
   {
-    -1.000, -1.000, 0.00025, // QPSK retx
+    0.00037, 0.00093, 0.00141, // QPSK retx
     0.0025, 0.0032, 0.0032, 0.0042, 0.0054, 0.0059, 0.0064, 0.0073, 0.0081, 0.0076, // QPSK
-    0.00175, 0.00367, 0.006223, // 16QAM retx
+    0.00273, 0.00351, 0.00417, // 16QAM retx
     0.0056, 0.0058, 0.0064, 0.0070, 0.0068, 0.0074, 0.0080, // 16QAM
-    0.00437, 0.00785, 0.00873,
+    0.00303, 0.00377, 0.00507, // 64QAM retx
     0.0060, 0.00609, 0.0061, 0.0066, 0.0069, 0.0080, 0.0081, 0.0080, 0.0077, 0.0068, 0.0066, 0.0058 // 64QAM
   }
     
@@ -403,11 +403,7 @@
   NS_LOG_FUNCTION (mib << (uint32_t) ecrId << (uint32_t) cbSize);
   double b = 0;
   double c = 0;
-  if (ecrId<2)
-    {
-      // Minimum ECR with available BLER curves -> ECR 0 and 1 assumed always correct
-      return (0.0);
-    }
+
   NS_ASSERT_MSG (ecrId <= MI_64QAM_BLER_MAX_ID, "ECR out of range [0..37]: " << (uint16_t) ecrId);
   int cbIndex = 1;
   while ((cbIndex < 9)&&(cbMiSizeTable[cbIndex]<= cbSize))
@@ -667,7 +663,7 @@
     }
   else
     {
-      NS_LOG_DEBUG ("HARQ!!!!!!!!!!! " << miHistory.size ());
+      NS_LOG_DEBUG ("HARQ block no. " << miHistory.size ());
       // harq retx -> get closest ECR to Reff from available ones
       if (mcs <= MI_QPSK_MAX_ID)
         {
@@ -699,7 +695,9 @@
             }
           ecrId = i;
         }
+      NS_LOG_DEBUG ("HARQ ECR " << (uint16_t)ecrId);
     }
+
   if (C!=1)
     {
       double cbler = MappingMiBler (MI, ecrId, Kplus);