DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Zero Padding in radix 2 FFT

Started by Iqbal ●December 30, 2005
John Monro wrote:

   ...

> The essential difference is that the Fourier series is a function of > time, and the DFT isn't. I know this is obvious to all concerned, but > we are talking about definitions here, I think. As I see it the DFT > provides the coefficients, but this set of coefficients becomes a > Fourier series only when you attach all the appropriate cos and sin > functions.
I haven't time to check back now, But I believe that I wrote that the DFT finds the coefficients of the Fourier series, not the series itself. If I wrote otherwise, I was wrong (as a definition). Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Ron N." <rhnlogic@yahoo.com> wrote in message
news:1136195132.221186.278250@z14g2000cwz.googlegroups.com...
> robert bristow-johnson wrote: >> well, even though i do not think about the real Fourier >> series >> (prefering the complex one) you know that i am a partisan >> for the >> notion that the DFT maps a discrete and periodic function >> of period N >> to another discrete and periodic sequence (also fully >> defined by N >> complex coefs. > > Why the condition of periodicity?
The DFT computes a set of coefficients based on a fundamental frequency and harmonics that are exactly periodic over the data window. It doesn't care whether your data is actually periodic or not. When you reconstruct the data from the DFT, it will generate an infinite stream of data windows, all exactly alike. From the point of view of the DFT, your data is periodic whether or not you think it is.
> In common use, a DFT is > used on sequences which rarely extend to last Tuesday, > much > less being periodic from before the big bang. Why not > just say > a DFT maps one discrete vector to another. The vector > pair > could be either periodic or finite. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.O.t C-o-M >
On Mon, 02 Jan 2006 01:45:32 -0800, Ron N. wrote:

> robert bristow-johnson wrote: >> [quoted text muted] > > Why the condition of periodicity? In common use, a DFT is > used on sequences which rarely extend to last Tuesday, much > less being periodic from before the big bang. Why not just say > a DFT maps one discrete vector to another. The vector pair > could be either periodic or finite.
Steven Smith gives a good description of what is happening here in his book "The Scientist and Engineer's Guide to DSP". Look at chapter 8, and in particular figure 8.2 in the online book. <http://www.dspguide.com> The upshot is that the DFT maps a set of time domain samples to a set of coefficients of discrete frequencies, and these scaled frequencies can then be added to produce a periodic, continuous function in time. The mapping is perfect, so if you sample the continuous function you get from the frequencies at the same times, you get your sample set back. Because of this, you can consider the sample set to have been initially periodic. You can also go the other way, and given a set of coefficients for frequencies, you can generate a continuous function in time, which can then be sampled and DFTd to get back your original set of frequency coefficients. These samples can be considered to live on a unit circle in the complex plane, which is divided into N pie slices, so it too can be considered periodic. So, a discrete non-periodic function that is represented by an infinite number of time samples maps to a continuous function in the frequency domain. On the other hand, a continuous bounded function within an interval T in the time domain generates an infinite number of discrete frequencies. This is the harmonics thing, ie, any periodic waveform can be represented by an infinite number of harmonics. The final indignity is an infinite, continuous, non-periodic function in the time domain, which can only be represented by an infinite function in the frequency domain. His mapping: Discrete Fourier Transform (DFT) is used for signals that are discrete and periodic. Discrete Time Fourier Transform (DTFT) is used for discrete, non-periodic signals. Fourier Series is used for continuous, periodic signals. Finally, the Fourier Transform is used for signals that are continuous and non-periodic. Understanding all this stuff is apparently necessary for understanding why anti-alias filters are required, why aliasing happens, and why windowing functions are used to alleviate the symptoms. (Take two sync functions, and call Dr Smith in the morning... ;) -- Regards, Bob Monsen "The expression often used by Mr. Herbert Spencer of the Survival of the Fittest is more accurate, and is sometimes equally convenient" -- Charles Darwin
Ron N. wrote:

> ... you can then force your > analysis to produce a result which more closely fits your assumptions.
That's often possible even when the assumptions are wrong, especially when the assumptions are about politics, history, or the like. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:
> John Monro wrote: > > ... > >> The essential difference is that the Fourier series is a function of >> time, and the DFT isn't. I know this is obvious to all concerned, but >> we are talking about definitions here, I think. As I see it the DFT >> provides the coefficients, but this set of coefficients becomes a >> Fourier series only when you attach all the appropriate cos and sin >> functions. > > > I haven't time to check back now, But I believe that I wrote that the > DFT finds the coefficients of the Fourier series, not the series itself. > If I wrote otherwise, I was wrong (as a definition). > > Jerry
Jerry, Yes, on checking back before this sub-thread you did indeed say, referring to the components of the DFT: "All the integrals are the coefficients a_n and b_n in the series a_n*sin(nwt)f(t)dt + b_n*cos(nwt)f(t)dt. " This doses of course infer that the DFT and the Fourier series are related but different. It seemed to me that in the more recent postings in this sub-thread there were two issues being discussed, but they were not clearly separated: They were: 1. Whether the DFT is a Fourier series or not 2. Whether the DFT coefficients allow you to is a good approximation of a Fourier series. I thought that it would be useful to make the point more strongly that the the DFT is not the Fourier series. Regards, John
John Monro wrote:

> It seemed to me that in the more recent postings in this sub-thread > there were two issues being discussed, but they were not clearly separated: > They were: > 1. Whether the DFT is a Fourier series or not > 2. Whether the DFT coefficients allow you to is a good approximation of > a Fourier series. > > I thought that it would be useful to make the point more strongly that > the the DFT is not the Fourier series.
i dunno if i want to start another comp.dsp semantics/philosophy war on this topic again (and this very topic of what the DFT *is* was the subject of a few slugfests in the past), but i will repeat: when all the smoke and dust clear and we start counting and burying the corpses, there is no mathematical difference (or "operational difference" to quote a favorite physicist of mine) between the DFT and the "Discrete Fourier Series". they are one and the same. and, to splash some airplane fuel on the old simmering coals, the consequence of the above fact is that the DFT *inherently* periodically extends the N numbers given to it, into an infinite periodic sequence of period N. you have N numbers in a vector, you might not consider them to be N discrete elements of a single period of an infinite and periodic sequence, but the DFT considers those N numbers to be precisely that. (flak jacket on) r b-j
"robert bristow-johnson" <rbj@audioimagination.com> wrote in 
message 
news:1136274315.757516.117120@f14g2000cwb.googlegroups.com...
> > John Monro wrote: > >> It seemed to me that in the more recent postings in this >> sub-thread >> there were two issues being discussed, but they were not >> clearly separated: >> They were: >> 1. Whether the DFT is a Fourier series or not >> 2. Whether the DFT coefficients allow you to is a good >> approximation of >> a Fourier series. >> >> I thought that it would be useful to make the point more >> strongly that >> the the DFT is not the Fourier series. > > i dunno if i want to start another comp.dsp > semantics/philosophy war on > this topic again (and this very topic of what the DFT *is* > was the > subject of a few slugfests in the past), but i will > repeat: when all > the smoke and dust clear and we start counting and burying > the corpses, > there is no mathematical difference (or "operational > difference" to > quote a favorite physicist of mine) between the DFT and > the "Discrete > Fourier Series". they are one and the same.
Considering the importance and ubiquitousness of the DFT in DSP, and because mathematics is not a democracy, I think that anything you can contribute to clarifying the facts is a positive boon. One way to see the difference between the Fourier Series and the DFT: try calculating the coefficients using the DFT and compare them to the coefficients you get when you use digital integration (using Simson's Rule, for example) to evaluate the FS over a data window. (Hint: don't stop calculating when you get to the Nyquist frequency.)
> > and, to splash some airplane fuel on the old simmering > coals, the > consequence of the above fact is that the DFT *inherently* > periodically > extends the N numbers given to it, into an infinite > periodic sequence > of period N. you have N numbers in a vector, you might > not consider > them to be N discrete elements of a single period of an > infinite and > periodic sequence, but the DFT considers those N numbers > to be > precisely that. >
Yep. The fundamental frequency of the DFT is the period of a sinusoid over the data window. If your signal is not periodic over the data window, you throw away information outside the data window. This becomes obvious if you ever try to reconstruct the original signal from the DFT: you can't.
> (flak jacket on)
I like asbestos. It's more flame-retardent.
> > r b-j >
robert bristow-johnson wrote:
> John Monro wrote: > > >>It seemed to me that in the more recent postings in this sub-thread >>there were two issues being discussed, but they were not clearly separated: >>They were: >>1. Whether the DFT is a Fourier series or not >>2. Whether the DFT coefficients allow you to is a good approximation of >>a Fourier series. >> >>I thought that it would be useful to make the point more strongly that >>the the DFT is not the Fourier series. > > > i dunno if i want to start another comp.dsp semantics/philosophy war on > this topic again (and this very topic of what the DFT *is* was the > subject of a few slugfests in the past), but i will repeat: when all > the smoke and dust clear and we start counting and burying the corpses, > there is no mathematical difference (or "operational difference" to > quote a favorite physicist of mine) between the DFT and the "Discrete > Fourier Series". they are one and the same. > > and, to splash some airplane fuel on the old simmering coals, the > consequence of the above fact is that the DFT *inherently* periodically > extends the N numbers given to it, into an infinite periodic sequence > of period N. you have N numbers in a vector, you might not consider > them to be N discrete elements of a single period of an infinite and > periodic sequence, but the DFT considers those N numbers to be > precisely that. > > (flak jacket on) > > r b-j >
Robert, Semantics / philosophy wars are half the fun of comp.dsp (:=) So, here goes: First, some things I am sure we all agree on: 1. The Fourier Series for any periodic waveform is a set of cos and sin functions that represents the instantaneous amplitude of the waveform at any time t. 2. The DFT (the process) is the usual way to obtain the amplitude of each of the cos and sin functions. 3. We also use the term 'DFT' to refer to the output of the DFT process and this DFT (output) is a set of complex numbers with the real values indicating the (real) amplitudes of the cos functions and the imaginary values indicating the (real) amplitudes of the sin functions. My argument is this: A. You CAN NOT calculate the value of the waveform at any instant (t) using only the DFT output. B. You CAN calculate the value at (t) using only the Fourier Series. Conclusion: The DFT and the Fourier Series are not the same thing. Finally, I am not sure of the point you were making about the infinite periodic sequence of N numbers produced by the DFT. I assume you are referring to the spectrum above the sampling frequency (or above fs/2) but I don't see the relevance. Regards, John
Beating a dead horse into dog food:

John Monro wrote:

> Jerry, > Yes, on checking back before this sub-thread you did indeed say, > referring to the components of the DFT: > "All the integrals are the coefficients a_n and b_n in the series > a_n*sin(nwt)f(t)dt + b_n*cos(nwt)f(t)dt. " > This doses of course infer that the DFT and the Fourier series are > related but different.
My sentence that you quoted also says that the integrations also determine only the coefficients of the Fourier series. It seems to me that makes the integrations entirely equivalent to a DFT.
> It seemed to me that in the more recent postings in this sub-thread > there were two issues being discussed, but they were not clearly separated: > They were: > 1. Whether the DFT is a Fourier series or not > 2. Whether the DFT coefficients allow you to is a good approximation of > a Fourier series. > > I thought that it would be useful to make the point more strongly that > the the DFT is not the Fourier series.
I'm sure it was. As long as we're here, another equivalence might be interesting. To determine the harmonic content of a proposed amplifier design, we used to plot its transfer function from the published tube characteristics, input a sine, and do a harmonic analysis of the output, all graphically. For the analysis, we selected a number of uniformly spaced points along the output curve (usually 24 for a whole cycle) and worked with the numbers picked off the plot. We were digitizing long before the word itself was invented. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
robert bristow-johnson wrote:
> John Monro wrote: > > >>It seemed to me that in the more recent postings in this sub-thread >>there were two issues being discussed, but they were not clearly separated: >>They were: >>1. Whether the DFT is a Fourier series or not >>2. Whether the DFT coefficients allow you to is a good approximation of >>a Fourier series. >> >>I thought that it would be useful to make the point more strongly that >>the the DFT is not the Fourier series. > > > i dunno if i want to start another comp.dsp semantics/philosophy war on > this topic again (and this very topic of what the DFT *is* was the > subject of a few slugfests in the past), but i will repeat: when all > the smoke and dust clear and we start counting and burying the corpses, > there is no mathematical difference (or "operational difference" to > quote a favorite physicist of mine) between the DFT and the "Discrete > Fourier Series". they are one and the same.
You didn't start it this time; I did.
> and, to splash some airplane fuel on the old simmering coals, the > consequence of the above fact is that the DFT *inherently* periodically > extends the N numbers given to it, into an infinite periodic sequence > of period N. you have N numbers in a vector, you might not consider > them to be N discrete elements of a single period of an infinite and > periodic sequence, but the DFT considers those N numbers to be > precisely that.
There's no assumption of periodicity. Does a hole in the roof assume that the floor will get wet in the rain? It just happens that way. The DFT of a train of samples gives a certain result, not affected by samples that aren't part of the train. I'd be surprised if you disagreed with that. I believe that everyone will agree that *if* that train represents N cycles of a periodic waveform (N a positive integer), then the Fourier series specified by that DFT will reconstruct that waveform. If I've sucked everybody in by now, answer this: can that same Fourier series (aka DFT, assuming that we allow the series to be represented by its coefficients) reconstruct anything else? Will a "viewpoint" affect the outcome of a mathematical operation? Clearly not, but it can affect what we make of that outcome, and I think that's where the angst lies. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;