How To Move OFDM Signal From BaseBand
조회 수: 1 (최근 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!