src/lte/model/lte-mi-error-model.cc
author Tom Henderson <tomh@tomh.org>
Tue, 15 May 2012 22:32:23 -0700
changeset 8762 46d94f0ede45
parent 8760 8ccb0c2badc1
child 8794 a68aeda2d85b
permissions -rw-r--r--
remove tests that always evaluate to true
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
     2
/*
8662
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     3
* Copyright (c) 2011 SIGNET LAB. Department of Information Engineering (DEI), University of Padua
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     4
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     5
* This program is free software; you can redistribute it and/or modify
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     6
* it under the terms of the GNU General Public License version 2 as
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     7
* published by the Free Software Foundation;
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     8
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
     9
* This program is distributed in the hope that it will be useful,
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    12
* GNU General Public License for more details.
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    13
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    14
* You should have received a copy of the GNU General Public License
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    15
* along with this program; if not, write to the Free Software
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    17
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    18
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    19
* Original Work Authors:
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    20
*      Marco Mezzavilla <mezzavil@dei.unipd.it>
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    21
*      Giovanni Tomasi <tomasigv@gmail.com>
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    22
* Original Work Acknowldegments:
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    23
*      This work was supported by the MEDIEVAL (MultiMEDia transport
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    24
*      for mobIlE Video AppLications) project, which is a
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    25
*      medium-scale focused research project (STREP) of the 7th
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    26
*      Framework Programme (FP7)
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    27
*
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    28
* Subsequent integration in LENA and extension done by:
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    29
*      Marco Miozzo <marco.miozzo@cttc.es>
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    30
*/ 
067fc46999d5 Add Acknowldegments to LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8646
diff changeset
    31
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    32
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    33
#include <list>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    34
#include <tr1/functional>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    35
#include <vector>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    36
#include <ns3/log.h>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    37
#include <ns3/pointer.h>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    38
#include <stdint.h>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    39
#include <cmath>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    40
#include <stdint.h>
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    41
#include "stdlib.h"
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    42
#include <ns3/lte-mi-error-model.h>
8533
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
    43
