Main Content

pre6GTBS

Pre-6G transport block size

Since R2026a

    Description

    Add-On Required: This feature requires the 6G Exploration Library for 5G Toolbox add-on.

    tbs = pre6GTBS(ch,tcr,NREPrime) returns the transport block size (TBS) for a pre-6G physical channel configuration ch. The function determines the TBS from the number of allocated physical resource blocks (PRBs), modulation order, number of layers, target code rate tcr, and the number of resource elements per PRB NREPrime, according to the procedure in 3GPP TS 38.214 Section 5.1.3.2 with these differences:

    • You can specify an arbitrary number of layers for one codeword using the NumLayers property of the ch input.

    • You can specify custom constellations using the Modulation and Constellation properties of the ch input.

    • The function does not subtract the number of REs that contain reference signals from the value of NREPrime you specify. This means that 5G-specific restrictions on the possible amount of channel overhead do not apply to this function.

    example

    Examples

    collapse all

    Create a pre-6G physical channel configuration object with two layers and 64-QAM modulation.

    ch = pre6GPhysicalChannelConfig;
    ch.NumLayers = 2;
    ch.Modulation = "64QAM";

    Create a 5G physical downlink shared channel configuration object with two layers, 64-QAM modulation, demodulation reference signal configuration type 1, and one CDM group without data.

    carrier = nrCarrierConfig;
    pdsch = nrPDSCHConfig;
    pdsch.NumLayers = 2;
    pdsch.Modulation = "64QAM";
    pdsch.DMRS.DMRSConfigurationType = 1;
    pdsch.DMRS.NumCDMGroupsWithoutData = 1;

    Get resource information for the 5G configuration. Calculate the TBS for the 5G configuration with a target code rate of 0.5.

    NREPerPRB = 12*14;
    [~,info5G] = nrPDSCHIndices(carrier,pdsch);
    NREPrime5G = info5G.NREPerPRB;
    nRS5G = NREPerPRB - NREPrime5G;
    tcr = 0.5;
    tbs5G = nrTBS(pdsch.Modulation,pdsch.NumLayers,numel(pdsch.PRBSet),NREPrime5G,tcr);

    Now create a pre-6G reference signal configuration object. Get the relevant resource information and calculate the corresponding transport block size.

    rs6G = pre6GReferenceSignalConfig;
    nRS6G = numel(rs6G.SubcarrierLocations) * numel(rs6G.SymbolLocations);
    NREPrime = NREPerPRB - nRS6G;
    tbs6G = pre6GTBS(ch,tcr,NREPrime);

    Compare the numbers of REs per PRB and the transport block sizes.

    fprintf("5G:  %2d RS REs/PRB,  N'_RE = %d,  TBS = %d bits\n",nRS5G,NREPrime5G,tbs5G);
    5G:   6 RS REs/PRB,  N'_RE = 162,  TBS = 49176 bits
    
    fprintf("6G:  %2d RS REs/PRB,  N'_RE = %d,  TBS = %d bits\n",nRS6G,NREPrime,tbs6G);
    6G:   1 RS REs/PRB,  N'_RE = 167,  TBS = 49176 bits
    

    Input Arguments

    collapse all

    Physical channel configuration parameters, specified as a pre6GPhysicalChannelConfig object. This function uses only these pre6GPhysicalChannelConfig object properties:

    Target code rate, specified as a scalar between 0 and 1.

    Data Types: double

    Number of resource elements (REs) per PRB available for data transmission, specified as an integer in the range [0, 168]. The maximum value of 168 corresponds to 12 subcarriers × 14 OFDM symbols. This input corresponds to the parameter N'RE in TS 38.214 Section 5.1.3.2 [1].

    Data Types: double

    Output Arguments

    collapse all

    Transport block size, returned as a positive integer. The value is the number of information bits that fit in the allocation you configure.

    Data Types: double

    References

    [1] 3GPP TS 38.214. “NR; Physical layer procedures for data.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    Version History

    Introduced in R2026a