Sunday, 15 February 2015

MATLAB - Using fm demod to decode data -



MATLAB - Using fm demod to decode data -

i trying extract sinusoid has speed changes sinusiodially. form of approximately sin (a(sin(b*t))), a+b constant.

this i'm trying, doesnt give me nice sin graph hope for.

fs = 100; % sampling rate of signal fc = 2*pi; % carrier frequency t = [0:(20*(fs-1))]'/fs; % sampling times s1 = sin(11*sin(t)); % channel 1, generates signal x = [s1]; dev = 50; % frequency deviation in modulated signal z = fmdemod(x,fc,fs,fm); % demodulate both channels. plot(z);

thank help.

there bug in code, instead of:

z = fmdemod(x,fc,fs,fm);

you should have:

z = fmdemod(x,fc,fs,dev);

also see nice sine graph need plot s1.

it looks not creating fm signal modulated correctly, can not demodulate correctly using fmdemod. here illustration correctly:

fs = 8000; % sampling rate of signal fc = 3000; % carrier frequency t = [0:fs]'/fs; % sampling times s1 = sin(2*pi*300*t)+2*sin(2*pi*600*t); % channel 1 s2 = sin(2*pi*150*t)+2*sin(2*pi*900*t); % channel 2 x = [s1,s2]; % two-channel signal dev = 50; % frequency deviation in modulated signal y = fmmod(x,fc,fs,dev); % modulate both channels. z = fmdemod(y,fc,fs,dev); % demodulate both channels.

if find thr answers useful can both up-vote them , take them, thanks.

matlab

No comments:

Post a Comment