Professional Documents
Culture Documents
Exp No: 1
Date:
AM GENERATION
Amplitude modulation (AM) is a one of the conventional modulation technique to
transmit signals using a carrier wave. The amplitude or the strength of a high frequency carrier
wave is changed in accordance with the amplitude of message signal.
Carrier signal (Sc) = Acsin(2fct)
Where,
When the signal is amplitude modulated, the amplitude of the high frequency carrier is varied in
accordance with the amplitude of message signal.
Modulation Index or Modulation Depth is the one of the most common term that used along
with modulation techniques. Here in AM, it is the measure of amplitude variation surrounding an
unmodulated carrier. It is the ratio of the amplitude of message signal to the amplitude of carrier
signal.In terms of modulation index (m=Am/Ac) the equation of the modulated signal becomes,
PROGRAM
clc;
clearall;
disp('Menu');
disp('Options:1-Amplitude Modulation and 2-Frequency modulation');
p=input('Enter choice=');
fm=input('Enter the signal frequency =');
fc=input('Enter the carrier frequency =');
fs=input('Enter the sampling frequency =');
t=0:0.001:10;
x=sin(2*pi*fm*t);
subplot(2,1,1);
plot(t,x);
xlabel('Time'),ylabel('Amplitude'),title('MODULATING SIGNAL')
switch(p)
case 1
a=modulate(x,fc,fs,'am');
subplot(2,1,2);
plot(t,a);
xlabel('Time'),ylabel('Amplitude'),title('AMPLITUDE MODULATION')
case 2
b=modulate(x,fc,fs,'fm');
subplot(2,1,2);
plot(t,b);
xlabel('Time'),ylabel('Amplitude'),title('FREQUENCY MODULATION')
otherwise
disp('Invalid choice');
end
SAMPLE OUTPUT
Menu
Options:1-Amplitude Modulation and 2-Frequency modulation
Enter choice=1
Enter the signal frequency =1
Enter the carrier frequency =10
Enter the sampling frequency =700
SAMPLE OUTPUT
Menu
Options:1-Amplitude Modulation and 2-Frequency modulation
Enter choice=2
Enter the signal frequency =.5
Enter the carrier frequency =8
Enter the sampling frequency =1000
amf=(1+(m*sin(2*pi*fm*t))).*sin(2*pi*fc*t);%amplitude modulation
subplot(2,1,1);
plot(t,md);
xlabel('Time'),ylabel('Amplitude'),title('MODULATING SIGNAL');
subplot(2,1,2);
plot(t,amf);
xlabel('Time'),ylabel('Amplitude'),title('AMPLITUDE MODULATION');
SAMPLE OUTPUT
Enter the signal frequency =1
Enter the carrier frequency =8
Enter the modulation index =.7
subplot(2,1,2);
plot(t,fmf);
xlabel('Time'),ylabel('Amplitude'),title('FREQUENCY MODULATION')
SAMPLE OUTPUT
Program:
clc;
clear
all;
0:0.001:1;
vm
input('Enter
the
amplitude
of
message
signal
');
vc
input('Enter
the
amplitude
of
carrier
signal
');
fm
input('Enter
the
message
fc
input('Enter
the
carrier
input('Enter
sm
modulation
=
frequency
frequency
index
');
');
');
vm*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,sm);
xlabel('Time
---->');
ylabel('Amplitude
---->');
title('Message
Signal');
grid
on;
sc
vc*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,sc);
xlabel('Time
---->');
ylabel('Amplitude
---->');
title('Carrier
Signal');
grid
y
on;
=
vc*sin(2*pi*fc*t+m.*sin(2*pi*fm*t));
subplot(3,1,3);
plot(t,y);
xlabel('Time
---->');
ylabel('Amplitude
---->');