You are on page 1of 7

Experiment No.

Date: 19.1.23

Amplitude Modulation and Demodulation

Name: Avinash V
Reg. No. 21BEC1676

AIM: To design an amplitude modulator and demodulator

Software required: MATLAB

Procedure:

1) Open MATLAB online

2) Assign the values for all parameters like message signal-frequency, amplitude and
others

3) Specify the message signal in mathematical form and plot the message signal

4) Give name for the plot and as well as the axes

5) Similarly construct the carrier signal to perform amplitude modulation

6) To perform amplitude modulation use the respective mathematical expression and


obtain the waveform

7) To extract the message signal from AM modulated signal multiply carrier signal
with message signal and use buttord and butterworth command

8) Repeat the process for different type of modulation and observe the output

Diagram and equations:

Amplitude modulation is defined as a system of modulation in which the amplitude of the


carrier is varied in accordance with amplitude of the message signal.

Let the carrier signal be: Vc(t) = Vc sin(2πfct)

Let the message signal be : Vm(t) = Vm sin(2πfmt)

The amplitude modulated signal is given by

VAM = (Vc +Vm sin2πfmt) sin 2πfct


Block Diagram:

Modulation

Modulating
Signal
Generator
A.M
modulator

Carrier
Generator

Demodulation

Modulating
Signal AM AM
Generator Modulator Demodulator

Carrier
Generator

MATLAB code for modulation:

clc
clear all
m=input('Enter the value of modulation index (m)=');
Am=5;
fa=2000;
Ta=1/fa;
t=0:Ta/999:6*Ta;
ym=Am*sin(2*pi*fa*t);
figure (2)
subplot(3,1,1);
plot(t,ym), grid on;
title('Modulating Signal');
xlabel('Time(sec)');
ylabel('Amplitude(Volt');
Ac=Am/m;
m=Am/Ac;
fc=fa*10;
Tc=1/fc;
yc=Ac*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,yc), grid on;
title('Carrier Signal');
xlabel('Time(sec)');
ylabel('Amplitude(Volt)');
y=Ac*(1+m*sin(2*pi*fa*t)).*sin(2*pi*fc*t);
subplot(3,1,3);
plot(t,y);
title('Amplitude Modulated Signal');
xlabel('Time(sec)');
ylabel('Amplitude(Volt');
grid on;

MATLAB Simulation result for AM Modulator:

For ideal modulation(m=1):


For under modulation(m=0.5):

For over modulation(m=3):


MATLAB Simulation result for AM Modulation and Demodulation with equations:

clc
clear all
close all;
%ZZZZZZZZZZ Modulating Signal Generation ZZZZZZZZ
A=3; % Amplitude of modulating Signal
fa=100; % Frequency of modulating signal
T=1/fa; %Period of modulating signal
t=0:T/1000:2*T; % Variable time
ya=A*sin(2*pi*fa*t); % Equation for Modulating signal
figure(1);
subplot(3,1,1);
plot(t,ya); % Graphical representation of Modulating signal
title ( ' Modulating Signal' );
xlabel ( ' time(second) ')
ylabel (' Amplitude(volt) ');

%ZZZZZZZZZZZ Carrrier Signal Generation ZZZZZZZZZZZZZZ


A=5; % Amplitude of Carrier Signal
fc=2000; % Frequency of Carrier signal
yc=A*sin(2*pi*fc*t); % Equation for carrier signal
figure(1);
subplot(3,1,2);
plot(t,yc); % Graphical representation of carrier signal
title ( ' Carrier Signal ' );
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');

%ZZZZZZZZ AM modulated Signal Generation ZZZZZZZZZ


ym=(A+ ya).*sin(2*pi*fc*t);% Equation for AM modulated signal
figure(1)
subplot(3,1,3)
plot(t,ym) % Graphical representation of AM modulated signal
title ( ' AM modulated Signal' );
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');

%ZZZZZZZZZZZZZZZZZZZ Recived signal ZZZZZZZZZZZZZZZZZ


ym=(A+ ya).*sin(2*pi*fc*t); % Equation for Received signal
figure(2)
subplot(4,1,1)
plot(t,ym) % Graphical representation of recived signal signal
title ( ' Received Signal' );
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');
%ZZZZZZZZZZ Carrrier Signal Generation ZZZZZZZZZZZZ
A=5; % Amplitude of Carrier Signal
fc=2000; % Frequency of Carrier signal
yc=A*sin(2*pi*fc*t); % Equation for carrier signal
figure(2)
subplot(4,1,2);
plot(t,yc); % Graphical representation of carrier signal
title ( ' Carrier Signal' );
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');

%%ZZZZZZZZ Multiply Carrier Signal with Received Signal%%%ZZZZZZZ


ymm=ym.*sin(2*pi*fc*t); %Multiply Carrier Signal with Received
Signal
figure(2)
subplot(4,1,3);
plot(t,ymm);
title('Received signal after Multiplication of Carrrier Signal');
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');

%ZZZZZZZZZ Filtering to Findout Modulating Signal ZZZZZZZZZ


[n,wc] = buttord(50/1000,75/1000,0.5,5); % Normalization Cutoff
Frequency
[a b]=butter(2,wc,'low'); % butterworth Low Pass Filter design
sig=filter(a,b,ymm); % Apply given signal to Low pass filter
figure(2)
subplot(4,1,4);
plot(t,2*sig -5);% Graphical representation for outpot signal of AM
receiver
title ('AM Demodulated signal ');
xlabel ( ' time(second) ');
ylabel (' Amplitude(volt) ');

MATLAB Simulation result for AM Modulation:


MATLAB Simulation result for AM Demodulation:

Explanation:

In the demodulation part first we generate the received signal that is basically AM modulated
signal and to extract the message signal we multiply the message the signal with carrier
signal to get message signal then we use buttord and butterworth commands to extract the
more accurate message signal

Inference:

From the modulated waveform we can observe the superimposition of carrier and message
signal and also we observe a bubble shaped signal from this waveform so we can conclude
that AM modulation is done and to verify the modulation output we need demodulate the
same once demodulation is done we can an observe similar signal like message signal hence
verified the result of AM modulation.

Result:

The MATLAB code for AM modulation is done and verified the output using demodulation

You might also like