DSPRelated.com
Forums

Sorry about the many posts

Started by Michael Plet March 1, 2017
On Sun, 5 Mar 2017 17:16:47 -0800 (PST), robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On Saturday, March 4, 2017 at 5:10:08 PM UTC-5, Michael Plet wrote: >> On Fri, 03 Mar 2017 19:32:21 -0500, robert bristow-johnson >> <rbj@audioimagination.com> wrote: >> >> >On 3/3/17 5:31 PM, Cedron wrote: >> >>> >> >>> Since you like music, math and puzzles, let me pose a puzzle for you to >> >>> consider. >> >>> >> >> [...snip...] >> >>> >> >>> My puzzle for you is to find an exact estimator for frequency in a >> >>> windowed transform. That's still a bit of a wide topic, so let me give >> >> more >> >>> background and narrow it down some. >> >>> >> >>> There is a family of windows called "cosine sum" windows that have the >> >>> characteristic that they can be applied in the time domain, but also in >> >> the >> >>> frequency domain where they are applied by convolving the Fourier >> >>> coefficients with a small kernel. For example, the classic von Hann >> >> window has the >> >>> kernel coefficients: -1/4 +1/2 -1/4. >> >>> >> >> [...snip...] >> >> >> >> >> >> It's nice of you to challenge Michael, but I can tell you that I have run >> >> down this path and it is either incredibly complicated or not possible. >> >> Furthermore, it is not necessary. >> >> >> >> First, the reason it is not possible, or extremely difficult, is due to >> >> the nature of the bin value formula for a pure tone. The best form of >> >> this equation for this purpose is the one I give as Equation 25 in my blog >> >> article "DFT Bin Value Formulas for Pure Real Tones" which can be found >> >> here: >> >> >> >> https://www.dsprelated.com/showarticle/771.php >> >> >> >> The bugaboo is the cos( beta_k ) term in the denominator. Generalizing a >> >> window function that can be implemented as "convolving the Fourier >> >> coefficients with a small kernel." >> >> >> >> Let's call K = ( k_{-1} k_0 k_1 ) be such a kernel. An example would be >> >> the Von Hann coefficients you provided of ( -1/4 +1/2 -1/4 ) >> >> >> >> Let's call the bins of an unwindowed DFT Z_k, and the bins of the windowed >> >> one W_k. >> >> >> >> W_k = ( Z_{k-1} Z_k Z_{k+1} ) dot K >> >> >> >> Deriving an exact formula for W_k would lead to an expression that has a >> >> cubic equation of cos( alpha ) in the denomitator and a quadratic equation >> >> of cos( alpha ) in the numerator which would include mixed values of U and >> >> V (which both also contain alpha). >> >> >> >> Solving for an exact frequency equation means manipulating the equations >> >> for W_{k-1}, W_k, and W_{k+1} (for a 3 bin equation) in order to eliminate >> >> the M, U, and V unknowns. If this is doable, and I'm not sure it is, it >> >> leaves you with a cubic equation of cos( alpha ). There is a generalized >> >> way to solve cubic equations, but it is much more complicated than the >> >> quadratic formula. >> >> >> >> Once you have solved for cos( alpha ), choosing the correct root, then the >> >> value of alpha will yield your frequency. >> >> >> >> If you step up to a five value kernel, you will similarly get a fifth >> >> degree equation for cos( alpha ) for which there is no general analytic >> >> solution available. >> >> >> >> Second, it is not necessary. The primary reason for employing a window >> >> function is to reduce the size of the side lobes (aka "spectral leakage") >> >> for all the tones in the signal. The conventional thinking[1] is the side >> >> lobes are undesirable because they can interfere with, and even mask, >> >> other tones that are in the signal. There is a better way to deal with >> >> this problem that I am working up to in my series of blog articles. It >> >> involves building a list of the tones that are present and iteratively >> >> calculating their parameters. It converges rapidly to very accurate >> >> values. In the case of a noiseless signal consisting of steady tones >> >> through the analysis frame, it converges to an exact answer. >> >> >> >> In the case of analyzing music, the latter assumption is generally not >> >> true. I have some other tricks that make it true on a piecemeal basis >> >> which I am currently working on coding (among other things). Yes, this >> >> also involves the concept of tone trajectories mentioned in the Phd thesis >> >> you referenced. >> >> >> > >> >well, i'm gonna toss in something i did nearly 2 decades ago: >> > >> > http://ieeexplore.ieee.org/document/969581/ >> > >> >you can get a free copy at researchgate: >> > >> > >> >https://www.researchgate.net/publication/3927319_Intraframe_time-scaling_of_nonstationary_sinusoids_within_the_phase_vocoder >> > >> > >> >if you use a Gaussian window, compute the FFT, and perform the complex >> >logarithm on those results, you can estimate not just the frequency of >> >the sinusoid, but also the linear sweep rate of the frequency and the >> >ramp rate of the amplitude. just by fitting a line to a set of points. >> >> This is a very good input rbj. The Gassian is unique in that sense and >> will reduce sidelobes. >> > >well, since the Gaussian goes on forever, but it decays fast so we can truncated it when it is very close to zero, but that truncation causes sidelobes (if it went on forever, the Fourier transform of a Gaussian is a Gaussian). but the sidelobes aren't big if you let the window get real close to zero before truncating. > >but the main reason for the Gaussian window is because it is the same mathematical form as a linearly-swept sinusoid: > > x(t) = e^(-a/2 t^2) e^(j b/2 t^2) e^(j w0 t) > >and the instantaneous frequency is > > w = w0 + b t > >so "a" is the measure for how narrow the window is. "b" is the sweep rate for the angular frequency, w, and in the middle of the window, t=0 and w=w0, which is likely the frequency you are looking for. > >r b-j
I have done some experiments with a Gaussian window applied to real signals. The signals were pure sinusoids of varying frequency and phase. I used this window: w(k) = e^( -(1/2) * (k - (N-1)/2)^2 / (a*(N-1)/2)^2 ) with N=32, k = 0, ..., N-1 and a = 0.265391249974779 I multiplied my signal with the window and did the DFT. Then I calculated the magnitudes around the peak. I took the natural logarithm of the magnitudes and did parabolic interpolation to find the location of the true peak. The results were almost exact. Now I have this question: What is the benefit of using a cosine window compared to a Gaussian window? Michael
On Tuesday, March 7, 2017 at 12:14:34 PM UTC-5, Michael Plet wrote:
> > > I have done some experiments with a Gaussian window applied to real > signals. The signals were pure sinusoids of varying frequency and > phase. > > I used this window: > > w(k) = e^( -(1/2) * (k - (N-1)/2)^2 / (a*(N-1)/2)^2 ) > > with N=32, k = 0, ..., N-1 and a = 0.265391249974779 > > I multiplied my signal with the window and did the DFT. > Then I calculated the magnitudes around the peak. > I took the natural logarithm of the magnitudes and did parabolic > interpolation to find the location of the true peak. > The results were almost exact.
now, if you wanted this information, you can also extract the rate of change of frequency and the rate of change of amplitude. Gaussian window is cool. r b-j
On Tue, 7 Mar 2017 11:10:59 -0800 (PST), robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On Tuesday, March 7, 2017 at 12:14:34 PM UTC-5, Michael Plet wrote: >> >> >> I have done some experiments with a Gaussian window applied to real >> signals. The signals were pure sinusoids of varying frequency and >> phase. >> >> I used this window: >> >> w(k) = e^( -(1/2) * (k - (N-1)/2)^2 / (a*(N-1)/2)^2 ) >> >> with N=32, k = 0, ..., N-1 and a = 0.265391249974779 >> >> I multiplied my signal with the window and did the DFT. >> Then I calculated the magnitudes around the peak. >> I took the natural logarithm of the magnitudes and did parabolic >> interpolation to find the location of the true peak. >> The results were almost exact. > >now, if you wanted this information, you can also extract the rate of change of frequency and the rate of change of amplitude. > >Gaussian window is cool. > >r b-j
Yes, very cool. Each of my signals had a fixed frequency and phase. I just used different frequencies and phases for different signals. Michael
Michael

