Main Content

nrULSCHDemultiplex

Perform UL-SCH data and control demultiplexing

Since R2020b

    Description

    [culsch,cack,ccsi1,ccsi2] = nrULSCHDemultiplex(pusch,tcr,tbs,oack,ocsi1,ocsi2,cw) performs uplink shared channel (UL-SCH) data and control demultiplexing by performing the reverse operation of the multiplexing processing, as defined in TS 38.212 Section 6.2.7 [1]. The function returns demultiplexed encoded data vector culsch and uplink control information (UCI) vectors cack, ccsi1, and ccsi2 for the specified inputs. pusch is the physical uplink shared channel (PUSCH) configuration. tcr is the target code rate. tbs is the transport block size for the 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 specifies the received log-likelihood ratio (LLR) soft bits corresponding to a single codeword or two-codeword transmission.

    example

    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 codewords in the UL-SCH transmission, specified as a scalar in the range (0, 1) or a two-element vector of numeric values in the range (0, 1) for two codewords. When you specify this input as a scalar and there are two codewords, the specified scalar applies to both codewords.

    Data Types: double

    Transport block size associated with the codewords in the UL-SCH transmission, specified as a nonnegative integer or a two-element vector of nonnegative integers for two codewords. When you specify this input as a nonnegative integer and there are two codewords, the specified value applies to both codewords. 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, specified as one of these options:

    • Real-valued column vector — Use this option for a single codeword transmission.

    • Cell array of one or two real-valued column vectors — You can use this option for a single codeword or a two-codeword transmission, respectively.

    • [] — Use this option to indicate the absence of soft bits.

    The length of cw must be equal to the bit capacity of the PUSCH. When processing a two-codeword transmission, the codeword on which UCI is multiplexed is determined internally and the codeword without UCI is not changed.

    Data Types: single | double

    Output Arguments

    collapse all

    Coded UL-SCH LLR soft bits corresponding to a single codeword or two-codeword transmission, returned as one of these values:

    • Real-valued column vector — The function returns this value when you specify cw as a vector.

    • Cell array of one or two real-valued column vectors — The function returns this value when you specify cw as a cell array of one or two column vectors, respectively.

    • [] — The function returns this value when cw is [].

    The output data type of culsch matches that of the input argument cw.

    Data Types: single | double

    Coded HARQ-ACK LLR soft bits, returned 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, returned 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, returned 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

    expand all