Transport Block Size Computation

This module computes the size of the transport block expected rom the MAC layer and processed by physical layer for transmission over air interface. The parameters required for computation of size of transport block and module used for it are demonstrated in following example.

symbolsPerSlot     = 10 #Number of Symbols per slot
numRB              = 50 #Number of Resource Blocks
scalingField       = '00' #Scaling field
mcsIndex           = 5 #Modulation Coding scheme index
additionalOverhead = 12 #Additional Overheads
numlayers          = 4 #Number of layers
dmrsREs            = 3 #Number of Resource Elements allocated for the additional DMRS

#Object for computing Transport Block Size
tbsObj    = ComputeTransportBlockSize(dmrsREs = dmrsREs)
#Computes Transport Block Size
tbLength  = tbsObj(symbolsPerSlot, numRB, numlayers, scalingField, mcsIndex, additionalOverhead)
class toolkit5G.PhysicalChannels.PDSCH.ComputeTransportBlockSize(dmrsREs=3, mcs_cqiIndex=2, mcs_cqiTable='pdschTable1')[source]

This class computes the Transport Block size (TBS), which is the packet of data passed between MAC and Physical Layers. The TB size that MAC layer passes to the physical layer depends on the amount of time-frequency resource available for transmission. The procedure for transport block calculation is written in section 5.1.3.2 of [3GPPTS38214pdsch].

Parameters:
  • dmrsREs (int) – Number of Resource Elements per Resource Block allocated to Demodulation Reference Signal(DMRS)

  • mcs_cqiIndex (int or (2,), float) – Defines the modulation order and coding rate If the variable is scalar integer then it used to define either Modulation and Coding Index (MCS-Index) or channel quality Indicator (CQI).It can take any values between 0 and 28 as per Table 5.2.2.1-2, Table 5.2.2.1-3, Table 5.2.2.1-4, Table Table 5.2.2.1-5, Table 5.1.3.1-1, Table 5.1.3.1-2, Table 5.1.3.1-3, Table 5.1.3.1-4, Table 6.1.4.1-1 and Table 6.1.4.1-2, defined in 3GPP TS 38.214 version 17.4.0. If the variable is a numpy array of floats [modulation_Order, code_Rate] then the first value is considered as modulation order and second value is considered as code-rate for LDPC.

  • mcs_cqiTable (str or None) – Defines the MCS index table for PDSCH/PUSCH or CQI-table to be used while selecting the modulation order or code rate using mcs_cqiIndex. It can take a value from the set {‘pdschTable1’, ‘pdschTable2’, ‘pdschTable3’, ‘pdschTable4’, ‘puschTable1’, ‘puschTable2’, ‘cqiTable1’, ‘cqiTable2’, ‘cqiTable3’, ‘cqiTable4’}. For passing [modulation_Order, code_Rate] instead of index, this variable shall be set to None.

Input:
  • symbolsPerSlot (int) – Number of symbols allocated per Slot. It takes a scalar or numpy integer. It can take values between 1 and 14.

  • numRB (int) – Number of Physical Resource Blocks allocated. It takes a positive scalar or numpy integer.

  • numLayers (int) – Number of MIMO layers (the number of layers is equal to the number of allocated DMRS Ports). It takes a scalar or numpy integer. It can take values between 1 and 8.

  • scalingField (str) – Transport Block Scaling Field. It accepts a string. Valid Strings are ‘00’, ‘01’, ‘10’.

  • additionalOverhead (int) – Additional Overheads that results in reduced number of available Resource Elements for data transfer. It takes a scalar or numpy integer. Valid values are 0, 6, 12 or 18.

Output:

It returns the Transport Block Size. The return type is scalar or numpy integer

Raises:
  • ValueError – [Error]: Number of Symbols per slot allocated to UE must be an integer!

  • ValueError – [Error]: Number of Symbols per slot allocated to UE should be between 1 and 14

  • ValueError – [Error]: additionalOverhead must be an integer!

  • ValueError – [Error]: Invalid Number of Resource Element allocation for additional Overhead

  • ValueError – [Error]: Number of Resource Blocks must be an integer!

  • ValueError – [Error]: Number of Resource Blocks allocaed should be a positive integer

  • ValueError – [Error]: Number of Layers must be an integer!

  • ValueError – [Error]: Number of Layers allocated should be between 1 and 8

  • ValueError – [Error]: ScalingField must be an string!

  • ValueError – [Error]: Scaling field can take value ‘00’, ‘01’, ‘10’

  • ValueError – [Error]: MCSIndex must be an integer!

  • ValueError – [Error]: MCSIndex takes the value between 0 and 28

  • ValueError – [Error]: Invalid combination of Number of Symbols allocated to UE per slot and Number of Resource Elements allocated for additional Overhead which results in negative value

  • Warning – Warning: ‘numREs’ available for sending data is: “+str(self.__NumREwithinRB)+” which is exceeding limit 156 specified by 3GPP TS 38.214.”