demodulator using adder with envelope detector
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hello , I am trying to make a AM modualtor and a demodulator using a summer with envelope detector here is my code
clear close all;
clc;
A=1.5;
B=2;
f1=1;
f2=4;
RSZ=15;
P=7;
f0=100;
t=0:0.00001:1;
Fs=100000;
s1=A*cos(2*pi*f1*t);
s2=B*cos(2*pi*f2*t);
s=s1+s2;
sp=P*cos(2*pi*f0*t);
figure(11), plot(t,s);
figure(1), plot(t,sp);
semnal_modulat=P*(1+s).*sp
figure(2), plot(t,semnal_modulat);
iesire = awgn(semnal_modulat,RSZ);
figure(3), plot(t,iesire);
spectru_iesire=fft(iesire);
figure(4), plot(abs(spectru_iesire));
demod=iesire+cos(2*pi*f0*t);
%detectorul de anvelopa
demod=2*demod.*demod;
demod=downsample(demod,15);
demod=sqrt(demod);
Wp=2*pi*1000
Ws=2*pi*(2*f0-4)
[n,Wt]=buttord(Wp,Ws,1,40,'s');
[b,a]=butter(n,Wt,'s');
[bd,ad]=impinvar(b,a,Fs);
iesire_demod=filter(bd,ad,demod);
iesire_demod=iesire_demod-100;
figure(6),plot(iesire_demod)
the output is close to the original signal but not kind like it , can someone help me ?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur PHY Components dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!