POV-Ray : Newsgroups : povray.off-topic : DFT and FFT : Re: DFT and FFT Server Time
6 Sep 2024 09:16:30 EDT (-0400)
  Re: DFT and FFT  
From: Orchid XP v8
Date: 17 Jan 2009 05:53:50
Message: <4971b8be$1@news.povray.org>
> That much I got, and the order of the data seemed to make sense to me, 
> what's racking my brain is the butterfly... That seems to be the "magic" 
> piece that makes the whole thing work.

Well, you *could* take the time-domain signal and cut it into two 
halves. But that's not very easy to undo in the frequency domain. So 
what they usually do is take all the odd samples and all the even samples.

Taking all the even samples is just halving the sampling rate. [Assuming 
0-based indexing!] Halving the time domain means doubling the frequency 
domain. (Think about it: You take a sound, cut out half the samples, 
that's like doubling the playback speed. All the pitches are twice as high!)

Taking all the odd samples is like shifting one sample to the side and 
then halving the sampling rate as per above. In the frequency domain, 
such a time shift is a multiplication by a sinewave.

So, to undo all this, double both signals, multiply one by a sinewave, 
then add them back together. Hence, the butterfly.

>> Combining in the frequency domain must undo what was done 
>> by splitting in the frequency domain...

Grr... "Combining in the *frequency domain* must ondo what was done by 
splitting in the *time domain*." Get it right, boy! >_<

>> Multiplication in the frequency domain is convulotion in the time 
>> domain, and vice versa. FFT convolution is mildly more tricky than it 
>> looks at first. (You gotta chop the input into "blocks" to run it 
>> through the FFT, and you need to overlap them after you're done or the 
>> "blur" will stop at the block edges - which is wrong.)
> 
> I'm supposing this is where Hamming and Blackmann windows come into play?

No. Those come into play if you're trying to desing a digital filter. 
(E.g., a "perfect" lowpass filter has an infinite frequency response, 
but we can't do that. If you just chop the ends off it screws up the 
frequency response. Using (say) a Hamming window reduces the effect - 
but doesn't eliminate it.)

Recall that the convolution of a signal by some kernel is *longer* than 
the original signal. This is the effect you have to repeat when doing 
FFT convolution. (The details escape me at this exact moment... Suffice 
it to say that your inverse-FFT results have to be overlapped to get a 
smooth result.)

> I knew you'd have something to add to this, since you seem to be quite 
> advanced in mathematics.

Meh. I wanted to build a digital filter, so I read a rather excellent 
book on the subject. ;-)

Wanna see the Z-transform?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.