MATLAB SNR Vs Probability of Symbol Error Curve For M-ary QAM in AWGN channel: Error Probability Curve For M-ary QAM
QAM(Quadrature amplitude modulation) is extensively used in digital data
radio & data communications applications. A variety of
forms of QAM are available and some of the more common forms include 4QAM, 8QAM, 16
QAM, 32 QAM, 64 QAM & 128 QAM.
The advantage of using QAM is that its higher M-ary type is able to carry more bits of information
per symbol, with a very less significant degradation in channel performance. Thus, selecting a higher order format of QAM, the data rate of transmission can be increased.
For the constellation diagram & other advanced information you can get various resources over the internet, you need to just search it with the right keyword.
Now, coming to the MATLAB implementation part.
SNR Vs Probability of Symbol Error Curve For M-ary QAM in AWGN channel: Error Probability Curve For M-ary QAM
%Here we have plotted for the following M-ary schemes, 4,8,16,32,64 & 128-ary QAM.
%different colors have been used to indicate different M-ary plot.
clc
close all
clear all
lc = ['m','r','g','b','k','c']; %for diffrent color plot for each M-ary
nsample = 1; % number of samples per symbol, default it is 1
M = 4; %starting M-ary number
for i = 1:6
snr = 0:2:30; %till 30 dB
nbits = log2(M); %calculating the number of bits per symbol
esym = snr + 10*log(nbits) + 10*log(nsample); %energy of symbol
esyml = db2mag(esym); %converting dB to linear scale
pe = 4*qfunc(sqrt(3*esyml/(M-1))); %probability of error
semilogy(snr,pe,lc(nbits-1)) %plotting the error curve
hold on
M = M*2; %doubling the M in M-ary system
end
xlabel('SNR (dB)')
ylabel('Probability of Error')
title('Symbol Error Probability Curve of M-ary QAM')
grid on
legend('M = 4','M = 8','M = 16','M = 32', 'M = 64', 'M = 128')
close all
clear all
lc = ['m','r','g','b','k','c']; %for diffrent color plot for each M-ary
nsample = 1; % number of samples per symbol, default it is 1
M = 4; %starting M-ary number
for i = 1:6
snr = 0:2:30; %till 30 dB
nbits = log2(M); %calculating the number of bits per symbol
esym = snr + 10*log(nbits) + 10*log(nsample); %energy of symbol
esyml = db2mag(esym); %converting dB to linear scale
pe = 4*qfunc(sqrt(3*esyml/(M-1))); %probability of error
semilogy(snr,pe,lc(nbits-1)) %plotting the error curve
hold on
M = M*2; %doubling the M in M-ary system
end
xlabel('SNR (dB)')
ylabel('Probability of Error')
title('Symbol Error Probability Curve of M-ary QAM')
grid on
legend('M = 4','M = 8','M = 16','M = 32', 'M = 64', 'M = 128')
Result of the above code execution:(Click on the image to Enlarge)
MATLAB SNR Vs Probability of Symbol Error Curve For M-ary QAM in AWGN channel: Error Probability Curve For M-ary QAM |
Feel free to comment if you git a better code for it. I will be posting that too as the extension to this article.
0 comments: