Main Content

nrULSCHDemultiplex

Perform UL-SCH data and control demultiplexing

Since R2020b

    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.

    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™.

    Version History

    Introduced in R2020b