Main Content

ltePBCHIndices

PBCH resource element indices

Description

ind = ltePBCHIndices(enb) returns an N-by-CellRefP matrix of resource element (RE) indices for the Physical Broadcast Channel (PBCH) given the parameter fields of structure enb. By default, the indices are returned in 1-based linear indexing form that can directly index elements of a 3-D array representing the subframe resource grid for CellRefP antennas. These indices are ordered as the PBCH modulation symbols should be mapped. Alternative indexing formats can also be generated. The PBCH is only transmitted in first subframe of each frame.

Note

When you are using this function together with the ltePBCH function, you must account for the fact that one transport block is transmitted over four frames. See the Create Resource Grid Containing PBCH Symbols example for details.

example

ind = ltePBCHIndices(enb,opts) formats the returned indices using options defined by opts.

Examples

collapse all

Generate zero-based PBCH resource element indices in linear form for RMC R.14.

enb = lteRMCDL('R.14');
ind = ltePBCHIndices(enb,{'0based'});
ind(1:4,:)
ans = 4x4 uint32 matrix

    4465   12865   21265   29665
    4466   12866   21266   29666
    4468   12868   21268   29668
    4469   12869   21269   29669

Create a cell-wide configuration structure initialized to RMC R.0. Generate the MIB. Pass the MIB through BCH transport channel coding.

enb = lteRMCDL("R.0");
mib = lteMIB(enb);
bchCoded = lteBCH(enb,mib);

Generate the PBCH symbols and their indices.

pbchSymbols = ltePBCH(enb,bchCoded);
pbchIndices = ltePBCHIndices(enb,{'1based'});

Isolate the number of PBCH symbols.

numPBCHSymbols = size(pbchIndices,1);

Populate a four-frame resource grid containing the entire PBCH transmission.

grid = [];
for frameIndex = 0:3
    gridTmp = lteResourceGrid(enb);
    startIdx = mod(frameIndex,4) * numPBCHSymbols + 1;
    endIdx = (mod(frameIndex,4) + 1) * numPBCHSymbols;
    gridTmp(pbchIndices) = pbchSymbols(startIdx:endIdx,:);
    grid = [grid gridTmp];
end

Input Arguments

collapse all

Cell-wide settings, specified as a structure. enb contains the following fields.

Number of downlink resource blocks, specified as a scalar value.

Physical layer cell identity, specified as a scalar integer.

Cyclic prefix length, specified as 'Normal' or 'Extended'.

Number of cell-specific reference signal antenna ports, specified as 1, 2, or 4.

Subframe number, specified as a scalar integer.

Data Types: struct

Output format options for resource element indices, specified as a character vector, cell array of character vectors, or string array. For convenience, you can specify several options as a single character vector or string scalar by a space-separated list of values placed inside the quotes. Values for opts when specified as a character vector include (use double quotes for string) :

Category Options Description

Indexing style

'ind' (default)

The returned indices are in linear index style.

'sub'

The returned indices are in [subcarrier,symbol,port] subscript row style.

Index base

'1based' (default)

The returned indices are one-based.

'0based'

The returned indices are zero-based.

Example: 'ind 1based', "ind 1based", {'ind','1based'}, or ["ind","1based"] specify the same formatting options.

Data Types: char | string | cell

Output Arguments

collapse all

PBCH resource element indices, returned as a numeric matrix of size N-by-CellRefP.

Data Types: double

Version History

Introduced in R2014a