Program
Program
A) Under Modulation
clc;
clear all;
close all;
t=0:0.01:10;
pi=3.14;
fm=500;
Em=2;
x=Em*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,x);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('modulating signal');
fc=10000;
m=0.5;
Ec=Em/m;
y=Ec*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,y);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('carrier signal');
z=Ec*(1+m*sin(2*pi*fm*t)).*sin(2*pi*fc*t)
subplot(3,1,3);
plot(t,z);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('under modulation');
B)Perfect Modulation
clc;
clear all;
close all;
t=0:0.01:10;
pi=3.14;
fm=500;
Em=2;
x=Em*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,x);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('modulating signal');
fc=10000;
m=1;
Ec=Em/m;
y=Ec*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,y);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('carrier signal');
z=Ec*(1+m*sin(2*pi*fm*t)).*sin(2*pi*fc*t)
subplot(3,1,3);
plot(t,z);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Perfect modulation');
C)Over Modulation
clc;
clear all;
close all;
t=0:0.01:10;
pi=3.14;
fm=500;
Em=2;
x=Em*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,x);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('modulating signal');
fc=10000;
m=2;
Ec=Em/m;
y=Ec*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,y);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('carrier signal');
z=Ec*(1+m*sin(2*pi*fm*t)).*sin(2*pi*fc*t)
subplot(3,1,3);
plot(t,z);
grid on;
xlabel('Time');
ylabel('Amplitude');
title('Over modulation');