Beruflich Dokumente
Kultur Dokumente
Experiment Number 7
Submitted by:
R. Saketh B140540EC
R. M. Alagappan B140490EC
Venkatesh. U B140709EC
THEORY:
Rectangular QAM constellations are, in general, sub-optimal in the sense that they
do not maximally space the constellation points for a given energy. However, they
have the considerable advantage that they may be easily transmitted as two pulse
amplitude modulation (PAM) signals on quadrature carriers, and can be easily
demodulated.
The circular QAM constellations highlights the relationship between QAM and PSK.
Although, in general, there is a non-rectangular constellation that is optimal for a
particular M, they are not often used since the rectangular QAMs are much easier to
modulate and demodulate.
nbits=3e5;
M=8;
nBitsPerSym = log2(M);
map_1=[-1+1j,-3+1j,-1-1j,-3-1j,1+1j,3+1j,1-1j,3-1j];
map_2=[2,-2,2j,-2j,(1+j)*sqrt(2),(1-j)*sqrt(2),(-
1+j)*sqrt(2),(-1-j)*sqrt(2)];
map_3=[1+1j,1-1j,-1+1j,-1-1j,3,3j,-3,-3j];
array=[map_1;map_2;map_3];
EsN0dB=0:18;
EbN0dB=EsN0dB-10*log10(nBitsPerSym);
symbErrors = zeros(3,length(EbN0dB));
for h=1:3
map=array(h,:);
figure
plot(real(map),imag(map),'r*');
title('Constellation diagram for Transmitted Symbols');
xlabel('Inphase component');
ylabel('Quadrature component');
axis([-5 5 -5 5]);
sym_map =sqrt(1/6)*map;
refI = real(sym_map);
refQ = imag(sym_map);
simulatedBER(h,:)= zeros(1,length(EbN0dB));
theoreticalBER(h,:) = zeros(1,length(EbN0dB));
theoreticalSER(h,:) = zeros(1,length(EbN0dB));
count=1;
for i=EbN0dB
data_bits=double(rand(1,nbits)>=0.5);
inputSymBin=reshape(data_bits,nBitsPerSym,[])';
b = inputSymBin*(2.^((nBitsPerSym-1):-1:0)).';
s=sym_map(b+1).';
EbN0 = 10.^(i/10);
EsN0 = 10.^(EsN0dB(count)/10);
noiseSigma = sqrt(1./(2*nBitsPerSym*EbN0));
n =
noiseSigma*(randn(1,length(s))+1i*randn(1,length(s)))';
y = s + n;
demodSymbols = zeros(1,length(y));
for j=1:length(y)
[minVal,minindex]=min(sqrt((real(y(j))-
refI(1,:)).^2+...
(imag(y(j))-refQ(1,:)).^2));
demodSymbols(j)=minindex-1;
end
symbErrors_t=b.'-demodSymbols;
symbErrors(h,count)=sum(symbErrors_t(:)~=0)/(nbits/nBitsPerSym
);
demodBits=dec2bin(demodSymbols)-'0';
outputSymBin=reshape(demodBits.',1,[])';
bitErrors=sum(sum(xor(outputSymBin.',data_bits)));
simulatedBER(h,count) = bitErrors/nbits;
theoreticalBER(1,count)= 2*erfc(sqrt((9/14)*EbN0));
theoreticalBER(2,count)= erfc(sqrt(3*EbN0/14))*sin(pi/8);
theoreticalBER(3,count)= 3.5*erfc(sqrt(EbN0));
count=count+1;
end
end
theoreticalSER=(theoreticalBER)*(nBitsPerSym);
figure;
semilogy(EbN0dB,simulatedBER(1,:),'k-o');hold on;
semilogy(EbN0dB,simulatedBER(2,:),'r-*');hold on;
semilogy(EbN0dB,simulatedBER(3,:),'g-+');hold off;
title('BER Vs Eb/N0 (dB) for 8-QAM Modulation-simulated');
legend('rectangular','circular(1)','circular(2)','theoretical'
);
axis('tight');
grid on;
xlabel('Eb/N0 dB');
ylabel('BER - Bit Error Rate');
grid on;
figure;
semilogy(EbN0dB,theoreticalBER(1,:),'k-o');hold on;
semilogy(EbN0dB,theoreticalBER(2,:),'r-*');hold on;
semilogy(EbN0dB,theoreticalBER(3,:),'g-+');hold off;
1. Rectangular
2. Circular (1 Circle)
3. Circular (2 Circles)
2. Constellation diagrams with noise(AWGN).
1. Rectangular
2. Circular (1 Circle)
3. Circular (2 Circles)
3. BER Comparison with theoretical values.
Here it can be seen that the circular 2 constellation has the best BER
performance among the three. This is because the constellation points are the
farthest away from each other in comparison, giving the best performance.
4. Comparison of each scheme with theoretical and simulated.
RESULT:
QAM modulation schemes were implemented as a simulation and their
error performance is evaluated on the basis of BER.