Main Content

lteNPUSCH

Generate NPUSCH symbols

Since R2020a

Description

[sym,stateOut] = lteNPUSCH(ue,chs,cw) generates sym, a column vector containing the narrowband physical uplink shared channel (NPUSCH) symbols for a time slot. The function generates symbols by applying NPUSCH encoding to codeword cw for the specified user equipment (UE) settings ue and channel transmission configuration chs. Channel encoding comprises scrambling, modulation, layer mapping onto a single layer, transform precoding, and precoding in accordance with section 10.1.3 of [1]. The function also returns stateOut, a structure containing the encoder state for bundle transmission.

example

[sym,stateOut] = lteNPUSCH(ue,chs,cw,stateIn) specifies stateIn, the initial encoder state.

Examples

collapse all

Generate NPUSCH symbols on a slot-by-slot basis for transmitting a bundle comprising one resource unit, 16 slots, and two codeword repetitions.

Configure UE-specific settings.

ue = struct('NNCellID',0,'NBULSubcarrierSpacing','3.75kHz');

Specify a channel transmission configuration.

chs = struct('NPUSCHFormat','Data','NRUsc',1,'NRep',2,'NBULSubcarrierSet',17, ...
    'NRU',1,'NULSlots',16,'Modulation','BPSK','RNTI',0);

Generate a codeword of bits.

[~,info] = lteNPUSCHIndices(ue,chs);
cwLen = info.G;
cw = ones(cwLen,1);

Specify the initial encoder state as an empty structure, indicating the start of a bundle.

stateIn = struct();

Generate NPUSCH symbols for bundle transmission.

for SlotIdx = 0:(chs.NRep*chs.NRU*chs.NULSlots-1)
    ue.NSlot = SlotIdx;
    [sym,stateOut] = lteNPUSCH(ue,chs,cw,stateIn);
    stateIn = stateOut;
end

Confirm that the transmission reaches the end of the bundle.

disp(stateOut.EndOfTx)
   1

Input Arguments

collapse all

UE-specific settings, specified as a structure containing these fields.

FieldValuesDescriptionData Types
NNCellIDInteger in the interval [0, 503]Narrowband physical layer cell identity (PCI)double
NBULSubcarrierSpacing'3.75kHz', '15kHz'

NB-IoT uplink subcarrier spacing

To set a subcarrier spacing of 3.75 kHz, specify this field as '3.75kHz'. To set a subcarrier spacing of 15 kHz, specify this field as '15kHz'.

char, string
NSlotNonnegative integerSlot numberdouble
NFrame0 (default), nonnegative integerFrame numberdouble

Data Types: struct

Channel transmission configuration, specified as a structure containing these fields.

FieldValuesDescriptionData Types
NPUSCHFormat'Data', 'Control'

NPUSCH format

To indicate that the NPUSCH carries narrowband uplink shared channel (UL-SCH) data, specify this field as 'Data'. To indicate that the NPUSCH carries uplink control information, specify this field as 'Control'.

char, string
NRUsc1, 3, 6, 12

Number of consecutive subcarriers in a resource unit (RU)

If you specify the NPUSCHFormat field as 'Control' or the NBULSubcarrierSpacing field of the ue input as '3.75kHz', then you must specify this field as 1.

double
NRep1, 2, 4, 8, 16, 32, 64, 128Number of repetitions for a codeworddouble
NRU1, 2, 3, 4, 5, 6, 8, 10Number of RUsdouble
NULSlots2, 4, 8, 16

Number of slots per RU

If you specify the NPUSCHFormat field as 'Control', then you must specify this field as 4.

If you specify the NPUSCHFormat field as 'Data', then you must specify this field as:

  • 16 when you specify the NRUsc field as 1

  • 8 when you specify the NRUsc field as 3

  • 4 when you specify the NRUsc field as 6

  • 2 when you specify the NRUsc field as 12

double
Modulation'BPSK', 'QPSK', '16QAM'

Modulation type

To enable binary phase-shift keying (BPSK), specify this field as 'BPSK'. To enable quadrature phase-shift keying (QPSK), specify this field as 'QPSK'. To enable 16-point quadrature amplitude modulation (16-QAM), specify this field as '16QAM'.

If you specify the NPUSCHFormat field as 'Control', then you must specify this field as 'BPSK'.

char, string
RNTINonnegative integerRadio network temporary identifier (RNTI) valuedouble

Data Types: struct

Codeword of bit values, specified as a binary-valued column vector. The length of this input must be an integer multiple of:

  • chs.NRU x chs.NULSlots x chs.NRUsc when you specify the Modulation field of the chs input as 'BPSK'

  • 2 x chs.NRU x chs.NULSlots x chs.NRUsc when you specify the Modulation field of the chs input as 'QPSK'

Data Types: double

Initial encoder state for bundle transmission, specified as a structure containing these fields.

FieldValuesDescriptionData Types
SlotIdxInteger in the interval [0, (chs.NRU x chs.NULSlots x chs.NRep) – 1]Index of a slot within a bundle, in zero-based formdouble
InitNSlotNonnegative integerSlot number for scrambling sequence initializationdouble
InitNFrameNonnegative integerFrame number for scrambling sequence initializationdouble
EndOfBlk1 or true, 0 or falseEnd of transport block indicatorlogical
EndOfTx1 or true, 0 or falseEnd of bundle indicatorlogical
GhpNSlotNonnegative integerSlot number for the first slot in the RUdouble

Data Types: struct

Output Arguments

collapse all

NPUSCH symbols for a time slot, returned as a complex-valued column vector.

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.

FieldValuesDescriptionData Types
SlotIdxInteger in the interval [0, (chs.NRU x chs.NULSlots x chs.NRep) – 1]

Index of a slot within a bundle, in zero-based form

The function returns this field as the SlotIdx field of the stateIn input increased by one. When the SlotIdx field of the stateIn input reaches its maximum value, the function returns this field as 0. If you do not specify the SlotIdx field of the stateIn input, the 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.

double
InitNSlotNonnegative integer

Slot number for scrambling sequence initialization

When the slot being processed is at the initialization point, this field is equal to the NSlot field of the ue input. Otherwise, the function returns this field as one of these values.

  • The value of the InitNSlot field of the stateIn input

  • The value of the NSlot field of the ue input when you do not specify the InitNSlot field of the stateIn input

double
InitNFrameNonnegative integer

Frame number for scrambling sequence initialization

When the frame being processed is at the initialization point, this field is equal to the NFrame field of the ue input. Otherwise, the function returns this field as one of these values.

  • The value of the InitNFrame field of the stateIn input

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

double
EndOfBlk1, 0

End of transport block indicator

When the transmission reaches the end of a transport block, the function returns this field as 1.

At the beginning of a bundle, the function resets this field.

logical
EndOfTx1, 0

End of bundle indicator

When the transmission reaches the end of a bundle, the function returns this field as 1. Otherwise, the function returns this field as 0.

At the beginning of a bundle, the function resets this field.

logical
GhpNSLotNonnegative integer

Slot number for the first slot in the RU

The function uses this field only when you specify the NPUSCHFormat field as 'Data' and the NRUsc field as 1 in the chs input.

double

Data Types: struct

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 transmission of a bundle, follow these steps.

  1. Call the function, optionally specifying the initial encoder state using the stateIn input. The stateOut output represents the first transmission of the transport block.

  2. Call the function again, specifying the stateIn input as the stateOut output returned by the previous call to the function.

  3. Repeat step 2 until the 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). https://www.3gpp.org.

[2] 3GPP TS 36.321. “Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). https://www.3gpp.org.

Version History

Introduced in R2020a

expand all