Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!t16g2000yqi.googlegroups.com!not-for-mail
From: Greg <heath@alumni.brown.edu>
Newsgroups: comp.soft-sys.matlab,comp.dsp
Subject: Re: WARNING: Is there a use for ifft(X,M)?
Date: Fri, 12 Jun 2009 20:36:19 -0700 (PDT)
Organization: http://groups.google.com
Lines: 112
Message-ID: <d3a0827b-8314-41df-a587-dde72f81d97c@t16g2000yqi.googlegroups.com>
References: <8c3ffec9-42f0-4ba1-ac3c-f826d56dd963@y7g2000yqa.googlegroups.com> 
	<h0udmm$6ro$1@fred.mathworks.com>
NNTP-Posting-Host: 69.141.163.135
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1244864180 3338 127.0.0.1 (13 Jun 2009 03:36:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 13 Jun 2009 03:36:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: t16g2000yqi.googlegroups.com; posting-host=69.141.163.135; 
	posting-account=mUealwkAAACvQrLWvunjg50tRAnsNtJR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
	2.0.50727),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:547100 comp.dsp:258707


1234567890123456789012345678901234567890123456789012345
On Jun 12, 4:27 pm, "Matt " <x...@whatever.com> wrote:
> Greg Heath <he...@alumni.brown.edu> wrote in message > <8c3ffec9-42f0-4ba1-ac3c-f826d56dd...@y7g2000yqa.googlegroups.com>...
> > As long as the N components of the time sampled row
> > vector function x are presented in chronological order,
> > the use of fft(x,M) as shorthand for the zeropadding
> > operation fft([x,zeros(1,M-N)]) is relatively
> > straightforward.
>
> > In contrast, it has been show in recent posts, e.g.,
>
> >http://groups.google.com/group/comp.soft-sys.matlab/
> > msg/a76d7837e3d84bcf?hl=en
>
> > that when zero padding in the spectral domain, it is
> > essential to add the zeros so that both the real and
> > imaginary parts of the result are conjugate symmetric.
>
> I wouldn't confine this to the spectral domain. Might
> I not want to interpolate spectral samples using the
> dual of this technique, by zero-padding in the
> non-Fourier domain? In this case, the same concerns
> apply when pre-padding fft() input.

My oersonal opinion is that the two scenarios should
not be perceived as duals when, in both cases, the
measurements are temporal and spectra are only obtained
via the DFT of measured trmporal data.

In the temporal interpolation case N equally spaced
measurements of complex data are obtained during the
time interval [t1:dt:t2]. However, there is no requirement
that the data have conjugate symmetry nor have a special
position with respect to a fixed time origin that is
independent of the data. When the transform is taken,
the spectral samples are equally spaced on the frequency
interval [0:df:Fs-df] where Fs = 1/dt and df = 1/(t2+dt-t1).
Here the first transform value is always at zero frequency
regardless of any other parameters. In addition, the
transforms of the real and inaginary parts of the original
temporal signal have conjugate symmetry and are assumed
to be periodic with period Fs. The locations of the zero
and maximum frequency components are well defined. When
the spectrum is zeropadded to obtain an interpolated
temporal signal, the zeros must be inserted at a precise
location without disturbing the conjugate symmetry of the
transforms from the real and imaginary parts of the
original temporal signal.

This CANNOT be done using IFFT(FFT(x),M)!

In the spectral interpolation case the same N equally
spaced measurements of complex temporal data are obtained
during the time interval [t1:dt:t2]. Again, there is no
requirement that the data be conjugate symmetric nor
have a special position with respect to a fixed time
origin that is independent of the data. The only
requirement is that the data retain the order in which
they were measured. Therefore when the temporal data is
zeropadded to obtain an interpolated spectrum, the zeros
are naturally appended withinn the time interval
[t2+dt:dt:t1+(M-1)*dt].

This CAN be done using FFT(x,M)!


> Zero-padding the symmetric sequence  [a b c d c b a]
> results in
> [a b c d c b a 0 0 0 0 ...]
> which ruins conjugate symmetry, i.e. b is not the conjugate of 0, etc...

That is precisely why you should NOT use ifft(X,M)!

> > The purpose of this thread is to warn potential users
> > that none of the three techniques in the above reference
> > involves appending the zeros at the end of the spectrum
> > obtained from fft(x).
>
> > Therefore, I can find no use for ifft(X,M).
>
> What if the spectrum is not obtained from fft(x), but rather by some other means? For example, in MRI, spectral samples are obtained by direct measurement, and not by fft computation.

In this case it depends on how the spectrum is formatted.
If it is formatted so that ifft(X) produces the temporal
signal,

IFFT(X,M) will probably NOT produce a desirable interpolation.

> Also, if I want to convolve two spectra X and Y each of
> length M,

Do you mean length N (N<M)?

>this form still has a use
>
> fft( ifft(X,M).*ifft(Y,M-1))

1. The convolution length should be 2*M-1. However, can't use
" .* " with different length vectors. Something needs fixing.
2. If X is of length M, ifft(X,M) is identically equal to ifft(X).

> Can I find an instance where this would be applied?
> Perhaps to filter noisy spectral estimates...

OK. I understand your point, but we are concerned with
details. How would you caculate the convolution using
the single input option for ifft?

Hope this helps.

Greg