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 ber for ofdm system in matlab

Status
Not open for further replies.

vaibhav mishra

Newbie level 3
Joined
May 9, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
hello , i need help for my matlab program for calculating ber for ofdm system..actually in my program i am got getting right curve for simulated result so plezz help me to knw where the problem is ..my progam is written below ...... plezz help me to get this done.

M=2;
N = 4;
G=N/4;
nsym = 2;
EbN0dB = [0:35];
EsN0dB = EbN0dB + 10*log10((N)/(N+G));
for ii = 1:length(EbN0dB)
data=randsrc(1,N*nsym,[0:M-1]);
psk_data=pskmod(data,M);
xF = reshape(psk_data,N,nsym).';
xt1 =ifft(xF.').';
xt = [xt1:),[N-G+1:N]) xt1];
yt1 = sqrt(N+G/N)*xt;
yt = yt1:),[G+1:N+G]);
yF = fft(yt.').';
yMod = reshape(yF.',N*nsym,1).';
psk_dataout=fft(yMod);
nErr(ii) = size(find(psk_dataout -data),2);
end
simBer = nErr/(nsym*N);
theoryBer = (1/2)*erfc(sqrt(10.^(EbN0dB/10)));
close all; figure
semilogy(EbN0dB,theoryBer,'bs-','LineWidth',2);
hold on
semilogy(EbN0dB,simBer,'mx-','LineWidth',2);
axis([0 10 10^-5 1])
grid on
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top