Re: FFT convolution giving different results from convolution
- From: Gordon Sande <g.sande@xxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 20:34:15 GMT
Bob Cain wrote:
Michel Rouzic wrote:
um... i'm trying to do a convolution with a input signal of 2,103,154 samples and a kernel filter of 3 samples, both brought back to 2,103,156 samples. is that wrong?
If you are under the constraint of dealing with arbitrary length sequences then for the FFT to work, padding to a power of two greater than or equal to the sum of the lengths is correct. Your numbers sum to just a bit greater than 2^21 requiring you to pad both to 2^24 (4,194,204) to do it directly without an overlap add/save type implementation of the convolution. If one sequence is always going to be a good deal smaller than the other, using overlap add/save will give signifigant savings.
Actually, generalized FFT's can be done on arbitary lengths but the saving in calculation is highly variable and depends on the number of factors of the number. The more the better. If your length is prime, the generalized FFT won't be any faster than a naive DFT.
Good FFTs based on 2s, 3s and 5s are easy to come by once you realize that they exist. The next composite number having only factors of 2, 3 and 5 and that is larger than 2,000,000 will almost surely be less than 5% larger. If I recall the details, by the time your get to around 10,000 the increase is always below 5% and it only gets better as the size goes up. And you only need the sum of the supports of the two sequences to avoid the circular convolution artifacts.
Bob
.
- References:
- FFT convolution giving different results from convolution
- From: Michel Rouzic
- Re: FFT convolution giving different results from convolution
- From: Jerry W.
- Re: FFT convolution giving different results from convolution
- From: Michel Rouzic
- Re: FFT convolution giving different results from convolution
- From: Bob Cain
- Re: FFT convolution giving different results from convolution
- From: Michel Rouzic
- Re: FFT convolution giving different results from convolution
- From: Bob Cain
- FFT convolution giving different results from convolution
- Prev by Date: Re: Power and phase of a signal: newbie question
- Next by Date: Re: pole zero stuff
- Previous by thread: Re: FFT convolution giving different results from convolution
- Next by thread: Re: FFT convolution giving different results from convolution
- Index(es):
Relevant Pages
|