On Thu, 28 May 2009 11:13:40 -0400, M.L. wrote: > Pete, > You can't detect a 60kHz signal with a 26.7kHz sample rate. I just ran an > Octave simulation of the Goertzel algorithm and I was able to get good > results with something like this: > > [snip] > > -- > Martin K. Thanks for the input Martin - I'll have a play about with your script a little later. For the time being though, I've stuck my own octave script at http://custard.restall.net/piclist/goertzel.m It seems to work alright (down to about -15dB SNR) but then again I'm new to this so could be missing something (or lots of things). The script is just a testbed so that I can plug in lots of different parameters and throw a few graphs, etc. together to get an idea of what's happening. Suggestions for improvement/further discussion/further reading are obviously welcome. I also tried implementing a version of the AN1115 tricks to obtain a phase sensitive detector in octave, but didn't have much luck. With a pure signal it works spot on - whenever I start adding any significant noise (ie. by using awng(), wng() or randn()) it fails miserably. Adding sine waves of discrete frequencies doesn't seem to hurt too badly though. It also takes lots more CPU cycles to perform a few low-pass filters than it does a humble Goertzel detector, which seems to perform better under noise in my octave simulation (although I'm sure this is rubbish - the noise figures I've seen for PSDs suggest they should be outstanding). Problem between chair and keyboard methinks. Regards, Pete Restall -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist