Main Content

lteULFrameOffsetNPUSCH

Estimate NPUSCH DRS timing offset

Description

[offset,corr] = lteULFrameOffsetNPUSCH(ue,chs,waveform) performs slot synchronization on waveform, the input time-domain waveform, by using the narrowband physical uplink shared channel (NPUSCH) demodulation reference signal (DRS) symbols for user equipment (UE) settings ue and channel transmission configuration chs.

The function returns offset, the number of samples between the start of waveform and the sample within waveform at which the NPUSCH DRS symbols begin. The function also returns corr, the signal that the function uses to calculate offset.

The offset estimation process comprises these steps.

  1. Extract the timing of the peak correlation between waveform and internally generated reference waveforms containing the NPUSCH DRS symbols.

  2. Calculate the correlation for each antenna.

  3. Compute the offset for the antenna with the strongest correlation.

example

[offset,corr] = lteULFrameOffsetNPUSCH(ue,chs,waveform,stateIn) specifies stateIn, the initial encoder state for NPUSCH DRS symbol generation.

Examples

collapse all

Synchronize and demodulate a transmission containing NPUSCH DRS symbols.

Configure UE-specific settings.

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

Specify a channel transmission configuration.

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

Generate the NPUSCH DRS symbols and allocate them to the appropriate locations on a resource grid.

grid = lteNBResourceGrid(ue);
grid(lteNPUSCHDRSIndices(ue,chs)) = lteNPUSCHDRS(ue,chs);

Generate a waveform by performing single-carrier frequency-division multiple access (SC-FDMA) modulation on the NPUSCH DRS symbols.

txWaveform = lteSCFDMAModulate(ue,chs,grid);

Create a received waveform by adding a time delay of 11 samples.

delay = 11;
waveform = [zeros(delay,1); txWaveform];

Specify an empty encoder state and calculate the timing offset in samples. Confirm that the result matches the added delay.

stateIn = struct();
[offset,corr] = lteULFrameOffsetNPUSCH(ue,chs,waveform,stateIn);
disp(isequal(offset,delay))
   1

Input Arguments

collapse all

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

FieldValuesDescriptionData Types
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
Windowing

Nonnegative even integer

Default depends on the value of the NBULSubcarrierSpacing field

Number of time-domain samples over which the function applies windowing and overlapping of SC-FDMA symbolsdouble
NNCellIDInteger in the interval [0, 503]Narrowband physical layer cell identity (PCI)double
NFrame0 (default), nonnegative integerFrame numberdouble
NSlotNonnegative integer

Slot number

When you specify the NPUSCHFormat field as 'Data' and the SeqGroupHopping field as 'Off' in the chs input, the function ignores this field.

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
BaseSeqIdxInteger 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
NBULSubcarrierSetInteger in the interval [0, 47], vector of integers in the interval [0, 11]

NB-IoT uplink subcarrier indices, in zero-based form, specified as one of these values:

  • An integer in the interval [0, 11] when you specify the NPUSCHFormat field as 'Control'

  • An integer in the interval [0, 47] when you specify the NPUSCHFormat field as 'Data' and the NBULSubcarrierSpacing fields of the ue input as '3.75kHz'

  • A vector of integers in the interval [0, 11] when you specify the NPUSCHFormatfield as 'Data' and the NBULSubcarrierSpacing fields of the ue input as '15kHz'.

double
Modulation'BPSK', 'QPSK'

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'.

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

char, string
SlotIdxInteger in the interval [0, (chs.NRU × chs.NULSlots × chs.NRep) – 1]Index of a slot within a bundle, in zero-based formdouble

Data Types: struct

Time-domain waveform, specified as a complex-valued matrix of size T-by-R.

  • T is the number of time-domain samples.

  • R is the number of receive antennas.

You can generate this input by performing SC-FDMA modulation on a resource matrix using the lteSCFDMAModulate function. Alternatively, you can generate this input by using either of these channel model functions: lteFadingChannel or lteMovingChannel.

Data Types: double
Complex Number Support: Yes

Encoder state for NPUSCH DRS generation, specified as a structure. This input corresponds to the stateIn input of the lteNPUSCHDRS function. This input contains the internal state of each transport block in these fields.

FieldValuesDescriptionData Types
SlotIdxInteger in the interval [0, (chs.NRU × chs.NULSlots × 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
EndOfBlkLogical 1 (true) or 0 (false)To indicate that the transmission has reached the end of a transport block, specify this field as 1 (true). Otherwise, specify this field as 0 (false).logical
EndOfTxLogical 1 (true) or 0 (false)To indicate that the transmission has reached the end of a bundle, specify this field as 1 (true). Otherwise, specify this field as 0 (false).logical
GhpNSlotNonnegative integer

Slot number for the first slot in the RU

Dependencies. To enable this field, specify the NPUSCHFormat field as 'Data' and the NRUsc field as 1 in the chs input.

double

Data Types: struct

Output Arguments

collapse all

Timing offset, returned as an integer. This output represents the offset, in samples, between the start of the waveform input and the sample within waveform at which the NPUSCH DRS symbols begin. The function returns this output as the value of max(abs(corr)) modulo slot length.

Data Types: double

Signal used to estimate timing offset, returned as a complex-valued matrix of the same dimensions as the waveform input.

Data Types: double
Complex Number Support: Yes

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.

Introduced in R2020a