Forums

Intro to Goertzel for math challenged antique

Started by Richard Owlett January 11, 2006
I saw a post somewhere that mentioned Goertzel in passing. It gave 
enough info to realize that someone had already invented "wheel" ;}

Consulting Lyons 13.17 (second edition) confirmed that it may be what 
I'm looking for. He gives a response plot with "m" as independent 
variable. To confuse me further, figures 13-43(b) seems at odds with 13-45.

I suspect they are plotting different things and my problem is I don't 
recognize the difference.

Now to how math(arithmetic) challenged I am.
For obvious reasons, everything is plotted in universe referring to 
number of samples with a implied association to sample rate.

I've not yet learned to translate from "n" to "hertz".

Can anyone point me to a reference that:
1. uses Hz as independent variable assuming audio CD sample rate?
2. generates above with a number of window withs expressed in seconds?

I've lost the URL, but there's an often recommended site with a Java app 
that illustrates FFT. Is there something similar for Goertzel?

OK
What should I actually be asking?

PS I understand why Rick used the specific independent variables he did.
    that in no way indicates that I can comprehend result ;)
On Wed, 11 Jan 2006 13:59:53 -0600, Richard Owlett
<rowlett@atlascomm.net> wrote:

>I saw a post somewhere that mentioned Goertzel in passing. It gave >enough info to realize that someone had already invented "wheel" ;} > >Consulting Lyons 13.17 (second edition) confirmed that it may be what >I'm looking for. He gives a response plot with "m" as independent >variable. To confuse me further, figures 13-43(b) seems at odds with 13-45. > >I suspect they are plotting different things and my problem is I don't >recognize the difference.
Hi Richard, Figure 13-43(b) and 13-45 aren't contradictory. I did my best to explain the meaning of Figure 13-45 in the last paragraph of Section 13.17.3. Figure 13-43(b) is the freq mag response of the resonator used in the Goertzel algorithm. Figure 13-45 is the freq mag response of the Goertzel algorithm itself. (Which is identical to the freq mag response of an N-point DFT, as it should be because the Goertzel algo is merely a way of computing DFT results.) The "m" index in those two figures is the same "m" used as the freq-domain index in the standard DFT equation.
>Now to how math(arithmetic) challenged I am. >For obvious reasons, everything is plotted in universe referring to >number of samples with a implied association to sample rate.
Humm, what plots are we talkin' about here? Time-domain plots, or freq-domain plots?
> >I've not yet learned to translate from "n" to "hertz".
I'm not sure there is a way to translate from "n" (assuming that "n" is a time-domain index variable) to "hertz".
>Can anyone point me to a reference that: >1. uses Hz as independent variable assuming audio CD sample rate? >2. generates above with a number of window withs expressed in seconds?
Oops. Sorry, I didn't understand those questions.
>I've lost the URL, but there's an often recommended site with a Java app >that illustrates FFT. Is there something similar for Goertzel? > >OK >What should I actually be asking?
Gosh, I'm not sure Richard.
>PS I understand why Rick used the specific independent variables he did. > that in no way indicates that I can comprehend result ;)
Humm, ... what "independent variables" are you referring to? [-Rick-]
Rick Lyons wrote:
> On Wed, 11 Jan 2006 13:59:53 -0600, Richard Owlett > <rowlett@atlascomm.net> wrote: > > >>I saw a post somewhere that mentioned Goertzel in passing. It gave >>enough info to realize that someone had already invented "wheel" ;} >> >>Consulting Lyons 13.17 (second edition) confirmed that it may be what >>I'm looking for. He gives a response plot with "m" as independent >>variable. To confuse me further, figures 13-43(b) seems at odds with 13-45. >> >>I suspect they are plotting different things and my problem is I don't >>recognize the difference. > > > Hi Richard, > > Figure 13-43(b) and 13-45 aren't contradictory.
I assumed that
> I did my best to explain the meaning of Figure 13-45 in the > last paragraph of Section 13.17.3. > > Figure 13-43(b) is the freq mag response of the resonator > used in the Goertzel algorithm. > Figure 13-45 is the freq mag response of the Goertzel > algorithm itself. (Which is identical to the freq mag > response of an N-point DFT, as it should be because the > Goertzel algo is merely a way of computing DFT results.) > > The "m" index in those two figures is the same "m" used > as the freq-domain index in the standard DFT equation. >
Yep understood
> >>Now to how math(arithmetic) challenged I am. >>For obvious reasons, everything is plotted in universe referring to >>number of samples with a implied association to sample rate. > > > Humm, what plots are we talkin' about here? > Time-domain plots, or freq-domain plots?
freq-domain
> >>I've not yet learned to translate from "n" to "hertz". > > > I'm not sure there is a way to translate from "n" > (assuming that "n" is a time-domain index variable) > to "hertz". >
My problem is that you wrote for normal/sane/??? reader. Actually my problem is that you (and every one else) normalize your plots. My problem is going from normalized frame of reference to to physical frame -- that's what I meant by "math challenged". Specifically, my current interest is in voice recognition issues. Therefore I need x-axis to explicitly be in kHz. You targeted the "normal" "intelligent" reader. I ain't "normal" and it would be futile for me to claim otherwise, this group knows me too well. As to "intelligent", I'll claim adequate "magnitude", if not "phase" ;}
> >>Can anyone point me to a reference that: >>1. uses Hz as independent variable assuming audio CD sample rate? >>2. generates above with a number of window withs expressed in seconds? > > > Oops. Sorry, I didn't understand those questions. >
To rephrase my previous comment, I need physical rather than normalized frame of reference. In essence we speak different languages. And, even though there is a one-to-one correspondence, I just can't seem to translate.
> >>I've lost the URL, but there's an often recommended site with a Java app >>that illustrates FFT. Is there something similar for Goertzel? >> >>OK >>What should I actually be asking? > > > Gosh, I'm not sure Richard.
Nor I ;/ I'm not sure of age of your children, but it might be interesting to have them look at figures 13-43(b) and 13-45, assuming that they can understand what a dB is. Or ask your parents (or in laws), assuming they are not techs nor engineers.
> > >>PS I understand why Rick used the specific independent variables he did. >> that in no way indicates that I can comprehend result ;) > > > Humm, ... what "independent variables" are you referring to? > > [-Rick-] > >
Thanks to group for tolerating my ignorance.
Richard Owlett wrote:

