フィルターのクリア

LTE PRACH Preamble Generation in MATLAB

25 ビュー (過去 30 日間)
German
German 2015 年 10 月 15 日
コメント済み: Fayaz 2023 年 3 月 20 日
Hello,
I'm trying to generate the preamble sent in the random access channel (PRACH) in LTE. I'm hoping somebody have some tips...
Using the LTE Toolbox is quite simple with ltePRACH(). However, I would like to generate my preamble without using this box.
One possible PRACH modulator in a 1.4MHz system is as follows:
  1. Generate Zadoff Chu Sequence according to 36.212 for the uth root with length NZC = 839.
  2. DFT with NZC points
  3. Subcarrier Mapping*
  4. IDFT with 1536 points. (12 times more than IDFT size for data as the subcarrier spacing is 1.25KHz instead of 15KHz).
  5. Repeat (Not need we are working with preamble format 0).
  6. CP Insertion
My main issue is with step 3, as I'm not sure how to map the unused subcarriers. Our sequence in frequency has 839 subcarriers occupied. As with normal uplink SC-FDMA transmission there is a half subcarrier (7500 Hz) shift, which for the PRACH is a K/2 subcarrier shift. A further subcarrier offset, φ (7 for formats 0–3 and 2 for format 4), centers the PRACH transmission within the 1.08 MHz bandwidth [1]. In this case, we have that we need to add zero padding:
Therefore, in total we have 864 subcarriers "used", or more precisely, 12 with zeros + 839 with the sequence and + 13. To reach to the the 1536, I'm just filling more zeros in the rest of subcarriers.
The problem is that lte ltePRACHDetect() detects different preambles to the one I have sent. The example code is here:
% code
% Cell Configuration
ueConfig=struct('NULRB',6,'DuplexMode','FDD','CyclicPrefix','Normal');
prachConfig=struct('Format',0,'SeqIdx',0,'PreambleIdx',0,'CyclicShiftIdx',1,'HighSpeed',0,'TimingOffset',0,'FreqIdx',0,'FreqOffset',0);
ue.NULRB = 6;
ue.DuplexMode = 'FDD';
% Sequence
N_ZC = 839;
sequence = lteZadoffChuSeq(129, 839);
% DFT -> Subcarrier Mapping -> IFFT
preambleDFT = fft(sequence, N_ZC);
preamble864subcarriers = [ zeros(13,1); preambleDFT; zeros(12,1)];
preambleMapped = [ zeros(336,1); preamble864subcarriers; zeros(336,1)]; % Only ' conjugate the complex numbers as well!!!
preambleIFFT = ifft(preambleMapped,1536);
% ADD CP and Guard Band
CPpreambleGP = [preambleIFFT(end-198+1:end); preambleIFFT; zeros(186,1)];
% MATLAB LTE Toolbox Generation
[matlabPreamble, info]=ltePRACH(ueConfig,prachConfig);
disp('--- MATLAB PREAMBLE ----');
[index,offset] = ltePRACHDetect(ue,prachConfig,matlabPreamble,(0:63).')
disp('--- OWN PREAMBLE ----');
[index,offset] = ltePRACHDetect(ue,prachConfig,CPpreambleGP,(0:63).')
Thanks a lot, Germán
  1 件のコメント
Fayaz
Fayaz 2023 年 3 月 20 日
hello, can you give me code to generate the preamble sent in the random access channel (Narrowband PRACH) in LTE

サインインしてコメントする。

回答 (1 件)

fedi sonnara
fedi sonnara 2018 年 5 月 17 日
change the line
preambleIFFT = ifft(preambleMapped,1536);
by
preambleIFFT = ifft(fftshift(preambleMapped),1536)/8.5;
The FFT in matlab is shifted i.e. the index 1 of the FFT vector corresponds to the middle of the spectrum. from 2 -> FFT size /2 corresponds to the right part of the spectrum from FFT size /2 +1 -> FFT size corresponds to the left part of the spectrum
read about shifting the FFT.
By changing this line, both sequences are matched and ltePRACHDetect() returns the same result for both of them.
  1 件のコメント
Radha Krishna Ganti
Radha Krishna Ganti 2019 年 1 月 24 日
Hello Fedi Sonnara,
Why are you dividing by 8.5?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLTE Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by