Thread View: comp.soft-sys.matlab
4 messages
4 total messages
Started by David Page
Sun, 13 May 2001 07:32
Shape information preservation in DFT
Author: David Page
Date: Sun, 13 May 2001 07:32
Date: Sun, 13 May 2001 07:32
11 lines
1653 bytes
1653 bytes
I am a novice in Matlab. Please excuse if this question sounds silly. I am experimenting with fft and ifft function of Matlab. When I take a fourier transform of a function, it fives me the frequency and its amplitude (weight of the frequency) and does not contain any information about the location of these frequencies. If the above is true, how can it reconstruct the whole signal again when ifft is applied ? How does it remember the locations of the frequencies ? Thanks in advance.
Re: Shape information preservation in DFT
Author: Bob Cain
Date: Sun, 13 May 2001 08:26
Date: Sun, 13 May 2001 08:26
42 lines
2598 bytes
2598 bytes
David Page wrote:
>
> I am a novice in Matlab. Please excuse if this question sounds silly.
>
> I am experimenting with fft and ifft function of Matlab. When I take a
> fourier transform of a function, it fives me the frequency and its amplitude
> (weight of the frequency) and does not contain any information about the
> location of these frequencies.
>
> If the above is true, how can it reconstruct the whole signal again when
> ifft is applied ? How does it remember the locations of the frequencies ?
The DFT/FFT does no time localization. It presumes the signal is
periodic in the length of the transform and thus that all the
frequencies are infinite in temporal extent. All that can be said about
the time of a frequency given that it is infinite in both directions is
its phase which is periodic in 2*pi. There are other orthogonal bases
for signal decomposition than the trigonometric one Fourier found which
do not presume signal periodicity and give frequency related time
localization. Look at wavelet theory.
Bob
--
"Things should be described as simply as possible, but no simpler."
A. Einstein
////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
To contribute your unused processor cycles to the fight against cancer:
http://www.intel.com/cure
To feed a hungry kid today at the cost of a click follow this link:
http://www.thehungersite.com/cgi-bin/WebObjects/HungerSite
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////////////////////
Re: Shape information preservation in DFT
Author: Barry D. Jacobson
Date: Sun, 13 May 2001 15:54
Date: Sun, 13 May 2001 15:54
67 lines
4531 bytes
4531 bytes
Hi David: I think Bob's answer was not exactly what you were looking for, and was based on more complex mathematics. I think the answer to what is bothering you is the sampling rate issue. Matlab's FFT produces a set of frequency points which need additional information from you to interpret what frequency they correspond to in real life. The length of the sequence and the sampling rate determine the mapping to real life. For instance if you have a sequence of length L and sampling rate Fs then the highest real-life frequency (which is actually at about the midpoint of your Matlab FFT sequence) corresponds to 1/2 the sampling rate (Nyquist frequency). Each frequency point is then 2/L of the Nyquist freq. (The factor of 2 comes in because the second half of FFT sequence is mirror image of first and contains no new information for real signals. (These are called the negative frequencies which, in the usual DSP convention follow the positive freqs instead of preceeding them as in analog world. You can switch arrangement using FFTSHIFT command) The first frequency point is the DC value. The next is (Fs/2)/(L/2) or Fs/L the next is 2Fs/L, the next 3Fs/L until you reach midpoint (L/2) (Fs/L) or simply Fs/2, the highest possible freq. (next point begins the negative freqs). So if you have sequence 1000 points long and Fs is 100Hz, then first point is DC, second is .1 Hz, third is .2 Hz, fourth is .3 Hz, etc. (Note people normally use a power of 2 for length of FFT but this is only because FFT computation is faster that way. There is nothing else magic or more accurate about powers of 2, contrary to popular misconception.) When you use IFFT to transform back to time, you still have same issue of what point in real life time corresponds to each point in sequence. The answer here also depends on sampling rate. The first point is starting point T0 the second point is T0 plus 1/Fs, the next T0 plus 2/Fs, etc. Since sampling rate figures into both calculations, the FFT and IFFT sequences are really not affected by whatever sampling rate you choose. The only difference is the mapping to real life. So matlab just takes one sequence as input and produces other sequence as output. It is up to you to interpret what they mean in your system. This is why many digital signal processing functions in matlab use a normalized sampling rate from 0 to 1 instead of your actual rate. You just multiply or divide by real sampling rate to convert between the two. I hope this clears things up. Barry Jacobson Harvard-MIT Division of Health Sciences and Technology bdj@mit.edu Maybe this David Page <david@REMOVE_SPAM.imhost.com> wrote in message news:eMqL6.71357$2U.31863845@news2.rdc2.tx.home.com... > I am a novice in Matlab. Please excuse if this question sounds silly. > > I am experimenting with fft and ifft function of Matlab. When I take a > fourier transform of a function, it fives me the frequency and its amplitude > (weight of the frequency) and does not contain any information about the > location of these frequencies. > > If the above is true, how can it reconstruct the whole signal again when > ifft is applied ? How does it remember the locations of the frequencies ? > > Thanks in advance. > >
Re: Shape information preservation in DFT
Author: David Page
Date: Sun, 13 May 2001 18:19
Date: Sun, 13 May 2001 18:19
78 lines
5106 bytes
5106 bytes
Thanks Barry and Bob. Barry, the idea is now concrete in my mind. I realized what I was missing before. Thank you for the wonderful explanation. David. "Barry D. Jacobson" <bdjacobs@bellatlantic.net> wrote in message news:Y6yL6.46346$Rg2.1574300@typhoon2.ba-dsg.net... > Hi David: > > I think Bob's answer was not exactly what you were looking for, and was > based on more complex mathematics. I think the answer to what is > bothering you is the sampling rate issue. Matlab's FFT produces a set of > frequency points which need additional information from you to interpret > what frequency they correspond to in real life. The length of the > sequence and the sampling rate determine the mapping to real life. For > instance if you have a sequence of length L and sampling rate Fs then > the highest real-life frequency (which is actually at about the midpoint > of your Matlab FFT sequence) corresponds to 1/2 the sampling rate > (Nyquist frequency). Each frequency point is then 2/L of the Nyquist > freq. (The factor of 2 comes in because the second half of FFT sequence > is mirror image of first and contains no new information for real > signals. (These are called the negative frequencies which, in the usual > DSP convention follow the positive freqs instead of preceeding them as > in analog world. You can switch arrangement using FFTSHIFT command) The > first frequency point is the DC value. The next is (Fs/2)/(L/2) or Fs/L > the next is 2Fs/L, the next 3Fs/L until you reach midpoint (L/2) (Fs/L) > or simply Fs/2, the highest possible freq. (next point begins the > negative freqs). So if you have sequence 1000 points long and Fs is > 100Hz, then first point is DC, second is .1 Hz, third is .2 Hz, fourth > is .3 Hz, etc. (Note people normally use a power of 2 for length of FFT > but this is only because FFT computation is faster that way. There is > nothing else magic or more accurate about powers of 2, contrary to > popular misconception.) > > When you use IFFT to transform back to time, you still have same issue > of what point in real life time corresponds to each point in sequence. > The answer here also depends on sampling rate. The first point is > starting point T0 the second point is T0 plus 1/Fs, the next T0 plus > 2/Fs, etc. Since sampling rate figures into both calculations, the FFT > and IFFT sequences are really not affected by whatever sampling rate you > choose. The only difference is the mapping to real life. So matlab just > takes one sequence as input and produces other sequence as output. It is > up to you to interpret what they mean in your system. This is why many > digital signal processing functions in matlab use a normalized sampling > rate from 0 to 1 instead of your actual rate. You just multiply or > divide by real sampling rate to convert between the two. > > I hope this clears things up. > > Barry Jacobson > Harvard-MIT Division of Health Sciences and Technology > bdj@mit.edu > > Maybe this > > David Page <david@REMOVE_SPAM.imhost.com> wrote in message > news:eMqL6.71357$2U.31863845@news2.rdc2.tx.home.com... > > I am a novice in Matlab. Please excuse if this question sounds silly. > > > > I am experimenting with fft and ifft function of Matlab. When I take a > > fourier transform of a function, it fives me the frequency and its > amplitude > > (weight of the frequency) and does not contain any information about > the > > location of these frequencies. > > > > If the above is true, how can it reconstruct the whole signal again > when > > ifft is applied ? How does it remember the locations of the > frequencies ? > > > > Thanks in advance. > > > > > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads