Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with code for simulating BPSK in OFDM system

Status
Not open for further replies.

Eng.Mohammed

Newbie level 4
Joined
Feb 20, 2007
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,320
when I simulated BPSK under Raleigh fading the simulated results was exactly as theoretical but when I use BPSK in OFDM system the result Untill 15dB like BPSK without OFDM but after that error floor occurred.
Can any one tell me what is the wrong???
PLZ help me
 

Re: OFDM Under Fading

below i inserted the code to read it and tell me where is the problem

clc
clear all

Esdb=0:5:50;
k1=0:length(Esdb);
Es=10.^(db/10);
sigma=sqrt(1/2);
snr=db;
NN=100000;
N=32;
Xn55=(rand(1,NN))>0.5; %%% Random data
Xn1=double(Xn55);
Xn5=(reshape(Xn1,N,[]))';

for k1=1:length(db)
for pp=1:(NN/N)
Xn3=Xn5(pp,:);
Xn2 =pskmod(Xn3,2);
Xn=Xn2.*sqrt(Es(k1));
Xk1=sqrt(N)*ifft(Xn);


% %%%%% Channel


a=1; %channel fading parameter
b=1/a; %% because we normalize the power
y= sqrt(gamrnd(a,b,1,N)); % N: OFDM block size , nakagami chamnnel
rNoisr=randn(1,N);
rNoisi=randn(1,N);
Gnoise=rNoisr+sqrt(-1)*rNoisi;
Xtch=Xk1.*y+(sigma*(Gnoise));





%%%%% Reconstruction


Xnr=fft(Xtch)/sqrt(N);
Xrec=pskdemod(Xnr,2);
Xrec5(pp,:)=Xrec;
end
Xrect=reshape(Xrec5',1,[]);
[num,rt]=symerr(Xrect,Xn1);
pe(k1)=rt;
k1
end
semilogy(db,pe,'--')
grid
hold on
 

Re: OFDM Under Fading

Can any one tell me the problem?????
 

Re: OFDM Under Fading

It is Kind of you to help me
 

Re: OFDM Under Fading

seems that no one knows till now Mohammad...i took these stuff in college but didn't continue in them at work, so i forgot all about them :( but when i have some free time soon i'll take a look and try to help you isA...i hope i could have helped now !
 

Re: OFDM Under Fading

It is kind of you to help me, I worked hardly on it but i did not not find the problem, I hope to find time to help me
 

Re: OFDM Under Fading

I have just run your program
maybe the way you add fading is not right, in this setence

Xtch=Xk1.*y+(sigma*(Gnoise));

y should be your channel fading,
your channel fading is the same length as your symbol
your symbol hasn't CP
the way of adding fading in time domain should use convolution
if you add fading in your system, you should do channel estimation and compensation
 

Re: OFDM Under Fading

y is rayleigh fading, so it is multiplicative noise.
I do not compensate BPSK without OFDM, so I think the two results should be the same, but this did not occur
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top