DSPRelated.com
Forums

proper terminology for one bin of an fft/dft?

Started by Ron N. March 13, 2006
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
Eric Jacobsen wrote:
> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >>in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >>rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >> >>>John Monro wrote: >>> >>>>Rick Lyons wrote: >>>>(snip) >>>> >>>>>"The DFT's second and third bins centers >>>>>(2*Fs/N and 3*Fs/N respectively) are separated >>>>>by 100 Hz." >>>>> >>>> >>>> >>>>Rick, >>>> >>>>Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>>More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>>commonly refered to as the first bin or the zero-th bin? >> >>it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >>i heartily disagree with John Monro on this, but we are all free to believe >>what we will about the same. it is not the time of Galileo. > > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices. > Eric Jacobsen
Eric and Robert, I have NEVER found anyone to be confused at the concept that the second bin contains the amplitude of F1 and that the first bin contains the amplitude of F0. If there is anyone who is confused by this then I don't think DSP would be a very wise career choice for them. :=) In computing generally, when we process arrays of numbers the 'natural' numbering of the elements does NOT correspond to the index numbers we choose to use for their storage. I think that in general it is a bad principle to change conventions to suit the problem. In the case of the FFT you see some advantage in nominating the initial element as the 'zero-th' but what great advantage does this give? Compare any advantage gained here with the incredible confusion that would result if the concept of 'first' became relative, and was Dependant on the problem at hand. Regards, John
in article rn1122l389d5fefrrnksh7h5arn5m2hrif@4ax.com, Eric Jacobsen at
eric.jacobsen@ieee.org wrote on 03/21/2006 18:08:

> On Mon, 20 Mar 2006 22:58:58 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> in article 1142906425.123342.171790@u72g2000cwu.googlegroups.com, Ron N. at >> rhnlogic@yahoo.com wrote on 03/20/2006 21:00: >> >>> John Monro wrote: >>>> Rick Lyons wrote: >>>> (snip) >>>>> >>>>> "The DFT's second and third bins centers >>>>> (2*Fs/N and 3*Fs/N respectively) are separated >>>>> by 100 Hz." >>>>> >>>> >>>> >>>> Rick, >>>> >>>> Shouldn't that be "... (Fs/N and 2*Fs/N respectively)..."? >>> >>> More nomeclature ambiguity. Is the DC term of a DFT/FFT more >>> commonly refered to as the first bin or the zero-th bin? >> >> it depends on if you're a MATLAB or Fortran user (and happy with it) or not. >> >> i heartily disagree with John Monro on this, but we are all free to believe >> what we will about the same. it is not the time of Galileo. > > Not surprisingly, I'm with you here. To call bin one, which has > exactly one sinusoidal cycle per bin, the second bin just adds > confusion. > > The zeroth bin is DC, or zero Hz, or zero cycles per aperture. In > this case the nomenclature is consistent with the meaning of the > indices.
what i;ve done recently (this audio class we had last year where there wasn't enough preparation in linear system theory) is use the terms "zeroeth", "oneth" and "twoth" and *not* use the terms "first" or "second". in article ql1122tf12it7jgshvpgkosp188v2vo22n@4ax.com, Eric Jacobsen at eric.jacobsen@ieee.org wrote on 03/21/2006 18:05:
> On 21 Mar 2006 11:19:57 -0800, "Andor" <andor.bariska@gmail.com> > wrote: > >> uh oh > > LOL! > > That was more or less my thought as well. ;)
what's this about? is it another volley of flak regarding the one and only *true* nature of the DFT? if so, then it *is* the time of Galileo and i'm willing to set fire to heretics. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
in article 1142987696.468220.318440@j33g2000cwa.googlegroups.com, Ron N. at
rhnlogic@yahoo.com wrote on 03/21/2006 19:34:

