Reply by mohamed hussien April 18, 20082008-04-18
Hi,
I'm trying to get the BER for OFDM system but the
result is not correct. Can any one tell me what is the
wrong in my program?
Regards
M. Hussien
This is my program
clear all;
close all;
clc;
% System Parameters
N = 64; % length of OFDM IFFT
M = 16; % number of QAM
constellation points
noz = N/4+1; % number Of Zeros
GI = 1/4; % Guard Interval
BW = 20; % OFDM signal Band width
in MHz
nos = 128; % number of OFDM Symbols
den = 1;
num = ones(64,1)/64;
EbNo = [0:20];
% data generation randint
txd = randint(N-noz,nos,M);
% QAM modulation
txdm = qammod(txd,M);
% zeros padding
txdz = [txdm((N-noz+1)/2:end,:);...
zeros(noz,nos);...
txdm(1:(N-noz+1)/2+1,:)];
% IFFT
txdzi = sqrt(N)*ifft(txdz,N);
% Apply windowing function to each time domain
waveform
for i = 1:64
txdzi1(i,:) = txdzi(i,:);
end
% Guard Interval Insertion
txdzig = [txdzi1((1-GI)*N+1:end,:);txdzi];

% receiver part
% Guard Interval removal
rxdzi = txdzig(GI*N+1 : N+GI*N,:);
% FFT operation
rxdz = 1/sqrt(N)*fft(rxdzi,N);
% zero removal and rearrangement
rxdm = [rxdz((N-(N-noz-1)/2+1):N,:);...
rxdz(1:(N-noz+1)/2,:)];
% demodulation
rxd qamdemod(rxdm/mean(std(rxdm))*mean(std(txd)),M);
%========================================================================= txdzig1 = reshape(txdzi,8192,1);
rxdm1 = reshape(rxdm,6016,1);
ber semianalytic(txdzig1,rxdm1,'qam',M,nos,num,den,EbNo);
figure(1)
semilogy(EbNo,ber); grid on;
title('BER for OFDM');
xlabel('EbNo (dB)'); ylabel('BER');
legend('OFDM')
%