nrPUCCHIndices
Syntax
Description
[
generates ind
,info
] = nrPUCCHIndices(carrier
,pucch
)ind
, which contains 1-based physical uplink control channel
(PUCCH) resource element (RE) indices, as defined in TS 38.211 Section 6.3.2 [1] for all PUCCH formats.
carrier
specifies the carrier configuration.
pucch
specifies the PUCCH configuration. The function also generates
info
, which contains information about the bit capacity and symbol
capacity of the uplink control information (UCI) on the PUCCH.
Examples
Generate PUCCH Format 0 Indices
Create a default carrier configuration object. This object corresponds to a 10 MHz carrier with 15 kHz subcarrier spacing.
carrier = nrCarrierConfig;
Create a default PUCCH format 0 configuration object.
pucch0 = nrPUCCH0Config;
Specify the size of the bandwidth part (BWP) as 35 and the starting PRB index of the BWP relative to CRB 0 as 12. Specify the first symbol index in the PUCCH transmission slot as 3 and the number of allocated PUCCH symbols as 2. Set the PRB allocated for the PUCCH to 20, enable intraslot frequency hopping, and set the starting PRB index of the second hop to 10.
pucch0.NSizeBWP = 35;
pucch0.NStartBWP = 12;
pucch0.SymbolAllocation = [3 2];
pucch0.PRBSet = 20;
pucch0.FrequencyHopping = 'intraSlot';
pucch0.SecondHopStartPRB = 10;
Generate PUCCH format 0 RE indices, setting the index orientation with respect to the carrier grid.
[ind,info] = nrPUCCHIndices(carrier,pucch0,'IndexOrientation','carrier')
ind = 24x1 uint32 column vector
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
⋮
info = struct with fields:
G: 24
Gd: 24
NREPerPRB: 24
DMRSSymbolSet: [1x0 double]
PRBSet: 20
Plot the generated REs for PUCCH format 0 in the carrier resource grid.
resGrid = nrResourceGrid(carrier); resGrid(ind) = 1; imagesc(resGrid) axis xy xlabel('OFDM Symbols') ylabel('Subcarriers') title('Carrier Grid Containing PUCCH Format 0')
Generate PUCCH Format 1 Indices
Create a default carrier configuration object.
carrier = nrCarrierConfig;
Specify a 60 kHz carrier with extended cyclic prefix. Set the number of RBs in the carrier resource grid to 55 and the slot number to 12.
carrier.SubcarrierSpacing = 60;
carrier.CyclicPrefix = 'extended';
carrier.NSizeGrid = 55;
carrier.NSlot = 12;
Create a default PUCCH format 1 configuration object.
pucch1 = nrPUCCH1Config;
Specify the first symbol index in the PUCCH transmission slot as 3 and the number of allocated PUCCH symbols as 8. Enable intraslot frequency hopping and set the starting PRB index of the second hop to 35.
pucch1.NSizeBWP = []; % Set NSizeBWP equal to the NSizeGrid property of carrier pucch1.NStartBWP = []; % Set NStartBWP equal to the NStartGrid property of carrier pucch1.SymbolAllocation = [3 8]; pucch1.FrequencyHopping = 'intraSlot'; pucch1.SecondHopStartPRB = 35;
Generate PUCCH format 1 RE indices.
[ind,info] = nrPUCCHIndices(carrier,pucch1)
ind = 48x1 uint32 column vector
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
⋮
info = struct with fields:
G: 48
Gd: 48
NREPerPRB: 48
DMRSSymbolSet: [3 5 7 9]
PRBSet: 0
Plot the generated REs for PUCCH format 1 in the carrier resource grid.
resGrid = nrResourceGrid(carrier); resGrid(ind) = 1; imagesc(resGrid) axis xy xlabel('OFDM Symbols') ylabel('Subcarriers') title('Carrier Grid Containing PUCCH Format 1')
Generate PUCCH Format 2 Indices
Create a default carrier configuration object.
carrier = nrCarrierConfig;
Specify the number of RBs in the carrier resource grid as 24, the start of the carrier resource grid relative to CRB 0 as 20, and the slot number as 43.
carrier.NSizeGrid = 24; carrier.NStartGrid = 20; carrier.NSlot = 43;
Create a default PUCCH format 2 configuration object.
pucch2 = nrPUCCH2Config;
Specify the first symbol index in the PUCCH transmission slot as 5 and the number of allocated PUCCH symbols as 2. Set the PRBs allocated for the PUCCH to range from 0 to 15 and enable intraslot frequency hopping. Set the starting PRB index of the second hop to 7.
pucch2.SymbolAllocation = [5 2];
pucch2.PRBSet = 0:15;
pucch2.FrequencyHopping = 'intraSlot';
pucch2.SecondHopStartPRB = 7;
Generate PUCCH format 2 RE indices.
[ind,info] = nrPUCCHIndices(carrier,pucch2)
ind = 256x1 uint32 column vector
1441
1443
1444
1446
1447
1449
1450
1452
1453
1455
⋮
info = struct with fields:
G: 512
Gd: 256
NREPerPRB: 16
DMRSSymbolSet: [5 6]
PRBSet: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
Plot the generated REs for PUCCH format 2 in the carrier resource grid.
resGrid = nrResourceGrid(carrier); resGrid(ind) = 1; imagesc(resGrid) axis xy xlabel('OFDM Symbols') ylabel('Subcarriers') title('Carrier Grid Containing PUCCH Format 2')
Generate PUCCH Format 3 Indices
Create a default carrier configuration object.
carrier = nrCarrierConfig;
Create a default PUCCH format 3 configuration object.
pucch3 = nrPUCCH3Config;
Specify the PRB allocation of the PUCCH to range from 0 to 11. Set the first symbol index in the PUCCH transmission slot to 2 and the number of allocated PUCCH symbols to 12. Enable the additional DM-RS configuration flag.
pucch3.NSizeBWP = []; pucch3.NStartBWP = []; pucch3.PRBSet = 0:11; pucch3.SymbolAllocation = [2 12]; pucch3.AdditionalDMRS = 1;
Generate PUCCH format 3 RE indices, setting the index orientation with respect to the carrier grid.
[ind,info] = nrPUCCHIndices(carrier,pucch3,'IndexOrientation','carrier')
ind = 1152x1 uint32 column vector
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
⋮
info = struct with fields:
G: 2304
Gd: 1152
NREPerPRB: 96
DMRSSymbolSet: [3 6 9 12]
PRBSet: [0 1 2 3 4 5 6 7 8 9 10 11]
Plot the generated REs for PUCCH format 3 in the carrier resource grid.
resGrid = nrResourceGrid(carrier); resGrid(ind) = 1; imagesc(resGrid) axis xy xlabel('OFDM Symbols') ylabel('Subcarriers') title('Carrier Grid Containing PUCCH Format 3')
Generate PUCCH Format 4 Indices
Create a default carrier configuration object.
carrier = nrCarrierConfig;
Create a default PUCCH format 4 configuration object.
pucch4 = nrPUCCH4Config;
Specify the modulation scheme as pi/2-BPSK and the allocated PRB for the PUCCH as 50. Set the first symbol index in the PUCCH transmission slot to 2 and the number of allocated PUCCH symbols to 10. Enable intraslot frequency hopping and the additional DM-RS configuration flag. Set the starting PRB index of the second hop to 10.
pucch4.Modulation = 'pi/2-BPSK'; pucch4.PRBSet = 50; pucch4.SymbolAllocation = [2 10]; pucch4.FrequencyHopping = 'intraSlot'; pucch4.SecondHopStartPRB = 10; pucch4.AdditionalDMRS = 1;
Generate the PUCCH format 4 RE indices.
[ind,info] = nrPUCCHIndices(carrier,pucch4)
ind = 72x1 uint32 column vector
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
⋮
info = struct with fields:
G: 36
Gd: 36
NREPerPRB: 72
DMRSSymbolSet: [3 5 8 10]
PRBSet: 50
Plot the generated REs for PUCCH format 4 in the carrier resource grid.
resGrid = nrResourceGrid(carrier); resGrid(ind) = 1; imagesc(resGrid) axis xy xlabel('OFDM Symbols') ylabel('Subcarriers') title('Carrier Grid Containing PUCCH Format 4')
Input Arguments
carrier
— Carrier configuration parameters
nrCarrierConfig
object
Carrier configuration parameters for a specific OFDM numerology, specified as an
nrCarrierConfig
object. This function only uses these nrCarrierConfig
object properties.
pucch
— PUCCH configuration parameters
nrPUCCH0Config
object | nrPUCCH1Config
object | nrPUCCH2Config
object | nrPUCCH3Config
object | nrPUCCH4Config
object
PUCCH configuration parameters, specified as one of these options.
For format 0, specify an
nrPUCCH0Config
object. The function uses only these object properties.For format 1, specify an
nrPUCCH1Config
object. The function uses only these object properties.For format 2, specify an
nrPUCCH2Config
object. The function uses only these object properties.For format 3, specify an
nrPUCCH3Config
object. The function uses only these object properties.For format 4, specify an
nrPUCCH4Config
object. The function uses only these object properties.
For PUCCH formats 0 to 3 and operation with
shared spectrum channel access for frequency range 1 (FR1), set the corresponding
Interlacing
property to true
, and use the
RBSetIndex
and InterlaceIndex
object
properties to specify the allocated frequency resources. In addition, for PUCCH formats
2 and 3, you can use the SpreadingFactor
and
OCCI
properties to specify single-interlace
configurations. (since R2023b)
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'IndexStyle','subscript'
specifies the RE indexing form of
the output.
IndexStyle
— RE indexing form
'index'
(default) | 'subscript'
RE indexing form, specified as one of these values:
'index'
— The indices are in linear index form.'subscript'
— The indices are in [subcarrier, symbol, antenna] subscript row form.
Data Types: char
| string
IndexBase
— RE indexing base
'1based'
(default) | '0based'
RE indexing base, specified as one of these values:
'1based'
— The index counting starts from 1.'0based'
— The index counting starts from 0.
Data Types: char
| string
IndexOrientation
— RE indexing orientation
'carrier'
(default) | 'bwp'
RE indexing orientation, specified as one of these values:
'carrier'
— Indices are referenced with respect to the carrier grid.'bwp'
— Indices are referenced with respect to the BWP.
Data Types: char
| string
Output Arguments
ind
— PUCCH RE indices
column vector | M-by-3 matrix
PUCCH RE indices, returned as one of these values:
Column vector — The function returns this type of value when you set the
IndexStyle
name-value argument to'index'
.M-by-3 matrix — The function returns this type of value when you set the
IndexStyle
name-value argument to'subscript'
. The matrix rows correspond to the [subcarrier, symbol, antenna] subscripts based on the number of subcarriers, OFDM symbols, and number of antennas, respectively.
Depending on the value of IndexBase
, the function returns
either 1-based or 0-based indices. Depending on the value of
IndexOrientation
, the function returns either carrier-oriented
indices or BWP-oriented indices.
Data Types: uint32
info
— PUCCH resource information
structure
PUCCH resource information, returned as a structure containing these fields. The
output data type of each field is double
.
Field | Description |
---|---|
G | Bit capacity of the PUCCH, returned as a value that is equal to the length of the UCI encoded codeword for formats 2, 3, and 4. |
Gd | Symbol capacity of the PUCCH |
NREPerPRB | Number of REs per PRB allocated to the PUCCH (including the spreading factor) |
DMRSSymbolSet | Set of 0-based OFDM symbol locations in a slot containing the demodulation reference signal (DM-RS) |
| PRBs allocated for PUCCH within the BWP |
References
[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 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 R2021aR2023b: Configure intracell guard bands
Use the IntraCellGuardBands
object property of the carrier
input
to specify intracell guard bands.
R2023b: Support for release 16 interlacing for operation in unlicensed spectrum (NR-U)
For PUCCH formats 0 to 3, use the Interlacing
,
RBSetIndex
, and InterlaceIndex
object properties
of the
pucch
input argument to configure interlaced PUCCH transmissions. In addition, for PUCCH formats 2
and 3, you can use the SpreadingFactor
and OCCI
properties with single-interlace configurations.
R2023b: Return information about PRBs
Theinfo
output argument also returns the PRBs allocated for PUCCH
within the BWP.
R2023a: C/C++ code generation updates
For C/C++ code generation, the limitation to specify name-value arguments as compile-time constants has been removed.
See Also
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)