Main Content

lteNPUSCHDRS

Generate NPUSCH DRS symbols

Since R2020a

Description

[sym,stateOut] = lteNPUSCHDRS(ue,chs) generates sym, a column vector containing the narrowband physical uplink shared channel (NPUSCH) demodulation reference signal (DRS) symbols. The function generates sym in accordance with section 10.1.4 of [1] for user equipment (UE) settings ue and channel transmission configuration chs. The function also returns stateOut, a structure containing the encoder state for bundle transmission.

example

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

Examples

collapse all

Generate NPUSCH DRS symbols for a single-tone data channel.

Configure UE-specific settings.

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

Specify a channel transmission configuration.

chs = struct('NPUSCHFormat','Data','NRep',2,'NRU',1,'NRUsc',1, ...
    'NULSlots',16,'SeqGroupHopping','On','SeqGroup',0);

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

stateIn  = struct();

Generate NPUSCH DRS symbols.

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

Confirming 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
NFrame0 (default), nonnegative integerFrame numberdouble
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 integer

Slot number

double

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
BaseSeqIdx

Integer in the interval [0, 29]

Default depends on the value of the NRUsc field

Multitone NPUSCH DRS base sequence index

  • When you specify the NRUsc field as 3, specify this field as an integer in the interval [0, 11]. If you do not specify this field, the function sets it to the value of mod(ue.NNCellID,12).

  • When you specify the NRUsc field as 6, specify this field as an integer in the interval [0, 13]. If you do not specify this field, the function sets it to the value of mod(ue.NNCellID,14).

  • When you specify the NRUsc field as 12, specify this field as an integer in the interval [0, 29]. If you do not specify this field, the function sets it to the value of mod(ue.NNCellID,30).

  • When you specify the NRUsc field as any other value, the function does not use this field.

Dependencies. To enable this field, specify the NRUsc field as 3, 6, or 12.

double
SeqGroupHopping'On' (default), 'Off'To enable sequence-group hopping, specify this field as 'On'. To disable sequence-group hopping, specify this field as 'Off'. For more information, see section 5.5.1.3 of [1].char, string
SeqGroup0 (default), integer in the interval [0, 29]

Sequence-group assignment for sequence shift pattern calculation

For more information, see section 10.1.4.1.3 of [1].

Dependencies. To enable this field, specify the SeqGroupHopping field as 'On'.

double
CyclicShift0 (default), integer in the interval [0, 3]

Cyclic shift

  • When you specify the NRUsc field as 3, specify this field as an integer in the interval [0, 2].

  • When you specify the NRUsc field as 6, specify this field as an integer in the interval [0, 3].

Dependencies. To enable this field, specify the NRUsc field as 3 or 6.

double

Data Types: struct

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 DRS symbols, 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