Number of complex calculations in FFT and inverse FFT

Click For Summary

Discussion Overview

The discussion revolves around calculating the total number of complex multiplications required for performing Fast Fourier Transforms (FFT) and Inverse Fast Fourier Transforms (IFFT) in the context of a homework problem. Participants explore the implications of padding vectors with zeros and the computational complexity associated with FFTs.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant calculates the number of complex multiplications for two FFTs and one IFFT, suggesting a total based on the formula Nlog2N.
  • Another participant clarifies that the FFT algorithm scales as O(N log2N), indicating that the number of operations is not strictly N log2N.
  • There is a discussion about the necessity of padding vectors with zeros, with one participant questioning the rationale behind this assumption.
  • Concerns are raised regarding the application of FFT on non-power-of-two lengths, specifically questioning the validity of using FFT on a length 5 vector.
  • Participants discuss the implications of big O notation in the context of algorithm performance and scaling with data size.
  • One participant seeks clarification on the nature of the calculations being performed, particularly regarding circular convolution and the impact of padding on the data length.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct application of FFT to non-power-of-two lengths and the necessity of padding. There is no consensus on the correct interpretation of the calculations or the implications of the assumptions made.

Contextual Notes

Participants mention the potential confusion surrounding the application of FFT algorithms to vectors of different lengths and the implications of padding on computational complexity. The discussion reflects varying levels of understanding regarding the mathematical principles involved.

Who May Find This Useful

This discussion may be useful for students and practitioners interested in understanding the computational aspects of FFT and IFFT, particularly in the context of homework problems and algorithmic complexity.

Jimmy Johnson
Messages
27
Reaction score
0

Homework Statement



Calculate the total number of compex multiplications required for the calculation in (b) when FFTs are used to perform the Discrete Fourier Transforms and Inverse Discrete Fourier Transforms.[/B]
There were two FFT multiplied together and one inverse FFT of that product to solve B.

x1(n) = [1, 0, −1, 1]

x2(n) = [2, 3, 2, 0, 1

Homework Equations


[/B]
Nlog2N

The Attempt at a Solution


[/B]
The vectors were padded with zeros but I'm working under the assumption that can be negated.

x1(n) = 4log24 = 8
x2(n) = 5log25 = 11.61

product of both created an 8 length vector

8log28 = 24Do I add these? The 5 one doesn't seem correct, something about it being a prime factor that doesn't hold for the equation?
 
Physics news on Phys.org
Jimmy Johnson said:

Homework Equations


[/B]
Nlog2N
Note that the FFT algorithm scales as ##O(N \log_2 N)##, not that the number of operations is exactly ##N \log_2 N## (I don't know if this is relevant to your problem, because I don't know how your teacher presented the material).

Jimmy Johnson said:
The vectors were padded with zeros but I'm working under the assumption that can be negated.
Why? What is the computer actually calculating?
Jimmy Johnson said:
The 5 one doesn't seem correct, something about it being a prime factor that doesn't hold for the equation?
You probably only learned about an algorithm that works for ##2^N## data points. Therefore an FFT on length 5 doesn't make any sense.
 
What is the O on that scale equation?

The calculation is the circular convolution of the x1(t) and x2(t) through ifft(fftx1padded)*(fftx2padded), so the padding was adding zeroes to the vector so that it was the same length and therefore achievable in matlab? after convolution a length 8 was determined and x1&2(t) are 4&5 length vectors respectively?

So would my data points actually be 2^4 and 2^5?
 
Jimmy Johnson said:
What is the O on that scale equation?
It's big O notation. It tells you how an algorithm scales when you change the size of the data. If an algorithm is of order ##O(n^2)##, then doubling the number of data points will result in about 4 times the number of operations. But it doesn't mean that it will perform exactly ##n^2## operations. The actual number of operations could be ##4 n^2 + 2 n##.

Jimmy Johnson said:
The calculation is the circular convolution of the x1(t) and x2(t) through ifft(fftx1padded)*(fftx2padded), so the padding was adding zeroes to the vector so that it was the same length and therefore achievable in matlab? after convolution a length 8 was determined and x1&2(t) are 4&5 length vectors respectively?
Why is padding necessary? What do you think MATLAB is doing with these zeros?
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
8
Views
2K
Replies
26
Views
6K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K