Define Matlab code (FM demodulation)

Status
Not open for further replies.

yiyi87

Newbie level 5
Joined
Jul 9, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Malaysia
Activity points
1,344
fm circuits with matlab output

Hi, I have a matlab code here
it acquires FM modulated signal from sound card can perform FM demodulation
however, i don't why it set vcok (VCO K constant) at 0.176
anyone can explain to me how and why it is set to 0.176?

Fc = 2144; %select VCO carrier frequency
vcok = 0.176; %select vco constant
Fs = 40000; %select sound card sampling frequency
samptime = 3; %select sampling time (in seconds)
y = wavrecord(samptime*Fs, Fs, 'double'); %sample sound into y
wavplay(y, Fs); %play the recorded sound
x = (demod(y, Fc, Fs, 'fm', vcok)); %FM demodulate the sound
cutoff = 100/(Fs/2); %cutoff(1/2 sampling frequency)
[b, a] = butter(4,cutoff); %design butterworth low pass filter
xfilt = filter(b,a,x); %filter demodulation signal
time = 1/Fs1/Fs):samptime; %generate time vector
figure, plot(time,xfilt) %plot filtered data vs time
grid %overlay grid on plot
xlabel ('time ') %label x axis
ylabel ('input [volts]') %label y axis

thank you in advance
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…