ASK SIMULATION USING MATLAB - DCS LAB
Aim: Simulation of ASK modulation and demodulation using MATLAB.
Theory:
Generation of ASK
ASK 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. The data rate is a sub multiple of the carrier frequency. Thus the modulated waveform consists of bursts of a sinusoid.Demodulation of ASK
ASK signal has a well defined envelope. Thus it enables demodulation by an envelope detector. Some sort of decision making circuitry is necessary for detecting the message.Code:
clc;close all;
F1=input('Enter the frequency of carrier=');
F2=input('Enter the frequency of pulse=');
A=3;
t=0:0.001:1;
x=A.*sin(2*pi*F1*t);
u=(A/2).*square(2*pi*F2*t)+(A/2);
v=x.*u;
subplot(3,1,1);
plot(t,x);
xlabel('Time');
ylabel('Amplitude');
title('Carrier');
grid on;
subplot(3,1,2);
plot(t,u);
xlabel('Time');
ylabel('Amplitude');
title('Square Pulses');
grid on;
subplot(3,1,3);
plot(t,v);
xlabel('Time');
ylabel('Amplitude');
title('ASK Signal');
grid on;
Generated Graph:
Enter the frequency of carrier=20
Enter the frequency of pulse=4
Comments
Post a Comment