Академический Документы
Профессиональный Документы
Культура Документы
DIGITAL COMMUNICATION
EXPERIMENT NO: - 04
AIM: -To Determine the Error Performance of QPSK & 4-ASK Modulation Techniques in AWGN
Channel.
counter_1=0;
for i=1:10000
s(i)=A(1)+ps*d(i);
if(s(i)>-2)
counter_1=counter_1+1;
end
end
k=randn(1,10000);
scatter(s,k);
hold on
counter_2=0;
MUSHTAQ AHMAD DAR 2019PEE0032
for j=1:10000
t(j)=A(2)+ps*d(j);
if(t(j)<-2)||(t(j)>0)
counter_2=counter_2+1;
end
end
k=randn(1,10000);
scatter(t,k);
hold on
counter_3=0;
for m=1:10000
u(m)=A(3)+ps*d(m);
if(u(m)<0)||(u(m)>2)
counter_3=counter_3+1;
end
end
k=randn(1,10000);
scatter(u,k);
hold on
counter_4=0;
for n=1:10000
v(n)=A(4)+ps*d(n);
if(v(n)<2)
counter_4=counter_4+1;
end
end
k=randn(1,10000);
scatter(v,k);
hold on
Pe(snrdb)=0.25*(counter_1/10000+counter_2/10000+counter_3/10000+counter_4/100
00);
end
figure;
semilogy(snr,Pe,'G*-');
hold on;
M=10.^(snr./10);
f=sqrt(2*M);
p=1.5*qfunc(f);
semilogy(snr,p);
xlabel('snrdb');
ylabel('prob of error');
title('probability of error of 4-ASK')
MUSHTAQ AHMAD DAR 2019PEE0032
RESULT: -
QPSK stands for Quadrature Phase Shift Keying. It is digital modulation technique. QPSK is
bandwidth efficient as each signal point represents two bits.
Instead of a phase shift of 180 degree, as allowed in BPSK, a common encoding technique, known
as QPSK uses phase shifts of multiples of 90 degrees
QPSK modulation can be represented mathematically as mentioned below.
S(t)= A* cos(2*pi*fc*t + pi/4) for '11' input bits
S(t)= A *cos(2*pi*fc*t + (3*pi4)/4) for '01' input bits
S(t)= A *cos(2*pi*fc*t -(3*pi4)/4) for '00' input bits
S(t)= A *cos(2*pi*fc*t -pi/4) for '10' input bits
MUSHTAQ AHMAD DAR 2019PEE0032
It converts two binary bits represented simultaneously at the input to the complex signal S(t) or d as
mentioned. This complex signal selects one of the four phases based on two binary digits. Each state
of the complex signal or waveform is called as symbol.
For QPSK, input bit stream needs to break up to two-two bits and later these two bits are entered
simultaneously to the input of the QPSK modulator. Hence, as shown in the constellation diagram for
the input of 11 the output is (1+j*1) *KMOD, where KMOD is normalization factor. For most of the
systems KMOD is 0.707
As mentioned this output of 0.707+j*0.707 is called as symbol which represent two binary
information digits.
MUSHTAQ AHMAD DAR 2019PEE0032
x(k)=cos(2*pi*(k-1)/4+pi/4);
y(k)=sin(2*pi*(k-1)/4+pi/4);
z(k)=x(k)+i*y(k);
end
counter_1=0;
for j=1:10000
s(j)=z(1)+n(j);
theta=angle(s(j));
if theta>0&&theta<1.5700
counter_1=counter_1+1;
end
end
counter_2=0;
for j=1:10000
s(j)=z(2)+n(j);
theta=angle(s(j));
if theta<3.14 && theta>1.5700
counter_2= counter_2+1;
end
end
counter_3=0;
for j=1:10000
s(j)=z(3)+n(j);
theta=angle(s(j));
if theta>-3.14 && theta<-1.5700
counter_3=counter_3+1;
end
end
counter_4=0;
for j=1:10000
s(j)=z(4)+n(j);
theta=angle(s(j));
if theta>-1.5700 && theta<0
counter_4=counter_4+1;
end
end
Pe(snr)=1-(((counter_1+counter_2+counter_3+counter_4))*(1/40000));
end
figure;
semilogy(Snr,Pe,'G*-');
hold on;
snrdb1=1:1:14;
MUSHTAQ AHMAD DAR 2019PEE0032
snr1=10.^(snrdb1/10);
pp=qfunc(sqrt(snr1./2));
semilogy(snrdb1,pp);
grid;
xlabel('snrdb');
ylabel('prob of error');
title('probability of error of psk');
legend('Simulation ','Analytical')
RESULT: -