Main Content


Generate NPDCCH symbols

Since R2019b


[sym,stateout] = lteNPDCCH (enb,chs,cw) generates sym, a matrix containing the NB-IoT physical downlink control channel (NPDCCH) complex symbols in a subframe for cell-wide settings structure, enb, channel transmission configuration, chs, and codeword, cw. The channel encoding process comprises stages of scrambling, QPSK modulation, layer mapping, and precoding in accordance with 3GPP TS 36.211 Section 10.2.5 of [1]. The function also returns stateout, a structure containing the encoder state of a bundle (a full set of repeated transmissions of a single downlink control information).


[sym,stateout] = lteNPDCCH (enb,chs,cw,statein) returns the NPDCCH symbols and the initial encoder state specified by statein.


collapse all

Generate the NPDCCH symbols subframe-by-subframe for a bundle of 10 subframes.

Specify the cell-wide settings and channel transmission configuration in parameter structures enb and chs.

enb.NNCellID = 0;
enb.NBRefP = 1;
chs.NRep = 10;

Set the output code length to 320 and generate the codeword bits. Specify the encoder state as empty at the start of the bundle.

cwLen = 320;
cw = ones(cwLen,1); % Codeword bits
estate = []; 

Generate the NPDCCH symbols for each of the 10 subframes.

for nsf=0:chs.NRep-1
ans = logical

Display the first seven NPDCCH encoded symbols.

ans = 7×1 complex

   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

Input Arguments

collapse all

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

NameRequired or OptionalValuesDescriptionData Types
NNCellIDRequiredNonnegative integerNarrowband physical layer cell identitydouble
NBRefPRequired1, 2Number of narrowband reference signal (NRS) antenna ports.double
NSubframeRequiredNonnegative integerSubframe numberdouble

Data Types: struct

Channel transmission configuration, specified as a structure containing this field.

NameRequired or OptionalValuesDescriptionData Types
NRepRequiredNonnegative integerNumber of repetitionsdouble

Data Types: struct

Codeword to be modulated, specified as a binary column vector.

Input encoder state for transmission of a bundle, specified as a structure containing the fields listed in the stateout output. At the start of the bundle transmission, set statein to empty. The lteNPDCCH function manages the state during subsequent calls for the transmissions of the bundle and resets it automatically at the end of the bundle.

Data Types: struct

Output Arguments

collapse all

NPDCCH symbols, returned as an N-by-P complex-valued matrix, where N is the number of modulation symbols for one antenna port and P is the number of transmission antennas.

Data Types: double
Complex Number Support: Yes

Output encoder state, returned as a structure. This output contains the internal state of each transport block in these fields.

NameValuesDescriptionData Types

0 (default),

integer in the interval [0, chs. NRep – 1]

Index of a subframe within a bundle, in zero-based form. The lteNPDCCH function returns this field as the SubframeIdx field of the statein input increased by one. When the input value of SubframeIdx in the statein input reaches its maximum value, the function returns this field as 0. If no input exists in statein, the default input is 0. A value of 0 indicates that the transmission has reached the end of a bundle, which the function also indicates by setting the EndOfTx field to 1 (true).double
InitNSubframeNonnegative integer

Subframe number, either at the initialization point of the scrambling sequence or reinitialization point of the sequence done at every 4th NPDCCH subframe. When the subframe being processed is at the initialization or reinitialization point, this field is equal to the mod(enb.Nsubframe,10). Otherwise, it is equal to the input in statein. If no input is provided to statein, the InitNSubframe is equal to mod(enb.NSubframe,10).

EndOfTxLogical 1 (true) or 0 (false)End of bundle indicator. The lteNPDCCH function returns this field as 1 (true) when the transmission reaches the end of a bundle. Otherwise, the lteNPDCCH function returns this field as 0 (false). At the beginning of a bundle, the lteNPDCCH function resets this field.logical

Data Types: struct


To use this function for a bundle transmission, follow these steps:

  1. Call the lteNPDCCH function and specify the initial encoder state using the statein input. The stateout output represents the output encoder state of the first transmission of the bundle.

  2. Call the lteNPDCCH function again and specify the statein input as the stateout output returned by the previous call to the function.

  3. Repeat step 2 until the lteNPDCCH function returns the EndOfTx field of the stateout output as 1 (true), indicating the end of the bundle. The lteNPDCCH automatically resets the state at the end of the bundle transmission.


[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). URL:

Version History

Introduced in R2019b