- https://www.mathworks.com/help/5g/ref/nrprachofdmmodulate.html
- https://www.mathworks.com/help/5g/ref/nrprachgrid.html
- https://www.mathworks.com/help/5g/ug/5g-nr-prach-configuration.html
- https://www.mathworks.com/help/5g/ug/5g-nr-prach-waveform-generation.html
- https://www.mathworks.com/help/5g/ref/nrprach.html
5G PRACH time offset generation for Long formats
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi Matlab,
I am trying to generate 10ms PRACH waveform for TDD configuration. From the 5G Toolbox example code, I get empty waveform/ only 1st Subframe data.
Is there any possiblity to have wavform generation with 10 Subframe or higher of complete grid set in the example?
openExample('5g/NewRadioPRACHConfigurationExample')
nrCarrierConfig with properties:
NCellID: 1
SubcarrierSpacing: 30
CyclicPrefix: 'normal'
NSizeGrid: 273
NStartGrid: 0
NSlot: 0
NFrame: 0
IntraCellGuardBands: [0×2 double]
Read-only properties:
SymbolsPerSlot: 14
SlotsPerSubframe: 2
SlotsPerFrame: 20
nrPRACHConfig with properties:
FrequencyRange: 'FR1'
DuplexMode: 'TDD'
ConfigurationIndex: 17
SubcarrierSpacing: 1.2500
LRA: 839
SequenceIndex: 22
PreambleIndex: 32
RestrictedSet: 'UnrestrictedSet'
ZeroCorrelationZone: 1
RBOffset: 0
FrequencyStart: 0
FrequencyIndex: 0
TimeIndex: 0
ActivePRACHSlot: 0
NPRACHSlot: 0
Read-only properties:
Format: '0'
NumTimeOccasions: 1
PRACHDuration: 1
SymbolLocation: 0
SubframesPerPRACHSlot: 1
PRACHSlotsPerPeriod: 10
Constant properties:
Tables: [1×1 struct]
prachGrid = nrPRACHGrid(CarrierConfig,prach);
prachGrid is empty 78264x 1 empty array
hPRACHPreamblePlot(carrier,prach);
hPRACHResourceGridPlot(carrier,prach);
In example code when I set Format "0" , "TDD" use cases for "FR1" condition : it overwrote PRACH configuration from "17" to "262", not sure if its example code bug or lookup able failure or something not handeled correctly in the above data paratemeters.
if strcmpi(prach.FrequencyRange,'FR1') && strcmpi(prach.DuplexMode,'FDD') && ...
any(strcmpi(format,{'A1','A2','A3','B1','B4','C0','C2'}))
prach.ConfigurationIndex = find(strcmpi(configTable.PreambleFormat,format),1,'last') - 2;
else
if ~any(strcmpi(format,{'B2','B3'}))
prach.ConfigurationIndex = find(strcmpi(configTable.PreambleFormat,format),1,'last') - 1;
else
% Format B2 and B3 only appear in mixed formats, so select an
% appropriate mixed format and set the maximum value of TimeIndex
prach.ConfigurationIndex = find(endsWith(configTable.PreambleFormat,format),1,'last') - 1;
prach.TimeIndex = prach.NumTimeOccasions - 1;
end
end
0 Commenti
Risposte (1)
Snehal
il 26 Set 2025 alle 6:35
I understand that you want to generate a complete 10 ms (one frame) PRACH waveform using the 5G Toolbox example code.
Currently, the empty prachGrid that you see is because the selected ConfigurationIndex, TimeIndex, and carrier.NSlot/NFrame do not define an active PRACH occasion at slot 0, frame 0 for your chosen TDD/FR1 setup. In other words, there is simply no PRACH transmission opportunity at that time location. This is expected behaviour since the example only generates one PRACH occasion and does not cover an entire frame by default.
Also, the example code overwriting your prach.ConfigurationIndex is intentional: it ensures the selected preamble format (e.g. "0") is consistent with the 3GPP lookup table for your duplex mode and frequency range. For TDD, FR1, format "0" maps to index 262 (not 17) so the code updates it automatically.
To get a 10 ms (or multi-subframe) PRACH waveform, you need to explicitly loop over slots/frames, update carrier.NSlot/carrier.NFrame, check for PRACH opportunities with nrPRACHInfo, and call nrPRACH for each active slot. For slots without PRACH, append zeros to maintain continuity. This way, you can stitch together a full 10 ms (or longer) waveform instead of just one subframe.
You may refer to the following documentation links for a better understanding the PRACH concepts involved:
Hope this helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Waveform Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!