Main Content

nrULSCHDemultiplex

Perform UL-SCH data and control demultiplexing

    Description

    example

    [culsch,cack,ccsi1,ccsi2] = nrULSCHDemultiplex(pusch,tcr,tbs,oack,ocsi1,ocsi2,cw) returns demultiplexed encoded data vector culsch, and encoded uplink control information (UCI) vectors cack, ccsi1, and ccsi2 post the demultiplexing of received codeword cw. This demultiplexing reverses the processing defined in TS 38.212 Section 6.2.7 [1]. pusch is the physical uplink shared channel (PUSCH) configuration. tcr is the target code rate. tbs is the transport block size for the uplink shared channel (UL-SCH) transmission. oack is number of the hybrid automatic repeat request acknowledgment (HARQ-ACK) payload bits. ocsi1 is the number of channel state information (CSI) part 1 payload bits, and ocsi2 is the number of CSI part 2 payload bits. cw is a column vector of the received log-likelihood ratio (LLR) soft bits.

    Examples

    collapse all

    Create a PUSCH configuration object with a pi/2-BPSK modulation scheme and no frequency hopping. Set the beta offset factor for the HARQ-ACK to 20, and the beta offset factor for CSI part 1 and CSI part 2 to 6.25 each. Specify the scaling factor as 1, which limits the number of resource elements (REs) assigned for the UCI.

    pusch = nrPUSCHConfig;
    pusch.Modulation = 'pi/2-BPSK';
    pusch.FrequencyHopping = 'neither';
    pusch.BetaOffsetACK = 20;
    pusch.BetaOffsetCSI1 = 6.25;
    pusch.BetaOffsetCSI2 = 6.25;
    pusch.UCIScaling = 1;

    Set the target code rate, payload lengths of the UL-SCH data, HARQ-ACK, CSI part 1, and CSI part 2.

    tcr = 0.5;   % Target code rate
    tbs = 3848;  % Payload length of UL-SCH data (transport block size)
    oack = 8;    % Payload length of HARQ-ACK
    ocsi1 = 88;  % Payload length of CSI part 1
    ocsi2 = 100; % Payload length of CSI part 2

    Get the rate matched lengths of the UL-SCH data, HARQ-ACK, CSI part 1, and CSI part 2.

    rmInfo = nrULSCHInfo(pusch,tcr,tbs,oack,ocsi1,ocsi2);

    Create the randomly coded bits of the UL-SCH, HARQ-ACK, CSI part 1, and CSI part 2.

    culsch = randi([0 1],rmInfo.GULSCH,1);
    cack = randi([0 1],rmInfo.GACK,1);
    ccsi1 = randi([0 1],rmInfo.GCSI1,1);
    ccsi2 = randi([0 1],rmInfo.GCSI2,1);

    Get the codeword from the randomly coded bits of the UL-SCH and coded bits of UCI types.

    cw = nrULSCHMultiplex(pusch,tcr,tbs,culsch,cack,ccsi1,ccsi2);

    Get the demultiplexed UL-SCH and UCI bits from the codeword.

    [rxculsch,rxcack,rxccsi1,rxccsi2] = nrULSCHDemultiplex(pusch,tcr,tbs,oack,ocsi1,ocsi2,1-2*cw);

    Verify that the randomly coded bits and demultiplexed coded bits of the UL-SCH and the coded UCI types are identical.

    isequal(rxculsch<0,culsch)
    ans = logical
       1
    
    
    isequal(rxcack<0,cack)
    ans = logical
       1
    
    
    isequal(rxccsi1<0,ccsi1)
    ans = logical
       1
    
    
    isequal(rxccsi2<0,ccsi2)
    ans = logical
       1
    
    

    Input Arguments

    collapse all

    PUSCH configuration parameters, specified as an nrPUSCHConfig object. This function uses only these nrPUSCHConfig object properties.

    Modulation scheme, specified as 'QPSK', 'pi/2-BPSK', '16QAM', '64QAM', or '256QAM', a string scalar, or a character array.

    Modulation SchemeNumber of Bits Per Symbol
    'pi/2-BPSK'1
    'QPSK'2
    '16QAM'4
    '64QAM'6
    '256QAM'8

    Data Types: char | string

    Number of transmission layers, specified as 1, 2, 3, or 4.

    Data Types: double

    Mapping type of the physical shared channel, specified as 'A' or 'B'.

    Data Types: char | string

    OFDM symbol allocation of the physical shared channel, specified as a two-element vector of nonnegative integers. The first element of this property represents the start of symbol allocation (0-based). The second element represents the number of allocated OFDM symbols.

    When this property is set to [] or second element in this two-element vector of nonnegative integers is 0, the symbol allocation is empty.

    Data Types: double

    Physical resource block (PRB) allocation of PUSCH within the BWP, specified as a vector of nonnegative integers from 0 to 274.

    Data Types: double

    Transform precoding flag, specified as one of these values.

    • 0 — The transform precoding is disabled and waveform type is cyclic-prefix orthogonal frequency division multiplexing (CP-OFDM).

    • 1 — The transform precoding is enabled and waveform type is discrete fourier transform spread orthogonal frequency division multiplexing (DFT-s-OFDM).

    Data Types: double | logical

    Frequency hopping for the physical uplink shared channel, specified as one of these options.

    • 'neither'

    • 'intraSlot'

    • 'interSlot'

    If you specify intra-slot frequency hopping and the input coded bits doesn't satisfy the equations of TS 38.212 Section 6.2.7, the function returns the codeword assuming no frequency hopping is present.

    Data Types: char | string

    Beta offset factor of the hybrid automatic repeat request acknowledgment (HARQ-ACK), specified as a positive integer. This property is used to determine the number of resources for multiplexing HARQ-ACK. The nominal value is one of the entry from the Table 9.3-1 of TS 38.213.

    Data Types: double

    Beta offset factor of the channel state information (CSI) part 1, specified as a positive integer. This property is used to determine the number of resources for multiplexing CSI part 1. The nominal value is one of the entry from the Table 9.3-2 of TS 38.213.

    Data Types: double

    Beta offset factor of the CSI part 2, specified as a positive integer. This property is used to determine the number of resources for multiplexing CSI part 2. The nominal value is one of the entry from the Table 9.3-2 of TS 38.213.

    Data Types: double

    Scaling factor to limit the number of the resource elements allocated for the uplink channel information (UCI) on the PUSCH, specified as a scalar in the range (0, 1). The nominal value is 0.5, 0.65, 0.8, or 1.

    Data Types: double

    Radio network temporary identifier of the user equipment (UE), specified as an integer from 0 to 65,535.

    Data Types: double

    PUSCH demodulation reference signal (DM-RS) configuration parameters, specified as a nrPUSCHDMRSConfig configuration object. This property relates to the demodulation reference signal configuration and contains all properties of the specified nrPUSCHDMRSConfig object.

    Enable PT-RS, specified as one of these values.

    • 0 — Disable PT-RS configuration.

    • 1 — Enable PT-RS configuration.

    Data Types: double | logical

    PUSCH phase tracking reference signal (PT-RS) configuration, specified as a nrPUSCHPTRSConfig configuration object. This property relates to the phase tracking reference signal configuration and contains all properties of the specified nrPUSCHPTRSConfig object.

    Target code rate for the codeword in the UL-SCH transmission, specified as a scalar in the range (0, 1).

    Data Types: double

    Transport block size associated with the codeword in the UL-SCH transmission, specified as a nonnegative integer. A value of 0 indicates no transport block or no UL-SCH transmission on the PUSCH.

    Data Types: double

    Payload length of the HARQ-ACK bits, specified as a nonnegative integer. A value of 0 indicates no HARQ-ACK transmission.

    Data Types: double

    Payload length of the CSI part 1 bits, specified as a nonnegative integer. A value of 0 indicates no CSI part 1 transmission.

    Data Types: double

    Payload length of the CSI part 2 bits, specified as a nonnegative integer. A value of 0 indicates no CSI part 2 transmission. Nominally, the CSI part 2 is present only when CSI part 1 is present.

    Data Types: double

    Received log likelihood ratio (LLR) soft bits, returned as a real-valued column vector or []. The length of cw must be equal to the bit capacity of the PUSCH.

    Data Types: single | double

    Output Arguments

    collapse all

    Coded UL-SCH LLR soft bits, specified as a real-valued column vector. If the input argument cw is empty, then the output argument culsch is also empty. The output data type of culsch matches that of the input argument cw.

    Data Types: single | double

    Coded HARQ-ACK LLR soft bits, specified as a real-valued column vector. If the input argument cw is empty, then the output argument cack is also empty. The output data type of cack matches that of the input argument cw.

    Data Types: single | double

    Coded CSI part 1 LLR soft bits, specified as a real-valued column vector. If the input argument cw is empty, then the output argument ccsi1 is also empty. The output data type of ccsi1 matches that of the input argument cw.

    Data Types: single | double

    Coded CSI part 2 LLR soft bits, specified as a real-valued column vector. If the input argument cw is empty, then the output argument ccsi2 is also empty. The output data type of ccsi2 matches that of the input argument cw.

    Data Types: single | double

    References

    [1] 3GPP TS 38.212. “NR; Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

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

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Introduced in R2020b