> Bob Cain wrote:
...
>> The DFT samples the continuous frequency domain function that actually >> describes what the FIR will do. No water splashed anywhere that I can >> see. :-) > > There is a *lot* of splashing. A DFT implies a finite length vector. > But any window on the real world to create a finite vector will cause > aliasing.
boy, Ron. i hadn't seen you around here until recently (< 1 year ago, i think), but i like what i read. *my* orthodoxy in this (which i believe is perfectly compatible with O&S scripture) is that the DFT maps an infinite periodic sequence with period N (so an N-vector suffices to define it) in one domain (say the "time domain") to another infinite periodic sequence with period N in the reciprocal domain. not only is the windowing in the real world done to yank out a set of N samples out of a potentially longer stream of samples, when you pass it to the DFT, you are effectively periodically extending the son-of-a-bitch to infinity in both directions. (or, to anthropomorphize, the DFT does it or "assumes" that.)
> Any frequency content in the signal that is not an *exact* > multiple of Fs/N will, after the windowing and fft, look like a sinc > pulse splashing amplitude all over every bin to the limits of the > arithmetic precision.
and you won't be able to tell the difference between that and a corresponding periodic sequence that, after windowing, has the same N samples passed to the DFT and has *only* frequencies that are multiples of Fs/N.
> Since a continuous signal can only be reconstructed from the samples > only if a signal is perfectly bandlimited and infinite in extent, the > continuous function and the continuous spectrum of any signal from > the real world can only be approximated by the samples. So I think > it is reasonable to talk about them separately, unless you are talking > only about artificial or theoretical signals. > > Your assumption of an infinitely repeating signal is only an artifact > of the finite length window,
whoa! it's an artifact of passing it to the DFT. the windowing didn't do that. it's because you are essentially fitting a basis of periodic functions (all with period N) to that finite, *possibly* windowed set that you get an infinitely repeating signal. i'll have to re-evaluate which side of this religious war you are on. hmmmmm.
> and rarely ever applies to any actual > signal or set of samples. If is very tempting to make assumptions > which help make a mathematical analysis become more tractable. But > with the help of computers these days we can sometimes calculate > estimates of results without making as many false assumptions about > the actual underlying signal.
that, i am not sure of, until we get to specifics. don't worry Ron, this is a religious war that flames up every few years here and i am definitely a partisan of a particular POV. (and everyone who disagrees burns as a heretic.) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
in article 44209c82$0$7533$afc38c87@news.optusnet.com.au, John Monro at
johnmonro@optusnet.com.au wrote on 03/21/2006 19:38:

> Eric and Robert, > I have NEVER found anyone to be confused at the concept that the second > bin contains the amplitude of F1 and that the first bin contains the > amplitude of F0.
so everyone you know is quite happy with the way indexing is hard-wired into MATLAB, i s'pose? that's another religious war we've had here, but IMO, it's more like the debate the science community (the good guys) are having with the Intelligent Design folks (who want to pollute our kid's brains with lies). X[k] is the value of the "(k)th" or the "(k+1)th" bin? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Eric Jacobsen wrote:

> Mark, I did like your water baloon analogy to a point. Like most > analogies it has it's limitations but the idea of not having splatter > when you hit the bin exactly was pretty cool.
Thanks.
> > I think, however, that the current arguments are somewhat semantic, as > I think many of these sorts of arguments ultimately turn out to be.
Agreed.
> > The fact that the DFT/FFT has an inverse suggests that it does > essentially mean that it can easily be interpreted as a sampling of > the frequency domain. The nuances of what happens between the > samples can be argued in both the time and frequency domains. The > nuances of the details between bins is, IMHO, more a function of > having a finite analysis window than anything. Consider that as the > length of the window grows to infinity, the sinx/x issues become > smaller and smaller and ultimately vanish with the window.
I'm simulating this now. I'll let you know as soon as the infinite length DFT finishes ;)
> > There are some additional concerns as we all know (well, as many of us > know), but I wouldn't argue that the frequency domain coefficients of > an FFT _aren't_ just frequency-domain samples. From certain > perspectives that's actually a quite good description of their nature.
It is a useful analogy which fits reality well enough, most of the time. As you note, analogies have their limitations. I think of DFT bins as approximations of the spectrum, rather than samples. But that brings us back to semantics. When I need more rigor, I think of DFT bins as correlations with sinusoids. -- Mark