On Sunday, February 24, 2013 6:59:27 AM UTC-8, Rick Lyons wrote:> On Thu, 21 Feb 2013 23:38:06 GMT, eric.jacobsen@ieee.org (Eric...> >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!! > ... > [-Rick-]To receive or access the Proceedings you've had to subscribe to it (currently $36), but you aren't required to pay for it if you don't want to. Apparently you guys don't. They've never sent me a membership form without the box to make the choice. Dale B. Dalrymple
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 26, 20132013-02-26
Reply by ●February 26, 20132013-02-26
On Monday, February 25, 2013 9:52:57 PM UTC-8, Eric Jacobsen wrote:> ...On Mon, 25 Feb 2013 20:37:39 -0800 (PST), kevin > <kevinjmcgee@netscape.net> wrote:...> >The http://mgasior.web.cern.ch/mgasior/pap/FFT_resol_note.pdf paper...> > 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!Gasior makes no such general statement about your 3-pt interpolators. He is however referring, as the title of the Appendix says, to "Interpolation of discrete magnitude spectra using other windows". Since he is speaking of interpolating magnitude instead of complex coefficients, he is correct about the 2 bin spectrum width as a source of error in what he is doing.> > It is a bit of a yellow flag when an algorithm is presented without > comparison to other algorithms used for the same purpose.Yes, it is. The 3-pt interpolaters are fine fast and dirty 'ad hoc' algorithms. People who have time to get accurate answers might consider using the algorithms tailored to the window used and greater accuracy, for example: Accurate analysis of multitone signals using a DFT John C. Burgess Department of Mechanical Engineering, University of Hawaii, 2540 Dole Street, Honolulu, Hawaii J. Acoust. Soc. Am. 116 (1), July 2004 In this paper, Burgess gives a method tuned to the cosine-summed windows. Those who are interested in additional approaches to parameter estimation and analyses of those approaches that includes the effects of interferers as well as noise might consider: Proc of the 5th Int Conf on Digital Audio Effects (DAFx02) Survey On Extraction Of Sinusoids In Stationary Sounds Florian Keilor and Sylvain Marchand and: XVIII IMEKO WORLD CONGRESS Metrology for a Sustainable Development September, 17 – 22, 2006, Rio de Janeiro, Brazil FAST MEASUREMENT OF POWER SYSTEM FREQUENCY IN THE FREQUENCY DOMAIN Dušan Agrež Faculty of Electrical Engineering, University of Ljubljana, Slovenia I present these only as examples of the type of content that the DAFx and IMEKO conferences provide, there is more material that is relevant. I suggest these conferences because their content has been freely available on the net. These conferences also have a lot of other good dsp stuff.(Google is your friend.) Another characteristic that has not received much recognition in this thread is the capability of the McEachern 2-pt and the "frequency reassignment" (from the DAFx citation) algorithms to provide useful parameter estimates even when there is a harmonic interferer close to the peak or that even removes the peak due to the frequency component being measured. Peak estimators can't go there. Dale B. Dalrymple
Reply by ●February 26, 20132013-02-26
On Tue, 26 Feb 2013 01:22:17 -0800 (PST), dbd <dbd@ieee.org> wrote:>On Monday, February 25, 2013 9:52:57 PM UTC-8, Eric Jacobsen wrote: >> ...On Mon, 25 Feb 2013 20:37:39 -0800 (PST), kevin >> <kevinjmcgee@netscape.net> wrote: >... >> >The http://mgasior.web.cern.ch/mgasior/pap/FFT_resol_note.pdf paper >... >>=20 >> 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! > > Gasior makes no such general statement about your 3-pt interpolators. He i= >s however referring, as the title of the Appendix says, to "Interpolation o= >f discrete magnitude spectra using other windows". Since he is speaking of = >interpolating magnitude instead of complex coefficients, he is correct abou= >t the 2 bin spectrum width as a source of error in what he is doing.Nice catch. By my reading that's only clarified in the subtitle of the appendix, as the wording in Appendix A.2 and the statements following Eq. 13 are general and don't make that clarification.>> It is a bit of a yellow flag when an algorithm is presented without >> comparison to other algorithms used for the same purpose. > >Yes, it is. > >The 3-pt interpolaters are fine fast and dirty 'ad hoc' algorithms. People = >who have time to get accurate answers might consider using the algorithms t= >ailored to the window used and greater accuracy, for example: > >Accurate analysis of multitone signals using a DFT >John C. Burgess >Department of Mechanical Engineering, University of Hawaii, 2540 Dole Stree= >t, Honolulu, Hawaii >J. Acoust. Soc. Am. 116 (1), July 2004 > >In this paper, Burgess gives a method tuned to the cosine-summed windows.Yes, there are certainly methods that trade computational complexity for better performance. I'm more tuned toward computational efficiency for either restricted (i.e., complexity-constrained) hardware or embedded software implementation. What I'm seeing with the cited Gaussian interpolator is that it requires a lot more complexity than the other simple estimators I'm comparing it with, but it doesn't yield any better performance compared to the high-bang-for-the-complexity-buck estimators. If you're going to spend the complexity hit, you should get something for it.>Those who are interested in additional approaches to parameter estimation a= >nd analyses of those approaches that includes the effects of interferers as= > well as noise might consider: > >Proc of the 5th Int Conf on Digital Audio Effects (DAFx02) >Survey On Extraction Of Sinusoids In Stationary Sounds >Florian Keilor and Sylvain Marchand > >and: > >XVIII IMEKO WORLD CONGRESS >Metrology for a Sustainable Development >September, 17 =E2=80=93 22, 2006, Rio de Janeiro, Brazil >FAST MEASUREMENT OF POWER SYSTEM FREQUENCY >IN THE FREQUENCY DOMAIN >Du=C5=A1an Agre=C5=BE >Faculty of Electrical Engineering, University of Ljubljana, Slovenia > >I present these only as examples of the type of content that the DAFx and I= >MEKO conferences provide, there is more material that is relevant. I sugges= >t these conferences because their content has been freely available on the = >net. These conferences also have a lot of other good dsp stuff.(Google is y= >our friend.) > >Another characteristic that has not received much recognition in this threa= >d is the capability of the McEachern 2-pt and the "frequency reassignment" = >(from the DAFx citation) algorithms to provide useful parameter estimates e= >ven when there is a harmonic interferer close to the peak or that even remo= >ves the peak due to the frequency component being measured. Peak estimators= > can't go there.Every tool for its job. I've been seeing a fair number of iterative algorithms and "dichotomous search" algorithms that all have their relative benefits as well. I've not seen the McEachern technique, so I'll have to go look at that.>Dale B. DalrympleMeanwhile, I was bothered by the size of the error at 0.5 bins and worried that I had a bug that also affected the results elsewhere. Fortunately, I did find a bug that had to do with the peak being a little harder to locate when the main lobe is spread out. So, I redid the plots and now we see, with no noise, essentially the same results as when I zeroed the results at 0.5 bins offset: http://www.ericjacobsen.org/pics/GausIntrpSims_s8_nobug.jpg And at SNR = 3dB: http://www.ericjacobsen.org/pics/GausIntrpSims_s8_3dBSNR_nobug.jpg I still see no advantage to the Gaussian estimator (the magenta dots) compared to Candan's (the blue X's), except at 0.5 bins offset, and no advantage compared to the other estimators when noise is present. There are significant disadvantages to the Gaussian estimator, however, the biggest being the greatly increased computational complexity and another the added difficulty is choosing the magnitude maximizer closest to the correct bin when the main lobe is spread out. One can get potentially get around that, but at the cost of even more complexity. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 26, 20132013-02-26
On 2/25/13 11:37 PM, kevin wrote:> 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.ya know, the 3 point parabolic interpolator *has* to be correct when the frequency lies exactly halfway between bins. at least assuming a window that has even symmetry, then the F.T. of the window has even symmetry and the bump associated with a single frequency component has to have even symmetry about the "true" frequency. that means that two adjacent points will be equal height (the third point will be lower) and the parabolic interpolator will hit it spot on. add some noise, or overlapping of lobes, then i dunno. so, if a decent window is used, where does the parabolic interpolator have the greatest error in estimating the peak location (under ideal conditions)? when the true frequency is 1/4 bin off center on either the left or right? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●February 26, 20132013-02-26
On Tuesday, February 26, 2013 9:36:17 AM UTC-8, Eric Jacobsen wrote:> ... > Yes, there are certainly methods that trade computational complexity > for better performance. I'm more tuned toward computational > efficiency for either restricted (i.e., complexity-constrained) > hardware or embedded software implementation. What I'm seeing with > the cited Gaussian interpolator is that it requires a lot more > complexity than the other simple estimators I'm comparing it with, but > it doesn't yield any better performance compared to the > high-bang-for-the-complexity-buck estimators. If you're going to > spend the complexity hit, you should get something for it. > ...It's surprising how many titles include "high accuracy" and how few titles and bodies include "for the amount of additional calculation required in resource limited embedded implementations".> I still see no advantage to the Gaussian estimator (the magenta dots) > compared to Candan's (the blue X's), except at 0.5 bins offset, and no > advantage compared to the other estimators when noise is present. > There are significant disadvantages to the Gaussian estimator, > however, the biggest being the greatly increased computational > complexity and another the added difficulty is choosing the magnitude > maximizer closest to the correct bin when the main lobe is spread out. > One can get potentially get around that, but at the cost of even more > complexity. > > Eric JacobsenWhen I configure a spectrum analyzer for a large two-tone dynamic range, say 100 dB, I have no choice but to use a window with greater than 100 dB sidelobe suppression. All such windows have wide mainlobes. The problems aren't any different for a ad hoc 3-pt peak interpolator for a Kaiser-Bessel window than for a Gaussian. In either case, the application already requires a fat mainlobe and log scaling for readout or display, so there is no added complexity to the parabolic on the Gaussian. Both windows would have the flat top shape problems. I would probably perform the peak interpolation with every other or every third sample for better performance in noise in either case. Now, a spectrum analyzer is an instrumentation application, but you suggested instrumentation as an application in the first sentence of the DSP Tricks column. To be fair, I don't think that the DSP Tricks column allows enough space to get the details right for all the applications you chose to include in that first sentence. Dale B. Dalrymple
Reply by ●February 26, 20132013-02-26
On Tue, 26 Feb 2013 12:59:06 -0500, robert bristow-johnson <rbj@audioimagination.com> wrote:>On 2/25/13 11:37 PM, kevin wrote: >> 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. > >ya know, the 3 point parabolic interpolator *has* to be correct when the >frequency lies exactly halfway between bins. at least assuming a window >that has even symmetry, then the F.T. of the window has even symmetry >and the bump associated with a single frequency component has to have >even symmetry about the "true" frequency. that means that two adjacent >points will be equal height (the third point will be lower) and the >parabolic interpolator will hit it spot on. > >add some noise, or overlapping of lobes, then i dunno. > >so, if a decent window is used, where does the parabolic interpolator >have the greatest error in estimating the peak location (under ideal >conditions)? when the true frequency is 1/4 bin off center on either >the left or right?In both the CERN papers and my results the error shape is roughly a sinusoid with the peaks near the 0.25 bin offsets in no noise. As the SNR goes down the 0.5 bin offset gets noisiest, which is expected. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 26, 20132013-02-26
On Tue, 26 Feb 2013 11:43:35 -0800 (PST), dbd <dbd@ieee.org> wrote:>On Tuesday, February 26, 2013 9:36:17 AM UTC-8, Eric Jacobsen wrote: >> ... >> Yes, there are certainly methods that trade computational complexity >> for better performance. I'm more tuned toward computational >> efficiency for either restricted (i.e., complexity-constrained) >> hardware or embedded software implementation. What I'm seeing with >> the cited Gaussian interpolator is that it requires a lot more >> complexity than the other simple estimators I'm comparing it with, but >> it doesn't yield any better performance compared to the >> high-bang-for-the-complexity-buck estimators. If you're going to >> spend the complexity hit, you should get something for it. >> ... > >It's surprising how many titles include "high accuracy" and how few titles = >and bodies include "for the amount of additional calculation required in re= >source limited embedded implementations". > >> I still see no advantage to the Gaussian estimator (the magenta dots) >> compared to Candan's (the blue X's), except at 0.5 bins offset, and no >> advantage compared to the other estimators when noise is present. >> There are significant disadvantages to the Gaussian estimator, >> however, the biggest being the greatly increased computational >> complexity and another the added difficulty is choosing the magnitude >> maximizer closest to the correct bin when the main lobe is spread out. >> One can get potentially get around that, but at the cost of even more >> complexity. >>=20 >> Eric Jacobsen > >When I configure a spectrum analyzer for a large two-tone dynamic range, sa= >y 100 dB, I have no choice but to use a window with greater than 100 dB sid= >elobe suppression. All such windows have wide mainlobes. The problems aren'= >t any different for a ad hoc 3-pt peak interpolator for a Kaiser-Bessel win= >dow than for a Gaussian. In either case, the application already requires a= > fat mainlobe and log scaling for readout or display, so there is no added = >complexity to the parabolic on the Gaussian. Both windows would have the fl= >at top shape problems. I would probably perform the peak interpolation with= > every other or every third sample for better performance in noise in eithe= >r case.That's a pretty good example of a case where the constraints change the tradeoffs of what tool to use.> Now, a spectrum analyzer is an instrumentation application, but you= > suggested instrumentation as an application in the first sentence of the D= >SP Tricks column. To be fair, I don't think that the DSP Tricks column allo= >ws enough space to get the details right for all the applications you chose= > to include in that first sentence.Agreed, and not all instrumentation is outside the application space for the estimators considered in that article. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●March 3, 20132013-03-03
On Feb 26, 2:54�pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote:> On Tue, 26 Feb 2013 12:59:06 -0500, robert bristow-johnson > > > > > > > > > > <r...@audioimagination.com> wrote: > >On 2/25/13 11:37 PM, kevin wrote: > >> 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. > > >ya know, the 3 point parabolic interpolator *has* to be correct when the > >frequency lies exactly halfway between bins. �at least assuming a window > >that has even symmetry, then the F.T. of the window has even symmetry > >and the bump associated with a single frequency component has to have > >even symmetry about the "true" frequency. �that means that two adjacent > >points will be equal height (the third point will be lower) and the > >parabolic interpolator will hit it spot on. > > >add some noise, or overlapping of lobes, then i dunno. > > >so, if a decent window is used, where does the parabolic interpolator > >have the greatest error in estimating the peak location (under ideal > >conditions)? �when the true frequency is 1/4 bin off center on either > >the left or right? > > In both the CERN papers and my results the error shape is roughly a > sinusoid with the peaks near the 0.25 bin offsets in no noise. � As > the SNR goes down the 0.5 bin offset gets noisiest, which is expected. > > Eric Jacobsen > Anchor Hill Communicationshttp://www.anchorhill.comEric, I'm coming into this a little late - and I haven't read all papers you guys are referring to. The approach I've taken in the past to this is as follows: For the a pure sinusoid that is between FFT bins (and a given window e.g. hamming) the magnitude of the FFT bins is deterministic (in noise free case). I build a lookup table at the fractional frequencies. So you could have say 50 entries in the table. Then given the magnitude of 2 fft bins (the peak and the next largest peak) you look up in the table. As an extension you can then interpolate between the table entries to gain further accuracy. So if you took the case of a signal the falls exactly at 0.5 an FFT bin then the magnitdue of each neighbouring FFT bin should be the same (noise free case) and the table should give a good estimate. A couple of notes : 1) You can use this to get an estimate of the frequency and the amplitude, but you should use different table - you get different results (and accuracy) based on whether you use amplitude , amplitude squared, or log magnitude. 2) Generally I found the performance is the worst for the rectangular window. This is due to the high sidelobes of the window affecting the neighbouring FFT bins. 3) Performance will suffer at low SNR's or if there is leakage from neighbouring sinusoids. I wasn't sure if the 3dB SNR you mentioned previously was per FFT bin (i.e. narrow band noise) or wideband. I would think in the wideband case it would perform okay because you would have additional coherent gain from the FFT. The computational complexity tradeoff - the size of the lookup tables vs the cost of the interpolation. Also the table only really has to go from 0 - 0.5 an FFT bin since the values are symmetric from 0.5 - 1.0, so that saves the table size but costs a couple of instructions in the code. I apologize if this duplicate material. There is a write of some of these techniques in Mark Richard's book on Signal Processing for Radar, as well as the B&K technical manuals. Cheers, Dave
Reply by ●March 3, 20132013-03-03
On Feb 24, 9:59�am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:> On Thu, 21 Feb 2013 23:38:06 GMT, eric.jacob...@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_J... > > Thanks for that link Eric. �I'd never seen that > paper before. �Candan's paper sure makes that > E. Jacobsen fellow look smart. > > [-Rick-]Guys, I review papers for a couple of the IEEE journals. Fortunately my company has a fairly good IEEE subscription so I can read the most of the references. I also review for the Elsevier Signal Processing journal - when they ask me to review something they give you a 1 month access to their publications to have access to the references. It would be nice if the IEEE gave 1 month access to their journals for their reviewers. It would be really difficult for me to review journals without the access. Note in Elsevier's case the 1 month access starts once I look up the 1st reference - not when I first decide to accept to review something. Rick - maybe you could mention this to the IEEE people. Cause if you think about it - those IEEE journals would be nowhere without the reviewers. Cheers, Dave
Reply by ●March 3, 20132013-03-03
On 3/3/13 12:11 PM, Dave wrote:> > The approach I've taken in the past to this is as follows: > > For the a pure sinusoid that is between FFT bins (and a given window > e.g. hamming) the magnitude of the FFT bins is deterministic (in noise > free case). I build a lookup table at the fractional frequencies. So > you could have say 50 entries in the table. Then given the magnitude > of 2 fft bins (the peak and the next largest peak) you look up in the > table.and you can make it a one-dimensional table by normalizing the peak.> As an extension you can then interpolate between the table > entries to gain further accuracy. > > So if you took the case of a signal the falls exactly at 0.5 an FFT > bin then the magnitdue of each neighbouring FFT bin should be the same > (noise free case) and the table should give a good estimate.well, the normalized next largest peak value is 1.0 and that would map to a 1/2 bin offset.> > A couple of notes : > 1) You can use this to get an estimate of the frequency and the > amplitude, but you should use different table - you get different > results (and accuracy) based on whether you use amplitude , amplitude > squared, or log magnitude.yup.> > 2) Generally I found the performance is the worst for the rectangular > window. This is due to the high sidelobes of the window affecting the > neighbouring FFT bins.my concern is what i saw in Fig 1 of Eric's Sig proc magazine article. if you do this on two points from the main lobe and one point from an adjacent side lobe, that discontinuity bothers me. i s'pose with the two point interpolation, both points are on the same lobe. but if you wanted to estimate both the peak location and the peak height, i think you need at least 3 points. so i think a window that makes the main lobe wide enough that the discrete peak and its adjacent bins are known to all be on the same main lobe. so an estimate of both from the three points would be a good thing, me thinks. how about this: given the window - it's known but need not be a gaussian, can we create a mapping, in the noise-free case of the parabolic mapping to the true frequency and amplitude. it seems to me that such could be set up with the Fourier Transform of the window. could even be done empirically with a MATLAB program. hmmm. then, i wonder what would happen to this approach if there is noise or overlapping of nodes from other frequency components.> 3) Performance will suffer at low SNR's or if there is leakage from > neighbouring sinusoids.two points doesn't seem like it's enough.> I wasn't sure if the 3dB SNR you mentioned > previously was per FFT bin (i.e. narrow band noise) or wideband. I > would think in the wideband case it would perform okay because you > would have additional coherent gain from the FFT. > > The computational complexity tradeoff - the size of the lookup tables > vs the cost of the interpolation. Also the table only really has to go > from 0 - 0.5 an FFT bin since the values are symmetric from 0.5 - 1.0, > so that saves the table size but costs a couple of instructions in the > code.yup, if the window is real and even-symmetry, so is the F.T. of the window which is the real peak you are looking at.> I apologize if this duplicate material. There is a write of some of > these techniques in Mark Richard's book on Signal Processing for > Radar, as well as the B&K technical manuals.are the B&K tech manuals free online somewhere? i have an old B&K tech manual on Heiser's Time-Delay Spectrometry (Linear-swept frequency measurements) and some stuff about the Hilbert transform, the minimum phase component to a frequency response, the APF component, and the linear phase (pure delay) component and how to extract the different components from the frequency response (both magnitude and phase) of an acoustic system under test. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."







