lteNPDSCHDecode

Decode modulated NPDSCH symbols

Description

[cw,stateout,symbols] = lteNPDSCHDecode(enb,chs,sym) decodes sym, the NB-IoT physical downlink shared channel (NPDSCH) symbols, for cell-wide settings enb and channel-specific configuration structure chs. The channel decoding comprises deprecoding, layer demapping, soft demodulation, descrambling, and codeword recovery. The decoding inverts the NPDSCH channel encoding process described in Section 10.2.3 of [1]. The function returns a codeword cw of soft bits, the decoder state stateout for reception of a bundle transmission, and the received constellation symbols symbols.

example

[cw,stateout,symbols] = lteNPDSCHDecode(enb,chs,sym,statein) decodes the NPDSCH symbols for the initial decoder state statein.

[cw,stateout,symbols] = lteNPDSCHDecode(enb,chs,sym,hest,noiseest) decodes the NPDSCH symbols for the channel estimate hest and noise estimate noiseest.

[cw,stateout,symbols] = lteNPDSCHDecode(enb,chs,sym,hest,noiseest,statein) decodes the NPDSCH symbols for the channel estimate, noise estimate, and initial decoder state.

Examples

collapse all

Generate and receive the NPDSCH symbols subframe by subframe for a bundle of 12 subframes.

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

enb.NNCellID = 0;
enb.NBRefP = 1;
enb.NFrame = 1;
chs.NSF = 3;
chs.NRep = 4;
chs.RNTI = 0;
chs.NPDSCHDataType = 'NotBCCH';

Set the output codeword length to 960 and generate the codeword bits. Do not provide the encoder or decoder states at the start of the bundle.

cwLen = 960;
eState = [];
statein = [];
txcw = ones(cwLen,1);

Generate the NPDSCH symbols for each of the 12 subframes and then decode them.

for subframeIdx = 0:(chs.NSF*chs.NRep-1)
    enb.NSubframe = subframeIdx;
    [sym,eState] = lteNPDSCH(enb,chs,txcw,eState);
    [cw,stateout] = lteNPDSCHDecode(enb,chs,sym,statein);
    statein = stateout;
end

The value of the field CWSFCount in structure dstate indicates that all three subframes in the codeword have been received four times.

disp(stateout.EndOfTx)
   1
disp(stateout.CWSFCount)
     4
     4
     4

Input Arguments

collapse all

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

NameRequired or OptionalValuesDescriptionData Types
NNCellIDRequiredNonnegative integerNarrowband physical layer cell identity (PCI)double
NSubframeRequiredNonnegative integerSubframe numberdouble
NFrameOptional0 (default), nonnegative integerFrame numberdouble
NBRefPRequired1, 2Number of narrowband reference signal (NRS) antenna ports. To indicate transmission on a single antenna port (port 0) and use minimum mean squared error (MMSE) equalization for reception, specify this field as 1. To indicate transmit diversity and use an orthogonal space frequency block code (OSFBC) decoder for deprecoding, specify this field as 2.double

Data Types: struct

Channel transmission configuration, specified as a structure that containing these fields:

NameRequired or OptionalValuesDescriptionDependenciesData Types
NPDSCHDataTypeOptional'NotBCCH', 'SIB1NB', 'BCCHNotSIB1NB'

Type of data carried by the NPDSCH, specified as one of these values:

  • 'NotBCCH' – The NPDSCH is not carrying the broadcast control channel (BCCH).

  • 'SIB1NB' – The NPDSCH is carrying system information block 1 narrowband (SIB1-NB).

  • 'BCCHNotSIB1NB' – The NPDSCH is carrying the BCCH but not SIB1-NB.

char, string
NSFSee Dependencies columnNonnegative integerNumber of subframes to which a codeword is mapped, not including repetitions

  • This field is required when you specify the NPDSCHDataType field as a value other than 'SIB1NB' and return the info output.

  • The lteNPDSCHDecode function sets this field to 8 when you specify the NPDSCHDataType field as 'SIB1NB' and return the info output.

  • If you do not return the info output, the lteNPDSCHDecode function ignores this field.

double
NRepRequiredNonnegative integerNumber of repetitionsdouble
RNTISee Dependencies columnNonnegative integer16-bit radio network temporary identifier (RNTI)

  • This field is required when you specify the NPDSCHDataType field as a value other than 'SIB1NB'.

  • The lteNPDSCHDecode function sets this field to the system information RNTI (SI-RNTI) value of 65535 when you specify the NPDSCHDataType field as 'SIB1NB'.

double
CSIOptional'On' (default), 'Off'Channel state information (CSI). To scale the soft bits by CSI during the equalization process, specify this field as 'On'. Otherwise, specify this field as 'Off'.char, string

Data Types: struct

Modulated NPDSCH symbols, specified as an NRE-by-NRxAnts complex-valued matrix, where:

  • NRE is the number of quadrature phase-shift keying (QPSK) symbols per antenna and per subframe assigned to the NPDSCH;

  • NRxAnts is the number of receive antennas.

Data Types: double
Complex Number Support: Yes

Input encoder state for the transmission of a bundle, specified as a structure containing the fields listed in the stateout output. This argument can be empty only when no information is provided, such as at the first subframe of a bundle.

Data Types: struct

Channel estimate for a transmission layer, specified as an NRE-by-NRxAnts-by-NNBRefP complex-valued array, where:

  • NRE is the number of encoded NPDSCH symbols per antenna and per subframe;

  • NRxAnts is the number of receive antennas;

  • NNBRefP is the number NRS antenna ports you specify in the NBRefP field of the enb input.

The lteNPDSCHDecode function assumes that this estimate uses the NRSs.

Data Types: double
Complex Number Support: Yes

Noise estimate of the noise power spectral density per RE on the received subframe, specified as a nonnegative scalar.

Data Types: double

Output Arguments

collapse all

Codeword of soft bits, returned as an NSF-by-1 binary vector, where NSF is the number of subframes.

Data Types: double

Output decoder state for the next subframe, returned as a structure. This output contains the internal state of each transport block in these fields:

NameValuesDescriptionData Types
SubframeIdxinteger in the interval [0, NSF x NRep – 1]Index of a subframe within a bundle, in zero-based form. The lteNPDSCHDecode 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 you do not specify an input value in the statein input, the lteNPDSCHDecode function returns this field as 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
InitNFrameNonnnegative integer

Frame number at initialization point of scrambling sequence. When the subframe being processed is at the initialization point, this field is equal to the NFrame field of the enb input. Otherwise, the lteNPDSCHDecode function returns this field as one of these values:

  • The value of the InitNFrame field of the statein argument

  • 0 when you do not specify the InitNFrame field of the statein input

double
InitNSubrameNonnnegative integer

Subframe number at initialization point. When the subframe being processed is at the initialization point, this field is equal to the NSubframe field of the enb input. Otherwise, the lteNPDSCHDecode function returns this field as one of these values:

  • The value of the InitNSubframe field of the statein argument

  • The NSubframe field of the enb input when you do not specify the InitNSubframe field of the statein input

double
CWBufferNSF-by-1 binary vectorBuffer to store the soft-combined log-likelihood ratio (LLR) bits after codeword descrambling. The length of this field is the same as the length of the codeword, cw. At the beginning of a bundle, the lteNPDSCHDecode function resets this field.double
CWSFCountNSF-by-1 integer-valued vectorRepetition counter. The length of this field is the same as the length of the codeword, cw. Each element of this field indicates how many repetitions of the corresponding element of cw the CWBuffer field has recovered. At the beginning of a bundle, the lteNPDSCHDecode function resets this field.double
EndOfCWLogical 1 (true) or 0 (false)Codeword receipt indicator. The lteNPDSCHDecode function returns this field as 1 (true) when the entire codeword has been received, that is, when each element of the CWSFCount field is as least 1. At the beginning of a bundle, the lteNPDSCHDecode function resets this field.logical
EndOfTxLogical 1 (true) or 0 (false)End of bundle indicator. The lteNPDSCHDecode function returns this field as 1 (true) when the transmission reaches the end of a bundle. Otherwise, the lteNPDSCHDecode function returns this field as 0 (false). At the beginning of a bundle, the lteNPDSCHDecode function resets this field.logical

Data Types: struct

Received constellation symbols, returned as a complex-valued vector.

Data Types: double

More About

collapse all

Bundle

A bundle in the medium access control (MAC) layer refers to the repeated transmissions of a transport block.

For more information, see Section 5.3.2.1 of [2]

Tips

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

  1. Call the lteNPDSCHDecode function, optionally specifying the initial encoder state using the statein input; the stateout output represents the first transport block in the bundle.

  2. Call the lteNPDSCHDecode function again, specifying the statein input as the stateout output returned by the previous call to the function.

  3. Repeat step 2 until the lteNPDSCHDecode function returns the EndOfTx field of the stateout output as 1 (true), indicating the end of the bundle.

References

[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: https://www.3gpp.org.

Introduced in R2018a