Professional Documents
Culture Documents
LAB REPORT 02
Submitted By:-
Mushtaq Ahmad Dar
2019Pee0032
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.
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’)
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
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