Constructing an FFT-like result array.

1 次查看(过去 30 天)
Background: From a known complex frequency response, one can "build" an array that should look like the output of fft() by appending the conjugate array in reverse to the end of the original. Then, running the resulting array through ifft() gives the time domain impulse response. Question: Are there requirements or constraints on the endpoints, midpoint/midgap, number of array elements in either half, etc? For example, I have seen a 5000 element array constructed as follows: element 1 = 0+j0, elements 2-2501 are the original complex frequency response, elements 2502-5000 are the conjugates of elements 2500-2 (so 2500=2502*, 2499=2503* … 2=5000*), with element 2501 changed to abs() of itself. So elements 1 and 2501 seem to be "special". Now, I ran ifft() on that 5000 element array constructed as described, and again with element 2501 left as the original complex number. There was no visible difference in the calculated impulse response. So these observations have made me wonder what is the proper way to handle endpoints and midpoint (or midgap) of the array, in general.

采纳的回答

David Goodmanson
David Goodmanson 2019-11-15
HI betz,
All of the following applies if the time domain waveform is REAL
For a N point fft, N even:
(a) point 1 is the fourier coefficient for f=0, which is proportional to a DC offset in the time domain.
(b) points (2 : N/2) are fourier coefficents,
(c) point N/2+1 is the fourier coefficient at the nyquist frequency, the highest possible frequency.
(d) points (N/2 + 2 : N) are fourier coefficents that are the complex conjugates of (b) in reverse order as you mentioned,
Given the first N/2+1 points, you can reconstruct (d) from (b) and obtain the complete waveform.
In the time domain, the nyquist waveform is the fastest possible oscillation, alternating values of +1 and -1. The waveform is real, so its fourier coefficient (the amplitude) must be real. (If the imaginary part is anywhere near in size to the real part, something is seriously wrong). Any imaginary part is due to numerical imprecision, so setting it to its absolute value makes sense.
Assuming a real nyquist term, the value itself is usually very small,since most time domain waveforms do not have large, super-high-frequency oscillations. But if you go in and set the nyquist fourier coefficient to be large, you will definitely see an effect in the time domain.
As for point 1, people set that term to 0 for different reasons, sometimes because the system they are modelling cannot really have a DC offset, sometimes to remove a physically meaningful but annoying dc offset in a time domain plot, etc. Removing it makes sense sometimes, definitely not always.
  3 个评论
David Goodmanson
David Goodmanson 2019-11-15
Hi betz,
Odd N works his way, agian with the time domain waveform REAL.
For an N point fft, N odd:
(a) same comment as for N even.
(b) points (2 : (N+1)/2) are fourier coefficents.
(d) points ((N+1)/2 + 1 : N) are fourier coefficents that are the complex conjugates of (b) in reverse order.
Given the first (N+1)/2 points, you can reconstruct (d) from (b) and obtain the complete waveform.
Now (b) and (d) match up and there there is no unique nyquist point left over. However, conjugate points (N+1)/2 and (N+1)/2 + 1 still oscillate at frequencies that are almost as fast as the nyquist frequency would have been.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by