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.

I NEED A MATLAB CODE FOR " BER SC-FDMA & OFDMA

Status
Not open for further replies.

shamir

Newbie level 2
Joined
Aug 9, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
London
Activity points
1,297
HI :
I need a matlab code for BER calculation of SC-FDMA AND OFDMA :
I need to show the simulation for OFDMA AND SC-FDMA:
Kindly if any one have please e-mail me at this id:
shamir_ali786@yahoo.com

Thanks
 

Re: I NEED A MATLAB CODE FOR " BER SC-FDMA & OF

Hi Shamir,

you need that your simulation can calculate ber in the case SFDMA and OFDMA, i believe this is expected to used in LTE, right?

I have code for this, but the thing is i cannot send it for free.
I have spend 3 weeks in it so, if you are interested in that you have to pay 400 pounds

then its all yours

cheers

Kingkong
 

Re: I NEED A MATLAB CODE FOR " BER SC-FDMA & OF

Mr. KingKong, you are charging 400 pounds for a code? God....
 

Re: I NEED A MATLAB CODE FOR " BER SC-FDMA & OF

Mr king kong:
i guess ,i know who are you but the thing is ,if really you have a BER code for ofdma & scfdma ,its a deal i am ready to pay for that :
reply me @ this id ...
shamir_ali786@yahoo.com
thanks:)
 

Re: I NEED A MATLAB CODE FOR " BER SC-FDMA & OF

Dear Shahzad,

Ok its done, i will contact u on ur email.

and cwjcwjcwj

wht did u mean by u r charging 400 pounds? if you want to pay more than its up to u!
feel free to contact me!
 

1) OFDM at frequency selective Fading

Code:
clear all
clc
No_sc=16;
cp=3;
No_tap=3;
No_blocks=3;
No_bits=48;
No_itr=100000;
Max_SNR=40;
Rs=.5^.5;
for SNR=0:5:Max_SNR
SNRab=10^(SNR/10);
sd=sqrt((1/(2*SNRab)));
error=0;
for itr=1:No_itr
data = randint(1,No_bits);
b_data= pskmod(data,2);
for t=1:No_blocks
for f=1:No_sc
bit_block(f)= b_data(No_sc*(t-1)+f);
s= ifft(bit_block);
end
for n=1:(No_sc+cp)
if n<=cp
ss(n)= s(No_sc-cp+n);
else
ss(n)=s(n-cp);
end
end
n=complex(sd*randn(1,No_sc+cp+No_tap-1),sd*randn(1,No_sc+cp+No_tap-1));
alfa=5;
seg=sqrt((1-exp(-1/alfa))/ (1-exp(-3/alfa)));
n3=randn(1,No_tap);
n4=randn(1,No_tap);
Appendix B
434
for l=1:No_tap
h(l)=(n3(l)*0.5+n4(l)*0.5i)*(seg*exp(-l/(2*alfa)));
end
r= conv(ss,h);
rx=r+n ;
for k=1:No_sc
rr(k)=rx(k+3);
end
RR= fft(rr) ;
rt=zeros(1,No_sc) ;
hh=zeros(1,No_sc) ;
hh(1,1:No_tap)=h ;
for qw=1:No_sc
for wq=1:No_sc
rt(qw)= rt(qw)+ (hh(wq)*(exp(-(2*i*pi*(qw-1)*(wq-1))/No_sc))) ;
end
end
for z=1:No_sc
Rx(No_sc*(t-1)+z)= RR(z)/rt(z);
end
end
data_rx = pskdemod(Rx,2);
error=error+sum(xor(data_rx,data));
end
BER((SNR/5)+1)=error/(No_itr*48);
end
x=0:5:Max_SNR;
semilogy(x,BER,'color',[1 0 0],'linewidth',2.5);
grid on
axis([0 Max_SNR .000001 1]);
xlabel('SNR(dB)')
ylabel('BER')

2) OFDM at Rayleigh Fading

Code:
clear all
clc
No_sc=16;
cp=3;
No_tap=3;
No_blocks=3;
No_bits=48;
No_itr=100000;
Max_SNR=40;
Appendix B
435
Rs=.5^.5;
for SNR=0:5:Max_SNR
SNRab=10^(SNR/10);
sd=sqrt(1/(2*SNRab));
error=0;
for itr=1:No_itr
data = randint(1,No_bits);
b_data= pskmod(data,2);
for t=1:No_blocks
for f=1:No_sc
bit_block(f)= b_data(No_sc*(t-1)+f);
s= ifft(bit_block);
end
for n=1:(No_sc+cp)
if n<=cp
ss(n)= s(No_sc-cp+n);
else
ss(n)=s(n-cp);
end
end
n=complex(sd*randn(1,No_sc+cp+No_tap-1),sd*randn(1,No_sc+cp+No_tap-1));
h=complex(Rs*randn(1,No_tap),Rs*randn(1,No_tap));
r= conv(ss,h);
rx=r+n ;
for k=1:No_sc
rr(k)=rx(k+3);
end
RR= fft(rr) ;
rt=zeros(1,No_sc) ;
hh=zeros(1,No_sc) ;
hh(1,1:No_tap)=h ;
for qw=1:No_sc
for wq=1:No_sc
rt(qw)= rt(qw)+ (hh(wq)*(exp(-(2*i*pi*(qw-1)*(wq-1))/No_sc))) ;
end
end
for z=1:No_sc
Rx(No_sc*(t-1)+z)= RR(z)/rt(z);
end
end
data_rx = pskdemod(Rx,2);
error=error+sum(xor(data_rx,data));
end
Appendix B
436
BER((SNR/5)+1)=error/(No_itr*96);
end
x=0:5:Max_SNR;
semilogy(x,BER,'color',[.5 1 0],'linewidth',2.5);
grid on
axis([0 Max_SNR .000001 1]);
xlabel('SNR(dB)')
ylabel('BER')
 

@above there is an error in ur code...what is apendix B please specify?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top