How To Move OFDM Signal From BaseBand
4 ビュー (過去 30 日間)
古いコメントを表示
hi everybody
if anyone knows how to move this signal (bw=20MHz)
and to move it from 0-20MHz to 1920MHz-1940MHz
any help will be appreciated !
Here is the code :
clear all
nFFTSize =64 ;
% for each symbol bits a1 to a52 are assigned to subcarrier
% index [-26 to -1 1 to 26]
subcarrierIndex = [-26:-1 1:26];
nBit = 2500;
ip = rand(1,nBit) > 0.5; % generating 1's and 0's
nBitPerSymbol = 52;
nSymbol = ceil(nBit/nBitPerSymbol);
% BPSK modulation
% bit0 --> -1
% bit1 --> +1
ipMod = 2*ip - 1; %2500 {0 or 1]
ipMod = [ipMod zeros(1,nBitPerSymbol*nSymbol-nBit)]; % 1 x 2548
ipMod = reshape(ipMod,nSymbol,nBitPerSymbol); % 49 x 52
figure(1)
plot(ipMod)
st = []; % empty vector
for ii = 1:nSymbol
inputiFFT = zeros(1,nFFTSize);
% assigning bits a1 to a52 to subcarriers [-26 to -1, 1 to 26]
inputiFFT(subcarrierIndex+nFFTSize/2+1) = ipMod(ii,:);
% shift subcarriers at indices [-26 to -1] to fft input indices [38 to 63]
inputiFFT = fftshift(inputiFFT);
outputiFFT = ifft(inputiFFT,nFFTSize);
% adding cyclic prefix of 16 samples
outputiFFT_with_CP = [outputiFFT(49:64) outputiFFT];
st = [st outputiFFT_with_CP];
end
close all
fsMHz = 20;
[Pxx,W] = pwelch(st,[],[],4096,20);
figure(1)
plot([0:4095]*fsMHz/4095,10*log10(fftshift(Pxx)));
xlabel('frequency, MHz')
ylabel('power spectral density')
title('Transmit spectrum OFDM (based on 802.11a)');
1 件のコメント
chiju
2014 年 6 月 11 日
please any idea on how to find the PAPR and spectrum of an OFDM baseband signal?
参考
カテゴリ
Help Center および File Exchange で OFDM についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!