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 个评论
回答(1 个)
Yella
2011-6-14
Do frequency modulation.....
or else do upsampling of the signal that is increasing the sampling rate by padding zeros
1 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 OFDM 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!