Number of complex calculations in FFT and inverse FFT

In summary: What is the relationship between the lengths of x1, x2, and the result of the circular convolution?So would my data points actually be 2^4 and 2^5?Yes, if you are using an algorithm that requires data lengths that are powers of 2. But your problem statement doesn't give enough information to determine this.
  • #1
Jimmy Johnson
27
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
  • #2
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.
 
  • #3
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?
 
  • #4
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?
 
  • #5


I would like to clarify a few things before providing a response. First, the statement mentions calculating the total number of complex multiplications, but the attempt at a solution only considers the total number of calculations (which includes additions, subtractions, etc.). Is the question specifically asking for the number of complex multiplications, or the total number of calculations?

Secondly, the attempt at a solution uses the equation Nlog2N, which is the theoretical number of calculations for a FFT of length N. However, this is not necessarily the same as the actual number of calculations that would be required for a specific set of data. The actual number of calculations can vary depending on the specific implementation of the FFT algorithm and the data being processed.

Assuming that the question is asking for the total number of complex multiplications, and based on the given vectors, here is a possible response:

To calculate the total number of complex multiplications required for the FFT and inverse FFT in this case, we need to consider the following:
1. Each FFT requires Nlog2N complex multiplications, where N is the length of the input vector.
2. The product of two FFTs (x1(n) and x2(n)) will result in an output vector of length 8, which would require 8log28 = 24 complex multiplications.
3. The inverse FFT of this product would also require 8log28 = 24 complex multiplications.
Therefore, the total number of complex multiplications required for this calculation would be 2(Nlog2N) + (8log28) = 2(4log24) + (8log28) = 16 + 24 = 40 complex multiplications.
 

Related to Number of complex calculations in FFT and inverse FFT

1. How does the number of complex calculations in FFT and inverse FFT affect its efficiency?

The number of complex calculations in FFT and inverse FFT directly impacts its efficiency. The more complex calculations that need to be performed, the longer it will take for the algorithm to run. Therefore, reducing the number of complex calculations can significantly improve the efficiency of the FFT and inverse FFT algorithms.

2. What factors influence the number of complex calculations in FFT and inverse FFT?

The number of complex calculations in FFT and inverse FFT is determined by the size of the input data and the chosen algorithm. Generally, the larger the input data, the more complex calculations are required. Additionally, different FFT and inverse FFT algorithms have varying levels of complexity, which can also impact the number of calculations.

3. How does the number of complex calculations in FFT and inverse FFT affect the accuracy of the results?

The number of complex calculations does not directly affect the accuracy of the results in FFT and inverse FFT. However, a greater number of calculations can lead to more rounding errors, which may slightly impact the accuracy of the final result. Therefore, it is important to carefully consider the trade-off between accuracy and efficiency when choosing the number of complex calculations.

4. Can the number of complex calculations in FFT and inverse FFT be reduced?

Yes, the number of complex calculations in FFT and inverse FFT can be reduced by using more efficient algorithms or by optimizing the input data. Additionally, some specialized hardware and software can also reduce the number of calculations required. However, it is important to note that reducing the number of calculations may also impact the accuracy of the results.

5. How do FFT and inverse FFT algorithms handle different input data sizes?

FFT and inverse FFT algorithms are designed to handle a wide range of input data sizes. The number of complex calculations required will vary depending on the size of the input data, but the algorithms are able to adjust accordingly. Some algorithms may be more efficient for smaller input data sizes, while others may perform better for larger input data sizes.

Similar threads

Replies
6
Views
1K
Replies
1
Views
632
Replies
11
Views
3K
Replies
4
Views
5K
Replies
1
Views
5K
Replies
1
Views
3K
Back
Top