> I saw a post somewhere that mentioned Goertzel in passing. It gave > enough info to realize that someone had already invented "wheel" ;} > > Consulting Lyons 13.17 (second edition) confirmed that it may be what > I'm looking for. He gives a response plot with "m" as independent > variable. To confuse me further, figures 13-43(b) seems at odds with 13-45. >
It isn't, really. Figure 13-43(b) is the response of the filter _if_ you let it run forever. Figure 13-45 is the response of the filter when you run it for a finite amount of time -- what you see there is the frequency response of the filter convolved with the frequency response of the rectangular pulse that you're multiplying the input with (what? You don't see the pulse? That's because it's implied -- but it's still there)
> I suspect they are plotting different things and my problem is I don't > recognize the difference.
He was.
> > Now to how math(arithmetic) challenged I am. > For obvious reasons, everything is plotted in universe referring to > number of samples with a implied association to sample rate. > > I've not yet learned to translate from "n" to "hertz". > > Can anyone point me to a reference that: > 1. uses Hz as independent variable assuming audio CD sample rate? > 2. generates above with a number of window withs expressed in seconds? > > I've lost the URL, but there's an often recommended site with a Java app > that illustrates FFT. Is there something similar for Goertzel? >
The angle of the pole pair (call it theta) is the filter center frequency in radians / sample. To convert to real time just multiply by samples / second. So if you have 0.1 radians/sample and a 44.2kHz sample rate (is that right for CDs?) that's 4420 radians/second, or about 703Hz. So the 2*pi*m/N in figure 13-43(a) is in radians per sample, you need to multiply by the sampling rate to get the pole location in radians/sec, then divide by 2*pi to get it in Hertz. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:
> Richard Owlett wrote: > >> I saw a post somewhere that mentioned Goertzel in passing. It gave >> enough info to realize that someone had already invented "wheel" ;} >> >> Consulting Lyons 13.17 (second edition) confirmed that it may be what >> I'm looking for. He gives a response plot with "m" as independent >> variable. To confuse me further, figures 13-43(b) seems at odds with >> 13-45. >> > It isn't, really. Figure 13-43(b) is the response of the filter _if_ > you let it run forever. Figure 13-45 is the response of the filter when > you run it for a finite amount of time -- what you see there is the > frequency response of the filter convolved with the frequency response > of the rectangular pulse that you're multiplying the input with (what? > You don't see the pulse? That's because it's implied -- but it's still > there) >
Bitten by windowing again. I'm beginning to relate to the crow in the no steak window cleaner ad ;)
>> I suspect they are plotting different things and my problem is I don't >> recognize the difference. > > > He was. > >> >> Now to how math(arithmetic) challenged I am. >> For obvious reasons, everything is plotted in universe referring to >> number of samples with a implied association to sample rate. >> >> I've not yet learned to translate from "n" to "hertz". >> >> Can anyone point me to a reference that: >> 1. uses Hz as independent variable assuming audio CD sample rate? >> 2. generates above with a number of window withs expressed in seconds? >> >> I've lost the URL, but there's an often recommended site with a Java >> app that illustrates FFT. Is there something similar for Goertzel? >> > The angle of the pole pair (call it theta) is the filter center > frequency in radians / sample. To convert to real time just multiply by > samples / second. So if you have 0.1 radians/sample and a 44.2kHz > sample rate (is that right for CDs?) that's 4420 radians/second, or > about 703Hz. > > So the 2*pi*m/N in figure 13-43(a) is in radians per sample, you need to > multiply by the sampling rate to get the pole location in radians/sec, > then divide by 2*pi to get it in Hertz. >
"Richard Owlett" <rowlett@atlascomm.net> wrote in message 
news:11saotqosqklq60@corp.supernews.com...
>I saw a post somewhere that mentioned Goertzel in passing. It gave enough info >to realize that someone had already invented "wheel" ;} > > Consulting Lyons 13.17 (second edition) confirmed that it may be what I'm > looking for. He gives a response plot with "m" as independent variable. To > confuse me further, figures 13-43(b) seems at odds with 13-45. > > I suspect they are plotting different things and my problem is I don't > recognize the difference. > > Now to how math(arithmetic) challenged I am. > For obvious reasons, everything is plotted in universe referring to number of > samples with a implied association to sample rate. > > I've not yet learned to translate from "n" to "hertz".
Assuming "n" is the sample index (number of samples), you don't translate from "n" to "Hertz". "n" is a time-domain variable whereas "Hertz" is a measure of frequency. Given the sample rate, you _could_ translate from "n" to "seconds" with this formula: time_in_seconds = n/sample_rate_in_Hertz, e.g. t=n/44100. The other thing you may often encounter is frequency expressed in radians/second. In this case, 2*pi rad/sec represents the sample rate, so you would convert as follows: frequency_in_Hertz = sample_rate_in_Hertz*frequency_in_rad_per_sec/(2*pi) You sometimes also see normalized frequency, where 1 represents the sample rate, so then the formula above is modified to remove the 2*pi: frequency_in_Hertz = sample_rate_in_Hertz*normalized_frequency I hope that is helpful.