Main Content

nrPUCCH

Generate PUCCH modulation symbols

    Description

    example

    sym = nrPUCCH(carrier,pucch,uciBits) generates physical uplink control channel (PUCCH) modulation symbols sym, as defined in TS 38.211 Sections 6.3.2.3 to 6.3.2.6 [1] for all PUCCH formats. carrier specifies the carrier configuration. pucch specifies the format-specific PUCCH configuration. uciBits specifies the uplink control information (UCI) bits.

    example

    sym = nrPUCCH(carrier,pucch,uciBits,'OutputDataType',datatype) specifies the data type of the PUCCH symbols.

    Examples

    collapse all

    Create a default carrier configuration object.

    carrier = nrCarrierConfig;

    Specify the physical layer cell identity as 490, cyclic prefix as normal, and slot number as 57.

    carrier.NCellID = 490;
    carrier.CyclicPrefix = 'normal';
    carrier.NSlot = 57;

    Create a default PUCCH format 0 configuration object.

    pucch0 = nrPUCCH0Config;

    Specify the first symbol index in the PUCCH transmission slot as 11 and the number of allocated PUCCH symbols as 2. Enable intraslot frequency hopping and group hopping. Set the initial cyclic shift to 7.

    pucch0.SymbolAllocation = [11 2];
    pucch0.FrequencyHopping = 'intraSlot';
    pucch0.GroupHopping = 'enable';
    pucch0.HoppingID = [];      % Set HoppingID equal to the NCellID property of carrier
    pucch0.InitialCyclicShift = 7;
     

    Specify a transmission without HARQ-ACK and with a positive SR.

    sr = 1;                    % Positive SR transmission
    ack = [];
    uciBits = {ack, sr}; 

    Generate PUCCH format 0 modulation symbols.

    sym = nrPUCCH(carrier,pucch0,uciBits)
    sym = 24×1 complex
    
      -0.7071 - 0.7071i
      -0.9659 + 0.2588i
      -0.9659 - 0.2588i
       0.7071 - 0.7071i
      -0.2588 - 0.9659i
      -0.9659 - 0.2588i
      -0.7071 - 0.7071i
       0.2588 + 0.9659i
      -0.2588 + 0.9659i
      -0.7071 - 0.7071i
          ⋮
    
    

    Create a default carrier configuration object.

    carrier = nrCarrierConfig;

    Specify a 60 kHz carrier with extended cyclic prefix. Set the number of (resource blocks) RBs in the carrier resource grid to 80 and the slot number to 3.

    carrier.SubcarrierSpacing = 60;
    carrier.CyclicPrefix = 'extended';
    carrier.NSizeGrid = 80;
    carrier.NSlot = 3;

    Create a default PUCCH format 1 configuration object.

    pucch1 = nrPUCCH1Config;

    Specify the first symbol index in the PUCCH transmission slot as 2 and the number of allocated PUCCH symbols as 10. Enable intraslot frequency hopping and group hopping. Set the hopping identity to 512, the initial cyclic shift to 7, and the orthogonal cover code index (OCCI) to 1.

    pucch1.SymbolAllocation = [2 10];
    pucch1.FrequencyHopping = 'intraSlot';
    pucch1.GroupHopping = 'enable';
    pucch1.HoppingID = 512;
    pucch1.InitialCyclicShift = 7;
    pucch1.OCCI = 1;

    Specify a transmission with two-bit HARQ-ACK.

    uciBits = [1;0];

    Generate PUCCH format 1 modulation symbols.

    sym = nrPUCCH(carrier,pucch1,uciBits)
    sym = 60×1 complex
    
       1.0000 + 0.0000i
       0.5000 + 0.8660i
      -0.8660 - 0.5000i
       0.0000 + 1.0000i
      -0.8660 + 0.5000i
       0.8660 + 0.5000i
       1.0000 - 0.0000i
       0.8660 - 0.5000i
      -0.8660 - 0.5000i
       1.0000 - 0.0000i
          ⋮
    
    

    Create a default carrier configuration object.

    carrier = nrCarrierConfig;

    Create a default PUCCH format 2 configuration object.

    pucch2 = nrPUCCH2Config;

    Specify the data scrambling identity as 1000 and the radio network temporary identifier as 160.

    pucch2.NID = 1000;
    pucch2.RNTI = 160;

    Create a random sequence of binary values corresponding to a UCI codeword of 100 bits.

    uciCW = randi([0 1],100,1);

    Generate PUCCH format 2 modulation symbols of data type single.

    sym = nrPUCCH(carrier,pucch2,uciCW,'OutputDataType','single')
    sym = 50x1 single column vector
    
       0.7071 + 0.7071i
      -0.7071 + 0.7071i
      -0.7071 - 0.7071i
      -0.7071 - 0.7071i
       0.7071 + 0.7071i
      -0.7071 + 0.7071i
       0.7071 - 0.7071i
       0.7071 + 0.7071i
       0.7071 - 0.7071i
       0.7071 - 0.7071i
          ⋮
    
    

    Create a default carrier configuration object, and then set the with cell identity as 135.

    carrier = nrCarrierConfig;
    carrier.NCellID = 135;

    Create a default PUCCH format 3 configuration object.

    pucch3 = nrPUCCH3Config;

    Specify the modulation scheme as pi/2-BPSK, the PRB allocation of the PUCCH to range from 70 to 74 (occupying 5 resource blocks), and the radio network temporary identifier as 2560.

    pucch3.Modulation = 'pi/2-BPSK';
    pucch3.PRBSet = 70:74;
    pucch3.RNTI = 2560;

    Create a random sequence of binary values corresponding to a UCI codeword of 120 bits.

    uciCW = randi([0 1],120,1);

    Generate PUCCH format 3 modulation symbols of datatype single.

    sym = nrPUCCH(carrier,pucch3,uciCW,'OutputDataType','single')
    sym = 120x1 single column vector
    
       0.1826 - 0.5477i
      -1.0861 - 0.3479i
       0.6300 + 0.8742i
      -0.5093 + 0.6652i
       0.1911 - 0.7721i
       0.1157 + 0.4320i
       0.3199 - 1.0054i
       1.4349 - 1.7045i
       0.4180 - 0.4832i
       0.0044 - 0.3429i
          ⋮
    
    

    Create a default carrier configuration object, and then set the cell identity as 140.

    carrier = nrCarrierConfig;
    carrier.NCellID = 140;

    Create a default PUCCH format 4 configuration object.

    pucch4 = nrPUCCH4Config;

    Specify the modulation scheme as QPSK, the spreading factor as 4, the OCCI as 3, and the radio network temporary identifier as 750.

    pucch4.Modulation = 'QPSK';
    pucch4.SpreadingFactor = 4;
    pucch4.OCCI = 3;
    pucch4.RNTI = 750;

    Create a random sequence of binary values corresponding to a UCI codeword of 120 bits.

    uciCW = randi([0 1],120,1);

    Generate PUCCH format 4 modulation symbols.

    sym = nrPUCCH(carrier,pucch4,uciCW)
    sym = 240×1 complex
    
       0.0000 + 0.0000i
       0.5977 + 0.5977i
       0.0000 + 0.0000i
       0.0000 + 0.0000i
       0.0000 + 0.0000i
      -2.2307 - 2.2307i
       0.0000 + 0.0000i
       0.0000 + 0.0000i
       0.0000 + 0.0000i
      -0.8165 - 0.8165i
          ⋮
    
    

    Input Arguments

    collapse all

    Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object. This function uses only these nrCarrierConfig object properties.

    PUCCH configuration parameters, specified as one of these options.

    UCI bits, specified as a binary-valued column vector, a one-element cell array, or a two-element cell array depending on the format type. When you specify this argument as a cell array, each element in the array must be a column vector.

    • For format 0, you must specify a binary-valued column vector, a one-element cell array, or a two-element cell array.

      • When you specify this value as a binary-valued column vector or a one-element cell array, the UCI bits are assumed to be hybrid automatic repeat request acknowledgment (HARQ-ACK) bits.

      • When you specify this value as a two-element cell array, the first element is assumed to have HARQ-ACK bits, and the second element is assumed to have scheduling request (SR) bit.

    • For format 1, you must specify a binary-valued column vector or a one-element cell array. This argument must contain HARQ-ACK bits or SR bits. To transmit only positive SR bit, specify this argument as [0] or {0}.

    • For formats 2, 3, and 4, you must specify a binary-valued column vector or a one-element cell array. This argument must contain a codeword of encoded UCI bits.

    Data Types: double

    Data type of the output symbols, specified as 'double' or 'single'.

    Data Types: char | string

    Output Arguments

    collapse all

    PUCCH modulation symbols for the specified format, returned as a complex column vector.

    Data Types: single | double
    Complex Number Support: Yes

    References

    [1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

    Extended Capabilities

    Introduced in R2021a