Amplitude modulation & demodulation signal
Mostrar comentarios más antiguos
hey there, can anybody help me .. i had run the code but the graph doesnt want to appear..anybody can help me..thank you
t=linspace(0,0.02,10000);
fc=5000;
fm=200;
fs=40000;
Am=5;
Ac=10;
m=(Am/Ac);
wc=(2*pi*fc*t);
wm=(2*pi*fm*t);
ec=(Ac*sin(wc));
em=(Am*sin(wm));
y=(Ac*(l+m*sin(wm).*sin(wc)));
d=(y.*ec);
dl=(conv(d,exp(-t/0.000795)));
l=10000;
subplot(4,1,1),plot(t(1:1),em(1:1))
xlabel('time(sec)');
ylabel('amplitude in volts(V)');
title('MODULATING SIGNAL');
subplot(4,1,2),plot(t(1:1),ec(1:1))
xlabel('time(sec)');
ylabel('amplitude in volts(V)');
title('CARRIER SIGNAL');
subplot(4,1,3),plot(t(1:1),ec(1:1))
xlabel('time(sec)');
ylabel('amplitude in volts(V)');
title('MODULATED SIGNAL');
subplot(4,1,4),plot(t(1:1),ec(1:1))
xlabel('time(sec)');
ylabel('amplitude in volts(V)');
title('DEMODULATED SIGNAL');
1 comentario
Ashik Ali
el 24 de Mzo. de 2022
%%
% $$ %% AM Modulation and Demodulation using Functions in MATLAB
%% Modulation index
h= 60;
%% Time Pereiod of Simulation :
t = linspace(0, 0.2, 100000);
%% Message Signal :
Am = 14;
fm = 200;
ym = Am*cos(2*pi*fm*t);
figure;
subplot(4, 1, 1);
plot(t(1:10000), ym(1:10000));
title('Message Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Carrier Signal :
Ac = Am/h;
fc = 2000;
yc = Ac*cos(2*pi*fc*t);
subplot(4, 1, 2);
plot(t(1:10000), yc(1:10000));
title('Carrier Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Modulated Signal :
y = ammod(ym, fc, 100000, 0, Ac);
subplot(4, 1, 3);
plot(t(1:10000), y(1:10000));
title('Modulated Signal');
xlabel('time(t)');
ylabel('Amplitude');
%% Demodulated Signal :
z = amdemod(y, fc, 100000, 0, Ac);
subplot(4, 1, 4);
plot(t(1:10000), z(1:10000));
title('Demodulated Signal');
xlabel('time(t)');
ylabel('Amplitude');
ylim([-10, 10]);
Respuesta aceptada
Más respuestas (2)
LAKSHMI CHAITRA NUNNA
el 16 de Abr. de 2021
%**********AMPLITUDE MODULATION AND DEMODULATION***********%
close all;
clear all;
clc;
fs=8000; %SAMPLE FREQUENCY
fm=20; %THREE MESSAGE SIGNAL FREQUENCY
fc=500; %CARRIER FREQUENCY
Am=1; %MESSAGE AMPLITUDE
Ac=1; %CARRIER AMPLITUDE
t=[0:0.1*fs]/fs; %TIME DURATION
m=Am*cos(2*pi*fm*t);
c=Ac*cos(2*pi*fc*t);
ka=0.5;
u=ka*Am;
s1=Ac*(1+u*cos(2*pi*fm*t)).*cos(2*pi*fc*t);
subplot(4,3,1:3);
plot(t,m);
title('Modulating or Message signal(fm=20Hz)');
subplot(4,3,4:6);
plot(t,c);
title('Carrier signal(fc=500Hz)');
subplot(4,3,7);
plot(t,s1);
title('Under Mod signal');
Am=2;
ka=0.5;
u=ka*Am;
s2=Ac*(1+u*cos(2*pi*fm*t)).*cos(2*pi*fc*t);
subplot(4,3,8);
plot(t,s2);
title('Exact Mod signal');
Am=5;
ka=0.5;
u=ka*Am;
s3=Ac*(1+u*cos(2*pi*fm*t)).*cos(2*pi*fc*t);
subplot(4,3,9);
plot(t,s3);
title('Over Mod signal');
r1=s1.*c;
[b a]=butter(1,0.01); %BUTTERWORTH FILTER
mr1=filter(b,a,r1); %DEPTH OF MODULATION
subplot(4,3,10);
plot(t,mr1);
title('DeModulated signal');
r2=s2.*c;
[b a]=butter(1,0.01);
mr2=filter(b,a,r2);
subplot(4,3,11);
plot(t,mr2);
title('DeModulated signal');
r3=s3.*c;
[b a]=butter(1,0.01);
mr3=filter(b,a,r3);
subplot(4,3,12);
plot(t,mr3);
title('DeModulated signal');
Katkoju Ajay kumar
el 16 de Abr. de 2023
0 votos
* AM DSBFC Demodulation Circuit
V1 1 0 AC 50mV 50kHz
V2
2 0 AC 80mV 50Hz
M1
3 1 2 0 Multiplier
C1
4 3 1nF
R1
5 4 10k
D1
6 5 Diode
C2
7 6 1nF
R2
8 7 10k
Rload
9 8 1k
Osc
0 Rload
.model Diode D
.tran 0.1ms 200ms
.control
run
plot
V(1), V(2), V(9)
.endc
Categorías
Más información sobre Spectral Measurements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!