VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE
MUMBAI
DEPARTMENT OF ELECTRICAL ENGINEERING
THIRD YEAR B. TECH ELECTRONICS
DIGITAL COMMUNICATION LAB
EXPERIMENT NO. 3A
Submitted by:
Nikhil Nichite (171060041) (Batch A)
1|P a ge
EXPERIMENT NO 3A
AIM: To study BASK demodulation with and without Gaussian noise.
APPARATUS: Scilab 6.0.2
THEORY:
Amplitude Shift Keying ASK is a type of Amplitude Modulation which
represents the binary data in the form of variations in the amplitude of a signal.
Any modulated signal has a high frequency carrier. The binary signal when ASK
modulated, gives a zero value for Low input while it gives the carrier
output for High input. The following figure represents ASK modulated
waveform along with its input.
ASK Demodulator
There are two types of ASK Demodulation techniques. They are −
Asynchronous ASK Demodulation/detection
Synchronous ASK Demodulation/detection
2|P a ge
The clock frequency at the transmitter when matches with the clock frequency
at the receiver, it is known as a Synchronous method, as the frequency gets
synchronized. Otherwise, it is known as Asynchronous.
Asynchronous ASK Demodulator
The Asynchronous ASK detector consists of a half-wave rectifier, a low pass
filter, and a comparator. Following is the block diagram for the same.
The modulated ASK signal is given to the half-wave rectifier, which delivers a
positive half output. The low pass filter suppresses the higher frequencies and
gives an envelope detected output from which the comparator delivers a digital
output.
Synchronous ASK Demodulator
Synchronous ASK detector consists of a Square law detector, low pass filter, a
comparator, and a voltage limiter. Following is the block diagram for the same.
3|P a ge
The ASK modulated input signal is given to the Square law detector. A square
law detector is one whose output voltage is proportional to the square of the
amplitude modulated input voltage. The low pass filter minimizes the higher
frequencies. The comparator and the voltage limiter help to get a clean digital
output.
Additive White Gaussian Noise:
Additive white Gaussian noise (AWGN) is a basic noise model used
in information theory to mimic the effect of many random processes that occur in
nature. The modifiers denote specific characteristics:
Additive because it is added to any noise that might be intrinsic to the
information system.
White refers to the idea that it has uniform to power across the frequency band
for the information system. It is an analogy to the color white which has
uniform emissions at all frequencies in the visible spectrum.
Gaussian because it has a normal distribution in the time domain with an
average time domain value of zero.
In Scilab the AGWN is added with the help of pre-defined function “rand”.
Noise = rand (1,693,"uniform")
4|P a ge
CODE:
1. Without Noise:
clc;
clear;
x=[ 1 0 0 1 1 0 1];
bp=.1;
disp(' Binary information at Trans mitter :');
disp(x);
bit=[];
for n=[Link]length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(4,1,1);
plot(t1,bit,'lineWidth',0.5);
ax=gca();
ax.data_bounds=[0 -0.05;0.7 1.05]
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
A1=10;
A2=0;
br=1/bp;
f=br*10;
t2=bp/99:bp/99:bp;
ss=length(t2);
m=[];
for (i=[Link]length(x))
if (x(i)==1)
y=A1*cos(2*%pi*f*t2);
else
y=A2*cos(2*%pi*f*t2);
end
m=[m y];
end
t3=bp/99:bp/99:bp*length(x);
subplot(4,1,2);
plot(t3,m);
xlabel('time(sec)');
ylabel('amplitude(volt)');
title('waveform for binary ASK modulation coresponding binary information');
5|P a ge
mn=[];
for n=ss:ss:length(m)
t=bp/99:bp/99:bp;
y=cos(2*%pi*f*t);
mm=y.*m((n-(ss-1)):n);
t4=bp/99:bp/99:bp;
z=inttrap(t4,mm)
zz=round((2*z/bp))
if(zz>7.5)
a=1;
else
a=0;
end
mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(4,1,3)
plot(t4,bit,'LineWidth',0.5);
ax=gca();
ax.data_bounds=[0 -0.05;0.7 1.05]
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary ASK demodulation');
subplot(4,1,4)
plot(t2,A1*cos(2*%pi*f*t2),'LineWidth',0.5);
2. With Noise:
clc;
clear;
x=[ 1 0 0 1 1 0 1];
bp=.1;
disp(' Binary information at Trans mitter :');
disp(x);
bit=[];
for n=[Link]length(x)
6|P a ge
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(4,1,1);
plot(t1,bit,'lineWidth',0.5);
ax=gca();
ax.data_bounds=[0 -0.05;0.7 1.05]
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
A1=10;
A2=0;
br=1/bp;
f=br*10;
t2=bp/99:bp/99:bp;
ss=length(t2);
m=[];
for (i=[Link]length(x))
if (x(i)==1)
y=A1*cos(2*%pi*f*t2);
else
y=A2*cos(2*%pi*f*t2);
end
m=[m y];
end
n1=rand(1,693,"uniform")
m=m+n1
t3=bp/99:bp/99:bp*length(x);
subplot(4,1,2);
plot(t3,m);
xlabel('time(sec)');
ylabel('amplitude(volt)');
title('waveform for binary ASK modulation coresponding binary information');
mn=[];
for n=ss:ss:length(m)
t=bp/99:bp/99:bp;
y=cos(2*%pi*f*t);
mm=y.*m((n-(ss-1)):n);
t4=bp/99:bp/99:bp;
z=inttrap(t4,mm)
zz=round((2*z/bp))
if(zz>7.5)
a=1;
else
7|P a ge
a=0;
end
mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(4,1,3)
plot(t4,bit,'LineWidth',0.5);
ax=gca();
ax.data_bounds=[0 -0.05;0.7 1.05]
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary ASK demodulation');
subplot(4,1,4)
plot(t2,A1*cos(2*%pi*f*t2),'LineWidth',0.5);
OUTPUT:
1. Without Noise:
8|P a ge
2. With Noise:
In both the case the output signal recovered matches exactly with that of the input
message signal.
9|P a ge
CONCLUSION:
1. In this experiment we studied BASK demodulation technique with and
without Gaussian noise.
2. Based on the procedure we can conclude that BASK signal is
demodulated in two ways:
i) Asynchronous (The clock frequency at the transmitter didn't
matches with clock frequency at the receiver) ASK detection.
ii) Synchronous (The clock frequency at the transmitter when matches
with clock frequency at the receiver) ASK detection.
Depending upon application we can use both type of detection methods.
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.
10 | P a g e