# nrPDCCHResources

Generate PDCCH and PDCCH DM-RS resources

## Syntax

``ind = nrPDCCHResources(carrier,pdcch)``
``[ind,dmrsSym,dmrsInd] = nrPDCCHResources(carrier,pdcch)``
``[ind,dmrsSym,dmrsInd] = nrPDCCHResources(carrier,pdcch,Name,Value)``

## Description

example

````ind = nrPDCCHResources(carrier,pdcch)` returns physical downlink control channel (PDCCH) resource element indices `ind`, as defined in TS 38.211 Section 7.3.2 . The input `carrier` specifies carrier configuration parameters for a specific OFDM numerology. The input `pdcch` specifies PDCCH configuration parameters.```

example

````[ind,dmrsSym,dmrsInd] = nrPDCCHResources(carrier,pdcch)` also returns PDCCH demodulation reference signal (DM-RS) symbols `dmrsSym` and PDCCH DM-RS resource element indices `dmrsInd`, as defined in TS 38.211 Section 7.4.1.3.```

example

````[ind,dmrsSym,dmrsInd] = nrPDCCHResources(carrier,pdcch,Name,Value)` specifies output formatting options using one or more name-value pair arguments.```

## Examples

collapse all

Configure the carrier and the PDCCH with default configuration parameters.

```carrier = nrCarrierConfig; pdcch = nrPDCCHConfig;```

Generate PDCCH symbols for a random DCI codeword by using PDCCH configuration parameters for scrambling and identifying the UE.

```dciCW = randi([0 1],864,1); sym = nrPDCCH(dciCW,pdcch.DMRSScramblingID,pdcch.RNTI);```

Generate PDCCH resource element indices by using the specified carrier and PDCCH objects.

`ind = nrPDCCHResources(carrier,pdcch);`

Create a grid for mapping PDCCH symbols to the grid.

`cgrid = zeros(12*carrier.NSizeGrid,carrier.SymbolsPerSlot);`

Map PDCCH symbols to the grid.

`cgrid(ind) = sym;`

Configure the carrier with default configuration parameters.

`carrier = nrCarrierConfig;`

Configure the CORESET with 6 frequency resources, a duration of 3 OFDM symbols, and a REG bundle size of 3.

```crst = nrCORESETConfig; crst.FrequencyResources = ones(1,6); crst.Duration = 3; crst.REGBundleSize = 3;```

Configure the PDCCH with the specified bandwidth part and CORESET.

```pdcch = nrPDCCHConfig; pdcch.NStartBWP = 6; pdcch.NSizeBWP = 36; pdcch.CORESET = crst; pdcch.AggregationLevel = 16;```

Generate PDCCH DM-RS symbols and indices for the specified carrier and PDCCH.

`[~,dmrs,dmrsInd] = nrPDCCHResources(carrier,pdcch);`

Configure a carrier grid of 60 resource blocks (RBs), where the starting RB index relative to the common resource block 0 (CRB 0) is 3.

```carrier = nrCarrierConfig; carrier.NStartGrid = 3; carrier.NSizeGrid = 60;```

Configure noninterleaved CORESET with 6 frequency resources and a duration of 3 OFDM symbols.

```crst = nrCORESETConfig; crst.FrequencyResources = ones(1,6); crst.Duration = 3; crst.CCEREGMapping = 'noninterleaved';```

Configure the PDCCH with the specified bandwidth part and CORESET.

```pdcch = nrPDCCHConfig; pdcch.NStartBWP = 5; pdcch.NSizeBWP = 48; pdcch.CORESET = crst; pdcch.AggregationLevel = 16;```

Generate PDCCH resource element indices and DM-RS symbol indices using 1-based, subscript indexing form relative to the BWP grid.

```[ind,~,dmrsInd] = nrPDCCHResources(carrier,pdcch,... 'IndexOrientation','bwp','IndexStyle','subscript');```

## Input Arguments

collapse all

Carrier configuration parameters for a specific OFDM numerology, specified as an `nrCarrierConfig` object.

PDCCH configuration parameters, specified as an `nrPDCCHConfig` object.

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: `'IndexStyle','subscript','IndexBase','0based'` specifies the indexing form and indexing base of the output.

Resource element indexing form, specified as the comma-separated pair consisting of `'IndexStyle'` and 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`

Resource element indexing base, specified as the comma-separated pair consisting of `'IndexBase'` and one of these values:

• `'1based'` — The index counting starts from one.

• `'0based'` — The index counting starts from zero.

Data Types: `char` | `string`

Indexing orientation of PDCCH and DM-RS resource elements, specified as the comma-separated pair consisting of `'IndexOrientation'` and one of these values:

• `'carrier'` — Indices are referenced with respect to the carrier grid.

• `'bwp'` — Indices are referenced with respect to the bandwidth part.

Data Types: `char` | `string`

Data type of PDCCH DM-RS symbols, specified as the comma-separated pair consisting of `'OutputDataType'` and one of these values:

• `'double'` — Output symbols are of `double` data type.

• `'single'` — Output symbols are of `single` data type.

Data Types: `char` | `string`

## Output Arguments

collapse all

PDCCH resource element indices, returned as one of these values:

• M-by-1 vector — When '`IndexStyle`' is set to `'index'`.

• M-by-3 matrix — When '`IndexStyle`' is set 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.

M depends on the aggregation level of the PDCCH and is equal to `pdcch``.AggregationLevel` × 6 × 12 × 3 / 4.

Depending on the value of '`IndexBase`', the indices are either 1-based or 0-based.

Data Types: `uint32`

DM-RS symbols, returned as an N-by-1 complex vector. N depends on the aggregation level of the PDCCH and is equal to `pdcch``.AggregationLevel` × 6 × 12 × 1 / 4.

Data Types: `single` | `double`

DM-RS resource element indices, returned as one of these values:

• N-by-1 vector — When '`IndexStyle`' is set to `'index'`.

• N-by-3 matrix — When '`IndexStyle`' is set 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.

N depends on the aggregation level of the PDCCH and is equal to `pdcch``.AggregationLevel` × 6 × 12 × 1 / 4.

Depending on the value of '`IndexBase`', the indices are either 1-based or 0-based.

Data Types: `uint32`

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

 3GPP TS 38.213. “NR; Physical layer procedures for control.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
{"ft_lang_label":"__label__en","ft_lang_prob":0.579162,"math_prob":0.7337844,"size":654,"snap":"2020-24-2020-29","text_gpt3_token_len":169,"char_repetition_ratio":0.12153846,"word_repetition_ratio":0.14634146,"special_character_ratio":0.2232416,"punctuation_ratio":0.17857143,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95704645,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-02T07:39:52Z\",\"WARC-Record-ID\":\"<urn:uuid:f27a4bc2-3b1a-40ef-84b2-59b72c6278de>\",\"Content-Length\":\"110252\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:17a42d18-e440-49d4-80e9-20bffe2ad14f>\",\"WARC-Concurrent-To\":\"<urn:uuid:7c2ea32c-ced8-44b0-a2ea-a7b1324083e8>\",\"WARC-IP-Address\":\"23.66.56.59\",\"WARC-Target-URI\":\"https://se.mathworks.com/help/5g/ref/nrpdcchresources.html\",\"WARC-Payload-Digest\":\"sha1:EZT33YNXNLMN6V5UIFCDQ3OGVANJSOZG\",\"WARC-Block-Digest\":\"sha1:CWALMOCV67CGZPXARTFYOIU5ZJ4U4KBJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655878519.27_warc_CC-MAIN-20200702045758-20200702075758-00355.warc.gz\"}"}