If you are going to keep examining widows, it's time for a data dump.

Cedron mentioned the Harris paper. It is the best of the early window revie=
w papers. In case you are not familiar with it, a proper citation is:

Harris, F.J. =E2=80=9DOn the Use of Windows for Harmonic Analysis with the
Discrete Fourier Transform.=E2=80=9D Proceedings of the IEEE. Vol. 66, No. =
1
(January 1978).

It can currently be downloaded from:

http://web.mit.edu/xiphmont/Public/windows.pdf
or
https://www.utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%2=
0on%20Windows.pdf

It is useful enough and not copyright protected so that it is often availab=
le somewhere on the net. It does have some errors. The errors are corrected=
 and the characteristics and derivations of some cosine sum and other windo=
w are given in a review paper by Nuttall:

Nuttall, Albert H. =E2=80=9DSome Windows with Very Good Sidelobe Behavior=
=E2=80=9D,
IEEE Transactions on Acoustics, Speech, and Signal Processing. Vol.
ASSP-29 (February 1981). pp. 84-91

If you see someone write about a window with "Nuttall" in the name, you can=
 find a correct name for the window in his paper.

For windows coefficients, plots of window performance and some other window=
s information, relationships and references see the presentation paper:

"Windows Connections"
Dale B. Dalrymple=20
from the last comp.dsp Conference=20
http://www.abvolt.com/compdsp/presentations/Dalrymple/dbd.pdf

