DSPRelated.com
Forums

Zero padding fftw

Started by simwes December 8, 2010
On Dec 8, 1:34&#4294967295;pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Zero padding can make it look like you are getting more resolution, > but you can't create resolution that isn't there in the first place.
This depends on the type of resolution you require. If you want to separate peaks, then zero padding won't buy you anything. If you want to more accurately locate isolated peaks (separated by say 3 bins or more), then interpolating by zero padding can create more accurate resolution of these locations (assuming the original signal was properly band-limited). Experiment: take a band-limited signal with a single clear peak, sample it above twice the highest frequency but with a sampling grid that does not include the peak location. You will then not see the peak in the actual sample values. Then resample the signal by using a FFT plus zero padded IFFT as the interpolator. The single peak location will now be resolved more accurately. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M http://www.nicholson.com/rhn/dsp.html
Resolution is also a term using for vision.  Interpolation
does not create more information than is already present
in the data.  But it does allow one to "see" the existing
information in more detail more easily.

> IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M > &#4294967295;http://www.nicholson.com/rhn/dsp.html
On Dec 9, 8:08&#4294967295;pm, illywhacker <illywac...@gmail.com> wrote:
> On Dec 9, 7:53&#4294967295;pm, Clay <c...@claysturner.com> wrote: > > > > That depends on your definition of "resolution". &#4294967295;Doing an FFT, zero > > > padding, then doing an IFFT is, IMHO, a valid way to do sample rate > > > conversion in batch applications. > > > I've actually read a few articles based on exactly this approach to > > resampling. It is valid. > > > Clay > > It is interpolation. It is based on a model of the signal. It is valid > to the extent that this model is valid.
Just like my Prof used to say when I was at Uni. Love it. :-)
> > illywhacker;
On Dec 9, 9:07&#4294967295;pm, Clay <c...@claysturner.com> wrote:
> On Dec 9, 3:08&#4294967295;pm, illywhacker <illywac...@gmail.com> wrote: > > > On Dec 9, 7:53&#4294967295;pm, Clay <c...@claysturner.com> wrote: > > > > > That depends on your definition of "resolution". &#4294967295;Doing an FFT, zero > > > > padding, then doing an IFFT is, IMHO, a valid way to do sample rate > > > > conversion in batch applications. > > > > I've actually read a few articles based on exactly this approach to > > > resampling. It is valid. > > > > Clay > > > It is interpolation. It is based on a model of the signal. It is valid > > to the extent that this model is valid. > > > illywhacker; > > Yes, resampling is interpolation.
Right. So were your signal produced by a musical instrument, for example, zero padding might not be the best thing to do, since the existence of lower harmonics implies the existence of higher ones. illywhacker;
On Dec 10, 6:55&#4294967295;am, illywhacker <illywac...@gmail.com> wrote:


> ...
.> > > It is interpolation. It is based on a model of the signal. It is valid .> > > to the extent that this model is valid.
> > > illywhacker;
.> > Yes, resampling is interpolation.
> Right. So were your signal produced by a musical instrument, for > example, zero padding might not be the best thing to do, since the > existence of lower harmonics implies the existence of higher ones.
> illywhacker;
Just as zero padding and filtering doesn't add any information, zero padding and filtering needn't remove any information. The only "model" that is relevant to the situation is whether the signal of interest survived the anti-aliasing filtering required before the original sampling. Dale B. Dalrymple
On Dec 10, 4:21=A0pm, dbd <d...@ieee.org> wrote:
> On Dec 10, 6:55=A0am, illywhacker <illywac...@gmail.com> wrote: > > > ... > > .> > > It is interpolation. It is based on a model of the signal. It > is valid > .> > > to the extent that this model is valid. > > > > > illywhacker; > > .> > Yes, resampling is interpolation. > > > Right. So were your signal produced by a musical instrument, for > > example, zero padding might not be the best thing to do, since the > > existence of lower harmonics implies the existence of higher ones. > > illywhacker; > > Just as zero padding and filtering doesn't add any information, zero > padding and filtering needn't remove any information. The only "model" > that is relevant to the situation is whether the signal of interest > survived the anti-aliasing filtering required before the original > sampling.
That model (i.e. that the signal 'survived' as you put it) is one possible model that would lead to the interpolation method discussed here under a squared error loss function. So would the model that the signal is white noise, and indeed any other model in which the Fourier components are independent with mean zero (this includes all translation invariant Gaussian models). illywhacker;
On Dec 10, 8:45=A0am, illywhacker <illywac...@gmail.com> wrote:
> On Dec 10, 4:21=A0pm, dbd <d...@ieee.org> wrote: > ... > > That model (i.e. that the signal 'survived' as you put it) is one > possible model that would lead to the interpolation method discussed > here under a squared error loss function.
> So would the model that the > signal is white noise, and indeed any other model in which the Fourier > components are independent with mean zero (this includes all > translation invariant Gaussian models). > > illywhacker;
White noise doesn't make sense as a model of the content of an anti- aliased and sampled signal. Dale B. Dalrymple
On Dec 11, 10:13=A0pm, dbd <d...@ieee.org> wrote:
> On Dec 10, 8:45=A0am, illywhacker <illywac...@gmail.com> wrote: > > > On Dec 10, 4:21=A0pm, dbd <d...@ieee.org> wrote: > > ... > > > That model (i.e. that the signal 'survived' as you put it) is one > > possible model that would lead to the interpolation method discussed > > here under a squared error loss function. > > So would the model that the > > signal is white noise, and indeed any other model in which the Fourier > > components are independent with mean zero (this includes all > > translation invariant Gaussian models). > > > illywhacker; > > White noise doesn't make sense as a model of the content of an anti- > aliased and sampled signal. > > Dale B. Dalrymple
Of course not. That is not what I said. When I say model, I am talking about a model of the signal before is was anti-aliased and sampled. Such a model is a prerequisite for signal reconstruction or resampling, explicitly or not. illywhacker;
On Dec 12, 5:24=A0am, illywhacker <illywac...@gmail.com> wrote:
> On Dec 11, 10:13=A0pm, dbd <d...@ieee.org> wrote: > > > > > On Dec 10, 8:45=A0am, illywhacker <illywac...@gmail.com> wrote: > > > White noise doesn't make sense as a model of the content of an anti- > > aliased and sampled signal. > > > Dale B. Dalrymple > > Of course not. That is not what I said. When I say model, I am talking > about a model of the signal before is was anti-aliased and sampled. > Such a model is a prerequisite for signal reconstruction or > resampling, explicitly or not. > > illywhacker;
In DSP we don't interpolate the signal as it was before anti-aliasing and sampling so modeling the signal as it was before anti-aliasing and sampling is irrelevant. If the signal of interest can be represented by the anti-aliased and sampled data then the interpolation may be valid whatever the signal source. If the signal can't be represented by the anti-aliased sampled data the problem isn't the interpolation, it's the choice to anti-alias and sample or the choice of how to anti- alias and sample that's the problem. Dale B. Dalrymple
On Dec 12, 6:30&#4294967295;pm, dbd <d...@ieee.org> wrote:
> On Dec 12, 5:24&#4294967295;am, illywhacker <illywac...@gmail.com> wrote: > > > > > > > On Dec 11, 10:13&#4294967295;pm, dbd <d...@ieee.org> wrote: > > > > On Dec 10, 8:45&#4294967295;am, illywhacker <illywac...@gmail.com> wrote: > > > > White noise doesn't make sense as a model of the content of an anti- > > > aliased and sampled signal. > > > > Dale B. Dalrymple > > > Of course not. That is not what I said. When I say model, I am talking > > about a model of the signal before is was anti-aliased and sampled. > > Such a model is a prerequisite for signal reconstruction or > > resampling, explicitly or not. > > > illywhacker; > > In DSP we don't interpolate the signal as it was before anti-aliasing > and sampling so modeling the signal as it was before anti-aliasing and > sampling is irrelevant. If the signal of interest can be represented > by the anti-aliased and sampled data then the interpolation may be > valid whatever the signal source. If the signal can't be represented > by the anti-aliased sampled data the problem isn't the interpolation, > it's the choice to anti-alias and sample or the choice of how to anti- > alias and sample that's the problem.
Obviously you have never heard of superresolution. In any case, the question is: what did the OP want? Or in other words, what are the extra samples, samples of? The case you are discussing is that in which: 1) only one signal in the range of the antialiasing is compatible with the values of the given samples; 2) the resampled signal required can be derived from the antialiased signal alone. We can assume (1), if the initial system is well-designed. But (2) renders the situation trivial, and it is hard to believe this is what the OP wanted (remember he or she wants to increase the resolution). If the resampled signal required is not a function of the antialiased signal alone, then more is required. illywhacker;