DSPRelated.com
Forums

Parabolic interpolation of a Gaussian window

Started by mfl June 3, 2015
Hello,

I am trying to interpolate values of a Gaussian window after discrete
fourier transform. I’ve been searching around but figure that I am still
missing some basic knowledge about gaussian function. Any suggestions
would be very appreciated.

I’ve found some information on this page:
http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html

There is a formula for interpolating the magnitude of ‘peak’
frequencies in spectra (y = b - 1/4(a-r)*p), but what’s still unclear to
me is how to interpolate frequencies at arbitrary locations. For example,
given a DFT of a gaussian window W, I have the magnitude of W[0], W[0],…
W[x], x being the bin indices, How do I interpolate values, say, at bin =
5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the
preceding formula doesn’t apply to these cases. 

Cheers,
mf
---------------------------------------
Posted through http://www.DSPRelated.com
On Wed, 03 Jun 2015 09:16:13 -0500, "mfl" <103819@DSPRelated> wrote:

>Hello, > >I am trying to interpolate values of a Gaussian window after discrete >fourier transform. I&rsquo;ve been searching around but figure that I am still >missing some basic knowledge about gaussian function. Any suggestions >would be very appreciated. > >I&rsquo;ve found some information on this page: >http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html > >There is a formula for interpolating the magnitude of &lsquo;peak&rsquo; >frequencies in spectra (y = b - 1/4(a-r)*p), but what&rsquo;s still unclear to >me is how to interpolate frequencies at arbitrary locations. For example, >given a DFT of a gaussian window W, I have the magnitude of W[0], W[0],&hellip; >W[x], x being the bin indices, How do I interpolate values, say, at bin = >5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the >preceding formula doesn&rsquo;t apply to these cases. > >Cheers, >mf
This might help: http://www.dsprelated.com/freebooks/sasp/Quadratic_Interpolation_Spectral_Peaks.html The y values are the thee samples including the peak, in other words, the peak plus one adjacent sample on each side. Plug those into the interpolation formula. For a gaussian window the quadratic is exact for a dB scale. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Hi Eric,

Thanks for the reply. I came across this page too but I thought this
formula is only applicable for interpolating the peak amplitude (meaning
the highest y-point/magnitude of the curve). While what I want to do is to
find the associated y-value of an arbitrary frequency, no necessary the
peak. Or am I missing something?

Cheers,
MF

>On Wed, 03 Jun 2015 09:16:13 -0500, "mfl" <103819@DSPRelated> wrote: > >>Hello, >> >>I am trying to interpolate values of a Gaussian window after discrete >>fourier transform. I&acirc;&#128;&#153;ve been searching around but figure that I am
still
>>missing some basic knowledge about gaussian function. Any suggestions >>would be very appreciated. >> >>I&acirc;&#128;&#153;ve found some information on this page: >>http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html >> >>There is a formula for interpolating the magnitude of &acirc;&#128;&#152;peak&acirc;&#128;&#153; >>frequencies in spectra (y = b - 1/4(a-r)*p), but what&acirc;&#128;&#153;s still
unclear to
>>me is how to interpolate frequencies at arbitrary locations. For
example,
>>given a DFT of a gaussian window W, I have the magnitude of W[0],
W[0],&acirc;&#128;&brvbar;
>>W[x], x being the bin indices, How do I interpolate values, say, at bin >5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the >>preceding formula doesn&acirc;&#128;&#153;t apply to these cases. >> >>Cheers, >>mf > >This might help: > >http://www.dsprelated.com/freebooks/sasp/Quadratic_Interpolation_Spectral_Peaks.html > >The y values are the thee samples including the peak, in other words, >the peak plus one adjacent sample on each side. Plug those into the >interpolation formula. > >For a gaussian window the quadratic is exact for a dB scale. > > >Eric Jacobsen >Anchor Hill Communications >http://www.anchorhill.com
--------------------------------------- Posted through http://www.DSPRelated.com
So we shall top-post now.

Sorry, I misunderstood your intent.

One way to interpolate anywhere you want would be to zero pad the
input to the DFT.    This requires some additional computation, but
you can essentially get samples almost wherever you want.   The
downside is that you compute a lot of them, but it does work.

Alternately, you can compute an individual arbitrarily located output
sample by computing a single DFT summation (rather than the entire
DFT), with the appropriately selected frequency reference.

I hope that help.   I did misunderstand your original question.

Cheers,

Eric


On Wed, 03 Jun 2015 13:24:14 -0500, "mfl" <103819@DSPRelated> wrote:

>Hi Eric, > >Thanks for the reply. I came across this page too but I thought this >formula is only applicable for interpolating the peak amplitude (meaning >the highest y-point/magnitude of the curve). While what I want to do is to >find the associated y-value of an arbitrary frequency, no necessary the >peak. Or am I missing something? > >Cheers, >MF > >>On Wed, 03 Jun 2015 09:16:13 -0500, "mfl" <103819@DSPRelated> wrote: >> >>>Hello, >>> >>>I am trying to interpolate values of a Gaussian window after discrete >>>fourier transform. I&acirc;&#128;&#153;ve been searching around but figure that I am >still >>>missing some basic knowledge about gaussian function. Any suggestions >>>would be very appreciated. >>> >>>I&acirc;&#128;&#153;ve found some information on this page: >>>http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html >>> >>>There is a formula for interpolating the magnitude of &acirc;&#128;&#152;peak&acirc;&#128;&#153; >>>frequencies in spectra (y = b - 1/4(a-r)*p), but what&acirc;&#128;&#153;s still >unclear to >>>me is how to interpolate frequencies at arbitrary locations. For >example, >>>given a DFT of a gaussian window W, I have the magnitude of W[0], >W[0],&acirc;&#128;&brvbar; >>>W[x], x being the bin indices, How do I interpolate values, say, at bin >>5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the >>>preceding formula doesn&acirc;&#128;&#153;t apply to these cases. >>> >>>Cheers, >>>mf >> >>This might help: >> >>http://www.dsprelated.com/freebooks/sasp/Quadratic_Interpolation_Spectral_Peaks.html >> >>The y values are the thee samples including the peak, in other words, >>the peak plus one adjacent sample on each side. Plug those into the >>interpolation formula. >> >>For a gaussian window the quadratic is exact for a dB scale. >> >> >>Eric Jacobsen >>Anchor Hill Communications >>http://www.anchorhill.com > > >--------------------------------------- >Posted through http://www.DSPRelated.com
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On 6/3/15 12:30 PM, Eric Jacobsen wrote:
> On Wed, 03 Jun 2015 09:16:13 -0500, "mfl"<103819@DSPRelated> wrote: > >> Hello, >> >> I am trying to interpolate values of a Gaussian window after discrete >> fourier transform. I&rsquo;ve been searching around but figure that I am still >> missing some basic knowledge about gaussian function. Any suggestions >> would be very appreciated. >> >> I&rsquo;ve found some information on this page: >> http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html
page doesn't come up for me.
>> >> There is a formula for interpolating the magnitude of &lsquo;peak&rsquo; >> frequencies in spectra (y = b - 1/4(a-r)*p), but what&rsquo;s still unclear to >> me is how to interpolate frequencies at arbitrary locations. For example, >> given a DFT of a gaussian window W, I have the magnitude of W[0], W[0],&hellip; >> W[x], x being the bin indices, How do I interpolate values, say, at bin = >> 5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the >> preceding formula doesn&rsquo;t apply to these cases. >> >> Cheers, >> mf > > This might help: > > http://www.dsprelated.com/freebooks/sasp/Quadratic_Interpolation_Spectral_Peaks.html > > The y values are the thee samples including the peak, in other words, > the peak plus one adjacent sample on each side. Plug those into the > interpolation formula. > > For a gaussian window the quadratic is exact for a dB scale.
well, assuming no interference from other sinusoidal components (including the negative frequency component of a single real sinusoid). -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Wednesday, June 3, 2015 at 10:16:15 AM UTC-4, mfl wrote:
> Hello, > > I am trying to interpolate values of a Gaussian window after discrete > fourier transform. I've been searching around but figure that I am still > missing some basic knowledge about gaussian function. Any suggestions > would be very appreciated. > > I've found some information on this page: > http://www.dsprelated.com/freebooks/sasp/Gaussian_Window_Transform.html > > There is a formula for interpolating the magnitude of 'peak' > frequencies in spectra (y = b - 1/4(a-r)*p), but what's still unclear to > me is how to interpolate frequencies at arbitrary locations. For example, > given a DFT of a gaussian window W, I have the magnitude of W[0], W[0],... > W[x], x being the bin indices, How do I interpolate values, say, at bin = > 5.7, or bin = 8.2? As they are not peaks in a given spectra I figure the > preceding formula doesn't apply to these cases. > > Cheers, > mf > --------------------------------------- > Posted through http://www.DSPRelated.com
A continuous Gaussian window transforms to a Gaussian spectrum. This has some good properties. Hopefully they extend to the digital domain, you can try and see. The log of a Gaussian is a parabola. Fit the log of 3 DFT magnitude values around the peak to a parabola. Use the equation for the parabola to get the log-magnitude values at the frequencies you want. Convert back to magnitude from log-magnitude if you want. Let me know how it works for you if you try it. Dirk