//#include <ns3/lte-amc.h> // for DEBUGing
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    44
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    45
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    46
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    47
NS_LOG_COMPONENT_DEFINE ("LteMiErrorModel");
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    48
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    49
namespace ns3 {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    50
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    51
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    52
  int TbsIndex[32] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, -1, -1};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    53
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    54
  uint16_t cbSizeTable[188] = {   // as K column of table 5.1.3-3 of TS 36,212
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    55
    
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    56
    40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    57
    160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    58
    272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    59
    384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    60
    496, 504, 512, 528, 544, 560, 576, 592, 608, 624, 640, 656, 672, 688,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    61
    704, 720, 736, 752, 768, 784, 800, 816, 832, 848, 864, 880, 896, 912,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    62
    928, 944, 960, 976, 992, 1008, 1024, 1056, 1088, 1120, 1152, 1184, 1216,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    63
    1248, 1280, 1312, 1344, 1376, 1408, 1440, 1472, 1504, 1536, 1568, 1600,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    64
    1632, 1664, 1696, 1728, 1760, 1792, 1824, 1856, 1888, 1920, 1952, 1984,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    65
    2016, 2048, 2112, 2176, 2240, 2304, 2368, 2432, 2496, 2560, 2624, 2688,    2752, 2816, 2880, 2944, 3008, 3072, 3136, 3200, 3264, 3328, 3392, 3456,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    66
    3520, 3584, 3648, 3712, 3776, 3840, 3904, 3968, 4032, 4096, 4160, 4224,    4288, 4352, 4416, 4480, 4544, 4608, 4672, 4736, 4800, 4864, 4928, 4992,    5056, 5120, 5184, 5248, 5312, 5376, 5440, 5504, 5568, 5632, 5696, 5760,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    67
    5824, 5888, 5952, 6016, 6080, 6144   
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    68
  };
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    69
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    70
  double MI_map_qpsk[MI_MAP_QPSK_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    71
      0.241488960000000,0.246542900000000,0.251558600000000,0.256536500000000,0.261477000000000,0.266380510000000,0.271247420000000,0.276078100000000,0.280872930000000,0.285632250000000,0.290356410000000,0.295045750000000,0.299700590000000,0.304321240000000,0.308908030000000,0.313461230000000,0.317981160000000,0.322468090000000,0.326922300000000,0.331344060000000,0.335733640000000,0.340091280000000,0.344417260000000,0.348711800000000,0.352975150000000,0.357207550000000,0.361409220000000,0.364930950000000,0.369063590000000,0.373163910000000,0.377232300000000,0.381269140000000,0.385274790000000,0.389249620000000,0.393193970000000,0.397108200000000,0.400992630000000,0.404847590000000,0.408673420000000,0.412470430000000,0.416238920000000,0.419979200000000,0.423691560000000,0.427376310000000,0.431033730000000,0.434664100000000,0.438267690000000,0.441844780000000,0.445395640000000,0.448920520000000,0.452419680000000,0.455893390000000,0.459341880000000,0.462765400000000,0.466164190000000,0.469538500000000,0.472888540000000,0.476214560000000,0.479516780000000,0.482795410000000,0.486050690000000,0.489282820000000,0.492492030000000,0.495678510000000,0.498842470000000,0.501984120000000,0.505103670000000,0.508201300000000,0.511277210000000,0.514331590000000,0.517364640000000,0.520376540000000,0.523367480000000,0.526337640000000,0.529287190000000,0.532216320000000,0.535125210000000,0.538014010000000,0.540882910000000,0.543732080000000,0.546561670000000,0.549371860000000,0.552162810000000,0.554934680000000,0.557687620000000,0.560421800000000,0.563137360000000,0.565834470000000,0.568513260000000,0.571173900000000,0.573816530000000,0.576441300000000,0.579048340000000,0.581637810000000,0.584209840000000,0.586764580000000,0.589302160000000,0.591822710000000,0.594326380000000,0.596813300000000,0.599283600000000,0.601737400000000,0.604174850000000,0.606596060000000,0.609001170000000,0.611390290000000,0.613763560000000,0.616121100000000,0.618463020000000,0.620789450000000,0.623100500000000,0.625396300000000,0.627676970000000,0.629942600000000,0.632193330000000,0.634429260000000,0.636650510000000,0.638857190000000,0.641049400000000,0.643227250000000,0.645390860000000,0.647540330000000,0.649675770000000,0.651797270000000,0.653904950000000,0.655998910000000,0.658079240000000,0.660146050000000,0.662199440000000,0.664239510000000,0.666266360000000,0.668280070000000,0.670280760000000,0.672268510000000,0.674243420000000,0.676205580000000,0.678155080000000,0.680092020000000,0.682016490000000,0.683928580000000,0.685828370000000,0.687715960000000,0.689591440000000,0.691454880000000,0.693306380000000,0.695146030000000,0.696973900000000,0.698790090000000,0.700594670000000,0.702387730000000,0.704169340000000,0.705939600000000,0.707698580000000,0.709446360000000,0.711183020000000,0.712908640000000,0.714623290000000,0.716327060000000,0.718020020000000,0.719702250000000,0.721373810000000,0.723034800000000,0.724685270000000,0.726325300000000,0.727954970000000,0.729574350000000,0.731183510000000,0.732782520000000,0.734371450000000,0.735950370000000,0.737519350000000,0.739078460000000,0.740627770000000,0.742167340000000,0.743697240000000,0.745217540000000,0.746728300000000,0.748229600000000,0.749721480000000,0.751204030000000,0.752677300000000,0.754141350000000,0.755596250000000,0.757042070000000,0.758478850000000,0.759906670000000,0.761325590000000,0.762735660000000,0.764136940000000,0.765529500000000,0.766913400000000,0.768288690000000,0.769655420000000,0.771013670000000,0.772363480000000,0.773704920000000,0.775038030000000,0.776362880000000,0.777679510000000,0.778988000000000,0.780288380000000,0.781580710000000,0.782865060000000,0.784141460000000,0.785409980000000,0.786670670000000,0.787923570000000,0.789168750000000,0.790406240000000,0.791636110000000,0.792858410000000,0.794073170000000,0.795280460000000,0.796480330000000,0.797672820000000,0.798857970000000,0.800035850000000,0.801206500000000,0.802369960000000,0.803526280000000,0.804675510000000,0.805817700000000,0.806952890000000,0.808081130000000,0.809202470000000,0.810316940000000,0.811424600000000,0.812525490000000,0.813619650000000,0.814707120000000,0.815787960000000,0.816862210000000,0.817929900000000,0.818991080000000,0.820045790000000,0.821094080000000,0.822135980000000,0.823171540000000,0.824200800000000,0.825223800000000,0.826240580000000,0.827251180000000,0.828255640000000,0.829254010000000,0.830246310000000,0.831232590000000,0.832212890000000,0.833187250000000,0.834155700000000,0.835118290000000,0.836075040000000,0.837026010000000,0.837971210000000,0.838910710000000,0.839844520000000,0.840772690000000,0.841695250000000,0.842612230000000,0.843523690000000,0.844429640000000,0.845330120000000,0.846225180000000,0.847114840000000,0.847999130000000,0.848878100000000,0.849751780000000,0.850620200000000,0.851483390000000,0.852341390000000,0.853194230000000,0.854041940000000,0.854884560000000,0.855722120000000,0.856554650000000,0.857382180000000,0.858204740000000,0.859022370000000,0.859835100000000,0.860642950000000,0.861445970000000,0.862244170000000,0.863037590000000,0.863826270000000,0.864610220000000,0.865389480000000,0.866164090000000,0.866934060000000,0.867699430000000,0.868460220000000,0.869216480000000,0.869968210000000,0.870715460000000,0.871458260000000,0.872196620000000,0.872930570000000,0.873660150000000,0.874385390000000,0.875106300000000,0.875822920000000,0.876535280000000,0.877243390000000,0.877947290000000,0.878647000000000,0.879342550000000,0.880033970000000,0.880721280000000,0.881404500000000,0.882083670000000,0.882758810000000,0.883429930000000,0.884097080000000,0.884760270000000,0.885419520000000,0.886074870000000,0.886726330000000,0.887373930000000,0.888017700000000,0.888657650000000,0.889293810000000,0.889926210000000,0.890554870000000,0.891179810000000,0.891801060000000,0.892418630000000,0.893032560000000,0.893642850000000,0.894249540000000,0.894852650000000,0.895452200000000,0.896048210000000,0.896640710000000,0.897229710000000,0.897815230000000,0.898397310000000,0.898975950000000,0.899551190000000,0.900123040000000,0.900691520000000,0.901256650000000,0.901818460000000,0.902376960000000,0.902932180000000,0.903484130000000,0.904032840000000,0.904578320000000,0.905120600000000,0.905659690000000,0.906195620000000,0.906728400000000,0.907258050000000,0.907784600000000,0.908308050000000,0.908828440000000,0.909345770000000,0.909860080000000,0.910371360000000,0.910879660000000,0.911384970000000,0.911887330000000,0.912386740000000,0.912883230000000,0.913376820000000,0.913867520000000,0.914355350000000,0.914840330000000,0.915322470000000,0.915801790000000,0.916278320000000,0.916752060000000,0.917223030000000,0.917691250000000,0.918156740000000,0.918619520000000,0.919079590000000,0.919536980000000,0.919991710000000,0.920443780000000,0.920893220000000,0.921340040000000,0.921784250000000,0.922225880000000,0.922664940000000,0.923101440000000,0.923535400000000,0.923966840000000,0.924395760000000,0.924822190000000,0.925246140000000,0.925667630000000,0.926086670000000,0.926503270000000,0.926917450000000,0.927329230000000,0.927738610000000,0.928145620000000,0.928550270000000,0.928952570000000,0.929352530000000,0.929750180000000,0.930145510000000,0.930538560000000,0.930929330000000,0.931317830000000,0.931704090000000,0.932088100000000,0.932469900000000,0.932849480000000,0.933226860000000,0.933602060000000,0.933975090000000,0.934345960000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    72
	};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    73
  double MI_map_qpsk_axis[MI_MAP_QPSK_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    74
		-3.97940010000000,-3.87216140000000,-3.76750710000000,-3.66531540000000,-3.56547320000000,-3.46787490000000,-3.37242170000000,-3.27902140000000,-3.18758760000000,-3.09803920000000,-3.01030000000000,-2.92429820000000,-2.83996660000000,-2.75724130000000,-2.67606240000000,-2.59637310000000,-2.51811970000000,-2.44125140000000,-2.36572010000000,-2.29147990000000,-2.21848750000000,-2.14670160000000,-2.07608310000000,-2.00659450000000,-1.93820030000000,-1.87086640000000,-1.80456060000000,-1.73925200000000,-1.67491090000000,-1.61150910000000,-1.54901960000000,-1.48741650000000,-1.42667500000000,-1.36677140000000,-1.30768280000000,-1.24938740000000,-1.19186410000000,-1.13509270000000,-1.07905400000000,-1.02372910000000,-0.969100130000000,-0.915149810000000,-0.861861480000000,-0.809219080000000,-0.757207140000000,-0.705810740000000,-0.655015490000000,-0.604807470000000,-0.555173280000000,-0.506099930000000,-0.457574910000000,-0.409586080000000,-0.362121730000000,-0.315170510000000,-0.268721460000000,-0.222763950000000,-0.177287670000000,-0.132282660000000,-0.0877392430000000,-0.0436480540000000,0,0.0432137380000000,0.0860017180000000,0.128372250000000,0.170333390000000,0.211892990000000,0.253058650000000,0.293837780000000,0.334237550000000,0.374264980000000,0.413926850000000,0.453229790000000,0.492180230000000,0.530784430000000,0.569048510000000,0.606978400000000,0.644579890000000,0.681858620000000,0.718820070000000,0.755469610000000,0.791812460000000,0.827853700000000,0.863598310000000,0.899051110000000,0.934216850000000,0.969100130000000,1.00370550000000,1.03803720000000,1.07209970000000,1.10589710000000,1.13943350000000,1.17271300000000,1.20573930000000,1.23851640000000,1.27104800000000,1.30333770000000,1.33538910000000,1.36720570000000,1.39879090000000,1.43014800000000,1.46128040000000,1.49219110000000,1.52288340000000,1.55336040000000,1.58362490000000,1.61368000000000,1.64352860000000,1.67317330000000,1.70261720000000,1.73186270000000,1.76091260000000,1.78976950000000,1.81843590000000,1.84691430000000,1.87520720000000,1.90331700000000,1.93124600000000,1.95899650000000,1.98657090000000,2.01397120000000,2.04119980000000,2.06825880000000,2.09515010000000,2.12187600000000,2.14843850000000,2.17483940000000,2.20108090000000,2.22716470000000,2.25309280000000,2.27886700000000,2.30448920000000,2.32996110000000,2.35528450000000,2.38046100000000,2.40549250000000,2.43038050000000,2.45512670000000,2.47973270000000,2.50420000000000,2.52853030000000,2.55272510000000,2.57678570000000,2.60071390000000,2.62451090000000,2.64817820000000,2.67171730000000,2.69512940000000,2.71841610000000,2.74157850000000,2.76461800000000,2.78753600000000,2.81033370000000,2.83301230000000,2.85557310000000,2.87801730000000,2.90034610000000,2.92256070000000,2.94466230000000,2.96665190000000,2.98853080000000,3.01030000000000,3.03196060000000,3.05351370000000,3.07496040000000,3.09630170000000,3.11753860000000,3.13867220000000,3.15970350000000,3.18063330000000,3.20146290000000,3.22219290000000,3.24282460000000,3.26335860000000,3.28379600000000,3.30413770000000,3.32438460000000,3.34453750000000,3.36459730000000,3.38456490000000,3.40444110000000,3.42422680000000,3.44392270000000,3.46352970000000,3.48304860000000,3.50248020000000,3.52182520000000,3.54108440000000,3.56025860000000,3.57934850000000,3.59835480000000,3.61727840000000,3.63611980000000,3.65487980000000,3.67355920000000,3.69215860000000,3.71067860000000,3.72912000000000,3.74748350000000,3.76576960000000,3.78397900000000,3.80211240000000,3.82017040000000,3.83815370000000,3.85606270000000,3.87389830000000,3.89166080000000,3.90935110000000,3.92696950000000,3.94451680000000,3.96199350000000,3.97940010000000,3.99673720000000,4.01400540000000,4.03120520000000,4.04833720000000,4.06540180000000,4.08239970000000,4.09933120000000,4.11619710000000,4.13299760000000,4.14973350000000,4.16640510000000,4.18301290000000,4.19955750000000,4.21603930000000,4.23245870000000,4.24881640000000,4.26511260000000,4.28134790000000,4.29752280000000,4.31363760000000,4.32969290000000,4.34568900000000,4.36162650000000,4.37750560000000,4.39332690000000,4.40909080000000,4.42479770000000,4.44044800000000,4.45604200000000,4.47158030000000,4.48706320000000,4.50249110000000,4.51786440000000,4.53318340000000,4.54844860000000,4.56366030000000,4.57881900000000,4.59392490000000,4.60897840000000,4.62398000000000,4.63892990000000,4.65382850000000,4.66867620000000,4.68347330000000,4.69822020000000,4.71291710000000,4.72756450000000,4.74216260000000,4.75671190000000,4.77121250000000,4.78566500000000,4.80006940000000,4.81442630000000,4.82873580000000,4.84299840000000,4.85721430000000,4.87138380000000,4.88550720000000,4.89958480000000,4.91361690000000,4.92760390000000,4.94154590000000,4.95544340000000,4.96929650000000,4.98310550000000,4.99687080000000,5.01059260000000,5.02427120000000,5.03790680000000,5.05149980000000,5.06505030000000,5.07855870000000,5.09202520000000,5.10545010000000,5.11883360000000,5.13217600000000,5.14547750000000,5.15873840000000,5.17195900000000,5.18513940000000,5.19827990000000,5.21138080000000,5.22444230000000,5.23746470000000,5.25044810000000,5.26339280000000,5.27629900000000,5.28916700000000,5.30199700000000,5.31478920000000,5.32754380000000,5.34026110000000,5.35294120000000,5.36558440000000,5.37819100000000,5.39076100000000,5.40329470000000,5.41579240000000,5.42825430000000,5.44068040000000,5.45307120000000,5.46542660000000,5.47774710000000,5.49003260000000,5.50228350000000,5.51450000000000,5.52668220000000,5.53883030000000,5.55094450000000,5.56302500000000,5.57507200000000,5.58708570000000,5.59906630000000,5.61101380000000,5.62292860000000,5.63481090000000,5.64666060000000,5.65847820000000,5.67026370000000,5.68201720000000,5.69373910000000,5.70542940000000,5.71708830000000,5.72871600000000,5.74031270000000,5.75187840000000,5.76341350000000,5.77491800000000,5.78639210000000,5.79783600000000,5.80924980000000,5.82063360000000,5.83198770000000,5.84331220000000,5.85460730000000,5.86587300000000,5.87710970000000,5.88831730000000,5.89949600000000,5.91064610000000,5.92176760000000,5.93286070000000,5.94392550000000,5.95496220000000,5.96597100000000,5.97695190000000,5.98790510000000,5.99883070000000,6.00972900000000,6.02059990000000,6.03144370000000,6.04226050000000,6.05305050000000,6.06381370000000,6.07455020000000,6.08526030000000,6.09594410000000,6.10660160000000,6.11723310000000,6.12783860000000,6.13841820000000,6.14897220000000,6.15950050000000,6.17000340000000,6.18048100000000,6.19093330000000,6.20136050000000,6.21176280000000,6.22214020000000,6.23249290000000,6.24282100000000,6.25312450000000,6.26340370000000,6.27365860000000,6.28388930000000,6.29409600000000,6.30427880000000,6.31443770000000,6.32457290000000,6.33468460000000,6.34477270000000,6.35483750000000,6.36487900000000,6.37489730000000,6.38489260000000,6.39486490000000,6.40481440000000,6.41474110000000,6.42464520000000,6.43452680000000,6.44438590000000,6.45422270000000,6.46403730000000,6.47382970000000,6.48360010000000,6.49334860000000,6.50307520000000,6.51278010000000,6.52246340000000,6.53212510000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    75
	};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    76
	
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    77
  double MI_map_16qam[MI_MAP_16QAM_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    78
		0.456130300000000,0.460154830000000,0.464125120000000,0.468042570000000,0.471908520000000,0.475724250000000,0.479491030000000,0.483210040000000,0.486882460000000,0.490509410000000,0.494091960000000,0.497631160000000,0.501128010000000,0.504583500000000,0.507998570000000,0.511374120000000,0.514711030000000,0.518010150000000,0.521272300000000,0.524498280000000,0.527688850000000,0.530844760000000,0.533966720000000,0.537055440000000,0.539786130000000,0.542806950000000,0.545795760000000,0.548753210000000,0.551679940000000,0.554576570000000,0.557443690000000,0.560281880000000,0.563091700000000,0.565873700000000,0.568628410000000,0.571356350000000,0.574058000000000,0.576733860000000,0.579384390000000,0.582010060000000,0.584611300000000,0.587188540000000,0.589742210000000,0.592272710000000,0.594780440000000,0.597265780000000,0.599729100000000,0.602170780000000,0.604591160000000,0.606990590000000,0.609369400000000,0.611727930000000,0.614066480000000,0.616385380000000,0.618684910000000,0.620965380000000,0.623227080000000,0.625470270000000,0.627695230000000,0.629902230000000,0.632091530000000,0.634263380000000,0.636418020000000,0.638555700000000,0.640676640000000,0.642781080000000,0.644869250000000,0.646941350000000,0.648997600000000,0.651038220000000,0.653063400000000,0.655073340000000,0.657068230000000,0.659048280000000,0.661013650000000,0.662964530000000,0.664901110000000,0.666823550000000,0.668732020000000,0.670626690000000,0.672507730000000,0.674375280000000,0.676229510000000,0.678070580000000,0.679898620000000,0.681713790000000,0.683516230000000,0.685306070000000,0.687083470000000,0.688848550000000,0.690601450000000,0.692342290000000,0.694071210000000,0.695788330000000,0.697493770000000,0.699187650000000,0.700870090000000,0.702541210000000,0.704201120000000,0.705849930000000,0.707487760000000,0.709114710000000,0.710730880000000,0.712336390000000,0.713931330000000,0.715515810000000,0.717089920000000,0.718653760000000,0.720207430000000,0.721751020000000,0.723284630000000,0.724808340000000,0.726322250000000,0.727826440000000,0.729321010000000,0.730806030000000,0.732281590000000,0.733747780000000,0.735204680000000,0.736652360000000,0.738090910000000,0.739520400000000,0.740940920000000,0.742352530000000,0.743755320000000,0.745149350000000,0.746534710000000,0.747911460000000,0.749279670000000,0.750639410000000,0.751990750000000,0.753333770000000,0.754668520000000,0.755995070000000,0.757313490000000,0.758623850000000,0.759926200000000,0.761220620000000,0.762507150000000,0.763785870000000,0.765056830000000,0.766320100000000,0.767575720000000,0.768823770000000,0.770064300000000,0.771297370000000,0.772523030000000,0.773741330000000,0.774952340000000,0.776156110000000,0.777352690000000,0.778542130000000,0.779724490000000,0.780899820000000,0.782068170000000,0.783229590000000,0.784384140000000,0.785531850000000,0.786672790000000,0.787806990000000,0.788934520000000,0.790055410000000,0.791169710000000,0.792277470000000,0.793378740000000,0.794473560000000,0.795561980000000,0.796644030000000,0.797719780000000,0.798789250000000,0.799852500000000,0.800909570000000,0.801960490000000,0.803005310000000,0.804044080000000,0.805076840000000,0.806103620000000,0.807124460000000,0.808139420000000,0.809148520000000,0.810151800000000,0.811149320000000,0.812141090000000,0.813127170000000,0.814107590000000,0.815082390000000,0.816051610000000,0.817015280000000,0.817973440000000,0.818926130000000,0.819873380000000,0.820815220000000,0.821751710000000,0.822682860000000,0.823608710000000,0.824529310000000,0.825444670000000,0.826354850000000,0.827259860000000,0.828159750000000,0.829054550000000,0.829944290000000,0.830829000000000,0.831708720000000,0.832583470000000,0.833453290000000,0.834318220000000,0.835178270000000,0.836033490000000,0.836883900000000,0.837729540000000,0.838570430000000,0.839406610000000,0.840238100000000,0.841064940000000,0.841887150000000,0.842704760000000,0.843517810000000,0.844326310000000,0.845130310000000,0.845929820000000,0.846724880000000,0.847515510000000,0.848301740000000,0.849083600000000,0.849861110000000,0.850634310000000,0.851403220000000,0.852167860000000,0.852928260000000,0.853684450000000,0.854436460000000,0.855184310000000,0.855928020000000,0.856667620000000,0.857403140000000,0.858134600000000,0.858862020000000,0.859585440000000,0.860304870000000,0.861020350000000,0.861731880000000,0.862439500000000,0.863143240000000,0.863843110000000,0.864539140000000,0.865231350000000,0.865919760000000,0.866604410000000,0.867285300000000,0.867962470000000,0.868635930000000,0.869305710000000,0.869971830000000,0.870634320000000,0.871293190000000,0.871948460000000,0.872600160000000,0.873248310000000,0.873892930000000,0.874534050000000,0.875171670000000,0.875805830000000,0.876436540000000,0.877063820000000,0.877687700000000,0.878308200000000,0.878925330000000,0.879539110000000,0.880149570000000,0.880756720000000,0.881360590000000,0.881961190000000,0.882558550000000,0.883152670000000,0.883743590000000,0.884331310000000,0.884915870000000,0.885497270000000,0.886075540000000,0.886650690000000,0.887222740000000,0.887791720000000,0.888357630000000,0.888920510000000,0.889480350000000,0.890037190000000,0.890591040000000,0.891141910000000,0.891689830000000,0.892234810000000,0.892776870000000,0.893316030000000,0.893852290000000,0.894385690000000,0.894916240000000,0.895443940000000,0.895968830000000,0.896490910000000,0.897010210000000,0.897526730000000,0.898040490000000,0.898551520000000,0.899059820000000,0.899565420000000,0.900068320000000,0.900568540000000,0.901066100000000,0.901561020000000,0.902053300000000,0.902542970000000,0.903030030000000,0.903514510000000,0.903996420000000,0.904475770000000,0.904952580000000,0.905426860000000,0.905898630000000,0.906367900000000,0.906834690000000,0.907299010000000,0.907760870000000,0.908220280000000,0.908677270000000,0.909131850000000,0.909584030000000,0.910033810000000,0.910481230000000,0.910926280000000,0.911368990000000,0.911809370000000,0.912247420000000,0.912683170000000,0.913116630000000,0.913547800000000,0.913976710000000,0.914403360000000,0.914827770000000,0.915249950000000,0.915669920000000,0.916087680000000,0.916503240000000,0.916916630000000,0.917327850000000,0.917736920000000,0.918143840000000,0.918548630000000,0.918951310000000,0.919351870000000,0.919750340000000,0.920146730000000,0.920541040000000,0.920933300000000,0.921323510000000,0.921711680000000,0.922097820000000,0.922481950000000,0.922864080000000,0.923244210000000,0.923622370000000,0.923998550000000,0.924372780000000,0.924745060000000,0.925115400000000,0.925483810000000,0.925850310000000,0.926214910000000,0.926577610000000,0.926938430000000,0.927297370000000,0.927654450000000,0.928009680000000,0.928363070000000,0.928714620000000,0.929064360000000,0.929412280000000,0.929758400000000,0.930102730000000,0.930445270000000,0.930786050000000,0.931125060000000,0.931462320000000,0.931797840000000,0.932131620000000,0.932463690000000,0.932794030000000,0.933122680000000,0.933449620000000,0.933774890000000,0.934098470000000,0.934420390000000,0.934740650000000,0.935059260000000,0.935376230000000,0.935691570000000,0.936005290000000,0.936317400000000,0.936627900000000,0.936936800000000,0.937244120000000,0.937549860000000,0.937854030000000,0.938156640000000,0.938457700000000,0.938757220000000,0.939055200000000,0.939351650000000,0.939646580000000,0.939940000000000,0.940231930000000,0.940522350000000,0.940811290000000,0.941098760000000,0.941384750000000,0.941669280000000,0.941952360000000,0.942234000000000,0.942514190000000,0.942792960000000,0.943070300000000,0.943346230000000,0.943620750000000,0.943893870000000,0.944165600000000,0.944435940000000,0.944704910000000,0.944972510000000,0.945238750000000,0.945503630000000,0.945767170000000,0.946029370000000,0.946290230000000,0.946549770000000,0.946807990000000,0.947064900000000,0.947320500000000,0.947574810000000,0.947827830000000,0.948079560000000,0.948330020000000,0.948579210000000,0.948827140000000,0.949073810000000,0.949319230000000,0.949563410000000,0.949806350000000,0.950048070000000,0.950288560000000,0.950527840000000,0.950765900000000,0.951002770000000,0.951238440000000,0.951472910000000,0.951706210000000,0.951938330000000,0.952169270000000,0.952399060000000,0.952627680000000,0.952855150000000,0.953081470000000,0.953306660000000,0.953530710000000,0.953753630000000,0.953975430000000,0.954196120000000,0.954415700000000,0.954634170000000,0.954851540000000,0.955067820000000,0.955283020000000,0.955497130000000,0.955710170000000,0.955922140000000,0.956133040000000,0.956342890000000,0.956551690000000,0.956759440000000,0.956966150000000,0.957171820000000,0.957376460000000,0.957580080000000,0.957782680000000,0.957984260000000,0.958184840000000,0.958384410000000,0.958582980000000,0.958780570000000,0.958977160000000,0.959172770000000,0.959367410000000,0.959561070000000,0.959753770000000,0.959945510000000,0.960136290000000,0.960326120000000,0.960515000000000,0.960702940000000,0.960889940000000,0.961076010000000,0.961261160000000,0.961445380000000,0.961628690000000,0.961811080000000,0.961992570000000,0.962173160000000,0.962352840000000,0.962531640000000,0.962709540000000,0.962886560000000,0.963062710000000,0.963237980000000,0.963412370000000,0.963585910000000,0.963758580000000,0.963930390000000,0.964101360000000,0.964271470000000,0.964440750000000,0.964609180000000,0.964776780000000,0.964943550000000,0.965109500000000,0.965274620000000,0.965438930000000,0.965602430000000,0.965765110000000,0.965926990000000,0.966088080000000,0.966248360000000,0.966407860000000,0.966566560000000,0.966724490000000,0.966881630000000,0.967038000000000,0.967193600000000,0.967348430000000,0.967502490000000,0.967655800000000,0.967808350000000,0.967960150000000,0.968111210000000,0.968261520000000,0.968411090000000,0.968559920000000,0.968708020000000,0.968855390000000,0.969002040000000,0.969147970000000,0.969293180000000,0.969437680000000,0.969581460000000,0.969724540000000,0.969866920000000,0.970008600000000,0.970149590000000,0.970289880000000,0.970429480000000,0.970568400000000,0.970706640000000,0.970844200000000,0.970981090000000,0.971117310000000,0.971252860000000,0.971387750000000,0.971521970000000,0.971655540000000,0.971788460000000,0.971920720000000,0.972052340000000,0.972183320000000,0.972313660000000,0.972443360000000,0.972572420000000,0.972700860000000,0.972828660000000,0.972955850000000,0.973082410000000,0.973208360000000,0.973333690000000,0.973458410000000,0.973582530000000,0.973706030000000,0.973828940000000,0.973951250000000,0.974072960000000,0.974194080000000,0.974314610000000,0.974434550000000,0.974553910000000,0.974672690000000,0.974790890000000,0.974908520000000,0.975025580000000,0.975142060000000,0.975257980000000,0.975373340000000,0.975488140000000,0.975602380000000,0.975716060000000,0.975829200000000,0.975941780000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    79
	};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    80
  double MI_map_16qam_axis[MI_MAP_16QAM_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    81
		4.77121250000000,4.84299840000000,4.91361690000000,4.98310550000000,5.05149980000000,5.11883360000000,5.18513940000000,5.25044810000000,5.31478920000000,5.37819100000000,5.44068040000000,5.50228350000000,5.56302500000000,5.62292860000000,5.68201720000000,5.74031270000000,5.79783600000000,5.85460730000000,5.91064610000000,5.96597100000000,6.02059990000000,6.07455020000000,6.12783860000000,6.18048100000000,6.23249290000000,6.28388930000000,6.33468460000000,6.38489260000000,6.43452680000000,6.48360010000000,6.53212510000000,6.58011400000000,6.62757830000000,6.67452950000000,6.72097860000000,6.76693610000000,6.81241240000000,6.85741740000000,6.90196080000000,6.94605200000000,6.98970000000000,7.03291380000000,7.07570180000000,7.11807230000000,7.16003340000000,7.20159300000000,7.24275870000000,7.28353780000000,7.32393760000000,7.36396500000000,7.40362690000000,7.44292980000000,7.48188030000000,7.52048450000000,7.55874860000000,7.59667840000000,7.63427990000000,7.67155870000000,7.70852010000000,7.74516970000000,7.78151250000000,7.81755370000000,7.85329840000000,7.88875120000000,7.92391690000000,7.95880020000000,7.99340550000000,8.02773730000000,8.06179970000000,8.09559710000000,8.12913360000000,8.16241300000000,8.19543940000000,8.22821650000000,8.26074800000000,8.29303770000000,8.32508910000000,8.35690570000000,8.38849090000000,8.41984800000000,8.45098040000000,8.48189120000000,8.51258350000000,8.54306040000000,8.57332500000000,8.60338010000000,8.63322860000000,8.66287340000000,8.69231720000000,8.72156270000000,8.75061260000000,8.77946950000000,8.80813590000000,8.83661440000000,8.86490730000000,8.89301700000000,8.92094600000000,8.94869660000000,8.97627090000000,9.00367130000000,9.03089990000000,9.05795880000000,9.08485020000000,9.11157610000000,9.13813850000000,9.16453950000000,9.19078090000000,9.21686480000000,9.24279290000000,9.26856710000000,9.29418930000000,9.31966110000000,9.34498450000000,9.37016110000000,9.39519250000000,9.42008050000000,9.44482670000000,9.46943270000000,9.49390010000000,9.51823040000000,9.54242510000000,9.56648580000000,9.59041390000000,9.61421090000000,9.63787830000000,9.66141730000000,9.68482950000000,9.70811610000000,9.73127850000000,9.75431810000000,9.77723610000000,9.80003370000000,9.82271230000000,9.84527310000000,9.86771730000000,9.89004620000000,9.91226080000000,9.93436230000000,9.95635190000000,9.97823080000000,10,10.0216610000000,10.0432140000000,10.0646600000000,10.0860020000000,10.1072390000000,10.1283720000000,10.1494030000000,10.1703330000000,10.1911630000000,10.2118930000000,10.2325250000000,10.2530590000000,10.2734960000000,10.2938380000000,10.3140850000000,10.3342380000000,10.3542970000000,10.3742650000000,10.3941410000000,10.4139270000000,10.4336230000000,10.4532300000000,10.4727490000000,10.4921800000000,10.5115250000000,10.5307840000000,10.5499590000000,10.5690490000000,10.5880550000000,10.6069780000000,10.6258200000000,10.6445800000000,10.6632590000000,10.6818590000000,10.7003790000000,10.7188200000000,10.7371840000000,10.7554700000000,10.7736790000000,10.7918120000000,10.8098700000000,10.8278540000000,10.8457630000000,10.8635980000000,10.8813610000000,10.8990510000000,10.9166700000000,10.9342170000000,10.9516940000000,10.9691000000000,10.9864370000000,11.0037050000000,11.0209050000000,11.0380370000000,11.0551020000000,11.0721000000000,11.0890310000000,11.1058970000000,11.1226980000000,11.1394340000000,11.1561050000000,11.1727130000000,11.1892580000000,11.2057390000000,11.2221590000000,11.2385160000000,11.2548130000000,11.2710480000000,11.2872230000000,11.3033380000000,11.3193930000000,11.3353890000000,11.3513270000000,11.3672060000000,11.3830270000000,11.3987910000000,11.4144980000000,11.4301480000000,11.4457420000000,11.4612800000000,11.4767630000000,11.4921910000000,11.5075640000000,11.5228830000000,11.5381490000000,11.5533600000000,11.5685190000000,11.5836250000000,11.5986780000000,11.6136800000000,11.6286300000000,11.6435290000000,11.6583760000000,11.6731730000000,11.6879200000000,11.7026170000000,11.7172650000000,11.7318630000000,11.7464120000000,11.7609130000000,11.7753650000000,11.7897690000000,11.8041260000000,11.8184360000000,11.8326980000000,11.8469140000000,11.8610840000000,11.8752070000000,11.8892850000000,11.9033170000000,11.9173040000000,11.9312460000000,11.9451430000000,11.9589970000000,11.9728060000000,11.9865710000000,12.0002930000000,12.0139710000000,12.0276070000000,12.0412000000000,12.0547500000000,12.0682590000000,12.0817250000000,12.0951500000000,12.1085340000000,12.1218760000000,12.1351780000000,12.1484380000000,12.1616590000000,12.1748390000000,12.1879800000000,12.2010810000000,12.2141420000000,12.2271650000000,12.2401480000000,12.2530930000000,12.2659990000000,12.2788670000000,12.2916970000000,12.3044890000000,12.3172440000000,12.3299610000000,12.3426410000000,12.3552840000000,12.3678910000000,12.3804610000000,12.3929950000000,12.4054920000000,12.4179540000000,12.4303800000000,12.4427710000000,12.4551270000000,12.4674470000000,12.4797330000000,12.4919840000000,12.5042000000000,12.5163820000000,12.5285300000000,12.5406450000000,12.5527250000000,12.5647720000000,12.5767860000000,12.5887660000000,12.6007140000000,12.6126290000000,12.6245110000000,12.6363610000000,12.6481780000000,12.6599640000000,12.6717170000000,12.6834390000000,12.6951290000000,12.7067880000000,12.7184160000000,12.7300130000000,12.7415780000000,12.7531140000000,12.7646180000000,12.7760920000000,12.7875360000000,12.7989500000000,12.8103340000000,12.8216880000000,12.8330120000000,12.8443070000000,12.8555730000000,12.8668100000000,12.8780170000000,12.8891960000000,12.9003460000000,12.9114680000000,12.9225610000000,12.9336260000000,12.9446620000000,12.9556710000000,12.9666520000000,12.9776050000000,12.9885310000000,12.9994290000000,13.0103000000000,13.0211440000000,13.0319610000000,13.0427510000000,13.0535140000000,13.0642500000000,13.0749600000000,13.0856440000000,13.0963020000000,13.1069330000000,13.1175390000000,13.1281180000000,13.1386720000000,13.1492010000000,13.1597030000000,13.1701810000000,13.1806330000000,13.1910610000000,13.2014630000000,13.2118400000000,13.2221930000000,13.2325210000000,13.2428250000000,13.2531040000000,13.2633590000000,13.2735890000000,13.2837960000000,13.2939790000000,13.3041380000000,13.3142730000000,13.3243850000000,13.3344730000000,13.3445380000000,13.3545790000000,13.3645970000000,13.3745930000000,13.3845650000000,13.3945140000000,13.4044410000000,13.4143450000000,13.4242270000000,13.4340860000000,13.4439230000000,13.4537370000000,13.4635300000000,13.4733000000000,13.4830490000000,13.4927750000000,13.5024800000000,13.5121630000000,13.5218250000000,13.5314650000000,13.5410840000000,13.5506820000000,13.5602590000000,13.5698140000000,13.5793480000000,13.5888620000000,13.5983550000000,13.6078270000000,13.6172780000000,13.6267090000000,13.6361200000000,13.6455100000000,13.6548800000000,13.6642300000000,13.6735590000000,13.6828690000000,13.6921590000000,13.7014280000000,13.7106790000000,13.7199090000000,13.7291200000000,13.7383110000000,13.7474830000000,13.7566360000000,13.7657700000000,13.7748840000000,13.7839790000000,13.7930550000000,13.8021120000000,13.8111510000000,13.8201700000000,13.8291710000000,13.8381540000000,13.8471170000000,13.8560630000000,13.8649900000000,13.8738980000000,13.8827890000000,13.8916610000000,13.9005150000000,13.9093510000000,13.9181690000000,13.9269700000000,13.9357520000000,13.9445170000000,13.9532640000000,13.9619930000000,13.9707050000000,13.9794000000000,13.9880770000000,13.9967370000000,14.0053800000000,14.0140050000000,14.0226140000000,14.0312050000000,14.0397800000000,14.0483370000000,14.0568780000000,14.0654020000000,14.0739090000000,14.0824000000000,14.0908740000000,14.0993310000000,14.1077720000000,14.1161970000000,14.1246050000000,14.1329980000000,14.1413740000000,14.1497330000000,14.1580770000000,14.1664050000000,14.1747170000000,14.1830130000000,14.1912930000000,14.1995570000000,14.2078060000000,14.2160390000000,14.2242570000000,14.2324590000000,14.2406450000000,14.2488160000000,14.2569720000000,14.2651130000000,14.2732380000000,14.2813480000000,14.2894430000000,14.2975230000000,14.3055880000000,14.3136380000000,14.3216730000000,14.3296930000000,14.3376980000000,14.3456890000000,14.3536650000000,14.3616260000000,14.3695730000000,14.3775060000000,14.3854230000000,14.3933270000000,14.4012160000000,14.4090910000000,14.4169510000000,14.4247980000000,14.4326300000000,14.4404480000000,14.4482520000000,14.4560420000000,14.4638180000000,14.4715800000000,14.4793290000000,14.4870630000000,14.4947840000000,14.5024910000000,14.5101850000000,14.5178640000000,14.5255310000000,14.5331830000000,14.5408230000000,14.5484490000000,14.5560610000000,14.5636600000000,14.5712460000000,14.5788190000000,14.5863780000000,14.5939250000000,14.6014580000000,14.6089780000000,14.6164860000000,14.6239800000000,14.6314610000000,14.6389300000000,14.6463860000000,14.6538290000000,14.6612590000000,14.6686760000000,14.6760810000000,14.6834730000000,14.6908530000000,14.6982200000000,14.7055750000000,14.7129170000000,14.7202470000000,14.7275640000000,14.7348700000000,14.7421630000000,14.7494430000000,14.7567120000000,14.7639680000000,14.7712130000000,14.7784450000000,14.7856650000000,14.7928730000000,14.8000690000000,14.8072540000000,14.8144260000000,14.8215870000000,14.8287360000000,14.8358730000000,14.8429980000000,14.8501120000000,14.8572140000000,14.8643050000000,14.8713840000000,14.8784510000000,14.8855070000000,14.8925520000000,14.8995850000000,14.9066070000000,14.9136170000000,14.9206160000000,14.9276040000000,14.9345810000000,14.9415460000000,14.9485000000000,14.9554430000000,14.9623750000000,14.9692960000000,14.9762060000000,14.9831060000000,14.9899940000000,14.9968710000000,15.0037370000000,15.0105930000000,15.0174370000000,15.0242710000000,15.0310940000000,15.0379070000000,15.0447090000000,15.0515000000000,15.0582800000000,15.0650500000000,15.0718100000000,15.0785590000000,15.0852970000000,15.0920250000000,15.0987430000000,15.1054500000000,15.1121470000000,15.1188340000000,15.1255100000000,15.1321760000000,15.1388320000000,15.1454780000000,15.1521130000000,15.1587380000000,15.1653540000000,15.1719590000000,15.1785540000000,15.1851390000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    82
	};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    83
	
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    84
	
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    85
  double MI_map_64qam[MI_MAP_64QAM_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    86
		0.594727140000000,0.597397600000000,0.600038840000000,0.602651650000000,0.605236780000000,0.607794940000000,0.610326790000000,0.612832980000000,0.615314110000000,0.617770790000000,0.620203550000000,0.622612930000000,0.624999450000000,0.627363570000000,0.629705780000000,0.632026500000000,0.634326170000000,0.636605200000000,0.638863960000000,0.641102840000000,0.643322200000000,0.645522370000000,0.647703700000000,0.649866490000000,0.652011060000000,0.653921260000000,0.656028510000000,0.658118030000000,0.660190110000000,0.662245020000000,0.664283030000000,0.666304390000000,0.668309340000000,0.670298130000000,0.672270970000000,0.674228110000000,0.676169740000000,0.678096090000000,0.680007360000000,0.681903740000000,0.683785420000000,0.685652600000000,0.687505460000000,0.689344180000000,0.691168920000000,0.692979860000000,0.694777160000000,0.696560970000000,0.698331470000000,0.700088790000000,0.701833100000000,0.703564520000000,0.705283220000000,0.706989320000000,0.708682960000000,0.710364280000000,0.712033410000000,0.713690470000000,0.715335590000000,0.716968900000000,0.718590510000000,0.720200540000000,0.721799110000000,0.723386330000000,0.724962320000000,0.726527190000000,0.728081030000000,0.729623970000000,0.731156100000000,0.732677520000000,0.734188340000000,0.735688660000000,0.737178580000000,0.738658180000000,0.740127580000000,0.741586850000000,0.743036090000000,0.744475400000000,0.745904850000000,0.747324550000000,0.748734580000000,0.750135010000000,0.751525950000000,0.752907460000000,0.754279630000000,0.755642550000000,0.756996300000000,0.758340940000000,0.759676570000000,0.761003250000000,0.762321070000000,0.763630100000000,0.764930410000000,0.766222070000000,0.767505170000000,0.768779760000000,0.770045930000000,0.771303740000000,0.772553250000000,0.773794550000000,0.775027690000000,0.776252740000000,0.777469770000000,0.778678850000000,0.779880030000000,0.781073380000000,0.782258970000000,0.783436860000000,0.784607110000000,0.785769770000000,0.786924920000000,0.788072610000000,0.789212890000000,0.790345840000000,0.791471500000000,0.792589930000000,0.793701200000000,0.794805350000000,0.795902440000000,0.796992530000000,0.798075670000000,0.799151910000000,0.800221320000000,0.801283940000000,0.802339820000000,0.803389010000000,0.804431580000000,0.805467560000000,0.806497010000000,0.807519980000000,0.808536520000000,0.809546670000000,0.810550490000000,0.811548020000000,0.812539320000000,0.813524420000000,0.814503370000000,0.815476230000000,0.816443030000000,0.817403820000000,0.818358650000000,0.819307570000000,0.820250600000000,0.821187810000000,0.822119230000000,0.823044900000000,0.823964880000000,0.824879190000000,0.825787880000000,0.826691000000000,0.827588580000000,0.828480670000000,0.829367300000000,0.830248520000000,0.831124360000000,0.831994870000000,0.832860070000000,0.833720020000000,0.834574750000000,0.835424300000000,0.836268700000000,0.837107990000000,0.837942220000000,0.838771400000000,0.839595590000000,0.840414820000000,0.841229120000000,0.842038530000000,0.842843080000000,0.843642820000000,0.844437760000000,0.845227950000000,0.846013420000000,0.846794210000000,0.847570340000000,0.848341850000000,0.849108780000000,0.849871150000000,0.850629000000000,0.851382360000000,0.852131270000000,0.852875740000000,0.853615820000000,0.854351530000000,0.855082900000000,0.855809980000000,0.856532770000000,0.857251320000000,0.857965660000000,0.858675810000000,0.859381810000000,0.860083670000000,0.860781440000000,0.861475130000000,0.862164790000000,0.862850420000000,0.863532070000000,0.864209760000000,0.864883520000000,0.865553370000000,0.866219340000000,0.866881460000000,0.867539760000000,0.868194250000000,0.868844970000000,0.869491940000000,0.870135190000000,0.870774740000000,0.871410620000000,0.872042850000000,0.872671460000000,0.873296470000000,0.873917910000000,0.874535800000000,0.875150160000000,0.875761010000000,0.876368400000000,0.876972320000000,0.877572810000000,0.878169900000000,0.878763590000000,0.879353930000000,0.879940920000000,0.880524600000000,0.881104970000000,0.881682080000000,0.882255930000000,0.882826540000000,0.883393950000000,0.883958170000000,0.884519220000000,0.885077130000000,0.885631910000000,0.886183580000000,0.886732170000000,0.887277690000000,0.887820170000000,0.888359630000000,0.888896080000000,0.889429540000000,0.889960040000000,0.890487590000000,0.891012220000000,0.891533940000000,0.892052770000000,0.892568730000000,0.893081840000000,0.893592110000000,0.894099570000000,0.894604240000000,0.895106120000000,0.895605250000000,0.896101630000000,0.896595290000000,0.897086240000000,0.897574500000000,0.898060090000000,0.898543020000000,0.899023320000000,0.899500990000000,0.899976060000000,0.900448540000000,0.900918450000000,0.901385800000000,0.901850610000000,0.902312910000000,0.902772690000000,0.903229990000000,0.903684800000000,0.904137160000000,0.904587080000000,0.905034570000000,0.905479640000000,0.905922320000000,0.906362610000000,0.906800540000000,0.907236110000000,0.907669350000000,0.908100260000000,0.908528860000000,0.908955170000000,0.909379200000000,0.909800960000000,0.910220480000000,0.910637750000000,0.911052800000000,0.911465640000000,0.911876290000000,0.912284750000000,0.912691050000000,0.913095180000000,0.913497180000000,0.913897050000000,0.914294800000000,0.914690450000000,0.915084010000000,0.915475490000000,0.915864910000000,0.916252280000000,0.916637610000000,0.917020910000000,0.917402200000000,0.917781490000000,0.918158790000000,0.918534110000000,0.918907470000000,0.919278870000000,0.919648330000000,0.920015870000000,0.920381480000000,0.920745190000000,0.921107010000000,0.921466940000000,0.921825000000000,0.922181210000000,0.922535560000000,0.922888070000000,0.923238760000000,0.923587630000000,0.923934700000000,0.924279980000000,0.924623470000000,0.924965190000000,0.925305140000000,0.925643350000000,0.925979810000000,0.926314550000000,0.926647560000000,0.926978870000000,0.927308470000000,0.927636390000000,0.927962630000000,0.928287190000000,0.928610100000000,0.928931360000000,0.929250980000000,0.929568970000000,0.929885330000000,0.930200090000000,0.930513250000000,0.930824810000000,0.931134790000000,0.931443200000000,0.931750040000000,0.932055330000000,0.932359080000000,0.932661280000000,0.932961960000000,0.933261120000000,0.933558770000000,0.933854920000000,0.934149580000000,0.934442750000000,0.934734450000000,0.935024690000000,0.935313460000000,0.935600790000000,0.935886670000000,0.936171120000000,0.936454150000000,0.936735770000000,0.937015970000000,0.937294770000000,0.937572190000000,0.937848220000000,0.938122870000000,0.938396160000000,0.938668080000000,0.938938660000000,0.939207890000000,0.939475780000000,0.939742350000000,0.940007590000000,0.940271520000000,0.940534140000000,0.940795470000000,0.941055500000000,0.941314250000000,0.941571720000000,0.941827930000000,0.942082870000000,0.942336550000000,0.942588990000000,0.942840190000000,0.943090150000000,0.943338890000000,0.943586410000000,0.943832710000000,0.944077810000000,0.944321710000000,0.944564410000000,0.944805930000000,0.945046270000000,0.945285440000000,0.945523440000000,0.945760280000000,0.945995970000000,0.946230510000000,0.946463920000000,0.946696180000000,0.946927330000000,0.947157340000000,0.947386250000000,0.947614050000000,0.947840740000000,0.948066340000000,0.948290840000000,0.948514270000000,0.948736610000000,0.948957880000000,0.949178090000000,0.949397230000000,0.949615320000000,0.949832360000000,0.950048360000000,0.950263320000000,0.950477250000000,0.950690150000000,0.950902040000000,0.951112910000000,0.951322770000000,0.951531620000000,0.951739480000000,0.951946340000000,0.952152220000000,0.952357120000000,0.952561040000000,0.952763980000000,0.952965970000000,0.953166990000000,0.953367060000000,0.953566170000000,0.953764340000000,0.953961570000000,0.954157870000000,0.954353240000000,0.954547680000000,0.954741200000000,0.954933810000000,0.955125510000000,0.955316300000000,0.955506190000000,0.955695190000000,0.955883300000000,0.956070520000000,0.956256860000000,0.956442320000000,0.956626920000000,0.956810640000000,0.956993510000000,0.957175510000000,0.957356670000000,0.957536970000000,0.957716430000000,0.957895060000000,0.958072840000000,0.958249800000000,0.958425930000000,0.958601240000000,0.958775730000000,0.958949410000000,0.959122280000000,0.959294350000000,0.959465610000000,0.959636080000000,0.959805760000000,0.959974650000000,0.960142760000000,0.960310090000000,0.960476640000000,0.960642420000000,0.960807440000000,0.960971690000000,0.961135180000000,0.961297920000000,0.961459910000000,0.961621150000000,0.961781640000000,0.961941400000000,0.962100420000000,0.962258710000000,0.962416280000000,0.962573110000000,0.962729230000000,0.962884630000000,0.963039320000000,0.963193300000000,0.963346580000000,0.963499150000000,0.963651030000000,0.963802210000000,0.963952700000000,0.964102500000000,0.964251620000000,0.964400050000000,0.964547820000000,0.964694900000000,0.964841320000000,0.964987080000000,0.965132160000000,0.965276590000000,0.965420370000000,0.965563490000000,0.965705960000000,0.965847790000000,0.965988970000000,0.966129510000000,0.966269420000000,0.966408690000000,0.966547340000000,0.966685350000000,0.966822750000000,0.966959520000000,0.967095680000000,0.967231220000000,0.967366160000000,0.967500480000000,0.967634200000000,0.967767320000000,0.967899840000000,0.968031770000000,0.968163100000000,0.968293840000000,0.968424000000000,0.968553570000000,0.968682560000000,0.968810980000000,0.968938820000000,0.969066090000000,0.969192790000000,0.969318920000000,0.969444490000000,0.969569500000000,0.969693950000000,0.969817850000000,0.969941190000000,0.970063990000000,0.970186240000000,0.970307950000000,0.970429110000000,0.970549740000000,0.970669830000000,0.970789380000000,0.970908410000000,0.971026910000000,0.971144880000000,0.971262330000000,0.971379260000000,0.971495680000000,0.971611580000000,0.971726960000000,0.971841840000000,0.971956210000000,0.972070080000000,0.972183440000000,0.972296300000000,0.972408670000000,0.972520540000000,0.972631920000000,0.972742810000000,0.972853210000000,0.972963120000000,0.973072560000000,0.973181510000000,0.973289980000000,0.973397980000000,0.973505510000000,0.973612560000000,0.973719150000000,0.973825270000000,0.973930920000000,0.974036110000000,0.974140850000000,0.974245120000000,0.974348940000000,0.974452310000000,0.974555230000000,0.974657690000000,0.974759720000000,0.974861290000000,0.974962430000000,0.975063120000000,0.975163380000000,0.975263200000000,0.975362590000000,0.975461550000000,0.975560070000000,0.975658170000000,0.975755850000000,0.975853100000000,0.975949930000000,0.976046340000000,0.976142330000000,0.976237910000000,0.976333080000000,0.976427830000000,0.976522170000000,0.976616110000000,0.976709640000000,0.976802770000000,0.976895500000000,0.976987830000000,0.977079760000000,0.977171290000000,0.977262430000000,0.977353180000000,0.977443540000000,0.977533510000000,0.977623090000000,0.977712290000000,0.977801110000000,0.977889540000000,0.977977600000000,0.978065280000000,0.978152580000000,0.978239510000000,0.978326070000000,0.978412260000000,0.978498080000000,0.978583530000000,0.978668620000000,0.978753340000000,0.978837700000000,0.978921700000000,0.979005350000000,0.979088640000000,0.979171570000000,0.979254150000000,0.979336380000000,0.979418260000000,0.979499790000000,0.979580970000000,0.979661810000000,0.979742310000000,0.979822460000000,0.979902280000000,0.979981750000000,0.980060890000000,0.980139700000000,0.980218170000000,0.980296300000000,0.980374110000000,0.980451590000000,0.980528740000000,0.980605560000000,0.980682060000000,0.980758240000000,0.980834090000000,0.980909630000000,0.980984850000000,0.981059750000000,0.981134330000000,0.981208600000000,0.981282560000000,0.981356200000000,0.981429540000000,0.981502560000000,0.981575280000000,0.981647700000000,0.981719810000000,0.981791620000000,0.981863120000000,0.981934330000000,0.982005240000000,0.982075850000000,0.982146160000000,0.982216180000000,0.982285910000000,0.982355350000000,0.982424490000000,0.982493350000000,0.982561920000000,0.982630200000000,0.982698190000000,0.982765910000000,0.982833340000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    87
	};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    88
  double MI_map_64qam_axis[MI_MAP_64QAM_SIZE] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    89
		11.7609130000000,11.8184360000000,11.8752070000000,11.9312460000000,11.9865710000000,12.0412000000000,12.0951500000000,12.1484380000000,12.2010810000000,12.2530930000000,12.3044890000000,12.3552840000000,12.4054920000000,12.4551270000000,12.5042000000000,12.5527250000000,12.6007140000000,12.6481780000000,12.6951290000000,12.7415780000000,12.7875360000000,12.8330120000000,12.8780170000000,12.9225610000000,12.9666520000000,13.0103000000000,13.0535140000000,13.0963020000000,13.1386720000000,13.1806330000000,13.2221930000000,13.2633590000000,13.3041380000000,13.3445380000000,13.3845650000000,13.4242270000000,13.4635300000000,13.5024800000000,13.5410840000000,13.5793480000000,13.6172780000000,13.6548800000000,13.6921590000000,13.7291200000000,13.7657700000000,13.8021120000000,13.8381540000000,13.8738980000000,13.9093510000000,13.9445170000000,13.9794000000000,14.0140050000000,14.0483370000000,14.0824000000000,14.1161970000000,14.1497330000000,14.1830130000000,14.2160390000000,14.2488160000000,14.2813480000000,14.3136380000000,14.3456890000000,14.3775060000000,14.4090910000000,14.4404480000000,14.4715800000000,14.5024910000000,14.5331830000000,14.5636600000000,14.5939250000000,14.6239800000000,14.6538290000000,14.6834730000000,14.7129170000000,14.7421630000000,14.7712130000000,14.8000690000000,14.8287360000000,14.8572140000000,14.8855070000000,14.9136170000000,14.9415460000000,14.9692960000000,14.9968710000000,15.0242710000000,15.0515000000000,15.0785590000000,15.1054500000000,15.1321760000000,15.1587380000000,15.1851390000000,15.2113810000000,15.2374650000000,15.2633930000000,15.2891670000000,15.3147890000000,15.3402610000000,15.3655840000000,15.3907610000000,15.4157920000000,15.4406800000000,15.4654270000000,15.4900330000000,15.5145000000000,15.5388300000000,15.5630250000000,15.5870860000000,15.6110140000000,15.6348110000000,15.6584780000000,15.6820170000000,15.7054290000000,15.7287160000000,15.7518780000000,15.7749180000000,15.7978360000000,15.8206340000000,15.8433120000000,15.8658730000000,15.8883170000000,15.9106460000000,15.9328610000000,15.9549620000000,15.9769520000000,15.9988310000000,16.0206000000000,16.0422610000000,16.0638140000000,16.0852600000000,16.1066020000000,16.1278390000000,16.1489720000000,16.1700030000000,16.1909330000000,16.2117630000000,16.2324930000000,16.2531250000000,16.2736590000000,16.2940960000000,16.3144380000000,16.3346850000000,16.3548370000000,16.3748970000000,16.3948650000000,16.4147410000000,16.4345270000000,16.4542230000000,16.4738300000000,16.4933490000000,16.5127800000000,16.5321250000000,16.5513840000000,16.5705590000000,16.5896480000000,16.6086550000000,16.6275780000000,16.6464200000000,16.6651800000000,16.6838590000000,16.7024590000000,16.7209790000000,16.7394200000000,16.7577830000000,16.7760700000000,16.7942790000000,16.8124120000000,16.8304700000000,16.8484540000000,16.8663630000000,16.8841980000000,16.9019610000000,16.9196510000000,16.9372690000000,16.9548170000000,16.9722930000000,16.9897000000000,17.0070370000000,17.0243050000000,17.0415050000000,17.0586370000000,17.0757020000000,17.0927000000000,17.1096310000000,17.1264970000000,17.1432980000000,17.1600330000000,17.1767050000000,17.1933130000000,17.2098570000000,17.2263390000000,17.2427590000000,17.2591160000000,17.2754130000000,17.2916480000000,17.3078230000000,17.3239380000000,17.3399930000000,17.3559890000000,17.3719260000000,17.3878060000000,17.4036270000000,17.4193910000000,17.4350980000000,17.4507480000000,17.4663420000000,17.4818800000000,17.4973630000000,17.5127910000000,17.5281640000000,17.5434830000000,17.5587490000000,17.5739600000000,17.5891190000000,17.6042250000000,17.6192780000000,17.6342800000000,17.6492300000000,17.6641280000000,17.6789760000000,17.6937730000000,17.7085200000000,17.7232170000000,17.7378640000000,17.7524630000000,17.7670120000000,17.7815130000000,17.7959650000000,17.8103690000000,17.8247260000000,17.8390360000000,17.8532980000000,17.8675140000000,17.8816840000000,17.8958070000000,17.9098850000000,17.9239170000000,17.9379040000000,17.9518460000000,17.9657430000000,17.9795960000000,17.9934050000000,18.0071710000000,18.0208930000000,18.0345710000000,18.0482070000000,18.0618000000000,18.0753500000000,18.0888590000000,18.1023250000000,18.1157500000000,18.1291340000000,18.1424760000000,18.1557770000000,18.1690380000000,18.1822590000000,18.1954390000000,18.2085800000000,18.2216810000000,18.2347420000000,18.2477650000000,18.2607480000000,18.2736930000000,18.2865990000000,18.2994670000000,18.3122970000000,18.3250890000000,18.3378440000000,18.3505610000000,18.3632410000000,18.3758840000000,18.3884910000000,18.4010610000000,18.4135950000000,18.4260920000000,18.4385540000000,18.4509800000000,18.4633710000000,18.4757270000000,18.4880470000000,18.5003330000000,18.5125830000000,18.5248000000000,18.5369820000000,18.5491300000000,18.5612440000000,18.5733250000000,18.5853720000000,18.5973860000000,18.6093660000000,18.6213140000000,18.6332290000000,18.6451110000000,18.6569610000000,18.6687780000000,18.6805640000000,18.6923170000000,18.7040390000000,18.7157290000000,18.7273880000000,18.7390160000000,18.7506130000000,18.7621780000000,18.7737130000000,18.7852180000000,18.7966920000000,18.8081360000000,18.8195500000000,18.8309340000000,18.8422880000000,18.8536120000000,18.8649070000000,18.8761730000000,18.8874100000000,18.8986170000000,18.9097960000000,18.9209460000000,18.9320680000000,18.9431610000000,18.9542250000000,18.9652620000000,18.9762710000000,18.9872520000000,18.9982050000000,19.0091310000000,19.0200290000000,19.0309000000000,19.0417440000000,19.0525600000000,19.0633500000000,19.0741140000000,19.0848500000000,19.0955600000000,19.1062440000000,19.1169020000000,19.1275330000000,19.1381390000000,19.1487180000000,19.1592720000000,19.1698000000000,19.1803030000000,19.1907810000000,19.2012330000000,19.2116610000000,19.2220630000000,19.2324400000000,19.2427930000000,19.2531210000000,19.2634240000000,19.2737040000000,19.2839590000000,19.2941890000000,19.3043960000000,19.3145790000000,19.3247380000000,19.3348730000000,19.3449850000000,19.3550730000000,19.3651370000000,19.3751790000000,19.3851970000000,19.3951930000000,19.4051650000000,19.4151140000000,19.4250410000000,19.4349450000000,19.4448270000000,19.4546860000000,19.4645230000000,19.4743370000000,19.4841300000000,19.4939000000000,19.5036490000000,19.5133750000000,19.5230800000000,19.5327630000000,19.5424250000000,19.5520650000000,19.5616840000000,19.5712820000000,19.5808580000000,19.5904140000000,19.5999480000000,19.6094620000000,19.6189550000000,19.6284270000000,19.6378780000000,19.6473090000000,19.6567200000000,19.6661100000000,19.6754800000000,19.6848290000000,19.6941590000000,19.7034690000000,19.7127580000000,19.7220280000000,19.7312790000000,19.7405090000000,19.7497200000000,19.7589110000000,19.7680830000000,19.7772360000000,19.7863690000000,19.7954840000000,19.8045790000000,19.8136550000000,19.8227120000000,19.8317510000000,19.8407700000000,19.8497710000000,19.8587540000000,19.8677170000000,19.8766630000000,19.8855900000000,19.8944980000000,19.9033890000000,19.9122610000000,19.9211150000000,19.9299510000000,19.9387690000000,19.9475690000000,19.9563520000000,19.9651170000000,19.9738640000000,19.9825930000000,19.9913050000000,20,20.0086770000000,20.0173370000000,20.0259800000000,20.0346050000000,20.0432140000000,20.0518050000000,20.0603800000000,20.0689370000000,20.0774780000000,20.0860020000000,20.0945090000000,20.1030000000000,20.1114740000000,20.1199310000000,20.1283720000000,20.1367970000000,20.1452050000000,20.1535980000000,20.1619740000000,20.1703330000000,20.1786770000000,20.1870050000000,20.1953170000000,20.2036130000000,20.2118930000000,20.2201570000000,20.2284060000000,20.2366390000000,20.2448570000000,20.2530590000000,20.2612450000000,20.2694160000000,20.2775720000000,20.2857130000000,20.2938380000000,20.3019480000000,20.3100430000000,20.3181230000000,20.3261880000000,20.3342380000000,20.3422730000000,20.3502930000000,20.3582980000000,20.3662890000000,20.3742650000000,20.3822260000000,20.3901730000000,20.3981060000000,20.4060230000000,20.4139270000000,20.4218160000000,20.4296910000000,20.4375510000000,20.4453980000000,20.4532300000000,20.4610480000000,20.4688520000000,20.4766420000000,20.4844180000000,20.4921800000000,20.4999290000000,20.5076630000000,20.5153840000000,20.5230910000000,20.5307840000000,20.5384640000000,20.5461310000000,20.5537830000000,20.5614230000000,20.5690490000000,20.5766610000000,20.5842600000000,20.5918460000000,20.5994190000000,20.6069780000000,20.6145250000000,20.6220580000000,20.6295780000000,20.6370860000000,20.6445800000000,20.6520610000000,20.6595300000000,20.6669860000000,20.6744280000000,20.6818590000000,20.6892760000000,20.6966810000000,20.7040730000000,20.7114530000000,20.7188200000000,20.7261750000000,20.7335170000000,20.7408470000000,20.7481640000000,20.7554700000000,20.7627630000000,20.7700430000000,20.7773120000000,20.7845680000000,20.7918120000000,20.7990450000000,20.8062650000000,20.8134730000000,20.8206690000000,20.8278540000000,20.8350260000000,20.8421870000000,20.8493360000000,20.8564730000000,20.8635980000000,20.8707120000000,20.8778140000000,20.8849050000000,20.8919840000000,20.8990510000000,20.9061070000000,20.9131520000000,20.9201850000000,20.9272060000000,20.9342170000000,20.9412160000000,20.9482040000000,20.9551800000000,20.9621460000000,20.9691000000000,20.9760430000000,20.9829750000000,20.9898960000000,20.9968060000000,21.0037050000000,21.0105940000000,21.0174710000000,21.0243370000000,21.0311930000000,21.0380370000000,21.0448710000000,21.0516940000000,21.0585070000000,21.0653090000000,21.0721000000000,21.0788800000000,21.0856500000000,21.0924100000000,21.0991590000000,21.1058970000000,21.1126250000000,21.1193430000000,21.1260500000000,21.1327470000000,21.1394340000000,21.1461100000000,21.1527760000000,21.1594320000000,21.1660770000000,21.1727130000000,21.1793380000000,21.1859540000000,21.1925590000000,21.1991540000000,21.2057390000000,21.2123150000000,21.2188800000000,21.2254350000000,21.2319810000000,21.2385160000000,21.2450420000000,21.2515580000000,21.2580650000000,21.2645610000000,21.2710480000000,21.2775250000000,21.2839930000000,21.2904510000000,21.2968990000000,21.3033380000000,21.3097670000000,21.3161870000000,21.3225970000000,21.3289980000000,21.3353890000000,21.3417710000000,21.3481440000000,21.3545070000000,21.3608610000000,21.3672060000000,21.3735410000000,21.3798670000000,21.3861840000000,21.3924920000000,21.3987910000000,21.4050800000000,21.4113610000000,21.4176320000000,21.4238950000000,21.4301480000000,21.4363920000000,21.4426280000000,21.4488540000000,21.4550720000000,21.4612800000000,21.4674800000000,21.4736710000000,21.4798530000000,21.4860270000000,21.4921910000000,21.4983470000000,21.5044940000000,21.5106330000000,21.5167620000000,21.5228830000000,21.5289960000000,21.5351000000000,21.5411950000000,21.5472820000000,21.5533600000000,21.5594300000000,21.5654920000000,21.5715440000000,21.5775890000000,21.5836250000000,21.5896530000000,21.5956720000000,21.6016830000000,21.6076860000000,21.6136800000000,21.6196660000000,21.6256440000000,21.6316140000000,21.6375750000000,21.6435290000000,21.6494740000000,21.6554110000000,21.6613400000000,21.6672610000000,21.6731730000000,21.6790780000000,21.6849750000000,21.6908640000000,21.6967440000000,21.7026170000000,21.7084820000000,21.7143390000000,21.7201880000000,21.7260290000000,21.7318630000000,21.7376880000000,21.7435060000000,21.7493160000000,21.7551180000000,21.7609130000000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    90
  };
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    91
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    92
uint16_t cbMiSizeTable [9] = {40, 104, 160, 256, 512, 1024, 2560, 4032, 6144};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    93
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    94
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    95
double bEcrTable [9][27] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    96
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    97
  // CB of 40 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    98
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
    99
    0.2346, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   100
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   101
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   102
  },  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   103
  // CB of 104 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   104
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   105
  0.1897, 0.2628, 0.3270, 0.3732, 0.4743, 0.5855, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   106
  -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   107
  -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   108
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   109
  // CB of 160
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   110
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   111
    0.1806, 0.2501, 0.3115, 0.3565, 0.4519, 0.5580, 0.6471, 0.7317, 0.8101,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   112
    0.8449, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   113
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   114
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   115
  // CB of 256
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   116
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   117
    0.1733, 0.2406, 0.3009, 0.3442, 0.4312, 0.5341, 0.6207, 0.7054, 0.7813,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   118
    0.8483, 0.5288, 0.5599, 0.6001, 0.6380, -1.000, -1.000, -1.000, -1.000, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   119
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   120
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   121
  // CB of 512
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   122
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   123
    0.1669, 0.2309, 0.2916, 0.3334, 0.4139, 0.5148, 0.5984, 0.6810, 0.7559,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   124
    0.8163, 0.5047, 0.5352, 0.5754, 0.6153, 0.6544, 0.6836, 0.7295, 0.7890,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   125
    0.8516, 0.6533, 0.6897, 0.7260, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   126
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   127
  // CB of 1024
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   128
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   129
    0.1639, 0.2264, 0.2871, 0.3288, 0.4049, 0.5053, 0.5873, 0.6681, 0.7455,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   130
    0.8040, 0.4987, 0.5275, 0.5648, 0.6037, 0.6422, 0.6717, 0.7182, 0.7770,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   131
    0.8393, 0.6378, 0.6769, 0.7151, 0.7517, 0.7838, 0.8391, 0.8837, 0.9320
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   132
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   133
  // CB of 2560
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   134
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   135
    0.1617, 0.2237, 0.2842, 0.3257, 0.3995, 0.4997, 0.5809, 0.6607, 0.7369,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   136
    0.7980, 0.4944, 0.5234, 0.5602, 0.5973, 0.6365, 0.6649, 0.7105, 0.7711, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   137
    0.8308, 0.6339, 0.6699, 0.7069, 0.7435, 0.7788, 0.8312, 0.8737, 0.9196
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   138
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   139
  // CB of 4032
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   140
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   141
    0.1612, 0.2235, 0.2837, 0.3254, 0.3982, 0.4981, 0.5793, 0.6589, 0.7349,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   142
    0.7959, 0.4949, 0.5215, 0.5566, 0.5939, 0.6535, 0.6621, 0.7081, 0.7692, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   143
    0.8281, 0.6313, 0.6695, 0.7076, 0.7435, 0.7788, 0.8296, 0.8703, 0.9168
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   144
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   145
  // CB of 6144
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   146
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   147
    0.1611, 0.2233, 0.2835, 0.3253, 0.3980, 0.4978, 0.5786, 0.6578, 0.7342,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   148
    0.7947, 0.4930, 0.5222, 0.5588, 0.5952, 0.6339, 0.6625, 0.7085, 0.7689, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   149
    0.8273, 0.6306, 0.6674, 0.7045, 0.7404, 0.7757, 0.8283, 0.8690, 0.9153
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   150
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   151
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   152
};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   153
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   154
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   155
double cEcrTable [9][27] = {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   156
  // CB of 40 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   157
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   158
    0.0435, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   159
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   160
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   161
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   162
  // CB of 104 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   163
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   164
    0.0257, 0.0342, 0.0410, 0.0434, 0.0516, 0.0578, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   165
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   166
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   167
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   168
  // CB of 160 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   169
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   170
    0.0205, 0.0275, 0.0332, 0.0357, 0.0414, 0.0471, 0.0500, 0.0499, 0.0472,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   171
    0.0424, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   172
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   173
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   174
  // CB of 256 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   175
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   176
    0.0160, 0.0216, 0.0263, 0.0291, 0.0330, 0.0378, 0.0396, 0.0411, 0.0401,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   177
    0.0364, 0.0314, 0.0336, 0.0346, 0.0361, -1.000, -1.000, -1.000, -1.000, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   178
    -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   179
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   180
  // CB of 512 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   181
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   182
    0.0111, 0.0148, 0.0189, 0.0206, 0.0230, 0.0267, 0.0280, 0.0294, 0.0295, 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   183
    0.0281, 0.0229, 0.0235, 0.0247, 0.0252, 0.0257, 0.0269, 0.0272, 0.0263,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   184
    0.0246, 0.0236, 0.0253, 0.0255, -1.000, -1.000, -1.000, -1.000, -1.000
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   185
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   186
  // CB of 1024 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   187
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   188
    0.0079, 0.0105, 0.0133, 0.0148, 0.0159, 0.0183, 0.0197, 0.0211, 0.0213,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   189
    0.0206, 0.0164, 0.0167, 0.0174, 0.0181, 0.0183, 0.0187, 0.0196, 0.0193,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   190
    0.0184, 0.0171, 0.0179, 0.0187, 0.0192, 0.0187, 0.0182, 0.0169, 0.0139
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   191
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   192
  // CB of 2560 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   193
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   194
    0.0051, 0.0065, 0.0083, 0.0095, 0.0103, 0.0118, 0.0126, 0.0129, 0.0134,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   195
    0.0131, 0.0101, 0.0106, 0.0109, 0.0111, 0.0116, 0.0118, 0.0125, 0.0122,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   196
    0.0118, 0.0105, 0.0114, 0.0115, 0.0119, 0.0120, 0.0116, 0.0107, 0.0096
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   197
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   198
  // CB of 4032 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   199
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   200
    0.0040, 0.0053, 0.0067, 0.0075, 0.0082, 0.0096, 0.0101, 0.0107, 0.0108,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   201
    0.0105, 0.0086, 0.0087, 0.0087, 0.0090, 0.0095, 0.0094, 0.0100, 0.0099,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   202
    0.0096, 0.0086, 0.0092, 0.0094, 0.0095, 0.0097, 0.0091, 0.0086, 0.0078
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   203
  },
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   204
  // CB of 6144 bits
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   205
  {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   206
    0.0032, 0.0044, 0.0054, 0.0062, 0.0069, 0.0077, 0.0083, 0.0087, 0.0088,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   207
    0.0083, 0.0068, 0.0069, 0.0073, 0.0073, 0.0077, 0.0079, 0.0080, 0.0080,
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   208
    0.0078, 0.0068, 0.0073, 0.0075, 0.0077, 0.0079, 0.0075, 0.0067, 0.0063
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   209
  }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   210
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   211
};
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   212
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   213
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   214
double 
8646
4b341d8f2f61 Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8595
diff changeset
   215
