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
Jerry Avins wrote:
> The FFT is a marvelously simplified way to calculate the Fourier series > that represents a particular periodic function f(t).
Um, since when was the DFT the same as the Fourier series? Let's not confuse approximation with definition.
stevenj@alum.mit.edu wrote:
> Jerry Avins wrote: > >>The FFT is a marvelously simplified way to calculate the Fourier series >>that represents a particular periodic function f(t). > > > Um, since when was the DFT the same as the Fourier series? Let's not > confuse approximation with definition.
Try it with a square wave. The approximation is pretty good. (It would not be nearly so useful otherwise.) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Sigh, I said nothing about whether the approximation was "pretty good"
or not. It certainly is (although there are more accurate
approximations using adaptive quadrature).  But you are confusing
matters when you equate two things that are only approximately related.

stevenj@alum.mit.edu wrote:
> > Um, since when was the DFT the same as the Fourier series? Let's not > confuse approximation with definition.
well, it isn't the same as a Fourier series of a periodic continuous-time function, but the DFT most certainly is the same as the Fourier series of a periodic discrete-time function. the DFT maps a discrete periodic function in one domain (call it the "time domain") of period N, to another discrete periodic function in the reciprocal domain (call that the "frequency domain") of the same period length, N. both discrete periodic functions are fully defined by N complex numbers and the DFT maps the N numbers from one to the N numbers of the other. do you disagree with this characterization, Steven? r b-j (still in FL)
stevenj@alum.mit.edu wrote:
> Sigh, I said nothing about whether the approximation was "pretty good" > or not. It certainly is (although there are more accurate > approximations using adaptive quadrature). But you are confusing > matters when you equate two things that are only approximately related.
The DFT is called a transform, but being discrete, has a finite spacing between terms. In that, it is far more like a Fourier series than a Fourier transform. Thinking of a DFT as a transform -- a misnomer it seems to me -- instead of as a series has a pernicious effect on understanding its nature and leads to asking about its value "between the bins". If you can bear it, please enlighten me about where the approximation breaks down and what difficulties arise from ignoring the discrepancy. The actual phases and amplitudes are exactly the same. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
robert bristow-johnson wrote:
> stevenj@alum.mit.edu wrote: > >>Um, since when was the DFT the same as the Fourier series? Let's not >>confuse approximation with definition. > > > well, it isn't the same as a Fourier series of a periodic > continuous-time function, but the DFT most certainly is the same as the > Fourier series of a periodic discrete-time function. the DFT maps a > discrete periodic function in one domain (call it the "time domain") of > period N, to another discrete periodic function in the reciprocal > domain (call that the "frequency domain") of the same period length, N. > both discrete periodic functions are fully defined by N complex > numbers and the DFT maps the N numbers from one to the N numbers of the > other. > > do you disagree with this characterization, Steven? > > r b-j > > (still in FL) >
Robert, While I agree that the DFT can be used to find the Fourier series, and that this can be done accurately under the conditions you describe,I don't agree that this makes the DFT the same as the Fourier series. 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. Regards, John
robert bristow-johnson wrote:
> stevenj@alum.mit.edu wrote: > >>Um, since when was the DFT the same as the Fourier series? Let's not >>confuse approximation with definition. > > > well, it isn't the same as a Fourier series of a periodic > continuous-time function, but the DFT most certainly is the same as the > Fourier series of a periodic discrete-time function. the DFT maps a > discrete periodic function in one domain (call it the "time domain") of > period N, to another discrete periodic function in the reciprocal > domain (call that the "frequency domain") of the same period length, N. > both discrete periodic functions are fully defined by N complex > numbers and the DFT maps the N numbers from one to the N numbers of the > other. > > do you disagree with this characterization, Steven? > > r b-j > > (still in FL) >
Robert, While I agree that the DFT can be used to find the Fourier series, and that this can be done accurately under the conditions you describe,I don't agree that this makes the DFT the same as the Fourier series. 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. Regards, John
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? 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
Iqbal wrote:
> Sorry for starting this topic all over again. I had seen some previous > discussions on zero padding and when I started reading them I > completely got lost. > > When I am provided with samples which are not of power of 2 and I need > to implement FFT, I zero pad the samples to the next highest power of > 2. I do FFT using Cooley Tukey algo and observe that the frequency > componets in several bin - ie there is spectral leakage even though the > signal given to me had a single tone. > > I did think of using some of the algos given to interpolate and find > the exact signal frequency. But then this would work only if the > samples given to me were of single tone, the problem is I would have no > idea of the kind of signal I am looking at.
If you have a vector of samples, then you already have a rectangular window on your original signal. This could make a single tone appear to have some spectral leakage. Or it could be a window on some wild discontinuous function which just happens to make it appear to be a segment of a single pure sine wave. If you really don't have any idea of the kind of signal you are looking at, then you don't know which. Often the physics (or some other a-priori knowledge) of the signal makes one more likely than the other, and you can then force your analysis to produce a result which more closely fits your assumptions. IMHO. YMMV. -- rhn A.T nicholson d.O.t C-o-M
Ron N. wrote:
> 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? 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.
Sure, and it sorta works when you do that, but the simple analysis breaks down. You also incur the need to window. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������