Digital Communication Systems: Name:D.V.Sahithi REGNO:18BEC2011 SLOT:L29+L30 Faculty:Prof - Velmuragn.T
Digital Communication Systems: Name:D.V.Sahithi REGNO:18BEC2011 SLOT:L29+L30 Faculty:Prof - Velmuragn.T
( LAB )
NAME:D.V.SAHITHI
REGNO:18BEC2011
SLOT:L29+L30
FACULTY:PROF.VELMURAGN.T
Title: Generation of Amplitude Shift Keying Signal
Task: 1A
Date: 31/7/20
Aim:
To generate Amplitude Shift Keying Signal (Modulated and Demodulated Signal) using
MATLAB.
Theory: Amplitude Shift Keying (ASK) is the digital modulation technique. In amplitude
shift keying, the amplitude of the carrier signal is varied to create signal elements. Both
frequency and phase remain constant while the amplitude changes. In ASK, the amplitude
of the carrier assumes one of the two amplitudes dependent on the logic states of the input
bit stream.
Amplitude shift keying (ASK) in the context of digital signal communications
is a modulation process, which imparts to a sinusoid two or more discrete amplitude levels.
These are related to the number of levels adopted by the digital message. For a binary
message sequence there are two levels, one of which is typically zero. Thus the modulated
waveform consists of bursts of a sinusoid. Figure 1 illustrates a binary ASK signal (lower),
together with the binary sequence which initiated it (upper). Neither signal has been band
limited.
Algorithm:
1. Represent message signal
Mt =[1 0 1 0]
2. Represent carrier signal
X(t)=A sin 2pi f t
3. Representation of Modulated signal using for and if loop
4. Representation of demodulated signal
5.Reconstruction of binary sequence
Progam:
clc
clear all
close all
fc=input('enter the frequency of sine wave carrier:');
fp=input('enter the frequency of periodic binary pulse(message):');
amp=input('enter the amplitude (for carrier and binary pulse message):');
t=0:0.001:1;
c=amp.*sin(2*pi*fc*t);
subplot(3,3,1)
plot(t,c)
xlabel('time')
ylabel('amplitude')
title('carrier wave')
m=amp/2.*square(2*pi*fp*t)+(amp/2);
subplot(3,1,2)
plot(t,m)
xlabel('time')
ylabel('amplitude')
title('binary message pulses')
w=c.*m;
subplot(3,1,3)
plot(t,w)
xlabel('time')
ylabel('amplitude')
title('amplitude shift keyed signal')
Graphical Output (Captured Photo):
Result:
Thus, we have generated the Amplitude Shift Keying modulated signal. Also we have
generated the demodulated signal.
Verification Signature
Date:31 /7/20
Aim:
To generate Frequency Shift Keying Signal (Modulated and Demodulated Signal) using
MATLAB.
Theory:
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 (corresponding to the carrier
wave 1 in this case) for a binary High input and is low in frequency (corresponding to carrier
wave 2 in this case) for a binary Low input.
Algorithm:
1. Get the message signal in the form of binary values in an array.
2. With the given values of amplitude, time-period and frequency of the carrier
signal, we generate the carrier signal 1 using:
Ct1=Amplitude1*sin(2*pi*fc1*time).
Program
clc
clear all
close all
Mt=[1 0 1 1 0 1]
subplot(5,1,1)
stairs(Mt)
ylabel('Amplitude')
xlabel('Time')
title('Message Signal')
Amp=5
fc1=10
fc2=5
t=1:0.01:5
c1=Amp*sin(2*pi*fc1*t)
subplot(5,1,2)
plot(c1)
ylabel('Amplitude')
xlabel('Time')
title('High frequency carrier signal')
c2=Amp*sin(2*pi*fc2*t)
subplot(5,1,3)
plot(c2)
ylabel('Amplitude')
xlabel('Time')
title('Low frequency carrier signal')
for i=1:length(Mt)
for j=(i-1)*60:i*60
if Mt(i)==1
Mod(j+1)=c1(j+1)
else
Mod(j+1)=c2(j+1)
end
end
end
subplot(5,1,4)
plot(Mod)
ylabel('Amplitude')
xlabel('Time')
title('Modulated Signal')
for i=1:length(Mt)
for j=(i-1)*60:i*60
if Mod(j+1)==c1(j+1)
Demod(j+1)=c1(j+1)./c1(j+1);
else
Demod(j+1)=0;
end
end
end
subplot(5,1,5)
stairs(Demod)
ylabel('Amplitude')
xlabel('Time')
title('Demodulated Signal')
Output:
FSK Modulation
Result:
Thus, we have generated the Frequency Shift Keying modulated signal. Also we have
retrieved the demodulated signal from the modulated FSK signal.
Verification Signature:
Title: Generation of Phase Shift Keying Signal
Task: 1C
Date: 7/8/20
Aim:
To generate phase Shift Keying Signal (Modulated and Demodulated Signal) using
MATLAB.
Theory:
Phase Shift Keying : In carrier-phase modulation, the information that is transmitted over
a communication channel is impressed on the phase of the carrier. Science the range of the
carrier phase is 0 ≤ θ ≤ 2Π,the carrier phases used to transmit digital information via digital-
phase modulation are θm=2Πm/M, for m=0,1,2…..,M-1.Thus for binary phase
modulation(M=2),the two carrier phase are θ0 =0 and θ1 = Π radian. For M-array phase
modulation=2k, where k is the number of information bits per transmitted symbol.
.
Algorithm:
1)Enter the bit sream [0 1 0 1 1 1]
2)The general representation of a set of M carrier-phase-modulated signal
waveforms is um (t) = AgT(t) cos(2Πfct+2Πm/M) , m=0,1,………,M-1
3) enter thebandwidth = bw(x(i*100:(i+1)*100)) = b_p(i);
4)Finally we plot all the signals.
Program:
clear;
clc;
b = input('Enter the Bit stream \n '); %b = [0 1 0 1 1 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;
end
for j = i:.1:i+1
bw(x(i*100:(i+1)*100)) = b_p(i);
end
end
bw = bw(100:end);
sint = sin(2*pi*t);
st = bw.*sint;
subplot(3,1,1)
plot(t,bw)
grid on ;
axis([0 n -2 +2])
subplot(3,1,2)
plot(t,sint)
grid on ; axis([0 n -2 +2])
subplot(3,1,3)
plot(t,st)
grid on ;
axis([0 n -2 +2])
Output:
Enter the bitsream
[1 0 1 1 0 0 0]
Enter the bit stream
[0 1 0 0 1 1 1 0]
PSK Modulation
Results:
Thus, we have generated the Phase Shift Keying modulated signal. Also we have retrieved
the demodulated signal from the modulated PSK signal.
Verification Signature: