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
Parabolic interpolation of a Gaussian window
Started by ●June 3, 2015
Reply by ●June 3, 20152015-06-03
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’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, >mfThis 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
Reply by ●June 3, 20152015-06-03
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’ve been searching around but figure that I amstill>>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 stillunclear to>>me is how to interpolate frequencies at arbitrary locations. Forexample,>>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 > >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
Reply by ●June 3, 20152015-06-03
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’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 >> >>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.comEric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●June 3, 20152015-06-03
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’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.htmlpage doesn't come up for me.>> >> 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 > > 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."
Reply by ●June 4, 20152015-06-04
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.comA 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