Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
John_A_Brown
PostPosted: May 31, 2012 - 12:11 PM
Raving lunatic


Joined: Sep 20, 2003
Posts: 4069
Location: Surrey, England

Probably a stupid question, but do the input values (the waveform samples) for the Goertzel algorithm need to be centred around zero, or can I use the raw values, complete with DC offset?
 
 View user's profile Send private message  
Reply with quote Back to top
DocJC
PostPosted: May 31, 2012 - 12:18 PM
Raving lunatic


Joined: Dec 11, 2007
Posts: 6848
Location: Cleveland, OH

Well, we'll see if anybody has a different idea...

Goertzel is basically a modified DFT, (FFT), that only looks for a few, specific frequencies, instead of the entire spectrum.

A DC offset in the signal would normally show up as the 0 bin component in an FFT.

One would therefore not think that it would impact ones ability to look for the other frequencies of interest.

JC
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
snigelen
PostPosted: May 31, 2012 - 12:38 PM
Posting Freak


Joined: Jan 08, 2009
Posts: 1152
Location: Lund, Sweden

I did some testing with an example in Matlab. It made no difference if I added a (large) DC offset.
 
 View user's profile Send private message  
Reply with quote Back to top
John_A_Brown
PostPosted: May 31, 2012 - 01:17 PM
Raving lunatic


Joined: Sep 20, 2003
Posts: 4069
Location: Surrey, England

Many thanks. It avoids having to perform some sort of running average or min/max detection and offset removal.

John
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits