Main Content

ltePRACH

Physical random access channel

Description

[waveform,info]=ltePRACH(ue,chs) returns a column vector, waveform, containing complex symbols of the Physical Random Access Channel given UE-specific settings structure, ue, and channel transmission configuration structure, chs. PRACH information is returned in a structure, info, as described in ltePRACHInfo. waveform contains the time-domain PRACH signal spanning info.TotSubframes, as described in TS 211, Section 5.7 [2]. The waveform consists of a period of zeros (for the case of a time offset or Preamble Format 4), a cyclic prefix, the “useful” part of the PRACH signal, and a period of zeros to extend the waveform to span info.TotSubframes. The duration of the PRACH is a function of the Preamble Format as described in TS 36.211, Table 5.7.1-1 [2]. Depending on the configuration given in ue and chs, it is possible that no PRACH are generated; in this case info.PRBSet is empty to signal this condition, and waveform consists of all zeros. The conditions under which no PRACH are generated are described in the help for ltePRACHInfo.

chs.PreambleIdx can be a vector in the functions ltePRACHInfo and ltePRACHDetect. This assists with modelling of an eNodeB receiver searching for multiple preambles. However, this function, ltePRACH only generates a single PRACH and therefore chs.PreambleIdx should be a scalar. If chs.PreambleIdx is a vector, the first element is used.

By default, for the given ue.NULRB, the waveform output, is sampled at the same sampling rate as other uplink channels (PUCCH, PUSCH, and SRS) using the lteSCFDMAModulate modulator.

If the value of chs.PreambleIdx is such that an insufficient quantity of cyclic shifts are available at the configured logical root index, chs.SeqIdx, the logical root index number needs to be incremented. As such, the physical root used, info.RootSeq, differs from the physical root configured by chs.SeqIdx. The cyclic shift corresponding to chs.PreambleIdx can be found in info.CyclicShift. For High Speed mode, when info.CyclicShift = –1, the PRACH waveform is generated with no cyclic shift.

example

Examples

collapse all

This example generates PRACH symbols of format 0 in an ue.NULRB=6 bandwidth, leaving all other parameters at their default values.

Initialize ue-specific settings and channel transmission configuration.

ue.DuplexMode = 'FDD';
ue.NULRB = 6;
chs.Format = 0;
chs.HighSpeed = 0;
chs.CyclicShiftIdx = 0;
chs.FreqOffset = 0;
chs.SeqIdx = 0;
chs.PreambleIdx = [ 0 ];

Generate PRACH symbols and PRACH info.

[prachSym,prachInfo] = ltePRACH(ue,chs);
prachInfo
prachInfo = struct with fields:
                  NZC: 839
    SubcarrierSpacing: 1250
                  Phi: 7
                    K: 12
         TotSubframes: 1
               Fields: [0 3168 24576 2976]
               PRBSet: [6x1 double]
                  NCS: 0
          CyclicShift: 0
              RootSeq: 129
         SamplingRate: 1920000
           BaseOffset: 0

Analyze physical root Zadoff-Chu sequence indices by generating 64 orthogonal PRACH preambles for two different PRACH configurations.

Root Sequence Indices with Single Value

Initialize ue-specific settings and channel transmission configuration. Use PRACH symbols of format 0 in an ue.NULRB=6 bandwidth, leaving all other parameters at their default values.

ue.NULRB = 6;
chs.Format = 0;

Set the PRACH logical root sequence index to 0. For this value, the value of the physical root sequence index is 129, as defined in TS 36.211 Table 5.7.2-4.

chs.SeqIdx = 0;

Set the PRACH cyclic shift configuration index to 1. For this value, each PRACH preamble has a different cyclic shift value, based on NCS from TS 36.211 Table 5.7.2-2.

chs.CyclicShiftIdx = 1;

Generate 64 PRACH preambles to store the physical root sequence indices and cyclic shift values.

