BER in OFDM systems
Afficher commentaires plus anciens
hi matlabers, i am trying to compute BER in ofdm but did not get the curve that i look for.anyone can help me?this is my code..
dataType = '16QAM'; % Modulation format.
totalSubcarriers = 1024; % Number of total subcarriers.
numSymbols = 16; % Data block size.
Fs = 5e6; % System bandwidth.
Ts = 1/Fs; % System sampling rate.
Nos = 4; % Oversampling factor.
Nsub = totalSubcarriers;
Fsub = [0:Nsub-1]*Fs/Nsub; % Subcarrier spacing
numRuns = 1000; % Number of runs.
M=16;
EbN0dB = [0:999];
for n = 1:numRuns,
% Generate random data.
if dataType == '16QAM'
ipBit = randint(1,numSymbols,M);
%Data Modulation
ipMod = (1/sqrt(10))*qammod(ipBit,M); % 16QAM modulation
end
% Time range of the OFDM symbol.dataType = '16QAM'; % Modulation format.
% Time range of the OFDM symbol.
t = [0:Ts/Nos:Nsub*Ts];
% OFDM modulation.
for k = 1:numSymbols,
y= ipMod(k)*exp(j*2*pi*Fsub(k)*t);
data_rx = y.*exp(-j*2*pi*Fsub(k)*t);
data_rx = data_rx(:,1);
end
ipBitHat = qamdemod(data_rx*sqrt(10),M);
nErr(n) = size(find(ipBit - ipBitHat),2);
end
simBer = nErr/numSymbols;
semilogy(EbN0dB,simBer,'bx-','LineWidth',2,'MarkerSize',5);
axis([0 16 10^-5 1]);
grid on
Réponses (0)
Catégories
En savoir plus sur OFDM dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!