what is the wrong with 4 QAM over awgn is not like therotical BER???

4 views (last 30 days)
clear all close all clc %% Simulation of 4-QAM over AWGN
mod_order =4; % the used modulation order which is 4QAM nsym = 10^5 %% numbser of symbols used SNR = 0:1:20 %% SNR scale %..................................................................... %..................................................................... %...........................Tx (Transmiter)...........................
M = modem.qammod('M',mod_order) ; % QAM modulator t_data= randint (2*nsym,1,2); % random binary qamdata=bi2de(reshape(t_data,nsym,2)); % combining of two binary on one used symbol mod_data= modulate(M,qamdata); % the modulated signal %..................................................................... no_of_error= zeros; % number of errors. ratio=zeros; Norm= 1; %...................................................................... %..............................the used channel and receiver...........
for i=1:length (SNR)
rxSig= mod_data+sqrt(Norm)*sqrt(10^(SNR(i)/10))*sqrt(1/2)*(randn(nsym,1)+1j*randn(nsym,1));
z=modem.qamdemod('M',mod_order); % Demodulator
demod_Data = demodulate (z,rxSig); %%demodulatoed data
data1= de2bi(demod_Data); %%converts the decimle into 2-digit binary.
data2= reshape(data1,2*nsym,1);
[no_of_error(i),ratio(i)]=biterr(t_data , data2);
end
%..............................................................
figure(1)
semilogy(SNR,ratio,'--or','linewidth',2);
hold on;
theoryBer = berawgn(SNR,'qam',mod_order);
semilogy(SNR,theoryBer,'--b','linewidth',2);
axis([0 20 10^-5 1])
legend('BER for 4-QAM over AWGN channel SISO system')
grid on
xlabel('SNR')
ylabel('BER')
title('BER for 4QAM SISO over AWGN channel');

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!