DSPRelated.com
Forums

Zero-padding, resolution and aliasing

Started by Amelia February 16, 2008
On Feb 17, 5:00 am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:
> ...
> > Hi glen, > Well,...perhaps we're having a sematics (language) > problem here. I was referring to a finite-duration > sequence's Fourier transform to be defined by the sequence's > discrete-time Fourier transform (DTFT). And the DTFT is > a continuous (and complex) function of the frequency > variable omega defined by: > > n = +inf > --- > X(w) = \ x(n)*exp(-jwn) > / > --- > n = -inf. >
It is a semantics problem. There is a common usage of "DTFT" to mean a finite impulse response and there is a common usage of "DTFT" to mean an infinite impulse response. Perhaps it would be easier to tell which meaning was in play if we used 'finite discrete time Fourier transform (FDTFT)' and ''infinite discrete time Fourier transform (IDTFT)', but that would avoid these swell pointless threads. However, to do that, the definition of FDTFT should have the summation limits changed to n1 and n2 instead of -inf and +inf.
> So if we consider the two-sample sequence: > > x1 = [2,3] > > and the 16-sample sequence: > > x2 = [0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0] > > and the infinite-length sequence: > > x3 = [...,0,0,0,0,0,0,2,3,0,0,0,0,0,0,...] > > is it not true that the above three sequences will all > have identical discrete-time Fourier transforms (DTFTs)?
If that question means: "Does the FDTFT of x1 equal the FDTFT of x2 and the IDTFT of x3?" then the answer is clear because the question is no longer ambiguous.
> ... > See Ya', > [-Rick-]
Others have already pointed out in this thread that x1 as a finite response does not adequately specify an infinite input to a transform. Since it clearly does not do so, that in itself suggests that it wasn't meant to imply an infinite response and a finite interpretation should be applied. But this kind of reasoning from context is seldom practiced by our eager semantics lawyers in the usenet groups. Dale B. Dalrymple http://dbdimages.com
On Feb 17, 11:42 am, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Feb 17, 5:00 am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote: > > > > > On Sat, 16 Feb 2008 23:46:09 -0800, glen herrmannsfeldt > > > <g...@ugcs.caltech.edu> wrote: > > >Rick Lyons wrote: > > > >(snip) > > > >> I agree with your words. The way I look > > >> at "zero padding" is as follows: given a > > >> finite duration sequence of time samples, that > > >> sequence has an "actual" continuous spectrum > > >> (infinitely fine granularity). The continuous > > >> spectrum is called the "discrete-time Fourier > > >> transform (DTFT). Using the DFT (or FFT), we > > >> can effectively "sample" that continuous spectrum > > >> and plot those samples on our computer screens. > > >> Zero padding the time sequence and performing > > >> larger DFTs merely gives us "more closely spaced" > > >> samples of the time sequence's continuous > > >> spectrum (its DTFT). > > > >I disagree. > > > >I finite sequence of samples does not have a continuous > > >transform unless you assume that there are an infinite > > >number of zero samples before and after the sequence. > > >With the extra zeros it is then an infinite sequence. > > > >Without specifying the rest of the sequence, the other > > >points should be considered "don't care" samples. > > > >-- glen > > > Hi glen, > > Well,...perhaps we're having a sematics (language) > > problem here. I was referring to a finite-duration > > sequence's Fourier transform to be defined by the sequence's > > discrete-time Fourier transform (DTFT). And the DTFT is > > a continuous (and complex) function of the frequency > > variable omega defined by: > > > n = +inf > > --- > > X(w) = \ x(n)*exp(-jwn) > > / > > --- > > n = -inf. > > > So if we consider the two-sample sequence: > > > x1 = [2,3] > > > and the 16-sample sequence: > > > x2 = [0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0] > > > and the infinite-length sequence: > > > x3 = [...,0,0,0,0,0,0,2,3,0,0,0,0,0,0,...] > > > is it not true that the above three sequences will all > > have identical discrete-time Fourier transforms (DTFTs)? > > > (Of course, as shown on page 50 of Oppenheim and Schafer, > > 3rd Edition, the DTFT of a sequence only exists if the > > sum of that sequence's samples is less than infinity.) > > > All I'm saying is that the x1 = [2,3] sequence has a > > continuous Fourier transform and that transform is: > > > X(w) = 2*exp(-j2w) + 3*exp(-j3w) > > > where the continuous frequency variable w (omega) is > > defined over a range of 2*pi, typically -pi to +pi. > > You've just assumed that the coeff's of exp(-j4w), etc. > are zero.
What you have done seems to be very common. Multiplying the known data by 1.0, and the unknown data by zero is actually a rectangular window. Applying a rectangular window without thinking about it seems to be the cause of a whole bunch of common misconceptions in DSP usage.
> IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
On Feb 17, 12:59 pm, "Ron N." <rhnlo...@yahoo.com> wrote:

> ... > What you have done seems to be very common. Multiplying > the known data by 1.0, and the unknown data by zero is > actually a rectangular window. Applying a rectangular > window without thinking about it seems to be the cause > of a whole bunch of common misconceptions in DSP usage. > > > IMHO. YMMV. > > -- > > rhn A.T nicholson d.0.t C-o-M
Any calculation we make and complete, except for symbolic manipulations will have a finite impulse response. If we are to talk about actual calculations we will talk about labeling part of all possible data with 1.0 and zeroing the rest. The misconceptions usually come from people who forget that or who take comfort in their symbolic manipulations and avoid the real effects of the finiteness of the data we work with. We deal with finite data sets. That is windowing, There is no other way to be in the real world, so why not face it and learn to deal with it? And as a start, why not try to talk and write so that people can tell whether you are dealing with the real world or practicing your symbolic manipulations? Dale B. Dalrymple
Rick Lyons wrote:

(snip)

> Well,...perhaps we're having a sematics (language) > problem here. I was referring to a finite-duration > sequence's Fourier transform to be defined by the sequence's > discrete-time Fourier transform (DTFT). And the DTFT is > a continuous (and complex) function of the frequency > variable omega defined by:
> n = +inf > --- > X(w) = \ x(n)*exp(-jwn) > / > --- > n = -inf.
> So if we consider the two-sample sequence:
> x1 = [2,3]
If x(n) is only defined for n=2 and n=3 I don't see any use in summing over -inf to +inf. Consider x(n) being an array in Fortran, or most any other computer language: elements outside the defined range are undefined. I believe that is true even in pure mathematics notation. -- glen
On Sun, 17 Feb 2008 11:42:27 -0800 (PST), "Ron N."
<rhnlogic@yahoo.com> wrote:

>On Feb 17, 5:00 am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote: >> On Sat, 16 Feb 2008 23:46:09 -0800, glen herrmannsfeldt >> >> >> >> <g...@ugcs.caltech.edu> wrote: >> >Rick Lyons wrote: >>
(snipped by Lyons)
>> >-- glen >> >> Hi glen, >> Well,...perhaps we're having a sematics (language) >> problem here. I was referring to a finite-duration >> sequence's Fourier transform to be defined by the sequence's >> discrete-time Fourier transform (DTFT). And the DTFT is >> a continuous (and complex) function of the frequency >> variable omega defined by: >> >> n = +inf >> --- >> X(w) = \ x(n)*exp(-jwn) >> / >> --- >> n = -inf. >> >> So if we consider the two-sample sequence: >> >> x1 = [2,3] >> >> and the 16-sample sequence: >> >> x2 = [0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0] >> >> and the infinite-length sequence: >> >> x3 = [...,0,0,0,0,0,0,2,3,0,0,0,0,0,0,...] >> >> is it not true that the above three sequences will all >> have identical discrete-time Fourier transforms (DTFTs)? >> >> (Of course, as shown on page 50 of Oppenheim and Schafer, >> 3rd Edition, the DTFT of a sequence only exists if the >> sum of that sequence's samples is less than infinity.) >> >> All I'm saying is that the x1 = [2,3] sequence has a >> continuous Fourier transform and that transform is: >> >> X(w) = 2*exp(-j2w) + 3*exp(-j3w) >> >> where the continuous frequency variable w (omega) is >> defined over a range of 2*pi, typically -pi to +pi. > >You've just assumed that the coeff's of exp(-j4w), etc. >are zero. What allows you to make the assumption that >an unspecified value is zero, or 17.5? A better assumption >might be that those coeff's are random variables with a 50% >chance of being either 2 or 3, since that's what's been >observed in the population so far. > > >IMHO. YMMV.
Hi Ron, Humm, ... I've tried to understand what you're telling me, but I'm having trouble. You seem to be saying that there is no such thing as a sequence containing only two samples. You asked: "What allows you to make the assumption that an unspecified value is zero, or 17.5?" I'm not making any assumptions about "unspecified values" because they do not exist. Can we at least agree that it is possible to write down, on a piece of paper, a sequence that has two samples? If we can agree on that, then I think we have a chance of understanding each other. Again, all I was saying is that the two-sample sequence, x1 = [2,3], has a continuous Fourier transform (DTFT). See Ya', [-Rick-]
On Feb 18, 6:44 am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:
> On Sun, 17 Feb 2008 11:42:27 -0800 (PST), "Ron N." > > <rhnlo...@yahoo.com> wrote: > >On Feb 17, 5:00 am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote: > >> On Sat, 16 Feb 2008 23:46:09 -0800, glen herrmannsfeldt > > >> <g...@ugcs.caltech.edu> wrote: > >> >Rick Lyons wrote: > > (snipped by Lyons) > > > > >> >-- glen > > >> Hi glen, > >> Well,...perhaps we're having a sematics (language) > >> problem here. I was referring to a finite-duration > >> sequence's Fourier transform to be defined by the sequence's > >> discrete-time Fourier transform (DTFT). And the DTFT is > >> a continuous (and complex) function of the frequency > >> variable omega defined by: > > >> n = +inf > >> --- > >> X(w) = \ x(n)*exp(-jwn) > >> / > >> --- > >> n = -inf. > > >> So if we consider the two-sample sequence: > > >> x1 = [2,3] > > >> and the 16-sample sequence: > > >> x2 = [0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0] > > >> and the infinite-length sequence: > > >> x3 = [...,0,0,0,0,0,0,2,3,0,0,0,0,0,0,...] > > >> is it not true that the above three sequences will all > >> have identical discrete-time Fourier transforms (DTFTs)? > > >> (Of course, as shown on page 50 of Oppenheim and Schafer, > >> 3rd Edition, the DTFT of a sequence only exists if the > >> sum of that sequence's samples is less than infinity.) > > >> All I'm saying is that the x1 = [2,3] sequence has a > >> continuous Fourier transform and that transform is: > > >> X(w) = 2*exp(-j2w) + 3*exp(-j3w) > > >> where the continuous frequency variable w (omega) is > >> defined over a range of 2*pi, typically -pi to +pi. > > >You've just assumed that the coeff's of exp(-j4w), etc. > >are zero. What allows you to make the assumption that > >an unspecified value is zero, or 17.5? A better assumption > >might be that those coeff's are random variables with a 50% > >chance of being either 2 or 3, since that's what's been > >observed in the population so far. > > >IMHO. YMMV. > > Hi Ron, > Humm, ... I've tried to understand what you're > telling me, but I'm having trouble. You seem to be > saying that there is no such thing as a sequence > containing only two samples. You asked: > "What allows you to make the assumption that > an unspecified value is zero, or 17.5?" > > I'm not making any assumptions about "unspecified > values" because they do not exist. > > Can we at least agree that it is possible to > write down, on a piece of paper, a sequence that > has two samples? If we can agree on that, then I > think we have a chance of understanding each other.
A vector of length 2, no problem. Calculating the dot product of two vectors of different lengths, problem. Some would say that the result is just unknown.
> Again, all I was saying is that the two-sample > sequence, x1 = [2,3], has a continuous Fourier > transform (DTFT).
I don't think I seem a complete and consistent formulation for the DTFT which uses a dot product of length 2. Leaving terms out is the same as applying a rectangular window and then calculating the dot product (or taking the limit of the dot product as n gets "big").
> See Ya', > [-Rick-]
IMHO. YMMV.
On 2008-02-16, Amelia <meelie2002@yahoo.fr> wrote:
> Basically, I have been zero-padding my data by 100,000 points and seeing > peaks appear in the spectrum where before there was just a broad, > asymmetric peak.
You've gotten answers from much more qualified people than me, but it seems odd that no one has asked if/how you are windowing the signal. If you are padding and then passing to a function which implements both the windowing and the FFT that might explain your results. Or if you were not windowing at all and your signal was periodic at its original length and the padding made it non-periodic. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/