LteMiErrorModel::Mib (const SpectrumValue& sinr, const std::vector<int>& map, uint8_t mcs)
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   216
{
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   217
  NS_LOG_FUNCTION (sinr << &map << (uint32_t) mcs);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   218
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   219
  double MI;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   220
  double MIsum = 0.0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   221
  
8760
8ccb0c2badc1 portable types for loop variables
Tom Henderson <tomh@tomh.org>
parents: 8662
diff changeset
   222
  for (uint32_t i = 0; i < map.size (); i++)
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   223
    {
8646
4b341d8f2f61 Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8595
diff changeset
   224
      SpectrumValue sinrCopy = sinr;
4b341d8f2f61 Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8595
diff changeset
   225
      double sinrLin = sinrCopy[map.at (i)];
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   226
      double sinr_db = 10*log10 (sinrLin);
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   227
      if (mcs <= 10) // QPSK
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   228
        {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   229
          int tr = 0;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   230
          while ((tr<MI_MAP_QPSK_SIZE)&&(MI_map_qpsk_axis[tr] < sinr_db))
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   231
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   232
              tr++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   233
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   234
          if (sinr_db > MI_map_qpsk_axis[MI_MAP_QPSK_SIZE-1])
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   235
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   236
              MI = 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   237
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   238
          else 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   239
            {
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   240
              NS_ASSERT_MSG (tr<MI_MAP_QPSK_SIZE, "MI map out of data");
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   241
              MI = MI_map_qpsk[tr];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   242
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   243
        }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   244
      else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   245
        {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   246
          if (mcs > 10 && mcs < 20 )	// 16-QAM
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   247
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   248
              int tr = 0;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   249
              while ((tr<MI_MAP_16QAM_SIZE)&&(MI_map_16qam_axis[tr] < sinr_db))
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   250
                {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   251
                  tr++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   252
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   253
              if (sinr_db > MI_map_16qam_axis[MI_MAP_16QAM_SIZE-1])
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   254
                {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   255
                  MI = 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   256
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   257
              else 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   258
                {
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   259
                  NS_ASSERT_MSG (tr<MI_MAP_16QAM_SIZE, "MI map out of data");
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   260
                  MI = MI_map_16qam[tr];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   261
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   262
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   263
          else // 64-QAM
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   264
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   265
              int tr = 0;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   266
              while ((tr<MI_MAP_64QAM_SIZE)&&(MI_map_64qam_axis[tr] < sinr_db))
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   267
                {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   268
                  tr++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   269
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   270
              if (sinr_db > MI_map_64qam_axis[MI_MAP_64QAM_SIZE-1])
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   271
                {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   272
                  MI = 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   273
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   274
              else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   275
                {
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   276
                  NS_ASSERT_MSG (tr<MI_MAP_64QAM_SIZE, "MI map out of data");
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   277
                  MI = MI_map_64qam[tr];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   278
                }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   279
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   280
        }
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   281
     NS_LOG_LOGIC (" RB " << map.at (i) << "Minimum SNR = " << sinr_db << " dB, MCS = " << (uint16_t)mcs << ", MI = " << MI);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   282
      MIsum += MI;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   283
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   284
  MI = MIsum / map.size ();
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   285
  NS_LOG_LOGIC (" MI = " << MI);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   286
  return MI;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   287
}
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   288
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   289
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   290
double 
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   291
LteMiErrorModel::MappingMiBler (double mib, uint8_t mcs, uint16_t cbSize)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   292
{
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   293
  NS_LOG_FUNCTION (mib << (uint32_t) mcs << (uint32_t) cbSize);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   294
  double b = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   295
  double c = 0;
8762
46d94f0ede45 remove tests that always evaluate to true
Tom Henderson <tomh@tomh.org>
parents: 8760
diff changeset
   296
  NS_ASSERT_MSG (mcs < 32, "MCS out of range");
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   297
  int tbsIndex = TbsIndex[mcs];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   298
  int cbIndex = 1;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   299
  while ((cbIndex < 9)&&(cbMiSizeTable[cbIndex]< cbSize))
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   300
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   301
      cbIndex++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   302
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   303
  cbIndex--;
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   304
  NS_LOG_LOGIC (" MCS " << (uint16_t)mcs << " TBS " << tbsIndex << " CB size " << cbSize << " CB size curve " << cbMiSizeTable[cbIndex]);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   305
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   306
  b = bEcrTable[cbIndex][tbsIndex];
8533
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   307
  if (b<0.0)
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   308
    {
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   309
      //take the lowest CB size including this CB for removing CB size
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   310
      //quatization errors
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   311
      int i = cbIndex;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   312
      while ((i<9)&&(b<0))
8533
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   313
        {
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   314
          b = bEcrTable[i++][tbsIndex];
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   315
        }
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   316
    }
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   317
  c = cEcrTable[cbIndex][tbsIndex];
8533
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   318
  if (c<0.0)
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   319
    {
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   320
      //take the lowest CB size including this CB for removing CB size
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   321
      //quatization errors
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   322
      int i = cbIndex;
8593
604d49e2c809 Add lack assert test on vectors in LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8576
diff changeset
   323
      while ((i<9)&&(c<0))
8533
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   324
        {
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   325
          c = cEcrTable[i++][tbsIndex];
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   326
        }
a22d076f13de Remove CB size quantization error in evaluating the error distribution
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8524
diff changeset
   327
    }
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   328
  // see IEEE802.16m EMD formula 55 of section 4.3.2.1
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   329
  double bler = 0.5*( 1 - erf((mib-b)/(sqrt(2)*c)) );
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   330
  NS_LOG_LOGIC ("MIB: " << mib << " BLER:" << bler);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   331
  return bler;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   332
}
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   333
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   334
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   335
double
8646
4b341d8f2f61 Add new UE CQI Measurement and AMC module based on LteMiErrorModel
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8595
diff changeset
   336
LteMiErrorModel::GetTbError (const SpectrumValue& sinr, const std::vector<int>& map, uint16_t size, uint8_t mcs)
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   337
{
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   338
  NS_LOG_FUNCTION (sinr << &map << (uint32_t) size << (uint32_t) mcs);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   339
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   340
  double MI = Mib(sinr, map, mcs);
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   341
  // estimate CB size (according to sec 5.1.2 of TS 36.212)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   342
  uint16_t Z = 6144; // max size of a codeblock (including CRC)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   343
  uint32_t B = size * 8;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   344
//   B = 1234;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   345
  uint32_t L = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   346
  uint32_t C = 0; // no. of codeblocks
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   347
  uint32_t Cplus = 0; // no. of codeblocks with size K+
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   348
  uint32_t Kplus = 0; // no. of codeblocks with size K+
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   349
  uint32_t Cminus = 0; // no. of codeblocks with size K+
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   350
  uint32_t Kminus = 0; // no. of codeblocks with size K+
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   351
  uint32_t B1 = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   352
  uint32_t deltaK = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   353
  if (B <= Z)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   354
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   355
      // only one codeblock
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   356
      L = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   357
      C = 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   358
      B1 = B;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   359
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   360
  else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   361
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   362
      L = 24;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   363
      C = ceil ((double)B / ((double)(Z-L)));
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   364
      B1 = B + C * L;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   365
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   366
  // first segmentation: K+ = minimum K in table such that C * K >= B1
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   367
//   uint i = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   368
//   while (B1 > cbSizeTable[i] * C)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   369
//     {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   370
// //       NS_LOG_INFO (" K+ " << cbSizeTable[i] << " means " << cbSizeTable[i] * C);
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   371
//       i++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   372
//     }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   373
//   uint16_t KplusId = i;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   374
//   Kplus = cbSizeTable[i];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   375
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   376
  // implement a modified binary search
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   377
  int min = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   378
  int max = 187;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   379
  int mid = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   380
  do
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   381
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   382
      mid = (min+max) / 2;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   383
      if (B1 > cbSizeTable[mid]*C)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   384
        {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   385
          if (B1 < cbSizeTable[mid+1]*C)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   386
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   387
              break;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   388
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   389
          else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   390
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   391
              min = mid + 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   392
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   393
        }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   394
      else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   395
        {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   396
          if (B1 > cbSizeTable[mid-1]*C)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   397
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   398
              break;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   399
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   400
          else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   401
            {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   402
              max = mid - 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   403
            }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   404
        }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   405
  } while ((cbSizeTable[mid]*C != B1) && (min < max));
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   406
  // adjust binary search to the largest integer value of K containing B1
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   407
  if (B1 > cbSizeTable[mid]*C)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   408
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   409
      mid ++;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   410
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   411
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   412
  uint16_t KplusId = mid;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   413
  Kplus = cbSizeTable[mid];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   414
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   415
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   416
  if (C==1)
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   417
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   418
      Cplus = 1;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   419
      Cminus = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   420
      Kminus = 0;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   421
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   422
  else
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   423
    {
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   424
      // second segmentation size: K- = maximum K in table such that K < K+
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   425
      Kminus = cbSizeTable[KplusId-1 > 0 ? KplusId-1 : 0];
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   426
      deltaK = Kplus - Kminus;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   427
      Cminus = floor ((((double) C * Kplus) - (double)B1) / (double)deltaK);
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   428
      Cplus = C - Cminus;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   429
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   430
  NS_LOG_INFO ("--------------------LteMiErrorModel: TB size of " << B << " needs of " << B1 << " bits reparted in " << C << " CBs as "<< Cplus << " block(s) of " << Kplus << " and " << Cminus << " of " << Kminus);
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   431
  
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   432
  double errorRate = 1.0;
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   433
  if (C!=1)
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   434
    {
8760
8ccb0c2badc1 portable types for loop variables
Tom Henderson <tomh@tomh.org>
parents: 8662
diff changeset
   435
        for (uint32_t i = 0; i < Cplus; i++)
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   436
        {
8576
dad6fca5e0fb Update LteMiErrorModel according to Raymond's comment in JIRA-200
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8533
diff changeset
   437
          double cbler = MappingMiBler (MI, mcs, Kplus);
dad6fca5e0fb Update LteMiErrorModel according to Raymond's comment in JIRA-200
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8533
diff changeset
   438
          errorRate *= (1.0 - cbler);
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   439
        }
8760
8ccb0c2badc1 portable types for loop variables
Tom Henderson <tomh@tomh.org>
parents: 8662
diff changeset
   440
      for (uint32_t i = 0; i < Cminus; i++)
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   441
        {
8576
dad6fca5e0fb Update LteMiErrorModel according to Raymond's comment in JIRA-200
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8533
diff changeset
   442
          double cbler = MappingMiBler (MI, mcs, Kminus);
dad6fca5e0fb Update LteMiErrorModel according to Raymond's comment in JIRA-200
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8533
diff changeset
   443
          errorRate *= (1.0 - cbler);
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   444
        }
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   445
      errorRate = 1.0 - errorRate;
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   446
    }
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   447
  else
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   448
    {
8524
5a9df7c4e553 Update error model support for multiple CBs per TB
Marco Miozzo <marco.miozzo@cttc.es>
parents: 8521
diff changeset
   449
      errorRate = MappingMiBler (MI, mcs, Kplus);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   450
    }
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   451
  
8595
5d193f3e4195 minor implementation refinements for LteMiErrorModel
Nicola Baldo <nbaldo@cttc.es>
parents: 8593
diff changeset
   452
  NS_LOG_LOGIC (" Error rate " << errorRate);
8521
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   453
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   454
  return errorRate;
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   455
}
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   456
  
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   457
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   458
} // namespace ns3
05b373fc3061 Add LteMiErrorModel and update LteSpectrumPhy for managing the error model
Marco Miozzo <marco.miozzo@cttc.es>
parents:
diff changeset
   459