from
BER of M-QAM over Rayleigh channel
by Sourav Mondal
This program gives simulated results of BER over Rayleigh fading channel.
|
| qam_run.m |
% simulation for M-QAM transmission
M=input('Enter the order of M-QAM, M(2^k) =');
EbNodB = [0:2:20];
EbNolin = 10.^(EbNodB/10) ;
Pe_sim=[];
for i = 1:11,
Pe_sim=[Pe_sim QAM_rayleigh(M, EbNodB(i))];
end
% plotting the simulated data
semilogy(EbNodB,Pe_sim,'rd')
hold on
% comparing with theoretical results
if(M==4)
a=1;
else
a=4/log2(M);
end
b=3*log2(M)/(M-1);
Pe=[];
for i = 1:11,
Pe= [Pe 0.5*a*(1-sqrt(0.5*b*EbNolin(i)/(1+0.5*b*EbNolin(i))))];
end % Ref: Wireless Communication, A. Goldsmith
semilogy(EbNodB,Pe)
xlabel('snr, EbNo(dB)');
ylabel('Bit error probability, Pe');
title('Comparison between theoretical & simulated results of BER of M-QAM');
legend('simulated result','theoretical results');
hold off
|
|
Contact us