rootSequence1 = NaN(1,64);
cyclicShift1 = NaN(1,64);
for preambleIndex = 0:63
    chs.PreambleIdx = preambleIndex;
    [~,info] = ltePRACH(ue,chs);
    rootSequence1(preambleIndex+1) = info.RootSeq;
    cyclicShift1(preambleIndex+1) = info.CyclicShift;
end

Verify that in each preamble, the physical root sequence index is 129, which is the expected value from configuring the logical root sequence index to 0.

disp(rootSequence1)
   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129   129

Verify that each preamble has a different cyclic shift value.

disp(cyclicShift1)
     0    13    26    39    52    65    78    91   104   117   130   143   156   169   182   195   208   221   234   247   260   273   286   299   312   325   338   351   364   377   390   403   416   429   442   455   468   481   494   507   520   533   546   559   572   585   598   611   624   637   650   663   676   689   702   715   728   741   754   767   780   793   806   819

Root Sequence Indices with Different Values

Initialize the same ue-specific settings and channel transmission configuration.

ue.NULRB = 6;
chs.Format = 0;

Set the PRACH logical root sequence index to 0. For this value, the value of the physical root sequence index is 129, as defined in TS 36.211 Table 5.7.2-4.

chs.SeqIdx = 0;

Set the PRACH cyclic shift configuration index to 0. For this value, each PRACH premable has the same cyclic shift value, equal to 0, based on TS 36.211 Table 5.7.2-2.

chs.CyclicShiftIdx = 0;

Generate 64 PRACH preambles to store the physical root sequence indices and cyclic shift values.

rootSequence2 = NaN(1,64);
cyclicShift2 = NaN(1,64);
for preambleIndex = 0:63
    chs.PreambleIdx = preambleIndex;
    [~,info] = ltePRACH(ue,chs);
    rootSequence2(preambleIndex+1) = info.RootSeq;
    cyclicShift2(preambleIndex+1) = info.CyclicShift;
end

Check the physical root sequence indices and cyclic shift values. Even though the logical root sequence index, chs.SeqIdx, is 0, not every physical root sequence index value is the expected value of 129. Because the cyclic shift value is zero in each preamble, the function ltePRACH obtains the physical root sequence indices by taking consecutive logical index values. The returned physical root sequence indices correspond to logical indices 0 to 63 from TS 36.211 Table 5.7.2-4.

disp(rootSequence2)
   129   710   140   699   120   719   210   629   168   671    84   755   105   734    93   746    70   769    60   779     2   837     1   838    56   783   112   727   148   691    80   759    42   797    40   799    35   804    73   766   146   693    31   808    28   811    30   809    27   812    29   810    24   815    48   791    68   771    74   765   178   661   136   703
disp(cyclicShift2)
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0

Input Arguments

collapse all

UE-specific settings, specified as a scalar structure. ue can contain the following fields.

Parameter FieldRequired or OptionalValuesDescription
NULRBRequired6, 9, 11, 15, 25, 27, 45, 50, 64, 75, 91, 100

Number of uplink resource blocks. (NRBUL)

DuplexModeOptional

'FDD' (default), 'TDD'

Duplexing mode, specified as either:

  • 'FDD' for Frequency Division Duplex

  • 'TDD' for Time Division Duplex

The following parameters are applicable when DuplexMode is set to 'TDD'.

  TDDConfigOptional

0, 1 (default), 2, 3, 4, 5, 6

Uplink–downlink configuration

  SSCOptional

0 (default), 1, 2, 3, 4, 5, 6, 7, 8, 9

Special subframe configuration (SSC)

The following parameter fields is applicable when DuplexMode is set to 'TDD' or when chs.ConfigIdx is present.

  NSubframeOptional

0 (default), Nonnegative scalar integer

Subframe number

  NFrameOptional

0 (default), nonnegative scalar integer

Frame number

The following parameter fields are dependent upon the condition that the Preamble Format (chs.Format) is set to '4'.

  CyclicPrefixOptional

