Exercise 5.5Z: Complexity of the FFT
The FFT algorithm (Fast Fourier Transform) realises a Discrete Fourier Transform with the smallest possible computational effort if the parameter N is a power of two. In detail, the following calculation steps are necessary to carry out an FFT:
- The FFT occurs in log2 N stages, whereby the exact same number of arithmetic operations must be carried out in each stage.
- The diagram shows the third and last stage for the example N=8. It can be seen that N/2 basic operations have to be carried out in this and the other stages.
- In each basic operation, which is often called a butterfly , two complex outputs are calculated from the two complex input variables E1 and E2 :
- A1=E1+E2⋅wμ,
- A2=E1−E2⋅wμ.
- Here w=e−j⋅2π/N denotes the complex rotation factor. For N=8 the value w=e−j⋅π/4=cos(45∘)−j⋅sin(45∘) is obtained.
- The exponent μ for this complex rotation factor can take all integer values between 0 and N/2−1 . For N=8 it is:
- w0=1,w1=1/√2−j⋅1/√2,w2=−j,w3=−1/√2−j⋅1/√2.
The purpose of this task is to determine the number of arithmetic operations (OFFT) required for the FFT and compare it with the value ODFT≈8⋅N2 that can be specified for the DFT
To be noted:
- It makes sense to calculate the powers of w before the actual algorithm and store them in a lookup table.
- The operations necessary for this are therefore to be disregarded.
- The bit reversal operation – a rearrangement that has to be carried out before the first stage – is also not to be taken into account in this estimation.
Hint:
- This task belongs to the chapter Fast Fourier Transform (FFT).
Questions
Solution
- (R1+j⋅I1)+(R2+j⋅I2)=(R1+R2)+j⋅(I1+I2)⇒AA=2_.
(2) Any complex multiplication requires four real multiplications and two real additions:
- (R1+j⋅I1)(R2+j⋅I2)=(R1⋅R2−I1⋅I2)+j⋅(R1⋅I2+R2⋅I1)⇒AM=2,MM=4_.
(3) The basic operations with complex inputs E1, E2 and wμ are:
- A1=E1+E2⋅wμ,A2=E1−E2⋅wμ.
- This means one complex multiplication and two complex additions: aB=2,mB=1_.
(4) In contrast to the first computers, a multiplication today does not take much more computing time than an addition or subtraction.
- Using the results of subtasks (1), (2) and (3) we obtain for the total number of arithmetic operations:
- OB=aB⋅AA+aB⋅(AM+MM)=2⋅2+1⋅6=10_.
(5) There are log2 N stages in total, each of which requires N/2 basic operations to be performed:
- OFFT=log2N⋅N2⋅OB=5⋅N⋅log2N
- ⇒OFFT(N=16)=5⋅16⋅4=320_,OFFT(N=1024)=5⋅1024⋅10=51200_.
(6) The computational time gain of the FFT over the conventional DFT is given by:
- GFFT=ODFTOFFT=8⋅N25⋅N⋅log2N=1.6⋅Nlog2N
- ⇒GFFT(N=16)=1.6⋅164=6.4_,GFFT(N=1024)=1.6⋅102410≈164_.