Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 5th 06, 02:17 PM posted to rec.radio.amateur.antenna
external usenet poster
 
First recorded activity by RadioBanter: Aug 2006
Posts: 3
Default Frequency discriminator algorithms?

Hi all,

I had been searching the 'net for simple digital frequency
discriminator
algorithms (fm detection, eg for SSTV etc) but have not really found
any
suitable info. In the mean time though, I figured out what I think is a
simple solution to this problem and tried it, using my computer's sound
system to digitize a sinewave signal from my FT847 rig (tuned to a MW
BC
station in CW mode and using the narrowest filters).

The results were mixed, with an accuracy of about 1% in many readings
but with a small portion of them having large errors 50%. The errors
seemed to be spaced at 1/4 of an audio cycle and near peaks and zero's.
But before I speculate on possible causes, I would like to take the
liberty to describe this algorithm so that experienced DSP boffins
might
first judge the viability and/or correctnes of it.

In a stream of digitized samples of a sine wave, the value s of a
sample
is given by s = V * sin(F) where V is the peak amplitude and F the
phase
of the sine wave at the moment the sample was taken. If we take three
consecutive samples, s0, s1, s2, we can form the following set of
simultaneous equations (by expanding sin(F+dF) & sin(F-dF)).

1. s0 = V*sin(F-dF) = V*{sin(F)*cos(dF)-cos(F)*sin(dF)}
2. s1 = V*sin(F)
3. s2 = V*sin(F+df) = V*{sin(F)*cos(dF)+cos(F)*sin(dF)}

where dF is the phase difference between successive samples.

By adding 1. and 3. we have:

4. s0+s2 = V*2*sin(F)*cos(dF)

By substituting sin(F) from 2. we have:

5. s0+s2 = V*2*(s1/V)*cos(dF)

So finally solving 5. for dF we have:

6. dF = arc cos{(s0+s2)/(2*s1)}

The frequency f of the sampled signal can then be estimated by:

7. f = (df/2pi)*S or f = S*arc cos{(s0+s2)/(2*s1)}/2pi (2pi=2*pi)

I tried this formula by feeding it with calculated samples and it
worked
fine. In practice, the expected problems I had were division by zero
when s1 = 0 and failure of the acos() C function when (s0+s2)/2s1 1.
But there were inaccuracies in he results as I mentioned near the peaks
and zeros since it seems errors in sampling by the dsp distorted the
relationship between consecutive samples.

I am using Linux and an AC97 type on-board sound system and I already
know there are some bugs in the ALSA (the Linux sound systems project)
drivers. This is especially obvious when sampling at a non-native DSP
rate (other than 48 Khz / 16-bit linear) where the sound driver has to
resample the output.

I would be greatful for any input on the "legitimacy" of the above
derived formula and/or its weak points, so that I can furher study the
output of the DSP for possible errors (not very easy ;-)).

My apologies for a longish and/or possibly boring article!

73's de "Nick" 5B4AZ http://5b4az.mattsnetwork.co.uk/

  #2   Report Post  
Old August 5th 06, 02:21 PM posted to rec.radio.amateur.antenna
external usenet poster
 
First recorded activity by RadioBanter: Aug 2006
Posts: 3
Default Frequency discriminator algorithms?

neok wrote:
Hi all,

I had been searching the 'net for simple digital frequency
discriminator


Very sorry guys, posted to wrong group :-(

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Electromagnetic Radiation N9OGL General 31 March 1st 06 02:42 PM
Electromagnetic Radiation N9OGL Policy 32 March 1st 06 02:42 PM
Channel-based AM tube tuner (was Designs for a single frequency high performance AM-MW receiver?) Jon Noring Shortwave 103 June 30th 04 07:13 PM
MilAir Monitoring from KeyWest - Lots of Comms! GeorgeF Scanner 1 May 13th 04 09:37 PM
North-Central Florida Mil Logs 9/10/2003 & 9/11/2003 GeorgeF Shortwave 0 September 12th 03 03:32 AM


All times are GMT +1. The time now is 11:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017