> I have a low frequency FM signal which I wish to demodulate. Has anybody
> developed an M file which might assist?
If x is your signal to be demodulated, create the complex signal z = x +
jy, where y is the Hilbert transform of x. y can be obtained from an FIR
filter designed with the 'hilbert' option in the remez function, or z can
be computed directly with the hilbert function. Then, take the derivative
of unwrap(angle(z)). unwrap won't work very well if your original samples
are very far apart (i.e., too close to the Nyquist frequency).
Doug Schwarz
Eastman Kodak Company
sch...@kodak.com
There is probably an easier way, but this should work:
% simulate an PM signal
Fs = 5.12e6; % sample rate
N = 2^12; % # samples
t = (0:N-1)/Fs; % time
fc = 100e3; % carrier frequency
fm = 10e3; % modulation frequency
noise = 1e-4;
mod = 1e-1 * sin( 2*pi*fm*t+ 2*pi*rand(1,1) ); % sinusiodual phase modulation
y = cos( ( 2*pi*(fc*t+rand(1,1) ) + mod ) ); % real PM signal
% Now FM demodulate signal
% Simulate a quadrature detector and low pass filter to get
% complex base-band video. Or do it the easy way:
y = hilbert( y );
% calculate phase
phase = unwrap( angle(y) );
f = diff(phase) / ( 2*pi*diff(t(1:2)) ); % definition of frequency
% since diff(t) is constant
plot( t(1:N-1), f )
grid
________________________________________________________________
| Tom Davis | da...@adrs1.dseg.ti.com |
| SMTS, Texas Instruments | phone: (214) 575-4958 |
----------------------------------------------------------------
y = hilbert( your_fm_signal );
yd = y(2:length(y)).*conj(y(1:length(y-1))); % The frequency is now
f = angle(yd); % hidden in the phase of yd
/Bo Engstrom, bo.en...@lulea.trab.se
--
-------------------------------------------------------
Bo Engstrom PHONE: Int. +4692075443
Telia Research HOME: Int. +4692046478
Aurorum 6 FAX: Int. +4692075490