ashokone
Member level 3
hi to all
i did FM modulation and demodulation using matlab... i did for 2k hz carrier frequency and getting demodulated output correctly.
if i do it for giga hertz frequency say carrier frequency, i am not getting demodulated output.. any one can help me, is there any changes needed.. below shows my code
clc
clear all;
close all;
fc=2e9;
fs = 200e9;% sample freq
ts=1/fs;
t0=2500/fs;
t = 0 : 1/fs : 2500/fs;
m=[ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),ones(1,t0/(3*ts)+2)];
y=fmmod(m,fc,fs,50);
demod=fmdemod(y,fc,fs,50);
subplot(2,1,1);
plot(t*1e9,m);
title('message signal');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
subplot(2,1,2);
plot(t*1e7,y);
title('modulated');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
figure,plot(t*1e7,demod);
title('demodulaton message signal');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
plz help this..plz
i did FM modulation and demodulation using matlab... i did for 2k hz carrier frequency and getting demodulated output correctly.
if i do it for giga hertz frequency say carrier frequency, i am not getting demodulated output.. any one can help me, is there any changes needed.. below shows my code
clc
clear all;
close all;
fc=2e9;
fs = 200e9;% sample freq
ts=1/fs;
t0=2500/fs;
t = 0 : 1/fs : 2500/fs;
m=[ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),ones(1,t0/(3*ts)+2)];
y=fmmod(m,fc,fs,50);
demod=fmdemod(y,fc,fs,50);
subplot(2,1,1);
plot(t*1e9,m);
title('message signal');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
subplot(2,1,2);
plot(t*1e7,y);
title('modulated');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
figure,plot(t*1e7,demod);
title('demodulaton message signal');
xlabel('Time '); ylabel('Amplitude');
axis([0 2500/fs -2.1 2.1])
plz help this..plz