On 2/22/13 12:43 AM, kevin wrote:> On 2/21/13 6:38 PM, Eric Jacobsen wrote: > >> Interpolation using parabolic fit to the coefficient magnitudes has >> significant bias and performs poorly in noise. > > In the Gaussian method, the authors don't use the magnitude, rather > they use the log of the magnitude. By using a Gaussian window, one > obtains a series of Gaussian bandpass filters in the frequency > domain. Then, since the log of a Gaussian is a parabola, by using the > log of the magnitudes (vice the magnitudes), and applying a parabolic > fit, they show that the estimates obtained are several orders of > magnitude better than a simple parabolic fit to magnitudes. >well, since the gaussian window in the time domain will result in gaussian bumps in the frequency domain, the parabolic curve is what you *should* have in the log magnitude. then the parabolic fit should be perfect in the no-noise case. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
FFT, zero padding and DFT bins
Started by ●February 19, 2013
Reply by ●February 22, 20132013-02-22
Reply by ●February 23, 20132013-02-23
Robert, you got the idea: the transform of a Gaussian in time is a Gaussian in frequency, so if you use a Gaussian time window, you get Gaussian bandpass filters in the frequency domain. The log of a Gaussian curve is a parabola. So if you use the natural log of the amplitudes, you can do perfect interpolation. The Gaussian r = 8 line from Fig. 4 and Fig. 5 in the Gasior/Gonzalez paper clearly shows the difference between the PI (parabolic interpolation using the amplitudes) in Fig. 4 versus the GI (Gaussian interpolation using the log of the amplitude) in Fig. 5: http://mgasior.web.cern.ch/mgasior/pap/biw2004.pdf And as the authors note in their conclusion: �The Gaussian method with 4T1 window is used in such a system for the CERN PS Booster accelerator. In the future, similar systems will be made for the PS and LEIR machines.� The authors have another, more detailed paper, and I've downloaded it before, but wasn't able to in the past few minutes. Kevin
Reply by ●February 23, 20132013-02-23
On 2/23/13 2:28 AM, kevin wrote:> > Robert, you got the idea: the transform of a Gaussian in time is a > Gaussian in frequency, so if you use a Gaussian time window, you get > Gaussian bandpass filters in the frequency domain. The log of a > Gaussian curve is a parabola.back in 2001, i did a paper (my only paper presented to an IEEE crowd) where i generalized. not only is this the case: F.T.{ e^(-pi*t^2) } = e^(-pi*f^2) but this is the case F.T.{ e^(a*t^2 + b*t + c) } = e^(A*f^2 + B*f + C) where for some A, B, C that can be determined from the given a, b, c. and complex or imaginary coefficients might be in there. the purpose was to estimate not just the frequency of the sinusoid, but the sweep rate and the "ramp rate". and with more than 3 points, what i did was compute the discrete-frequency derivative of the log-magnitude in the frequency domain. that result is linear and it was a segment of that where one can "best fit" a straight line to a segment and the real and imaginary parts of the slope and elevation of that line is where the parameters lie. i assumed no interference from other bumps. that's the worser problem. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●February 23, 20132013-02-23
On Fri, 22 Feb 2013 23:28:03 -0800 (PST), kevin <kevinjmcgee@netscape.net> wrote:> >Robert, you got the idea: the transform of a Gaussian in time is a >Gaussian in frequency, so if you use a Gaussian time window, you get >Gaussian bandpass filters in the frequency domain. The log of a >Gaussian curve is a parabola. So if you use the natural log of the >amplitudes, you can do perfect interpolation. > >The Gaussian r =3D 8 line from Fig. 4 and Fig. 5 in the Gasior/Gonzalez >paper clearly shows the difference between the PI (parabolic >interpolation using the amplitudes) in Fig. 4 versus the GI (Gaussian >interpolation using the log of the amplitude) in Fig. 5: > >http://mgasior.web.cern.ch/mgasior/pap/biw2004.pdf > >And as the authors note in their conclusion: =93The Gaussian method with >4T1 window is used in such a system for the CERN PS Booster >accelerator. In the future, similar systems will be made for the PS >and LEIR machines.=94 > >The authors have another, more detailed paper, and I've downloaded it >before, but wasn't able to in the past few minutes. > >KevinI coded up the Gaussian estimator and compared it to my original estimator, Quinn's, and Candan's for my usual test case of a rectangular window function (which provides the best native "resolution"). In short, it sucks in those conditions. I put the plots of the results here: http://www.ericjacobsen.org/pics/GausIntrpSims.jpg The sim moves a tone in 0.1 bin steps from bin 9 to bin 9.9. In this case no noise is added, so it is the noiseless case within the precision of the simulation arithmetic. At each frequency 1000 trials are made. Four estimators are compared; mine, Quin's first estimator, Candan's, and the Gaussian estimator from the CERN paper cited. The first plot is the mean estimated tone location vs test tone number. The second plot (Figure 2) is the estimator variance, and the third plot is the estimator bias. The Guassian estimator is the magenta dots. The other estimators perform closely enough to each other than they can't be discerned from each other on the scales shown. It can be seen that the Gaussian estimator compares very poorly to the others in these test conditions. Looking closely at the CERN paper, they used windowing that resulted in substantial broadening of the main lobe, and then applied the estimator to those various cases and reported good results in no noise. I'm not sure why you'd apply a window that broadens the peak before trying to accurately find the peak, but they probably have their reasons. Just to see, I reran the sim with noise at SNR = 3dB, and got the following: http://www.ericjacobsen.org/pics/GausIntrpSims_3dBSNR.jpg Adding noise doesn't seem to improve the situation. Anyway, all I can conclude is that for rectangular windowing it's not a very good estimator compared to methods that are usually used in that case. For cases where the main lobe is broadened substantially by windowing, maybe the Gaussian estimator is quite good, but I don't know how it would compare to other methods. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 23, 20132013-02-23
On Sat, 23 Feb 2013 20:05:24 GMT, eric.jacobsen@ieee.org (Eric Jacobsen) wrote:>On Fri, 22 Feb 2013 23:28:03 -0800 (PST), kevin ><kevinjmcgee@netscape.net> wrote: > >> >>Robert, you got the idea: the transform of a Gaussian in time is a >>Gaussian in frequency, so if you use a Gaussian time window, you get >>Gaussian bandpass filters in the frequency domain. The log of a >>Gaussian curve is a parabola. So if you use the natural log of the >>amplitudes, you can do perfect interpolation. >> >>The Gaussian r =3D 8 line from Fig. 4 and Fig. 5 in the Gasior/Gonzalez >>paper clearly shows the difference between the PI (parabolic >>interpolation using the amplitudes) in Fig. 4 versus the GI (Gaussian >>interpolation using the log of the amplitude) in Fig. 5: >> >>http://mgasior.web.cern.ch/mgasior/pap/biw2004.pdf >> >>And as the authors note in their conclusion: =93The Gaussian method with >>4T1 window is used in such a system for the CERN PS Booster >>accelerator. In the future, similar systems will be made for the PS >>and LEIR machines.=94 >> >>The authors have another, more detailed paper, and I've downloaded it >>before, but wasn't able to in the past few minutes. >> >>Kevin > >I coded up the Gaussian estimator and compared it to my original >estimator, Quinn's, and Candan's for my usual test case of a >rectangular window function (which provides the best native >"resolution"). In short, it sucks in those conditions. > >I put the plots of the results here: > >http://www.ericjacobsen.org/pics/GausIntrpSims.jpg > >The sim moves a tone in 0.1 bin steps from bin 9 to bin 9.9. In this >case no noise is added, so it is the noiseless case within the >precision of the simulation arithmetic. At each frequency 1000 trials >are made. Four estimators are compared; mine, Quin's first estimator, >Candan's, and the Gaussian estimator from the CERN paper cited. > >The first plot is the mean estimated tone location vs test tone >number. The second plot (Figure 2) is the estimator variance, and >the third plot is the estimator bias. The Guassian estimator is the >magenta dots. The other estimators perform closely enough to each >other than they can't be discerned from each other on the scales >shown. > >It can be seen that the Gaussian estimator compares very poorly to the >others in these test conditions. Looking closely at the CERN paper, >they used windowing that resulted in substantial broadening of the >main lobe, and then applied the estimator to those various cases and >reported good results in no noise. I'm not sure why you'd apply a >window that broadens the peak before trying to accurately find the >peak, but they probably have their reasons. > >Just to see, I reran the sim with noise at SNR = 3dB, and got the >following: > >http://www.ericjacobsen.org/pics/GausIntrpSims_3dBSNR.jpg > >Adding noise doesn't seem to improve the situation. > >Anyway, all I can conclude is that for rectangular windowing it's not >a very good estimator compared to methods that are usually used in >that case. For cases where the main lobe is broadened substantially >by windowing, maybe the Gaussian estimator is quite good, but I don't >know how it would compare to other methods.I spoke a little too soon, but not too badly. The premise is that a Gaussian window is applied to the data, so that the interpolation curve is a match to the shape in the data. So, I applied a Gaussian window to the time-domain data, truncating the Gaussian window at various values of sigma as described in the text. Using sigma = 4 I got the following results, with the same legend and methodology as described previously: http://www.ericjacobsen.org/pics/GausIntrpSims_s4.jpg You can see that the error is much smaller than the results with the rectangular window, but still worse than the other estimators (which are still computed using rectangular windows). Changing the Gaussian window to truncate at sigma = 5 (i.e., truncates at +/- 2.5 sigma), the plots change to: http://www.ericjacobsen.org/pics/GausIntrpSims_s5.jpg In general the errors are even smaller, but the variance at an offset of 0.5 is starting to get very large compared to the other offsets. Increasing to sigma = 6, and we see: http://www.ericjacobsen.org/pics/GausIntrpSims_s6.jpg where the mid-offset variance is now getting very large, with an increase in bias at that frequency as well. The bias is large enough that the average estimate at that frequency is 0.1 bins off (as seen in Figure 1). The trend continues with increasing sigma. In no case did I observe performance that I would call "better" in any general sense compared to the other estimators using a rectangular window. I'm not sure what advantage the Gaussian estimator might have, but I can't find one, and these are no-noise tests. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 24, 20132013-02-24
On Feb 23, 5:31�pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote:> On Sat, 23 Feb 2013 20:05:24 GMT, eric.jacob...@ieee.org (Eric >Eric: The technique is, of course, dependent on parameters, and I'll have to modify some of my code to try to match the numbers that you're using. In the mean time, the following is a brief example of the two point Gaussian method, followed by results: #include <cstdio> #include <cstdlib> #include <iostream> #include <cmath> using namespace std; void fft_recur(long, double* r, double* i); int main (int nNumberofArgs, char* pszArgs[ ] ) { // arguments needed for Dev C++ I/O const long N = 1024; double sample_rate = 44100., r[N] = {0.}, i[N] = {0.}, w[N] = {0.} ; long n; double t, twopi = 2*3.141592653589793238; double amp_sq[N], F, fbin, amp, power, c = 2.5; for (n = 0; n < N; n++) { // generate test data t = twopi*n/sample_rate; r[n] = 1.*cos(16351.*t) ; } // end for //Gaussian window as computed in [MCEACH94] program double z; for (n = 0; n < N/2; n++) { z = (.5+(N/2)-1.-n)*(twopi/2.)/N; w[n] = exp(-c*z*z); w[N-1-n] = w[n]; } //multiply input data by window points for (n = 0; n < N; n++) { r[n] = w[n]*r[n]; // we're overwriting r[n] with the windowed r[n] } //end for fft_recur(N, r, i); // note: fft is not scaled // compute amplitude squared for (n = 0; n < N/2+1; n++) { amp_sq[n] = r[n]*r[n]+i[n]*i[n]; } //end for // compute natural log of FFT outputs for (n = 0; n < N/2+1; n++) { r[n] = .5*log( amp_sq[n] ) ; // r[n] is now the natural log of the amplitude of FFT bin 'n' } // end for // .5*log(A squared) = log(A) cout<<"\n\nfrequency and amplitude estimation results\n\n n magnitude frequency amplitude\n\n"; for (n = 375; n < 385; n++) { fbin = n+.5+.5*c*(r[n+1]-r[n]); // r[n+1] and r[n] are ln(b) and ln(a) F = (sample_rate/N)*fbin; amp = sqrt(c)*exp(r[n]+((fbin-n)*(fbin-n))/c)*(2.0*sqrt(twopi/2.)/ N) ; printf("%2d\t%9.5f\t%9.5f\t%9.5f\n", n, amp_sq[n], F, amp); } //end for system ("PAUSE"); return 0; } // end main //******************** fft_recur *********************** void fft_recur(long N, double *r, double *i) { long h, i1, j = 0, k, i2 = N/2, l1, l2 = 1; double c = -1.0, s = 0.0, t1, t2, u1, u2; for (h = 0; h < N-2; h++) { // ***** bit reverse starts here *** if (h < j) { t1 = r[h]; r[h] = r[j]; r[j] = t1; t2 = i[h]; i[h] = i[j]; i[j] = t2; } k = i2; while (k <= j) { j = j - k; k = k/2; } j = j + k; } //****** bit reverse done ****** for (k = 1; k < N; k = k*2) { l1 = l2; l2 = l2*2; u1 = 1.0; u2 = 0.0; for (j = 0; j < l1; j++) { for (h = j; h < N; h = h + l2) { i1 = h + l1; t2 = (r[i1] - i[i1])*u2 ; t1 = t2 + r[i1]*(u1 - u2) ; t2 = t2 + i[i1]*(u1 + u2) ; r[i1] = r[h] - t1; i[i1] = i[h] - t2; r[h] = r[h] + t1; i[h] = i[h] + t2; } // end for over h t1 = u1 * c - u2 * s; u2 = u1 * s + u2 * c; u1 = t1; //x = u1 - u2; y = u1 + u2; } // end for over j s = - sqrt((1.0 - c) / 2.0); c = sqrt((1.0 + c) / 2.0); } // end for over k } // end fft program output: frequency and amplitude estimation results n magnitude frequency amplitude 375 0.00713 16290.96044 0.03375 376 0.60443 16355.27109 1.24801 377 112.88502 16350.63368 0.98776 378 3582.89216 16351.07090 1.00121 379 23335.36574 16350.97138 0.99997 380 30571.62898 16351.02180 0.99966 381 8101.48929 16350.98216 1.00064 382 432.81301 16350.79044 1.00899 383 4.63523 16359.00168 0.61554 384 0.01360 16456.39665 0.00264 As shown, the test tone is f = 16351, and N = 1024, and sample rate of 44100. The spectral peak occurs between bins 379 and 380, and bin 380 shows an estimated f = 16351.02180 and an amplitude of .99966. I coded it in a simple way so I wouldn't have to add a peak detector. The above is fairly typical of what I get when using the technique � about 6-8 decimal digits of accuracy. I can very often get more (8-12 digits) by adjusting the parameters (window beamwidth, FFT size, etc.), or modifying the code (the Gaussian window above is from the original McEachern article, and it's not quite correct � it works fine for large N, but not so good for N below about 64 points). I have several correct versions, but I'll have to change the code (and I've got Gaussian windows parametrized on 'c', 'alpha', and 'sigma'). When adding noise, the results show a scatter around the estimate, but I haven't seen a bias. The CERN people have done quite a bit of testing, and I'll try to get a good link to the results that they've published. I'm not sure why you should be getting such different results � I'll look at the parameters you're using and adjust mine to try and match them (eg: put the tone between bins 9 and 10, use similar sigma, etc.). Kevin
Reply by ●February 24, 20132013-02-24
On Thu, 21 Feb 2013 23:38:06 GMT, eric.jacobsen@ieee.org (Eric Jacobsen) wrote: [Snipped by Lyons]>> >>R. J. Webster, =93Leakage Regulation in the Discrete Fourier Transform >>Spectrum,=94 Proc. >>IEEE, vol. 68, no. 10, Oct. 1980, pp. 1339-1341. > >This is another sad confirmation that even when you have a long-time >membership and supposedly appropriate society membership, the paper is >inaccessible unless a fee is paid or some other membership is >obtained. I've never figured out what society memberships is/are >necessary to have access to Proc. IEEE.Hi Eric, you're not kiddin'. It ticks me off that I'm a paid member of the IEEE, *and* the IEEE Signal Proc. Society, and I can't obtain a paper from the 'Proceedings of the IEEE" journal. It's a darn shame!!>> >>The Webster paper will mess with your head. In it, the author shows >>that leakage is a phenomenon of calculation. He shows that, by a >>proper choice and placement of a sum-of-cosines window, he can >>eliminate leakage beyond (or before) other bins in the spectrum when >>confronted with an interfering sinusoid. >> >>Yet another paper you should get is: >> >>http://mgasior.web.cern.ch/mgasior/pap/biw2004.pdf > >Interpolation using parabolic fit to the coefficient magnitudes has >significant bias and performs poorly in noise. > >A more recent development in a simple estimator with good performance >at high and low SNR: > >http://www.eee.metu.edu.tr/~ccandan/pub_dir/FineDopplerEst_IEEE_SPL_June2011.pdf >Thanks for that link Eric. I'd never seen that paper before. Candan's paper sure makes that E. Jacobsen fellow look smart. [-Rick-]
Reply by ●February 24, 20132013-02-24
On Sat, 23 Feb 2013 21:22:33 -0800 (PST), kevin <kevinjmcgee@netscape.net> wrote:>On Feb 23, 5:31=A0pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote: >> On Sat, 23 Feb 2013 20:05:24 GMT, eric.jacob...@ieee.org (Eric >> > >Eric: > >The technique is, of course, dependent on parameters, and I'll have to >modify some of my code to try to match the numbers that you're using. >In the mean time, the following is a brief example of the two point >Gaussian method, followed by results:I was comparing the three-point Gaussian technique from the CERN paper you linked.>#include <cstdio> >#include <cstdlib> >#include <iostream> >#include <cmath> >using namespace std; >void fft_recur(long, double* r, double* i); >int main (int nNumberofArgs, char* pszArgs[ ] ) { // arguments needed >for Dev C++ I/O >const long N =3D 1024; double sample_rate =3D 44100., r[N] =3D {0.}, i[N] >=3D {0.}, w[N] =3D {0.} ; >long n; double t, twopi =3D 2*3.141592653589793238; >double amp_sq[N], F, fbin, amp, power, c =3D 2.5; > >for (n =3D 0; n < N; n++) { // generate test data > t =3D twopi*n/sample_rate; > r[n] =3D 1.*cos(16351.*t) ; >} // end for > >//Gaussian window as computed in [MCEACH94] program >double z; >for (n =3D 0; n < N/2; n++) { > z =3D (.5+(N/2)-1.-n)*(twopi/2.)/N; > w[n] =3D exp(-c*z*z); > w[N-1-n] =3D w[n]; >} > >//multiply input data by window points >for (n =3D 0; n < N; n++) { > r[n] =3D w[n]*r[n]; // we're overwriting r[n] with the windowed >r[n] >} //end for > >fft_recur(N, r, i); // note: fft is not scaled > >// compute amplitude squared >for (n =3D 0; n < N/2+1; n++) { > amp_sq[n] =3D r[n]*r[n]+i[n]*i[n]; >} //end for > >// compute natural log of FFT outputs >for (n =3D 0; n < N/2+1; n++) { > r[n] =3D .5*log( amp_sq[n] ) ; // r[n] is now the natural log of the >amplitude of FFT bin 'n' >} // end for // .5*log(A squared) =3D >log(A) > >cout<<"\n\nfrequency and amplitude estimation results\n\n n >magnitude frequency amplitude\n\n"; >for (n =3D 375; n < 385; n++) { > fbin =3D n+.5+.5*c*(r[n+1]-r[n]); // r[n+1] and r[n] are ln(b) and >ln(a) > F =3D (sample_rate/N)*fbin; > amp =3D sqrt(c)*exp(r[n]+((fbin-n)*(fbin-n))/c)*(2.0*sqrt(twopi/2.)/ >N) ; > printf("%2d\t%9.5f\t%9.5f\t%9.5f\n", n, amp_sq[n], F, amp); >} //end for > >system ("PAUSE"); >return 0; >} // end main >//******************** fft_recur *********************** >void fft_recur(long N, double *r, double *i) { >long h, i1, j =3D 0, k, i2 =3D N/2, l1, l2 =3D 1; >double c =3D -1.0, s =3D 0.0, t1, t2, u1, u2; > >for (h =3D 0; h < N-2; h++) { // ***** bit reverse starts here *** > if (h < j) { > t1 =3D r[h]; r[h] =3D r[j]; r[j] =3D t1; > t2 =3D i[h]; i[h] =3D i[j]; i[j] =3D t2; > } > k =3D i2; > while (k <=3D j) { > j =3D j - k; k =3D k/2; > } > j =3D j + k; >} //****** bit reverse done ****** > >for (k =3D 1; k < N; k =3D k*2) { > l1 =3D l2; l2 =3D l2*2; > u1 =3D 1.0; u2 =3D 0.0; > for (j =3D 0; j < l1; j++) { > for (h =3D j; h < N; h =3D h + l2) { > i1 =3D h + l1; > t2 =3D (r[i1] - i[i1])*u2 ; > t1 =3D t2 + r[i1]*(u1 - u2) ; > t2 =3D t2 + i[i1]*(u1 + u2) ; > r[i1] =3D r[h] - t1; > i[i1] =3D i[h] - t2; > r[h] =3D r[h] + t1; > i[h] =3D i[h] + t2; > } // end for over h > t1 =3D u1 * c - u2 * s; > u2 =3D u1 * s + u2 * c; > u1 =3D t1; //x =3D u1 - u2; y =3D u1 + u2; > } // end for over j > s =3D - sqrt((1.0 - c) / 2.0); > c =3D sqrt((1.0 + c) / 2.0); >} // end for over k > >} // end fft > >program output: > >frequency and amplitude estimation results > > n magnitude frequency amplitude > >375 0.00713 16290.96044 0.03375 >376 0.60443 16355.27109 1.24801 >377 112.88502 16350.63368 0.98776 >378 3582.89216 16351.07090 1.00121 >379 23335.36574 16350.97138 0.99997 >380 30571.62898 16351.02180 0.99966 >381 8101.48929 16350.98216 1.00064 >382 432.81301 16350.79044 1.00899 >383 4.63523 16359.00168 0.61554 >384 0.01360 16456.39665 0.00264 > >As shown, the test tone is f =3D 16351, and N =3D 1024, and sample rate of >44100. The spectral peak occurs between bins 379 and 380, and bin 380 >shows an estimated f =3D 16351.02180 and an amplitude of .99966. I >coded it in a simple way so I wouldn't have to add a peak detector. > >The above is fairly typical of what I get when using the technique =96 >about 6-8 decimal digits of accuracy. I can very often get more (8-12 >digits) by adjusting the parameters (window beamwidth, FFT size, >etc.), or modifying the code (the Gaussian window above is from the >original McEachern article, and it's not quite correct =96 it works fine >for large N, but not so good for N below about 64 points). I have >several correct versions, but I'll have to change the code (and I've >got Gaussian windows parametrized on 'c', 'alpha', and 'sigma'). > >When adding noise, the results show a scatter around the estimate, but >I haven't seen a bias. The CERN people have done quite a bit of >testing, and I'll try to get a good link to the results that they've >published. > >I'm not sure why you should be getting such different results =96 I'll >look at the parameters you're using and adjust mine to try and match >them (eg: put the tone between bins 9 and 10, use similar sigma, >etc.).I'm not sure my results were different. The shape of the error curve in my results is the same as in the CERN paper. The CERN paper has a bit of a convenient disclaimer that the parabolic technique works for the case where 2S[km] > S[k+1] + S[k-1], which may exclude the case of the tone exactly between bins, where the estimator seems to have the most trouble. Whether they extend that disclaimer to the Gaussian method described in Eq. 15 (Gasior) isn't clear, but since that's where it seems to break down it's not completely discountable. I reran the sim with r = 8 in order to try to duplicate Gasior's results in Figures 4 and 5. This is what I get: http://www.ericjacobsen.org/pics/GausIntrpSims_s8.jpg The error at 0.5 bins offset is huge, as can be seen in all three plots. In order to zoom in and see the results in the rest of the offsets, I forced the results for trial 6 in figures 2 and 3 to zero, and this is what we see: http://www.ericjacobsen.org/pics/GausIntrpSims_s8_6_0.jpg Quin's estimator is the green line, mine is the black circles, and Candan's is the blue x's, the Gaussian estimator is the magenta dots. With the 0.5 bin offset results excluded it actually works quite well in no noise! It's just about as good as Candan's, although the computational complexity of Candan's is far, far simpler than the Gaussian estimator, and doesn't require a window (and doesn't crap out at an offset of 0.5 bins). If we add a little noise and make the SNR = 3dB, we find: http://www.ericjacobsen.org/pics/GausIntrpSims_s8_3dBSNR.jpg where we see the Gaussian estimator starting to perform poorly compared to the others, especially around the offset of 0.5 bins (trial 6). In Figure 1 we can see that the errors at trials 5 and 7 are now fairly large and the bias at trial 6 has actually gone down while the variance is large. So, if one excludes the results at an offset of 0.5 bins, and operates only at high SNR, the Gaussian estimator works about as well as Candan's but at the expense of much higher computational complexity and required windowing. I'm not seeing any advantage to the Gaussian technique. If one is required to do windowing that substantially broadens the main lobe for some other reason, and the very poor performance at an offset of 0.5 bins can be tolerated, then it's a pretty good estimator. That seems to be a fairly restrictive application case to me, but if it works for someone then it's certainly an option. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 26, 20132013-02-26
On Feb 24, 1:17�pm, eric.jacob...@ieee.org (Eric >> The error at 0.5 bins offset is huge, as can be seen in all three > plots. � In order to zoom in and see the results in the rest of the > offsets, I forced the results for trial 6 in figures 2 and 3 to zero,Well, I haven't seen any major errors when using a tone exactly half way between bins, whether using either the 2 point or 3 point approach. My code seems to transition smoothly from one bin to the next � although I haven't coded the 3 point method anywhere nearly as many times as the 2 point (a few dozen times since 2004 vs. many hundreds of times since 1993). As I mentioned, 6 to 8 digits of accuracy is typical, without doing any tweaking. I don't recall the authors mentioning any problems estimating half-bin tones, and I've read most of their reports. M. Gasior has a home page: http://mgasior.web.cern.ch/mgasior/pap/index.html The http://mgasior.web.cern.ch/mgasior/pap/FFT_resol_note.pdf paper is the more extensive report on the 3 point method � I've downloaded it before, but I couldn't do so the other day. It may be available from another source. Anyways, I showed a code example � people can test and decide for themselves if they want to use it. Kevin
Reply by ●February 26, 20132013-02-26
On Mon, 25 Feb 2013 20:37:39 -0800 (PST), kevin <kevinjmcgee@netscape.net> wrote:>On Feb 24, 1:17=A0pm, eric.jacob...@ieee.org (Eric > >> The error at 0.5 bins offset is huge, as can be seen in all three >> plots. =A0 In order to zoom in and see the results in the rest of the >> offsets, I forced the results for trial 6 in figures 2 and 3 to zero, > >Well, I haven't seen any major errors when using a tone exactly half >way between bins, whether using either the 2 point or 3 point >approach. My code seems to transition smoothly from one bin to the >next =96 although I haven't coded the 3 point method anywhere nearly as >many times as the 2 point (a few dozen times since 2004 vs. many >hundreds of times since 1993). As I mentioned, 6 to 8 digits of >accuracy is typical, without doing any tweaking. > >I don't recall the authors mentioning any problems estimating half-bin >tones, and I've read most of their reports. M. Gasior has a home >page: > >http://mgasior.web.cern.ch/mgasior/pap/index.html > >The http://mgasior.web.cern.ch/mgasior/pap/FFT_resol_note.pdf paper >is the more extensive report on the 3 point method =96 I've downloaded >it before, but I couldn't do so the other day. It may be available >from another source.He says a fair number of things in that paper that I find odd. He has an entire appendix section (A.2) dedicated to explaining why 3-pt interpolators don't work with rectangular windows, but it's pretty clear that they do, and they outperform the Gaussian interpolator described in that paper! It is a bit of a yellow flag when an algorithm is presented without comparison to other algorithms used for the same purpose.>Anyways, I showed a code example =96 people can test and decide for >themselves if they want to use it.I just did that. ;)>KevinEven if my code has an error at 0.5 bins offset the error variance of the three-point Gaussian interpolator at other offsets appears to be worse than Candan's, and the Gaussian interpolator much, much more complex to implement. The results I got were consistent with the CERN paper except at 0.5 bins offset, and, as mentioned previously, it's fairly common for three-point estimators to be their worst at 0.5 bins offset (mine, Candan's, and Quin's have that behavior as well in no noise). The Gaussian is consistent with this behavior, but performs slightly worse than Candan's in all conditions, worse than the others compared when noise is present, and potentially has a big problem at 0.5 bins offset. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com







