Professional Documents
Culture Documents
AIM:-To Plot The Wave For Amplitude Shift Keying and Then Demonstrate
AIM:-To Plot The Wave For Amplitude Shift Keying and Then Demonstrate
AIM:-To Plot The Wave For Amplitude Shift Keying and Then Demonstrate
ECE – 4001
Submitted to :- Prof Nandakumar S
L-41+42
-Performed By:- Harshit Pandey(18BEC2036)
AIM :- To plot the wave for amplitude shift keying and then demonstrate
the process of demodulation.
ASK demodulation
Model Graph:-
MATLAB Code :-
clc;
clear all;
f=5;
a=2;
n=[1 0 1 1 1 0 0 0];
l=length(n);
if n(l)==1
n(l+1)=1
else
n(l+1)=0
end
num=length(n)
anc=0:num-1;
subplot(4,1,1);
stairs(anc,n);
title('MESSAGE ');
xlabel('TIME');
ylabel('AMPLITUDE');
t=0:0.01:l;
y1=a*sin(2*pi*f*t);
subplot(4,1,2);
plot(t,y1);
title('CARRIER SIGNAL');
xlabel('TIME');
ylabel('AMPLITUDE');
for i=1:l
for j=(i-1)*100:i*100
if(n(i)==1)
s(j+1)=y1(j+1);
else
s(j+1)=0;
end
end
end
subplot(4,1,3);
plot(t,s);
title('MODULATED SIGNAL');
xlabel('TIME');
ylabel('AMPLITUDE');
for i=1:l
for j=(i-1)*100:i*100
if(s(j+1)==y1(j+1))
x(j+1)=1;
else
x(j+1)=0;
end
end
end
subplot(4,1,4);
plot(t,x);
title('DEMODULATED SIGNAL');
xlabel('TIME');
ylabel('AMPLITUDE');
OUTPUT GRAPH :-