You are on page 1of 10

DIGITAL COMMUNICATION

LAB REPORT 02

Submitted By:-
Mushtaq Ahmad Dar
2019Pee0032

Indian Institute of Technology


Jammu
Department of Electrical Engineering
Contents

0.1 Aim:- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
0.2 Requirements:- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
0.3 Generation of Different Digital Modulated Signals using Matlab software:- 2
0.3.1 Amplitude Shift Keying (ASK):- . . . . . . . . . . . . . . . . . . . . 2
0.3.2 Phase Shift Keying (PSK):- . . . . . . . . . . . . . . . . . . . . . . . 3
0.3.3 Frequency Shift Keying (FSK):- . . . . . . . . . . . . . . . . . . . . . 6
0.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1
2

0.1 Aim:-
To Generate the following digital Modulated Signals using MATLAB.
1.Amplitude Shift Keying.
2.Phase Shift Keyig.
3.Frequency Shift Keying.

0.2 Requirements:-
Computer with MATLAB Software.

0.3 Generation of Different Digital Modulated


Signals using Matlab software:-
0.3.1 Amplitude Shift Keying (ASK):-
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 modu-
lated, gives a zero value for Low input while it gives the carrier output for High input.

Figure 1: ASK Modulated signal


3

MATLAB program for Amplitude Shift Keying:

clc;
clear all;
t = 0:0.001:1;
%message signal
l= 5*square(2*pi*20*t)+5;
%carrier signal
m= 10*cos(2*pi*80*t);
%modulated signal
p = l.*m;
subplot(4,1,1);
plot(t,l);
xlabel(’time’)
ylabel(’amplitude’)
title(’message signal’)
subplot(4,1,2);
plot(t,m);
xlabel(’time’)
ylabel(’amplitude’)
title(’carrier signal’)
subplot(4,1,3);
plot(t,p);
xlabel(’time’)
ylabel(’amplitude’)
title(’modulated ASK signal’)

0.3.2 Phase Shift Keying (PSK):-


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
4

wave carrier takes two phase reversals such as 0 and 180.

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.

Figure 2: BPSK Modulated signal

MATLAB program for Phase Shift Keying:

clc;
clear all;
%message signal.........................
clear;
clc;
b = [1 0 1 0 1 0 1 0 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
if (b(i) == 0)
b_p(i) = -1;
else
5

b_p(i) = 1;
end
for j = i:.1:i+1
w(x(i*100:(i+1)*100)) = b_p(i);
end
end
w = w(100:end);
subplot(3,1,1)
plot(t,w)
xlabel(’time’)
ylabel(’amplitude’)
title(’message signal’)
%carrier signal....................
m= 10*sin(2*pi*1*t);
subplot(3,1,2)
plot(t,m)
xlabel(’time’)
ylabel(’amplitude’)
title(’carrier signal’)
%%modulated psk signal..............
p=w.*m;
subplot(3,1,3)
xlabel(’time’)
ylabel(’amplitude’)
title(’carrier signal’)
plot(t,p)
xlabel(’time’)
ylabel(’amplitude’)
title(’Modulated PSK signal’)
6

0.3.3 Frequency Shift Keying (FSK):-


Frequency Shift Keying (FSK) is the digital modulation technique in which the frequency
of the carrier signal varies according to the digital signal changes. FSK is a scheme of
frequency modulation.
The output of a FSK modulated wave is high in frequency for a binary High input and
is low in frequency for a binary Low input. The binary 1s and 0s are called Mark and
Space frequencies.

Figure 3: FSK Modulated Signal

MATLAB program for Frequency Shift Keying:

clc;
clear all;
b = [1 0 1 0 1 0 1 0 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
if (b(i) == 0)
b_p(i) = -1;
else
b_p(i) = 1;
7

end
for j = i:.1:i+1
w(x(i*100:(i+1)*100)) = b_p(i);
end
end
w = w(100:end);
fo = 3*(2*pi*t);
f = 2*(2*pi*t);
sin1 = sin(fo+f);
sin2 = sin(fo-f);
p = sin(fo+(w).*f);
subplot(4,1,1)
plot(t,w)
xlabel(’time’)
ylabel(’amplitude’)
title(’message signal’)
grid on ;
subplot(4,1,2)
plot(t,sin1)
grid on ;
subplot(4,1,3)
plot(t,sin2)
grid on ;
subplot(4,1,4)
plot(t,p)
xlabel(’time’)
ylabel(’amplitude’)
title(’modulated FSK signal’)
8

0.4 Results

Figure 4: PSK Modulated signal

Figure 5: FSK Modulated Signal


9

Figure 6: ASK Modulated signal

You might also like