pilot's matrix wrong dimension error , using ofdmmod function

1 回表示 (過去 30 日間)
Igor Lisogurski
Igor Lisogurski 2022 年 1 月 25 日
回答済み: Pratyush Roy 2022 年 1 月 28 日
Hi,
I am trying to generate an OFDM burst with ofdmmod function ...After defining the matrix with pilot subcarriers getting an error attached below regarding the dimension of the pilots matrix ...Attaching the code here , please advise where the problem
MCS7=64;
nfft=64;
cplen=16;
nSym = 100;
npilot=4;
nantena=1;
pilotIdx = [12 26 40 54]';
nullIdx = [1:6 33 64-4:64]';
numDataCarrs = nfft-length(nullIdx)-length(pilotIdx);
inSig = randi([0 MCS7-1],numDataCarrs,nSym);
pilots = repmat(pskmod((0:MCS7-1).',MCS7),4,nSym,1);
qamSym = qammod(inSig,MCS7,'UnitAveragePower',true);
outSig64 = ofdmmod(qamSym,nfft,cplen,nullIdx,pilotIdx,pilots);

回答 (1 件)

Pratyush Roy
Pratyush Roy 2022 年 1 月 28 日
Hi Igor,
As per my understanding, the matrix with pilot subcarriers is gnerating an error while performing the OFDM modulation.
The shape of the matrix, as per the definition mentioned in the documentation, is -by--by-, where is the length of the pilotIdx array. However, in our case we are defining the pilot array in terms of the order of the modulation, MCS7.
A workaround for this issue would be to define the pilot indices such that the number of elements is equal to the order of modulation for QAM.
The script below might be helpful:
MCS7 = 16;
nfft = 64;
cplen = 16;
nSym = 100;
npilot = 4;
nantena = 1;
pilotIdx = [12:23 40:42 54]';
nullIdx = [1:6 33 64-4:64]';
numDataCarrs = nfft-length(nullIdx)-length(pilotIdx);
inSig = randi([0 MCS7-1],numDataCarrs,nSym);
pilots = repmat(pskmod((0:MCS7-1).',MCS7),1,nSym);
qamSym = qammod(inSig,MCS7,'UnitAveragePower',true);
outSig64 = ofdmmod(qamSym,nfft,cplen,nullIdx,pilotIdx,pilots);
Hope this helps!

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by