Main Content


Generate NPBCH symbols

Since R2019b



sym = lteNPBCH(enb,cw) generates sym, a matrix containing the narrowband physical broadcast channel (NPBCH) symbols for cell-wide settings enb. The function generates the symbols by applying NPBCH encoding to and codeword cw, which comprises scrambling, QPSK modulation, layer mapping, and precoding in accordance with section 10.2.4 of [1].


collapse all

Generate NPBCH symbols using the MIB.

Generate the MIB and pass it through broadcast channel (BCH) encoding to obtain the 1600-bit codeword.

mib = randi([0 1],34,1);
cw = lteBCH(mib,1600,1);

Specify the cell-wide settings in the structure enb.

enb.NNCellID = 0;
enb.NBRefP = 1;
enb.NSubframe = 10;

Generate the NPBCH symbols for each of the subframes.

sym = lteNPBCH(enb,cw);

Input Arguments

collapse all

Cell-wide settings, specified as a structure containing these fields.

Parameter FieldRequired or OptionalValuesDescriptionData Types

Nonnegative integer

NB-IoT physical layer cell identity

NBRefPRequired1, 2

Number of narrowband reference signal antenna ports


Nonnegative integer

Subframe numberdouble

0 (default),

nonnegative integer

Frame number


Data Types: struct

Codeword to be modulated, specified as a binary-valued column vector of length 1600.

Data Types: double | logical

Output Arguments

collapse all

NPBCH symbols, returned as a 100-by-P complex valued matrix, where 100 is the number of modulation symbols for one antenna port for one subframe, and P is the number of transmission antenna ports.

Data Types: double
Complex Number Support: Yes


[1] 3GPP TS 36.211. “Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA).

Version History

Introduced in R2019b