I hope you have fun.

Dale B. Dalrymple
Am Dienstag, 7. M&auml;rz 2017 20:11:03 UTC+1 schrieb robert bristow-johnson:
> On Tuesday, March 7, 2017 at 12:14:34 PM UTC-5, Michael Plet wrote: > > > > I have done some experiments with a Gaussian window applied to real > > signals. The signals were pure sinusoids of varying frequency and > > phase. > > > > I used this window: > > > > w(k) = e^( -(1/2) * (k - (N-1)/2)^2 / (a*(N-1)/2)^2 ) > > > > with N=32, k = 0, ..., N-1 and a = 0.265391249974779 > > > > I multiplied my signal with the window and did the DFT. > > Then I calculated the magnitudes around the peak. > > I took the natural logarithm of the magnitudes and did parabolic > > interpolation to find the location of the true peak. > > The results were almost exact. > > now, if you wanted this information, you can also extract the rate > of change of frequency and the rate of change of amplitude. > > Gaussian window is cool.
How would you do that? Cheers! sg
On Tue, 7 Mar 2017 14:32:27 -0800 (PST), dbd
<d.dalrymple@sbcglobal.net> wrote:

> >Michael > >If you are going to keep examining widows, it's time for a data dump. > >Cedron mentioned the Harris paper. It is the best of the early window review papers. In case you are not familiar with it, a proper citation is: > >Harris, F.J. &#4294967295;On the Use of Windows for Harmonic Analysis with the >Discrete Fourier Transform.&#4294967295; Proceedings of the IEEE. Vol. 66, No. 1 >(January 1978). > >It can currently be downloaded from: > >http://web.mit.edu/xiphmont/Public/windows.pdf >or >https://www.utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%20on%20Windows.pdf > >It is useful enough and not copyright protected so that it is often available somewhere on the net. It does have some errors. The errors are corrected and the characteristics and derivations of some cosine sum and other window are given in a review paper by Nuttall: > >Nuttall, Albert H. &#4294967295;Some Windows with Very Good Sidelobe Behavior&#4294967295;, >IEEE Transactions on Acoustics, Speech, and Signal Processing. Vol. >ASSP-29 (February 1981). pp. 84-91 > >If you see someone write about a window with "Nuttall" in the name, you can find a correct name for the window in his paper. > >For windows coefficients, plots of window performance and some other windows information, relationships and references see the presentation paper: > >"Windows Connections" >Dale B. Dalrymple >from the last comp.dsp Conference >http://www.abvolt.com/compdsp/presentations/Dalrymple/dbd.pdf > >I hope you have fun. > >Dale B. Dalrymple
I am indeed having fun! I learned about the Gaussian window yesterday. Before that I have only used the von Hann window with STFT and reconstruction. Thank you very much for the links Dale. I have glanced at the Harris paper before, but never really read it. Your own presentation is very thorough. What I don't like about windows is that they usually extend the width of the main lobe to more than 2 bins. That makes it harder to distinguish between two very close frequencies. Michael
>> >> now, if you wanted this information, you can also extract the rate >> of change of frequency and the rate of change of amplitude. >> >> Gaussian window is cool. > >How would you do that? > >Cheers! >sg
He gives the equations in Section 2.1 in his paper referenced in his previous post. I agree that this is very cool, but you should recognize that they are approximations. 1) The Gaussian window applied in a DFT gets its tails chopped off. 2) The equations in the paper are for the continuous FT. 3) The equations are for a complex signal, so for a real signal they ignore the conjugate component. This means results for frequencies near the DC or Nyquist will be less accurate. This being said, it is still very cool. I have tried in the past to do this exactly with summation formulas, but since I don't know of any summation formula for exp( a * n * n ), I have not succeeded. The author almost apologizes (it seems to me) for the amplitude variation being an exponential function rather than linear. To me, the exponential model is vastly preferred as it fits the solutions to second degree differential equations with a dampening factor. YMMV. Ced --------------------------------------- Posted through http://www.DSPRelated.com
On Wed, 08 Mar 2017 14:35:35 +0100, Michael Plet <me@home.com> wrote:

>On Tue, 7 Mar 2017 14:32:27 -0800 (PST), dbd ><d.dalrymple@sbcglobal.net> wrote: > >> >>Michael >> >>If you are going to keep examining widows, it's time for a data dump. >> >>Cedron mentioned the Harris paper. It is the best of the early window review papers. In case you are not familiar with it, a proper citation is: >> >>Harris, F.J. &#4294967295;On the Use of Windows for Harmonic Analysis with the >>Discrete Fourier Transform.&#4294967295; Proceedings of the IEEE. Vol. 66, No. 1 >>(January 1978). >> >>It can currently be downloaded from: >> >>http://web.mit.edu/xiphmont/Public/windows.pdf >>or >>https://www.utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%20on%20Windows.pdf >> >>It is useful enough and not copyright protected so that it is often available somewhere on the net. It does have some errors. The errors are corrected and the characteristics and derivations of some cosine sum and other window are given in a review paper by Nuttall: >> >>Nuttall, Albert H. &#4294967295;Some Windows with Very Good Sidelobe Behavior&#4294967295;, >>IEEE Transactions on Acoustics, Speech, and Signal Processing. Vol. >>ASSP-29 (February 1981). pp. 84-91 >> >>If you see someone write about a window with "Nuttall" in the name, you can find a correct name for the window in his paper. >> >>For windows coefficients, plots of window performance and some other windows information, relationships and references see the presentation paper: >> >>"Windows Connections" >>Dale B. Dalrymple >>from the last comp.dsp Conference >>http://www.abvolt.com/compdsp/presentations/Dalrymple/dbd.pdf >> >>I hope you have fun. >> >>Dale B. Dalrymple > > >I am indeed having fun! I learned about the Gaussian window yesterday. >Before that I have only used the von Hann window with STFT and >reconstruction. > >Thank you very much for the links Dale. I have glanced at the Harris >paper before, but never really read it. >Your own presentation is very thorough. > >What I don't like about windows is that they usually extend the width >of the main lobe to more than 2 bins. That makes it harder to >distinguish between two very close frequencies.
That's the usual tradeoff with window functions. Thanks to Parseval, the total output power in the response is constant if the window function is normalized, so if the sidelobe energy goes down that energy has to go somewhere, and it's the main lobe. There are many interesting window functions that shape the main lobe and sidelobes in interesting ways, but the general tradeoff is that the price for lower sidelobes is a wider main lobe. Since the width of the main lobe is the general measure of "resolution", yes, you tend to either get good basic resolution or good contrast due to sidelobe suppression. Many times you can throw more processing at the problem to get around issues in particular applications, though. This is why there are so many different window functions, though. The different tradeoffs work better or worse depending on the application. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On Wed, 08 Mar 2017 18:06:05 GMT, eric.jacobsen@ieee.org wrote:

>On Wed, 08 Mar 2017 14:35:35 +0100, Michael Plet <me@home.com> wrote: > >>On Tue, 7 Mar 2017 14:32:27 -0800 (PST), dbd >><d.dalrymple@sbcglobal.net> wrote: >> >>> >>>Michael >>> >>>If you are going to keep examining widows, it's time for a data dump. >>> >>>Cedron mentioned the Harris paper. It is the best of the early window review papers. In case you are not familiar with it, a proper citation is: >>> >>>Harris, F.J. &#4294967295;On the Use of Windows for Harmonic Analysis with the >>>Discrete Fourier Transform.&#4294967295; Proceedings of the IEEE. Vol. 66, No. 1 >>>(January 1978). >>> >>>It can currently be downloaded from: >>> >>>http://web.mit.edu/xiphmont/Public/windows.pdf >>>or >>>https://www.utdallas.edu/~cpb021000/EE%204361/Great%20DSP%20Papers/Harris%20on%20Windows.pdf >>> >>>It is useful enough and not copyright protected so that it is often available somewhere on the net. It does have some errors. The errors are corrected and the characteristics and derivations of some cosine sum and other window are given in a review paper by Nuttall: >>> >>>Nuttall, Albert H. &#4294967295;Some Windows with Very Good Sidelobe Behavior&#4294967295;, >>>IEEE Transactions on Acoustics, Speech, and Signal Processing. Vol. >>>ASSP-29 (February 1981). pp. 84-91 >>> >>>If you see someone write about a window with "Nuttall" in the name, you can find a correct name for the window in his paper. >>> >>>For windows coefficients, plots of window performance and some other windows information, relationships and references see the presentation paper: >>> >>>"Windows Connections" >>>Dale B. Dalrymple >>>from the last comp.dsp Conference >>>http://www.abvolt.com/compdsp/presentations/Dalrymple/dbd.pdf >>> >>>I hope you have fun. >>> >>>Dale B. Dalrymple >> >> >>I am indeed having fun! I learned about the Gaussian window yesterday. >>Before that I have only used the von Hann window with STFT and >>reconstruction. >> >>Thank you very much for the links Dale. I have glanced at the Harris >>paper before, but never really read it. >>Your own presentation is very thorough. >> >>What I don't like about windows is that they usually extend the width >>of the main lobe to more than 2 bins. That makes it harder to >>distinguish between two very close frequencies. > >That's the usual tradeoff with window functions. Thanks to Parseval, >the total output power in the response is constant if the window >function is normalized, so if the sidelobe energy goes down that >energy has to go somewhere, and it's the main lobe. There are many >interesting window functions that shape the main lobe and sidelobes in >interesting ways, but the general tradeoff is that the price for lower >sidelobes is a wider main lobe. > >Since the width of the main lobe is the general measure of >"resolution", yes, you tend to either get good basic resolution or >good contrast due to sidelobe suppression. Many times you can throw >more processing at the problem to get around issues in particular >applications, though. > >This is why there are so many different window functions, though. >The different tradeoffs work better or worse depending on the >application. > > > > >--- >This email has been checked for viruses by Avast antivirus software. >https://www.avast.com/antivirus
I didn't know that about the total power. It makes completely sense. The "resolution versus contrast" is a good way to put it. Michael
On Tue, 07 Mar 2017 18:14:26 +0100, Michael Plet <me@home.com> wrote:

