Sunteți pe pagina 1din 8

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE

MUMBAI

DEPARTMENT OF ELECTRICAL ENGINEERING


THIRD YEAR B. TECH ELECTRONICS
DIGITAL COMMUNICATION LAB

EXPERIMENT NO. 3C

Submitted by:
Nikhil Nichite (171060041) (Batch A)

1|P a ge
EXPERIMENT NO 3C

AIM: To study BPSK demodulation with and without Gaussian Noise.


APPARATUS: Scilab 6.0.1
THEORY:

Phase Shift Keying PSK is the digital modulation technique in which the phase of the
carrier signal is changed by varying the sine and cosine inputs at a particular time. PSK
technique is widely used for wireless LANs, bio-metric, contactless operations, along
with RFID and Bluetooth communications.

PSK is of two types, depending upon the phases the signal gets shifted. They are −

Binary Phase Shift Keying BPSK

This is also called as 2-phase PSK or Phase Reversal Keying. In this technique, the sine
wave carrier takes two phase reversals such as 0° and 180°.

BPSK is basically a Double Side Band Suppressed Carrier DSBSC modulation scheme,
for message being the digital information.

Quadrature Phase Shift Keying QPSK

This is the phase shift keying technique, in which the sine wave carrier takes four phase
reversals such as 0°, 90°, 180°, and 270°.

If this kind of techniques are further extended, PSK can be done by eight or sixteen
values also, depending upon the requirement.

BPSK Demodulator

The block diagram of BPSK demodulator consists of a mixer with local oscillator
circuit, a bandpass filter, a two-input detector circuit. The diagram is as follows.

2|P a ge
By recovering the band-limited message signal, with the help of the mixer circuit and
the band pass filter, the first stage of demodulation gets completed. The base band
signal which is band limited is obtained and this signal is used to regenerate the binary
message bit stream.

In the next stage of demodulation, the bit clock rate is needed at the detector circuit to
produce the original binary message signal. If the bit rate is a sub-multiple of the carrier
frequency, then the bit clock regeneration is simplified. To make the circuit easily
understandable, a decision-making circuit may also be inserted at the 2nd stage of
detection.

CODE:
1. Without Noise:
clear all
clc
f=input('enter frequency in Hz:')
t=0:0.0001:1
x1=sin(2*%pi*f*t);
x2=sin((2*%pi*f*t)+%pi)
message=[];
carrier1=[];
carrier2=[];
I=input('Enter binary data:')
for i=1:length(I)
if(I(i))==1
m_s=ones(1,length(t));
else
m_s=zeros(1,length(t));

3|P a ge
end
message=[message,m_s];
carrier1=[carrier1,x1]
carrier2=[carrier2,x2]
end
psk=[];
for n=1:length(I)
if(I(n)==1)
psk=[psk,x2];
else
psk=[psk,x1]
end
end
subplot(4,1,1);
plot(message,"r");
xtitle('Y15EC847 Message Signal');
xlabel('Time---->');
ylabel('Amplitude--->');
subplot(4,1,2);
plot(carrier1,"g");
xtitle('Carrier Signal');
xlabel('Time---->');
ylabel('Amplitude--->');
subplot(4,1,3);
plot(psk);
xtitle('Modulated Signal');
xlabel('Time---->');
ylabel('Amplitude--->');

//demodulation
xdemod1=[];
xdemod2=[];
demod=[];
xdemod1=psk.*carrier1;
xdemod2=psk.*carrier2;
xdemod=xdemod2-xdemod1;
for i=1:length(I)
if i==1
s=sum(xdemod(1:length(t)))
else
s=sum(xdemod((i-1)*length(t):i*length(t)))
end
if(s>0)
demod=[demod,zeros(1,length(t))]
else
demod=[demod,ones(1,length(t))]
end

end

subplot(4,1,4);

4|P a ge
plot(demod);
xtitle('DeModulated Signal');
xlabel('Time---->');
ylabel('Amplitude--->');

2. With Noise:
clear all
clc
f=input('enter frequency in Hz:')
t=0:0.0001:1
x1=sin(2*%pi*f*t);
x2=sin((2*%pi*f*t)+%pi)
message=[];
carrier1=[];
carrier2=[];
I=input('Enter binary data:')
for i=1:length(I)
if(I(i))==1
m_s=ones(1,length(t));
else
m_s=zeros(1,length(t));
end
message=[message,m_s];
carrier1=[carrier1,x1]
carrier2=[carrier2,x2]
end
psk=[];
for n=1:length(I)
if(I(n)==1)
psk=[psk,x2];
else
psk=[psk,x1]
end
end
n1=rand(1,80008,"uniform")
psk=psk+n1;
subplot(4,1,1);
plot(message,"r");
xtitle('Y15EC847 Message Signal');
xlabel('Time---->');
ylabel('Amplitude--->');
subplot(4,1,2);
plot(carrier1,"g");
xtitle('Carrier Signal');
xlabel('Time---->');
ylabel('Amplitude--->');
subplot(4,1,3);
plot(psk);
xtitle('Modulated Signal');
xlabel('Time---->');
ylabel('Amplitude--->');

5|P a ge
//demodulation
xdemod1=[];
xdemod2=[];
demod=[];
xdemod1=psk.*carrier1;
xdemod2=psk.*carrier2;
xdemod=xdemod2-xdemod1;
for i=1:length(I)
if i==1
s=sum(xdemod(1:length(t)))
else
s=sum(xdemod((i-1)*length(t):i*length(t)))
end
if(s>0)
demod=[demod,zeros(1,length(t))]
else
demod=[demod,ones(1,length(t))]
end

end

subplot(4,1,4);
plot(demod);
xtitle('DeModulated Signal');
xlabel('Time---->');
ylabel('Amplitude--->');

OUTPUT:

6|P a ge
1. Without Noise:

2. With Noise:

7|P a ge
CONCLUSION:
1. In this experiment we studied BPSK demodulation technique with and without
Gaussian noise.
2. Based on the procedure we can conclude that PSK signal is demodulated in two
ways:
i) translation back to baseband, with recovery of the bandlimited message
waveform.
ii) regeneration from the bandlimited waveform back to the binary message
bit stream.
Translation back to baseband requires a local, synchronized carrier.
3. While Scilab implementation of this demodulation technique we had done
demodulation with as well as without noise.
4. For with noise type, we use Additive White Gaussian Noise (AWGN). Because
it is a basic noise model used in information theory to mimic the effect of many
random processes that occur in nature. It has properties like Additive Property,
Uniform power Spectra property and possess Gaussian Distribution (because
noise is often the result of summing a large number of different and independent
factors, which allows to apply an important result from probability and
statistics, like the central limit theorem. This type of approximation improved as
more variables are summed in. also, other reasons are almost all variables are
distributed approximately normally and requires only two variables mean and
Standard deviation for Mathematical calculation purpose.
In a nutshell, Gaussian is a normal distribution in the time domain with an
average time domain value of zero.
5. In Scilab the AGWN is added with the help of pre-defined function “rand”.

Noise = rand (1,693,"uniform")

6. In both the cases we found that the output signal recovered matches exactly with
that of the input message signal.

8|P a ge

S-ar putea să vă placă și