'Normal' (default), 'Extended'

Cyclic prefix length

Data Types: struct

Channel transmission configuration, specified as a scalar structure. chs can contain the following fields.

Parameter FieldRequired or OptionalValuesDescription
FormatOptional

0, 1, 2, 3, 4 (default is determined by ConfigIdx field if present). However, the Format field must be specified if the ConfigIdx field is not specified.

Preamble format

See Note 1.

SeqIdxOptional

Scalar integer from 0 to 837. The default value is 0.

Logical root sequence index (RACH_ROOT_SEQUENCE)

ConfigIdxOptional

Scalar integer from 0 to 63. The default value is determined by Format field, if present. However, the ConfigIdx field must be specified if the Format field is not specified.

PRACH Configuration Index (prach-ConfigurationIndex)

See Note 1.

PreambleIdxOptional

Scalar integer or vector of integers from 0 to 63. The default value is 0.

Preamble index within cell (ra-PreambleIndex)

CyclicShiftIdxOptional

Scalar integer from 0 to 15. The default value is 0.

Cyclic shift configuration index (zeroCorrelationZoneConfig, yields NCS)

HighSpeedOptional

0 (default) or 1

High Speed flag (highSpeedFlag). A value of 1 signifies a restricted set. A value of 0 signifies an unrestricted set.

TimingOffsetOptional

0.0 (default), Numeric scalar

PRACH timing offset, in microseconds

See Note 2.

The following parameters are applicable when ue.DuplexMode is set to 'TDD'.

  FreqIdxOptional

0 (default), 0, 1, 2, 3, 4, 5

Frequency resource index (fRA). Only required for 'TDD' duplexing mode.

The following parameter fields are dependent upon the condition that the Preamble Format (chs.Format) is set to 0, 1, 2, or 3.

  FreqOffsetOptional

Scalar integer from 0 to 94. The default value is 0.

PRACH frequency offset (nPRBoffset). Only required for Preamble format 0–3.

Note

  1. Although the parameters chs.Format and chs.ConfigIdx are both described as ‘Optional’, at least one of these parameters must be specified. If both parameters are present then chs.Format is used and chs.ConfigIdx is ignored.

  2. The parameter chs.TimingOffset is not a genuine parameter of the PRACH generation as defined in the standard. It is provided to allow easy generation of a delayed PRACH output for use in testing, to simulate the effect of the distance between UE and eNodeB. The maximum value of chs.TimingOffset that yields a complete PRACH transmission in the output waveform is a timing offset equal to the duration of the last field of info.Fields; this timing offset corresponds to the maximum cell size and hence maximum distance between UE and eNodeB. If this maximum timing offset is exceeded, part of the PRACH signal is lost. The end of the useful part of the PRACH signal is out with the span of waveform.

Data Types: struct

Output Arguments

collapse all

PRACH waveform symbols, returned as a complex-valued numeric column vector. It contains the time-domain PRACH signal spanning info.TotSubframes. It has size N-by-1, where N = info.TotSubframes × 30720 / 2048 × Nfft, where Nfft is a function of the Number of Resource Blocks (NRB) given by ue.NULRB.

NRB

Nfft

6

128

15

256

25

512

50

1024

75

2048

100

2048

In general, Nfft is the smallest power of 2 greater than or equal to 12×NRB/0.85. It is the smallest FFT that spans all subcarriers and results in a bandwidth occupancy (12×NRB/Nfft) of no more than 85%.

Data Types: double
Complex Number Support: Yes

PRACH information, returned as a scalar structure. It contains the following fields.

Zadoff-Chu sequence length, returned as a positive integer. (NZC)

Data Types: double

Subcarrier spacing of PRACH preamble, in Hz, returned as a positive integer. (deltaf_RA)

Data Types: double

Frequency-domain location offset, returned as a positive integer. (phi)

Data Types: double