>On Sun, 5 Mar 2017 17:16:47 -0800 (PST), robert bristow-johnson ><rbj@audioimagination.com> wrote: > >>On Saturday, March 4, 2017 at 5:10:08 PM UTC-5, Michael Plet wrote: >>> On Fri, 03 Mar 2017 19:32:21 -0500, robert bristow-johnson >>> <rbj@audioimagination.com> wrote: >>> >>> >On 3/3/17 5:31 PM, Cedron wrote: >>> >>> >>> >>> Since you like music, math and puzzles, let me pose a puzzle for you to >>> >>> consider. >>> >>> >>> >> [...snip...] >>> >>> >>> >>> My puzzle for you is to find an exact estimator for frequency in a >>> >>> windowed transform. That's still a bit of a wide topic, so let me give >>> >> more >>> >>> background and narrow it down some. >>> >>> >>> >>> There is a family of windows called "cosine sum" windows that have the >>> >>> characteristic that they can be applied in the time domain, but also in >>> >> the >>> >>> frequency domain where they are applied by convolving the Fourier >>> >>> coefficients with a small kernel. For example, the classic von Hann >>> >> window has the >>> >>> kernel coefficients: -1/4 +1/2 -1/4. >>> >>> >>> >> [...snip...] >>> >> >>> >> >>> >> It's nice of you to challenge Michael, but I can tell you that I have run >>> >> down this path and it is either incredibly complicated or not possible. >>> >> Furthermore, it is not necessary. >>> >> >>> >> First, the reason it is not possible, or extremely difficult, is due to >>> >> the nature of the bin value formula for a pure tone. The best form of >>> >> this equation for this purpose is the one I give as Equation 25 in my blog >>> >> article "DFT Bin Value Formulas for Pure Real Tones" which can be found >>> >> here: >>> >> >>> >> https://www.dsprelated.com/showarticle/771.php >>> >> >>> >> The bugaboo is the cos( beta_k ) term in the denominator. Generalizing a >>> >> window function that can be implemented as "convolving the Fourier >>> >> coefficients with a small kernel." >>> >> >>> >> Let's call K = ( k_{-1} k_0 k_1 ) be such a kernel. An example would be >>> >> the Von Hann coefficients you provided of ( -1/4 +1/2 -1/4 ) >>> >> >>> >> Let's call the bins of an unwindowed DFT Z_k, and the bins of the windowed >>> >> one W_k. >>> >> >>> >> W_k = ( Z_{k-1} Z_k Z_{k+1} ) dot K >>> >> >>> >> Deriving an exact formula for W_k would lead to an expression that has a >>> >> cubic equation of cos( alpha ) in the denomitator and a quadratic equation >>> >> of cos( alpha ) in the numerator which would include mixed values of U and >>> >> V (which both also contain alpha). >>> >> >>> >> Solving for an exact frequency equation means manipulating the equations >>> >> for W_{k-1}, W_k, and W_{k+1} (for a 3 bin equation) in order to eliminate >>> >> the M, U, and V unknowns. If this is doable, and I'm not sure it is, it >>> >> leaves you with a cubic equation of cos( alpha ). There is a generalized >>> >> way to solve cubic equations, but it is much more complicated than the >>> >> quadratic formula. >>> >> >>> >> Once you have solved for cos( alpha ), choosing the correct root, then the >>> >> value of alpha will yield your frequency. >>> >> >>> >> If you step up to a five value kernel, you will similarly get a fifth >>> >> degree equation for cos( alpha ) for which there is no general analytic >>> >> solution available. >>> >> >>> >> Second, it is not necessary. The primary reason for employing a window >>> >> function is to reduce the size of the side lobes (aka "spectral leakage") >>> >> for all the tones in the signal. The conventional thinking[1] is the side >>> >> lobes are undesirable because they can interfere with, and even mask, >>> >> other tones that are in the signal. There is a better way to deal with >>> >> this problem that I am working up to in my series of blog articles. It >>> >> involves building a list of the tones that are present and iteratively >>> >> calculating their parameters. It converges rapidly to very accurate >>> >> values. In the case of a noiseless signal consisting of steady tones >>> >> through the analysis frame, it converges to an exact answer. >>> >> >>> >> In the case of analyzing music, the latter assumption is generally not >>> >> true. I have some other tricks that make it true on a piecemeal basis >>> >> which I am currently working on coding (among other things). Yes, this >>> >> also involves the concept of tone trajectories mentioned in the Phd thesis >>> >> you referenced. >>> >> >>> > >>> >well, i'm gonna toss in something i did nearly 2 decades ago: >>> > >>> > http://ieeexplore.ieee.org/document/969581/ >>> > >>> >you can get a free copy at researchgate: >>> > >>> > >>> >https://www.researchgate.net/publication/3927319_Intraframe_time-scaling_of_nonstationary_sinusoids_within_the_phase_vocoder >>> > >>> > >>> >if you use a Gaussian window, compute the FFT, and perform the complex >>> >logarithm on those results, you can estimate not just the frequency of >>> >the sinusoid, but also the linear sweep rate of the frequency and the >>> >ramp rate of the amplitude. just by fitting a line to a set of points. >>> >>> This is a very good input rbj. The Gassian is unique in that sense and >>> will reduce sidelobes. >>> >> >>well, since the Gaussian goes on forever, but it decays fast so we can truncated it when it is very close to zero, but that truncation causes sidelobes (if it went on forever, the Fourier transform of a Gaussian is a Gaussian). but the sidelobes aren't big if you let the window get real close to zero before truncating. >> >>but the main reason for the Gaussian window is because it is the same mathematical form as a linearly-swept sinusoid: >> >> x(t) = e^(-a/2 t^2) e^(j b/2 t^2) e^(j w0 t) >> >>and the instantaneous frequency is >> >> w = w0 + b t >> >>so "a" is the measure for how narrow the window is. "b" is the sweep rate for the angular frequency, w, and in the middle of the window, t=0 and w=w0, which is likely the frequency you are looking for. >> >>r b-j > > >I have done some experiments with a Gaussian window applied to real >signals. The signals were pure sinusoids of varying frequency and >phase. > >I used this window: > >w(k) = e^( -(1/2) * (k - (N-1)/2)^2 / (a*(N-1)/2)^2 ) > >with N=32, k = 0, ..., N-1 and a = 0.265391249974779 > >I multiplied my signal with the window and did the DFT. >Then I calculated the magnitudes around the peak. >I took the natural logarithm of the magnitudes and did parabolic >interpolation to find the location of the true peak. >The results were almost exact. > >Now I have this question: >What is the benefit of using a cosine window compared to a Gaussian >window? > >Michael
I must admit that I found a = 0.265391249974779 by trial and error. That value gave the most exact results. I believe it is supposed to have something to do with std dev, but can someone explain why this is the correct value to use? And maybe give an analytical expression for the number. Thanks, Michael