主要内容

5G NR Prach波形生成

This example implements a 5G NR PRACH waveform generator using 5G Toolbox™. The example shows how to parameterize and generate a 5G New Radio (NR) physical random access channel (PRACH) waveform, as defined in TS 38.211 [1]。该示例演示了单个载体中一种Prach配置的参数化和生成,并在资源网格中显示Prach Preambles的位置。您可以根据子帧来定义波形的长度,并在生成的波形中设置活动prach preambles的模式。

Waveform and Carrier Configuration

configure one carrier and set the length of the generated waveform in terms of 1 ms subframes. Visualize the generated resource grid by setting theDisplayGrids字段至1。

Use thewaveconfig用于存储Prach波形生成所需的配置参数的结构。这waveconfig结构包含这些字段:

  • NumSubframes: Number of 1 ms subframes in generated waveform.

  • DisplayGrids:如果设置为1,则该示例显示资源网格。

  • 窗口: Number of time-domain samples over which to apply windowing and overlapping of OFDM symbols. For more information, seenrprachofdmmodulate.

  • Carriers:载体特定的配置对象,如nrcarrierConfig.

  • Prach: Structure containing the PRACH-related configuration, as described in detail in thePrachconfiguration部分。

waveconfig = [];waveconfig.numsubframes = 10;% Number of 1 ms subframes in generated waveformwaveconfig.displayGrids = 1;%显示资源网格waveconfig.Windowing = [];% Use the default windowing%定义载体配置对象carrier = nrCarrierConfig; carrier.SubcarrierSpacing = 15; carrier.NSizeGrid = 52;%将载体存储到Waveconfig结构中waveconfig.carrier =载体;

Prachconfiguration

考虑到Prach的命理学可能与载体的命理学不同,请设置Prach的参数。此示例设置了对应于具有15 kHz子载波间距的Prach短序列格式B2的Prach配置。

您还可以设置其他PRACH参数。有关更多信息,请参阅NRPRACHconfig.

添加字段Prachwaveconfig存储Prach配置和相关参数的结构。场Prach是包含这些字段的结构:

  • config: PRACH configuration object

  • AllocatedPreambles: Index (0-based) of the allocated PRACH preambles to transmit. This field considers only the active PRACH preambles. Set this value to 'all' to include all the active PRACH preambles in the waveform.

  • Power: PRACH power scaling in dB. This parameter represents$ \ beta_ {prach} $(in dB) in TS 38.211 Section 6.3.3.2.

%prach配置prach = nrprachconfig;prach.frequencyrange ='FR1';%频率范围('fr1','fr2')prach.DuplexMode ='FDD';%双链模式('fdd','tdd','sul')prach.ConfigurationIndex = 145;%配置索引(0 ... 255)prach.subcarrierspacing = 15;%子载波间距(1.25、5、15、30、60、120)prach.frequencyIndex = 0;频域中Prach传输场合的索引%(0 ... 7)prach.TimeIndex = 2;% Index of the PRACH transmission occasions in time domain (0...6)prach.activeprachslot = 0;% Active PRACH slot number within a subframe or a 60 kHz slot (0, 1)% Store the PRACH configuration and additional parameters in the%waveconfig结构waveconfig.PRACH.Config = prach; waveconfig.PRACH.AllocatedPreambles ='全部';% Index of the allocated PRACH preambleswaveconfig.PRACH.Power = 0;% PRACH power scaling in dB

波形产生

Generate the PRACH complex baseband waveform by using the parameters stored in thewaveconfigstructure.

[waveform,gridset,winfo] = hNRPRACHWaveformGenerator(waveconfig);

什么时候waveconfig.DisplayGrids被设定为1, the waveform generator also plots the PRACH resource grid, in PRACH numerology. For more information on the number of OFDM symbols in the resource grid, see 5G NR PRACH Configuration.

通用电气的波形nerator function returns the time domain waveform, and two structures:gridset温富.

结构温富包含这些字段:

  • NPRACHSlot: PRACH slot numbers of each allocated PRACH preamble

  • prachsymbols:与每个分配的prach插槽相对应的prach符号

  • prachsymbolsinfo:与Prach符号相关的其他信息

  • PrachIndices:与每个分配的prach插槽相对应的PRACH索引

  • Prachindicesinfo:与Prach指数相关的其他信息

结构gridset包含这些字段:

  • ResourceGrid:与此载体相对应的资源网格

  • Info:结构带有与Prach OFDM调制相对应的信息。如果为FR2配置了PRACH或当前配置的Prach插槽跨越一个以上的子帧,则PRACH插槽之间的某些与OFDM相关的信息可能有所不同。在这种情况下,信息结构是与波形中的prach插槽数相同长度的数组。

disp('Information associated with PRACH OFDM modulation for the first PRACH slot:')disp(gridset.info(1))
Information associated with PRACH OFDM modulation for the first PRACH slot: Nfft: 1024 SampleRate: 15360000 CyclicPrefixLengths: [188 0 0 0 188 0 0 0 180 0 0 0 0 0] GuardLengths: [0 0 0 108 0 0 0 108 0 0 0 108 0 144] SymbolLengths: [1212 1024 1024 1132 1212 1024 1024 1132 1204 ... ] OffsetLength: 0 Windowing: 72

摘要和进一步探索

This example shows how to generate a time-domain waveform for a single PRACH configuration on a single carrier. You can set the length of the generated waveform in terms of number of subframes. You can also set the pattern of PRACH preambles in the generated waveform. The example also shows the OFDM-related information for the PRACH.

要在同一载体中生成一个包含多个Prach配置的波形,请运行此示例以进行多种Prach配置,然后将生成的波形添加在一起。

有关Prach配置和Prach资源网格的更多信息,请参见5G NR PRACH Configuration.

Appendix

This example uses these helper functions:

Selected Bibliography

  1. 3GPP TS 38.211。“ NR;物理通道和调制。”3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

See Also

Functions

Objects

相关话题