Ratio of uplink data to PRACH subcarrier spacing, returned as a numeric scalar. (K)

Data Types: double

Number of subframes duration of the PRACH, returned as a numeric scalar. Each subframe lasts 30720 fundamental periods, therefore TotSubframes is ceil(sum(Fields)/30720), the number of subframes required to hold the entire PRACH waveform. The duration of the PRACH is a function of the Preamble Format as described in TS 36.211, Table 5.7.1-1 [2].

Data Types: double

PRACH field lengths, returned as a 1-by-4 numeric vector. The elements are [OFFSET T_CP T_SEQ GUARD]. T_CP and T_SEQ are the lengths in fundamental time periods (T_s), of cyclic prefix and PRACH sequence, respectively. OFFSET is the number of fundamental time periods from the start of configured subframe to the start of the cyclic prefix, and is nonzero only for TDD special subframes. GUARD is the number of fundamental time periods from the end of the PRACH sequence to the end of the number of subframes spanned by the PRACH.

Data Types: double

PRBs occupied by PRACH preamble, returned as a nonnegative integer column vector. (starts at NPRB, 0-based).

  • An empty info.PRBSet indicates that the PRACH is not present and the waveform generated by ltePRACH consists of all zeros.

  • An info.PRBSet that contains six consecutive Physical Resource Block numbers indicates the frequency domain location of the PRACH.

Note

The PRACH uses a different SC-FDMA symbol construction from the other channels (PUCCH, PUSCH and SRS) and therefore the PRBSet indicates the frequency range (180kHz per RB) that the PRACH occupies, it does not occupy the set of 12 subcarriers in each RB in the same fashion as other channels. The PRACH occupies a bandwidth approximately equal to 1.08MHz = 6RBs.

Data Types: uint32

Length of zero correlation zone plus 1, specified as a positive integer (N_CS). NCS corresponds to the complete extent of autocorrelation lags (0 and N_CS–1 nonzero) that exhibit perfect correlation properties (1 at 0 lag, 0 at nonzero lags). NCS is expressed directly, as in the standard, related to the fundamental Zadoff-Chu sequence construction. The actual sample span of the zero correlation zone in the waveform generated by ltePRACH is a function of the sampling rate.

Data Types: double

Cyclic shift or shifts of Zadoff-Chu sequence, returned as a numeric row vector. (C_v). For High Speed mode, any element of CyclicShift equal to –1 indicates that there are no cyclic shifts in the restricted set for the corresponding preamble index.

Data Types: double

Physical root Zadoff-Chu sequence index or indices, returned as a numeric row vector. (u)

Data Types: double

Cyclic shift or shifts corresponding to Doppler Shift of (1/T_SEQ), returned as a vector. This parameter is present for High Speed mode. (d_u)

Data Types: double

Sampling rate of the PRACH modulator, returned as a numeric scalar.

Data Types: double

Base timing offset, in microseconds, returned as a numeric scalar. This parameter field is used for the detection test in TS 36.104 [1]. (duration of N_CS/2)

Data Types: double

Data Types: struct

Note

Logical root sequence index chs.SeqIdx determines the returned physical root Zadoff-Chu sequence index RootSeq, based on TS 36.211 Table 5.7.2-4 and Table 5.7.2-5. However, if the preamble index within the cell, specified by chs.PreambleIdx, results in insufficient amount of cyclic shifts available at index chs.SeqIdx, the function ltePRACH obtains the physical root sequence index by taking consecutive logical root sequence indices, following the process described in TS 36.211 Section 5.7.2. In this case, the value of RootSeq differs from the expected index, specified by chs.SeqIdx. For an example, see Analyze PRACH Root Sequence Indices.

References

[1] 3GPP TS 36.104. “Evolved Universal Terrestrial Radio Access (E-UTRA); Base Station (BS) Radio Transmission and Reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

[2] 3GPP TS 36.211. “Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Channels and Modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

Version History

Introduced in R2014a