Main Content

lteNPRACHDetect

Detect NPRACH transmission

Since R2023a

Description

example

[indout,offset,detinfo] = lteNPRACHDetect(ue,chs,waveform) detects a narrowband physical random access channel (NPRACH) transmission in the time-domain waveform waveform for UE-specific settings ue and channel transmission configuration chs. The function returns indout, the detected value of the initial subcarrier used to generate the NPRACH transmission, offset, the timing offset, and detinfo, the detection information.

example

[indout,offset,detinfo] = lteNPRACHDetect(___,threshold) optionally specifies the detection threshold in addition to the previous syntax.

Examples

collapse all

Create the UE-specific settings structure, setting the narrowband cell identity to 0 and the NB-IoT uplink subcarrier spacing to 15 kHz.

ue.NNCellID = 0;
ue.NBULSubcarrierSpacing = '15kHz';

Create the channel transmission configuration structure, setting the value of NInit to 32.

chs.NPRACHFormat = '0';
chs.Periodicity = 80;
chs.SubcarrierOffset = 0;
chs.NumSubcarriers = 48;
chs.NRep = 1;
chs.NInit = 32;

Generate a time-domain NPRACH transmit waveform.

tx = lteNPRACH(ue,chs);

Create a received waveform by introducing a delay of seven samples in the transmit waveform.

rx = [zeros(7,1);tx];

Detect NPRACH instances in the received waveform. Confirm that the delay introduced in the waveform offsets the timing of the NPRACH detection.

[index,offset] = lteNPRACHDetect(ue,chs,rx)
index = 32
offset = 7.0196

Detect NPRACH instances in the waveform again, setting the detection threshold to 1. Both outputs are empty because no detection peak exceeds the threshold.

threshold = 1;
[index,offset] = lteNPRACHDetect(ue,chs,rx,threshold)
index =

     []


offset =

     []

Input Arguments

collapse all

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

FieldRequired or OptionalValuesDescriptionData Type
NNCellIDRequiredInteger in the interval [0, 503]Narrowband physical layer cell identity.double
NBULSubcarrierSpacingRequired'3.75kHz', '15kHz'Narrowband internet of things (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

Data Types: struct

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

FieldRequired or OptionalValuesDescriptionDependenciesData Types
NPRACHFormatRequired'0', '1', '2'NPRACH preamble formatNot applicablechar, string
PeriodicityRequired40, 80, 160, 320, 640, 1280, 2560, 5120NPRACH resource periodicity, in millisecondsIf you set the NPRACHFormat field to '0' or '1', then you cannot set this field to 5120.double
SubcarrierOffsetRequired0, 2, 6, 12, 18, 24, 34, 36, 42, 48, 54, 60, 72, 78, 84, 90, 102, 108Frequency location of the first subcarrier allocated to NPRACH

If you set the NPRACHFormat field to '0' or '1', then you cannot set this field to 6, 42, 48, 54, 60, 72, 78, 84, 90, 102, or 108.

If you set the NPRACH field to '2', then you cannot set this field to 2 or 34.

double
NumSubcarriersRequired12, 24, 36, 48, 72, 108, 144Number of subcarriers allocated to NPRACH

If you set the NPRACHFormat field to '0' or '1', then you cannot set this field to 72, 108, or 144.

If you set the NPRACHFormat field to '2', then you cannot set this field to 12, 24, or 48.

double
NRepRequired1, 2, 4, 8, 16, 32, 64, 128Number of NPRACH repetitionsNot applicabledouble
StartTimeOptional8 (default), 16, 32, 64, 128, 256, 512, 1024NPRACH starting time, in millisecondsNot applicabledouble

Data Types: struct

Received signal potentially containing NPRACH transmission, specified as an N-by-P complex matrix. This matrix contains the received time-domain signal in which the function searches for NPRACH transmissions. N is the number of time-domain samples. P is the number of receive antennas.

If N is less than the minimum number of samples that the function needs to analyze the configuration, the function appends zeros at the end of the waveform. If the waveform contains multiple NPRACH instances, the function returns the values of indout and offset that correspond to the NPRACH instance with the highest peak of the spectrum.

Data Types: double
Complex Number Support: Yes

Detection threshold, specified as a real number in the range [0, 1]. If you do not specify this input, the function chooses a default value based on the NPRACHFormat and NRep fields of the chs input.

The default value of the detection threshold has been empirically determined based on the probability of a false alarm and the probability of detection for the conformance tests discussed in Section 8.5.3 of [2]. This table provides the formulas that the function uses to calculate default detection thresholds for different NPRACH formats.

NPRACH FormatDefault Detection Threshold
0 or 10.0250.003log2(NRep)
20.0170.002log2(NRep)

Data Types: double

Output Arguments

collapse all

Detected NPRACH initial subcarrier, returned as one of these values.

  • Nonnegative integer — The index of the initial NPRACH subcarrier that corresponds to the highest detection peak across all valid values of NInit.

  • [] — No detection peak exists above the detection threshold.

Data Types: double

Timing offset of the NPRACH waveform, in number of samples, from the origin of the input waveform, returned as one of these values.

  • Real number — The position, in number of samples, of the highest detection peak. The sampling rate is determined by the ue and chs arguments.

    The function estimates this position from the discrete set of initial subcarrier values using a quadratic interpolation. See details in [3].

  • [] — No detection peak exists above the detection threshold.

Data Types: double

Detection information, returned as a structure containing these fields.

FieldDescription
DetectionPeaksHighest peaks of the spectrum used for the detection, returned as a vector. The length of the vector is equal to the number of subcarriers. Each entry of the vector corresponds to a value of NInit in ascending order.
DetectionThresholdThreshold that the function uses for the preamble detection.

Data Types: struct

Algorithms

The function implements the "Differential processing with minimum combinations" algorithm described in [3]. This algorithm matches the received waveform with a reference frequency-hopping pattern. The function generates a reference pattern for all values of NInit that are allowed for the current NPRACH configuration. For each of these values, the function follows these steps.

  1. Generate a vector v that contains the magnitude of the frequency hopping of the received waveform. The position of the received frequency hopping in v depends on the reference frequency hopping.

  2. Generate the spectrum of v and store the value of its highest peak.

    The output indout is the initial subcarrier index that corresponds to the highest peak of the spectrum among all those that exceed a defined threshold. The output offset is the position, in number of samples, of this peak.

References

[1] 3GPP TS 36.101. “Evolved Universal Terrestrial Radio Access (E-UTRA); User Equipment (UE) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. https://www.3gpp.org.

[2] 3GPP TS 36.141. “Base Station (BS) conformance testing.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). https://www.3gpp.org.

[3] Chougrani et al. “Efficient Preamble Detection and Time-of-Arrival Estimation for Single-Tone Frequency Hopping Random Access in NB-IoT.” IEEE Internet of Things Journal vol. 8, no. 9 (May 2021): 7437–7449.

Version History

Introduced in R2023a