nrPRACHConfig
Description
The nrPRACHConfig
object sets physical random access channel
(PRACH) configuration parameters for a PRACH preamble, as defined in TS 38.211 Section 5.3.2
and Section 6.3.3 [1]. The default PRACH
configuration corresponds to a PRACH preamble format 0 placed at the start of the allocated
resources that is active in all subframes for frequency range 1 (FR1) and frequency division
duplex (FDD) mode for paired spectrum.
Creation
Description
prach = nrPRACHConfig
creates a PRACH configuration object with
default properties.
prach = nrPRACHConfig(
specifies
properties using one or more name-value pair arguments. Enclose each property in quotes.
For example, Name,Value
)'ConfigurationIndex',106,'SubcarrierSpacing',30
specifies
the time resource and subcarrier spacing for the PRACH preamble. Unspecified properties
take their default values.
Properties
Configurable PRACH Properties
FrequencyRange
— Frequency range
'FR1'
(default) | 'FR2'
Frequency range, specified as 'FR1'
or
'FR2'
.
Use this property together with the DuplexMode
property to specify these PRACH configuration tables from TS 38.211.
To specify Table 6.3.3.2-2, set
FrequencyRange
to'FR1'
andDuplexMode
to'FDD'
or'SUL'
.To specify Table 6.3.3.2-3, set
FrequencyRange
to'FR1'
andDuplexMode
to'TDD'
.To specify Table 6.3.3.2-4, set
FrequencyRange
to'FR2'
andDuplexMode
to'TDD'
.
Data Types: char
| string
DuplexMode
— Duplex mode for uplink transmission
'FDD'
(default) | 'TDD'
| 'SUL'
Duplex mode for uplink transmission, specified as one of these values:
'FDD'
— Use this value to specify FDD mode for paired spectrum.'TDD'
— Use this value to specify time division duplex (TDD) mode for unpaired spectrum.'SUL'
— Use this value to specify supplementary uplink.
Use this property together with the FrequencyRange
property to specify these PRACH configuration tables from
TS 38.211:
To specify Table 6.3.3.2-2, set
FrequencyRange
to'FR1'
andDuplexMode
to'FDD'
or'SUL'
.To specify Table 6.3.3.2-3, set
FrequencyRange
to'FR1'
andDuplexMode
to'TDD'
.To specify Table 6.3.3.2-4, set
FrequencyRange
to'FR2'
andDuplexMode
to'TDD'
.
Data Types: char
| string
ConfigurationIndex
— Time resource of PRACH preamble
27
(default) | integer from 0 to 262
Time resource of PRACH preamble, specified as an integer from 0 to 262. This
property specifies a configuration index from Tables 6.3.3.2-2 to 6.3.3.2-4 in TS
38.211. The FrequencyRange
and DuplexMode
properties determine the actual configuration table to
consider. When you set FrequencyRange
to 'FR1'
and DuplexMode
to 'FDD'
or when you set
FrequencyRange
to 'FR2'
, the property value
must be an integer from 0 to 255.
This property corresponds to the prach-ConfigurationIndex and prach-ConfigurationIndex-v1610 higher layer parameters.
Data Types: double
SubcarrierSpacing
— Subcarrier spacing for PRACH in kHz
1.25
(default) | 5
| 15
| 30
| 60
| 120
| 480
| 960
Subcarrier spacing for the PRACH in kHz, specified as 1.25
,
5
, 15
, or 30
for frequency
range FR1 and 60
, 120
, 480
,
or 960
for frequency range FR2.
Set this property in relation to the preamble format property Format
. To identify valid preamble format and subcarrier spacing
combinations, see the LongPreambleFormats
and
ShortPreambleFormats
fields of the Tables
property. For more information, see Table 6.3.3.1-1 for long
preambles and Table 6.3.3.1-2 for short preambles.
Data Types: double
LRA
— Length of Zadoff-Chu preamble sequence
139
| 571
| 839
| 1151
Length of Zadoff-Chu preamble sequence, specified as 139
,
571
, 839
, or 1151
. The
default value depends on the Format
property.
For long preambles (formats 0, 1, 2, and 3), the default value is
839
. You cannot change the property value from its default value.For short preambles (formats A1, A2, A3, B1, B2, B3, B4, C0, and C2), the default value is
139
.When you set the
SubcarrierSpacing
property to1.25
,5
,60
, or960
, setLRA
to139
.When you set
SubcarrierSpacing
to15
, setLRA
to139
or1151
.When you set
SubcarrierSpacing
to30
or480
, setLRA
to139
or571
.When you set
SubcarrierSpacing
to120
, setLRA
to139
,571
, or1151
.
This property corresponds to the parameter from TS 38.211 Section 6.3.3.
Data Types: double
SequenceIndex
— Logical root sequence index
0
(default) | integer from 0 to 1149
Logical root sequence index, specified as an integer from 0 to 1149.
This property corresponds to the prach-RootSequenceIndex-r16 and prach-RootSequenceIndex higher layer parameters and parameter from TS 38.211 Tables 6.3.3.1-3, 6.3.3.1-4, 6.3.3.1-4A, and 6.3.3.1-4B.
Data Types: double
PreambleIndex
— Preamble index within cell
0
(default) | integer from 0 to 63
Preamble index within the cell, specified as an integer from 0 to 63.
This property is the higher layer parameter ra-PreambleIndex.
Data Types: double
RestrictedSet
— Type of restricted set
'UnrestrictedSet'
(default) | 'RestrictedSetTypeA'
| 'RestrictedSetTypeB'
Type of restricted set, specified as 'UnrestrictedSet'
,
'RestrictedSetTypeA'
, or 'RestrictedSetTypeB'
.
Set this property in relation to the cyclic shift configuration index property
ZeroCorrelationZone
, as defined by in Tables 6.3.3.1-5 to 6.3.3.1-7 from TS 38.211.
Data Types: char
| string
ZeroCorrelationZone
— Cyclic shift configuration index
0
(default) | integer from 0 to 15
Cyclic shift configuration index, specified as an integer from 0 to 15. Use this
property together with the RestrictedSet
and SubcarrierSpacing
properties to retrieve the number of cyclic shifts for
the sequence generation. For more information, see TS 38.211 Tables 6.3.3.1-5 to
6.3.3.1-7.
Data Types: double
RBOffset
— Starting RB index of initial uplink BWP
0
(default) | integer from 0 to 274
Starting resource block (RB) index of the initial uplink bandwidth part (BWP), relative to the carrier resource grid, specified as an integer from 0 to 274.
Data Types: double
FrequencyStart
— Offset of lowest PRACH transmission occasion
0
(default) | integer from 0 to 274
Offset of lowest PRACH transmission occasion, in frequency domain, relative to the physical resource block (PRB) 0, specified as an integer from 0 to 274.
This property corresponds to parameter in TS 38.211 Section 5.3.2 and is the higher layer parameter msg1-FrequencyStart.
Data Types: double
RBSetOffset
— Starting RB index of uplink RB set
0
(default) | integer from 0 to 274
Starting RB index of the uplink RB set for the configured PRACH transmission occasion, specified as an integer from 0 to 274. This property determines the PRACH indices and corresponds to in TS 38.211 Section 5.3.2.
Dependencies
To enable this property, set the LRA
property to 571
or
1151
.
Data Types: double
FrequencyIndex
— Index of PRACH transmission occasion
0
(default) | integer from 0 to 7
Index of PRACH transmission occasion, in frequency domain, specified as an integer from 0 to 7. The frequency index must be in the range from 0 to M − 1, where M is 1, 2, 4, or 8.
This property corresponds to parameter in TS 38.211 Sections 5.3.2 and 6.3.3.2 and is the higher layer parameter msg1-FDM defined in TS 38.331 Section 6.3.2.
Dependencies
To enable this property, set the LRA
property to 139
or
839
.
Data Types: double
TimeIndex
— Index of PRACH transmission occasion
0
(default) | integer from 0 to 6
Index of the PRACH transmission occasion, in time domain, specified as an integer
from 0 to 6. Set this property in relation to the LRA
property.
When
LRA
is839
, setTimeIndex
to0
.When
LRA
is139
,571
, or1151
, setTimeIndex
to an integer from 0 toNumTimeOccasions
− 1.
This property corresponds to parameter in TS 38.211 Section 5.3.2.
Data Types: double
ActivePRACHSlot
— Position of active PRACH slot within subframe or 60 kHz slot
0
(default) | 1
| 3
| 7
| 15
Position of active PRACH slot within a subframe (for FR1) or a 60 kHz slot (for FR2), specified as one of these options.
If the
SubcarrierSpacing
property is set to1.25
,5
,15
, or60
, thenActivePRACHSlot
must be0
.If
SubcarrierSpacing
is set to30
or120
, thenActivePRACHSlot
must be0
or1
.If
SubcarrierSpacing
is set to480
, thenActivePRACHSlot
must be3
or7
.If
SubcarrierSpacing
is set to960
, thenActivePRACHSlot
must be7
or15
.
To specify the frequency range of the carrier as FR1 or FR2, use the FrequencyRange
property.
This property corresponds to parameter in TS 38.211 Section 5.3.2.
Data Types: double
NPRACHSlot
— PRACH slot number
0
(default) | nonnegative integer
PRACH slot number, specified as a nonnegative integer. You can set
NPRACHSlot
to a value larger than the number of slots per frame.
For example, you can set this value using transmission loop counters in a MATLAB® simulation. In this case, you might have to ensure that the property
value is modulo the number of slots per frame in a calling code.
Data Types: double
Nonconfigurable PRACH Properties
The object automatically sets these properties based on configurable PRACH property values by using the configuration tables from TS 38.211 Section 6.3.3.
Format
— Preamble format
'0'
| '1'
| '2'
| '3'
| 'A1'
| 'A2'
| 'A3'
| 'B1'
| 'B2'
| 'B3'
| 'B4'
| 'C0'
| 'C2'
This property is read-only.
Preamble format, defined in TS 38.211 Tables 6.3.3.1-1 and 6.3.3.1-2, returned as
'0'
, '1'
, '2'
,
'3'
, 'A1'
, 'A2'
,
'A3'
, 'B1'
, 'B2'
,
'B3'
, 'B4'
, 'C0'
, or
'C2'
.
For short preamble format C0, each preamble has one active sequence period. Because the preamble spans two OFDM symbols, including the guard and the cyclic prefix, the grid related to format C0 has 7 OFDM symbols instead of 14.
Data Types: char
| string
NumTimeOccasions
— Number of time-domain PRACH occasions within PRACH slot
integer from 0 to 7
This property is read-only.
Number of time-domain PRACH occasions within a PRACH slot, returned as an integer
from 0 to 7. For long preambles, NumTimeOccasions
is always 1.
For more details, see TS 38.211 Section 5.3.2.
This property corresponds to parameter in TS 38.211 Tables 6.3.3.2-2 to 6.3.3.2-4.
Data Types: double
PRACHDuration
— Number of OFDM symbols in PRACH slot grid
integer from 1 to 12
This property is read-only.
Number of OFDM symbols in the PRACH slot grid, corresponding to one transmission occasion, returned as an integer from 1 to 12.
This property corresponds to parameter in TS 38.211 Tables 6.3.3.2-2 to 6.3.3.2-4. For format C0, because
the grid has 7 OFDM symbols instead of 14, the object sets
PRACHDuration
to / 2.
For long preamble formats 0 and 1, PRACHDuration
is
1
and 2
, respectively. For long preamble
formats 2 and 3, PRACHDuration
is 4
. For more
information on long preamble formats, see Table 6.3.3.1-1.
Data Types: double
SymbolLocation
— First OFDM symbol location in current PRACH occasion
integer from 0 to 222
This property is read-only.
First OFDM symbol location in current PRACH occasion within a slot, returned as an
integer from 0 to 222. For nonzero ActivePRACHSlot
property values, this location can fall outside a PRACH
slot.
This property corresponds to parameter in TS 38.211 Section 5.3.2 with these exceptions.
For format C0, because the grid has 7 OFDM symbols instead of 14, the object sets
SymbolLocation
to / 2.For long preamble formats characterized by starting symbol location 7 in Table 6.3.3.2-3, the object sets the
SymbolLocation
to0
.
Data Types: double
SubframesPerPRACHSlot
— Total number of subframes per nominal PRACH slot
0.0156
| 0.0312
| 0.125
| 0.25
| 0.5
| 1
| 3
| 4
This property is read-only.
Total number of subframes per nominal PRACH slot, returned as
0.0156
, 0.0312
, 0.125
,
0.25
, 0.5
, 1
,
3
, or 4
.
Data Types: double
PRACHSlotsPerPeriod
— Number of PRACH slots per overall period
5
| 10
| 20
| 40
| 80
| 160
| 320
| 640
This property is read-only.
Number of PRACH slots per overall period, returned as 5
,
10
, 20
, 40
,
80
, 160
, 320
, or
640
. The overall period spans an integer multiple of
x frames, where x is defined in TS 38.211
Tables 6.3.3.2-2, 6.3.3.2-3, and 6.3.3.2-4.
Data Types: double
PRACH Lookup Tables
Tables
— PRACH configuration tables
constant structure
This property is read-only.
PRACH configuration tables, from TS 38.211 Section 6.3.3, returned as a constant structure containing these fields:
Fields | Values | Description |
---|---|---|
LongPreambleFormats | 4-by-6 table | Table 6.3.3.1-1: Long PRACH preamble formats |
ShortPreambleFormats | 9-by-8 table | Table 6.3.3.1-2: Short PRACH preamble formats |
NCSFormat012 | 16-by-4 table | Table 6.3.3.1-5: for long preamble formats with 1.25 kHz subcarrier spacing |
NCSFormat3 | 16-by-4 table | Table 6.3.3.1-6: for long preamble formats with 5 kHz subcarrier spacing |
NCSFormatABC | 16-by-4 table | Table 6.3.3.1-7: for short preamble formats |
SupportedSCSCombinations | 39-by-5 table | Table 6.3.3.2-1: Supported combinations of subcarrier spacing for the PRACH and the physical uplink shared channel (PUSCH) |
ConfigurationsFR1PairedSUL | 263-by-9 table | Table 6.3.3.2-2: PRACH configurations for FR1 and paired spectrum or FR1 and supplementary uplink |
ConfigurationsFR1Unpaired | 263-by-9 table | Table 6.3.3.2-3: PRACH configurations for FR1 and unpaired spectrum |
ConfigurationsFR2 | 263-by-9 table | Table 6.3.3.2-4: PRACH configurations for FR2 and unpaired spectrum |
Invalid PRACH Configurations
Based on the configuration tables in TS 38.211 Section 6.3.3, these property setting combinations and scenarios lead to invalid PRACH configurations.
Setting
'FrequencyRange'
to'FR2'
and'DuplexMode'
to'FDD'
is invalid.Setting
'FrequencyRange'
to'FR2'
and'DuplexMode'
to'SUL'
is invalid.Setting
'FrequencyRange'
to'FR1'
and'SubcarrierSpacing'
to60
is invalid.Setting
'FrequencyRange'
to'FR1'
and'SubcarrierSpacing'
to120
is invalid.Setting
'FrequencyRange'
to'FR2'
and'SubcarrierSpacing'
to1.25
is invalid.Setting
'FrequencyRange'
to'FR2'
and'SubcarrierSpacing'
to5
is invalid.Setting
'FrequencyRange'
to'FR2'
and'SubcarrierSpacing'
to15
is invalid.Setting
'FrequencyRange'
to'FR2'
and'SubcarrierSpacing'
to30
is invalid.Any combination of properties
Format
andSubcarrierSpacing
not listed in Table 6.3.3.1-1 for long preambles or Table 6.3.3.1-2 for short preambles is invalid. You can identify valid combinations in theLongPreambleFormats
andShortPreambleFormats
fields of theTables
property.Any combination of properties
ZeroCorrelationZone
andRestrictedSet
not listed in Tables 6.3.3.1-5, 6.3.3.1-6, and 6.3.3.1-7 is invalid. You can identify valid combinations in theNCSFormat012
,NCSFormat3
, andNCSFormatABC
fields, respectively, of theTables
property.Any combination of properties
ActivePRACHSlot
,FrequencyRange
,DuplexMode
,ConfigurationIndex
, andSubcarrierSpacing
not covered in Section 5.3.2 is invalid.Any configuration where
TimeIndex
≥NumTimeOccasions
is invalid.
Examples
Configure PRACH Preamble Format
Create a PRACH configuration object with default properties. The default configuration object defines a PRACH configuration with long preamble format 0, based on TS 38.211 Table 6.3.3.2-2.
prach = nrPRACHConfig;
To consider a different PRACH configuration table as a basis, for example Table 6.3.3.2-3 for FR1 and unpaired spectrum, update the duplex mode property.
prach.DuplexMode = 'TDD';
To change the PRACH preamble format, you must update the ConfigurationIndex
property of the object based on Table 6.3.3.2-3. To lookup a suitable value, access this table through the ConfigurationsFR1Unpaired
field of the Tables
property.
prach.Tables.ConfigurationsFR1Unpaired(:,:)
ans=263×9 table
ConfigurationIndex PreambleFormat x y SubframeNumber StartingSymbol PRACHSlotsPerSubframe NumTimeOccasions PRACHDuration
__________________ ______________ __ _____ ______________ ______________ _____________________ ________________ _____________
0 {'0'} 16 {[1]} {[ 9]} 0 NaN NaN 0
1 {'0'} 8 {[1]} {[ 9]} 0 NaN NaN 0
2 {'0'} 4 {[1]} {[ 9]} 0 NaN NaN 0
3 {'0'} 2 {[0]} {[ 9]} 0 NaN NaN 0
4 {'0'} 2 {[1]} {[ 9]} 0 NaN NaN 0
5 {'0'} 2 {[0]} {[ 4]} 0 NaN NaN 0
6 {'0'} 2 {[1]} {[ 4]} 0 NaN NaN 0
7 {'0'} 1 {[0]} {[ 9]} 0 NaN NaN 0
8 {'0'} 1 {[0]} {[ 8]} 0 NaN NaN 0
9 {'0'} 1 {[0]} {[ 7]} 0 NaN NaN 0
10 {'0'} 1 {[0]} {[ 6]} 0 NaN NaN 0
11 {'0'} 1 {[0]} {[ 5]} 0 NaN NaN 0
12 {'0'} 1 {[0]} {[ 4]} 0 NaN NaN 0
13 {'0'} 1 {[0]} {[ 3]} 0 NaN NaN 0
14 {'0'} 1 {[0]} {[ 2]} 0 NaN NaN 0
15 {'0'} 1 {[0]} {[1 6]} 0 NaN NaN 0
⋮
To change the preamble from format 0 to format A1, set the ConfigurationIndex
property to any value from 67 to 86.
prach.ConfigurationIndex = 86;
Verify that the object updates the preamble format correctly.
isequal(prach.Format,'A1')
ans = logical
1
References
[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2020aR2023a: Subcarrier spacing for FR2-2
These object properties now support subcarrier spacing for FR2-2, as defined in Release 17 of TS 38.211 Section 5.3.2:
The
SubcarrierSpacing
property supports 480 kHz and 960 kHz subcarrier spacings.The
ActivePRACHSlot
property supports the values 3, 7, and 15 for 480 kHz and 960 kHz subcarrier spacings.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)