nrPRACH
Syntax
Description
[
returns the physical random access channel (PRACH) symbols, as defined in TS 38.211 Section
6.3.3 [1]. The input
sym
,info
] = nrPRACH(carrier
,prach
)carrier
specifies carrier configuration parameters for a specific
OFDM numerology. The input prach
specifies PRACH configuration
parameters. The function also returns the structure info
, which
contains carrier-dependent information about the PRACH.
Examples
Generate and Map PRACH Symbols to Grid
Configure the PRACH and the carrier with default properties.
carrier = nrCarrierConfig; prach = nrPRACHConfig;
Generate PRACH symbols and indices using the specified carrier and PRACH configuration parameters.
prachSym = nrPRACH(carrier,prach); prachInd = nrPRACHIndices(carrier,prach);
Generate a PRACH resource grid of all zeros.
prachGrid = nrPRACHGrid(carrier,prach);
Map the PRACH symbols to the PRACH resource grid by using the indices.
prachGrid(prachInd) = prachSym;
Analyze PRACH Root Sequence Indices
Analyze physical root Zadoff-Chu sequence indices by generating 64 orthogonal PRACH preambles for two different PRACH configurations.
Root Sequence Indices with Single Value
Configure the PRACH and the carrier with default properties.
carrier = nrCarrierConfig; prach1 = nrPRACHConfig;
Set the PRACH logical root sequence index to 0
. For this value, the physical root sequence index is 129
, as defined in TS 38.211 Table 6.3.3.1-3.
prach1.SequenceIndex = 0;
Set the PRACH cyclic shift configuration index to 1
. For this value, each PRACH preamble has a different cyclic shift value, based on from TS 38.211 Table 6.3.3.1-5.
prach1.ZeroCorrelationZone = 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 prach1.PreambleIndex = preambleIndex; [~,info] = nrPRACH(carrier,prach1); rootSequence1(preambleIndex+1) = info.RootSequence; 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
Configure another PRACH with default properties.
prach2 = nrPRACHConfig;
Set the PRACH logical root sequence index to 0
. For this value, the physical root sequence index is 129
, as defined in TS 38.211 Table 6.3.3.1-3.
prach2.SequenceIndex = 0;
Set the PRACH cyclic shift configuration index to 0
. For this value, each PRACH preamble has the same cyclic shift value, equal to 0
, based on TS 38.211 Table 6.3.3.1-5.
prach2.ZeroCorrelationZone = 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 prach2.PreambleIndex = preambleIndex; [~,info] = nrPRACH(carrier,prach2); rootSequence2(preambleIndex+1) = info.RootSequence; cyclicShift2(preambleIndex+1) = info.CyclicShift; end
Check the physical root sequence indices and cyclic shift values. Even though the logical root sequence index, prach.SequenceIndex
, 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 nrPRACH
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 38.211 Table 6.3.3.1-3.
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
carrier
— Carrier configuration parameters
nrCarrierConfig
object
Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig
object.
prach
— PRACH configuration parameters
nrPRACHConfig
object
PRACH configuration parameters, specified as an nrPRACHConfig
object. The
function uses only these properties of this input.
datatype
— Data type of output symbols
'double'
(default) | 'single'
Data type of the output symbols, specified as 'double'
or
'single'
.
Data Types: char
| string
Output Arguments
sym
— PRACH symbols
complex column vector | []
PRACH symbols, returned as a complex column vector or an empty array. The number of
symbols depends on the PRACH configuration prach
. The function
returns an empty array when the PRACH preamble is not active in the current slot.
Data Types: single
| double
info
— Carrier-dependent PRACH information
structure
Carrier-dependent PRACH information, returned as a structure containing these fields:
Fields | Description |
---|---|
RootSequence | Index or indices of physical root Zadoff-Chu sequence |
CyclicShift | Cyclic shift or shifts of Zadoff-Chu sequence |
CyclicOffset | Cyclic shift or shifts corresponding to a Doppler shift of 1/TSEQ, where TSEQ is the length of the PRACH sequence (applies to restricted set only) |
NumCyclicShifts | Number of cyclic shifts corresponding to a single PRACH preamble sequence |
Note
Logical root sequence index prach
.
determines the returned physical root
Zadoff-Chu sequence index SequenceIndex
RootSequence
, based on TS 38.211 Table
6.3.3.1-3 and Table 6.3.3.1-4. However, if the preamble index within the cell,
specified by prach.
, results in insufficient amount of cyclic
shifts available at index PreambleIndex
prach.SequenceIndex
, the function
nrPRACH
obtains the physical root sequence index by taking
consecutive logical root sequence indices, following the process described in TS
38.211 Section 6.3.3.1. In this case, the value of RootSequence
differs from the expected index, specified by prach.SequenceIndex
.
For an example, see Analyze PRACH Root Sequence Indices.
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™.
Usage notes and limitations:
The
datatype
input argument must be compile-time constant. For example,
when specifying 'single'
as the output data type, include
{coder.Constant('OutputDataType'),coder.Constant('single')}
in the
-args
value of the codegen
function. For more
information, see the coder.Constant
(MATLAB Coder) class.
Version History
Introduced in R2020a
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
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)