84
Fast Fourier Transform Part: Informal Development of Fast Fourier Transform http://numericalmethods.eng.usf. edu

Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Embed Size (px)

Citation preview

Page 1: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Numerical Methods

Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu

Page 2: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword Click on Fast Fourier Transform

Page 3: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

You are free

to Share – to copy, distribute, display and perform the work

to Remix – to make derivative works

Page 4: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 5: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Chapter 11.05: Informal Development of Fast Fourier

Transform

Major: All Engineering Majors

Authors: Duc Nguyen

http://numericalmethods.eng.usf.edu

Numerical Methods for STEM undergraduateshttp://numericalmethods.eng.usf.edu04/21/23 5

Lecture # 11

Page 6: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Informal Development of Fast Fourier Transform

Recall the DFT pairs of Equations (20) and (21) of Chapter 11.04 and swapping the indexes , one obtains

n k

1

0

20

)(~ N

k

kN

win

n ekfC

1

0

2~ 01

)(N

n

kN

win

n eCN

kf

(1)

(2) where

1,...,3,2,1,0, Nkn (3)

Ni

eE2

12 iN eEhenceLet (4)6

http://numericalmethods.eng.usf.edu

Page 7: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Informal Development cont.Then Eq. (1) and Eq. (2) become

1

0)()(

~~ N

k

nkn EkfnCC

1

0

~1)(

N

n

nknECN

kf

(5)

Assuming , then)2(24 rN

)3(

)2(

)1(

)0(

)3(~)2(

~)1(

~)0(

~

1

1

1

1111

1

963

642

321

f

f

f

f

C

C

C

C

EEE

EEE

EEE

N

(5A)

7

http://numericalmethods.eng.usf.edu

Page 8: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Informal Development cont.

To obtain the above unknown vector for a given vector , the coefficient matrix can be easily converted as

f C~

963

642

321

1

963

642

321

1

1

1

1111

1

1

1

1111

1

EEE

EEE

EEE

EEE

EEE

EEE

N

8

http://numericalmethods.eng.usf.edu

Page 9: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu9

Hence, the unknown vector can be computed as with matrix vector operations, as following

C~

)3(

)2(

)1(

)0(

)3(~)2(

~)1(

~)0(

~

)3)(3()2)(3()1)(3()0)(3(

)3)(2()2)(2()1)(2()0)(2(

)3)(1()2)(1()1)(1()0)(1(

)3)(0()2)(0()1)(0()0)(0(

f

f

f

f

EEEE

EEEE

EEEE

EEEE

C

C

C

C

(6)

Informal Development cont.

Page 10: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Informal Development cont.

)3(

)2(

)1(

)0(

)3(~)2(

~)1(

~)0(

~

9630

6420

3210

0000

f

f

f

f

EEEE

EEEE

EEEE

EEEE

C

C

C

C

(7)

For and , then:3,4 kN 2n

22222

2)4(6 EEeEeEEEE i

N

Ni

Nnk

10

http://numericalmethods.eng.usf.edu

Page 11: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu11

Thus, in general (for ) Nnk

where Unk EE

N

nkremainderU

),mod( NnkU (8)

Informal Development cont.

Page 12: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Informal Development cont.

Remarks:a) Matrix times vector, shown in Eq. (7), will require 16 (or ) complex multiplications and 12 (or ) complex additions.

b) Use of Eq. (8) will help to reduce the number of operation counts, as explained in the next section.

2N)1( NN

12

http://numericalmethods.eng.usf.edu

Page 13: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

THE ENDhttp://numericalmethods.eng.usf.edu

Page 14: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://numericalmethods.eng.usf.eduCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 15: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For instructional videos on other topics, go to

http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 16: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

The End - Really

Page 17: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Numerical Methods

Fast Fourier Transform Part: Factorized Matrix and Further Operation Count

http://numericalmethods.eng.usf.edu

Page 18: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword Click on Fast Fourier Transform

Page 19: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

You are free

to Share – to copy, distribute, display and perform the work

to Remix – to make derivative works

Page 20: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 21: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Chapter 11.05: Factorized Matrix and Further Operation Count

(Contd.)Equation (7) can be factorized as

)3(

)2(

)1(

)0(

010

001

010

001

100

100

001

001

)3(~)1(

~)2(

~)0(

~

2

2

0

0

3

1

2

0

f

f

f

f

E

E

E

E

E

E

E

E

C

C

C

C

Let’s define the following “inner – product”

)3(

)2(

)1(

)0(

010

001

010

001

)3(

)2(

)1(

)0(

2

2

0

0

1

1

1

1

f

f

f

f

E

E

E

E

f

f

f

f

(9)

(10)

21

http://numericalmethods.eng.usf.edu

Lecture # 12

Page 22: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Factorized Matrix cont.

)2()0()0( 01 fEff

)3()1()1( 01 fEff

)2()0()2( 21 fEff

)2()0( 0 fEf

From Eq. (9) and (10) we obtain (11A)

(11B)

(11C)

22

http://numericalmethods.eng.usf.edu

02*42

2 1 EeeE ii

with

)3()1()3( 21 fEff

)3()1( 0 fEf (11D)

Page 23: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu23

Equations(11A through 11D) for the “inner” matrix times vector requires 2 complex multiplications and 4 complex additions.

Factorized Matrix cont.

Page 24: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Factorized Matrix cont.

Finally, performing the “outer” product (matrix times vector) on the RHS of Equation(9), one obtains

)3(

)2(

)1(

)0(

100

100

001

001

)3(

)2(

)1(

)0(

)3(~)1(

~)2(

~)0(

~

1

1

1

1

3

1

2

0

2

2

2

2

f

f

f

f

E

E

E

E

f

f

f

f

C

C

C

C

(12)

24

http://numericalmethods.eng.usf.edu

Page 25: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu25

)1()0()0( 10

12 fEff (13A)

)1()0()1()0()1( 10

112

12 fEffEff )3()2()2( 1

112 fEff

)3()2()3()2()3( 112

113

12 fEEffEff

)3()2( 11

1 fEf

(13B)

(13C)

(13D)

Factorized Matrix cont.

Page 26: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Factorized Matrix cont.Again, Eqs (13A-13D) requires 2 complex multiplicationsAnd 4 complex additions. Thus, the complete RHS of Eq.(9) Can be computed by only 4 complex multiplications (or ) and 8 complex additions (or ),

where Since computational time is mainly controlled by the number of multiplications, implementing Eq. (9) will significantly reduce the number of multiplication operations, as compared to a direct matrix times vector operations. (as shown in Eq. (7)).

2

24

2r

N 2*4Nr

26

http://numericalmethods.eng.usf.edu

.2rN

Page 27: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Factorized Matrix cont.For a large number of data points,

r

NNrN

Ratio2

2

2

(14)

,22048 )11( rN Equation (14) gives:For

36.37211

)2048(2Ratio

This implies that the number of complex multiplications involved in Eq. (9) is about 372 times less than the one involved in Eq. (7).27

http://numericalmethods.eng.usf.edu

Page 28: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Graphical Flow of Eq. 9

Consider the case

422 2 rN

Figure 1. Graphical form of FFT (Eq. 9) for the case

28

http://numericalmethods.eng.usf.edu

422 2 rN

)0(f

)1(f

)2(f

)3(f

)0(1f

)1(1f

)2(1f

)3(1f

)0(2f

)1(2f

)2(2f

)3(2f

0E

Initial data

Vector )(kf

Vector 1 (l=1)

)(1 kf

Vector 2 (l=2=r)

)(2 kf

Computational Vectors

0E

2E

2E

2E

1E

3E

0E

Page 29: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

4

4

4

4

4

4

4

4

4

4

4

4

4

4

4

4

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

Data Array )(0 kf )(1 kf )(2 kf )(3 kf )(4 kf

L=1 L=2 L=3 L=4

Computation Arrays

8

8

8

8

8

8

8

8

0

0

0

0

0

0

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

12

12

12

12

4

4

4

4

8

8

8

8

0

0

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

14

14

6

6

10

10

2

2

12

12

4

4

8

8

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

15

7

10

3

13

5

9

1

14

6

11

2

12

4

8

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

Figure 2. Graphical Form of FFT (Eq. 9) for the case 29

http://numericalmethods.eng.usf.edu1622 4 rN

Page 30: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

THE ENDhttp://numericalmethods.eng.usf.edu

Page 31: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://numericalmethods.eng.usf.eduCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 32: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For instructional videos on other topics, go to

http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 33: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

The End - Really

Page 34: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Numerical Methods

Fast Fourier Transform Part: Companion Node Observation

http://numericalmethods.eng.usf.edu

Page 35: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword Click on Fast Fourier Transform

Page 36: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

You are free

to Share – to copy, distribute, display and perform the work

to Remix – to make derivative works

Page 37: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 38: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Chapter 11.05 : Companion Node Observation (Contd.)

Careful observation of Figure 2 has revealed that each computed vector (where and ) we can always find two (companion) nodes which came from the same pair of nodes in the previous vector.

thl rl ,...,2,11622 4 rN

For example, and are computed in terms of and .

)0(1f)0(f

)8(1f)8(f

Similarly, the companion nodes and are computed from the same pair of nodes as and .

)8(2f)8(1f

)12(2f

)12(1f38

http://numericalmethods.eng.usf.edu

Lecture # 13

Page 39: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu39

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

3

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

)15(

)14(

)13(

)12(

)11(

)10(

)9(

)8(

)7(

)6(

)5(

)4(

)3(

)2(

)1(

)0(

4

4

4

4

4

4

4

4

4

4

4

4

4

4

4

4

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

f

Data Array )(0 kf )(1 kf )(2 kf )(3 kf )(4 kf

L=1 L=2 L=3 L=4

Computation Arrays

8

8

8

8

8

8

8

8

0

0

0

0

0

0

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

12

12

12

12

4

4

4

4

8

8

8

8

0

0

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

14

14

6

6

10

10

2

2

12

12

4

4

8

8

0

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

15

7

10

3

13

5

9

1

14

6

11

2

12

4

8

0

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

E

Figure 2. Graphical Form of FFT (Eq. 9) for the case 1622 4 rN

Page 40: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Companion Node Observation cont.

Furthermore, the computation of companion nodes are independent of other nodes (within the –vector). Therefore, the computed and will override the original space of and .

)0(1f )8(1f)0(f )8(f

thl

Similarly, the computed and will override the space occupied by and which in turn, will occupy the original space of and .

)8(1f)8(2f

)8(f

)12(2f)12(1f

)12(f

Hence, only one complex vector (or 2 real vectors) of length are needed for the entire FFT process.N

40

http://numericalmethods.eng.usf.edu

Page 41: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Companion Node Spacing

Observing Figure 2, the following statements can be made:

a) in the first vector ( ), the companion nodes and are separated by

1l )0(1f)8(1f

12

16

28

l

Nork

b) in the second vector ( ), the companion nodes and are separated by .

2l)8(2f )12(2f 4k

.),4

16

2

16

2(

2etc

Nor

l

41

http://numericalmethods.eng.usf.edu

Page 42: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Companion Node ComputationThe operation counts in any companion nodes (of the vector), such as and can be explained as (see Figure 2).

ndthl 2 )8(2f )12(2f

4112 )12()8()8( Efff

12112 )12()8()12( Efff

4811 )12()8( EEff

4

8

)16(2

11 )12()8( Eeff Ni

411 )12()8( Eeff i4

112 )12()8()12( Efff

(15)

(16)42

http://numericalmethods.eng.usf.edu

Page 43: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Companion Node Computation cont.

Thus, the companion nodes and computation will require 1 complex multiplication and 2 complex additions (see Eq. (15) and (16)). The weighting factors for the companion nodes ( and ) are (or ) and (or ), respectively.

)8(2f )12(2f

)8(2f)12(2f 4E UE 12E 2NUE

)2

()()( 11 llU

llN

kfEkfkf

)2

()()2

( 11 llU

lllN

kfEkfN

kf

48

(17)

(18)43

http://numericalmethods.eng.usf.edu

Page 44: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Skipping Computation of Certain Nodes

Because the pair of companion nodes and are separated by the “distance” , at the

level, after every node computation, then

the next nodes will be skipped. (see Figure 2)

L

Nk2k

L

N

2thLL

N

2L

N

2

44

http://numericalmethods.eng.usf.edu

Page 45: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

THE ENDhttp://numericalmethods.eng.usf.edu

Page 46: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://numericalmethods.eng.usf.eduCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 47: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For instructional videos on other topics, go to

http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 48: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

The End - Really

Page 49: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Numerical Methods

Fast Fourier Transform Part: Determination of

http://numericalmethods.eng.usf.edu

UE

Page 50: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword Click on Fast Fourier Transform

Page 51: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

You are free

to Share – to copy, distribute, display and perform the work

to Remix – to make derivative works

Page 52: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 53: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu

Chapter 11.05: Determination of

The values of ""U

Step 1: Express the index in binary form, using bits. For and 01231 2)0(2)0(2)0(2)1(0,0,0,18 rk

)1,...,2,1,0( Nkr ,4,2,8 rLk

,1622 4 rN

53

Lecture # 14

;2

)()( 11

ll

Ull

NkfEkfkf

ll

Ulll

NkfEkf

Nkf

2)(

211

can be determined by the following steps:

one obtains:

UE

Page 54: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu54

0,1,0,00,1,,0,0,0,1 XX

Step 2: Sliding this binary number positions to the right, and fill in zeros, the results are

224 Lr

It is important to realize that the results of Step 2 (0,0,1,0) are equivalent to expressing an integer

22

8

2 24

Lr

kM in binary format. In other

words

)0,1,0,0(2M

Determination of cont.UE

Page 55: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Determination of cont.

Step 3: Reverse the order of the bits, then (0,0,1,0) becomes (0,1,0,0) = . Thus,

U

42)0(2)0(2)1(2)0( 0123 U

It is “NOT” really necessary to perform Step 3, since the results of Step 2 can be used to compute “ “ as followingU

42)0(2)1(2)0(2)0( 3210 U55

http://numericalmethods.eng.usf.edu

UE

Page 56: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Computer Implementation to find

Based on the previous discussions (with the 3-step procedures), to find the value of “ ”, one only needs a procedure to express an integer

Lr

kM

2

r

U

Assuming (a base 10 number) can be expressed as (assuming bits)

M4r

11234 JaaaaM (19)

56

http://numericalmethods.eng.usf.edu

in binary format, with bits.

UE

Page 57: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu57

Divide by 2, then multiply the truncated result by 2 ( ), and compute the difference between the original number and the new number.

212 JJ 222 JJJ

M

Computer Implementation cont.

Page 58: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Computer Implementation cont.

Compute the difference between the original number and the new number :&&)( 21 JJJM

2221

Truncated

MMJJJIDIFF (20)

If IDIFF = 0, then the bit a1 = 0If IDIFF ≠ 0, then the bit a1 = 1

58

http://numericalmethods.eng.usf.edu

Page 59: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu59

Once the bit has been determined, the value of is set to (or value of is reduced by a factor of 2; since the previous .

A similar process can be used to determine the value of process can be used to determine the next bit

1a 1J2J

12341 aaaaMJ

1J

)2()2()2()2( 0

1

1

2

2

3

3

41 aaaaMJ

2aetc.

Computer Implementation cont.

Page 60: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Example 1For , , bits and . Find the value of .

8k rN 216 4r 2LU

1242

2

8

2J

kM

Lr

Determine the bit (Index )1a 1IInitialize 0U

12

2

21

2 JJ

0)2)(1(2)2( 221 JJJJIDIFF

01 a

00202 IDIFFUU

Thus

60

http://numericalmethods.eng.usf.edu

Page 61: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Example 1 cont.

Determine the bit (Index )2a 2I

02

1

21

2 JJ

1)20(1)2( 221 JJJJIDIFF

12 a

11202 IDIFFUU

Thus

121 JJ

61

http://numericalmethods.eng.usf.edu

Page 62: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu62

Determine the bit (Index )3a 3I

02

0

21

2 J

J

0)2)(0(0)2( 221 JJJJIDIFF

03 a20212 IDIFFUU

Thus

021 JJ

Example 1 cont.

Page 63: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Example 1 cont.

02

1

21

2 J

J

0)2)(0(0)2( 221 JJJJIDIFF

04 a

40222 IDIFFUU

Thus

021 JJ

Determine the bit (Index )4a 4I

63

http://numericalmethods.eng.usf.edu

Page 64: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

THE ENDhttp://numericalmethods.eng.usf.edu

Page 65: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://numericalmethods.eng.usf.eduCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 66: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For instructional videos on other topics, go to

http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 67: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

The End - Really

Page 68: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Numerical Methods

Fast Fourier Transform Part: Unscrambling the FFT

http://numericalmethods.eng.usf.edu

Page 69: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword Click on Fast Fourier Transform

Page 70: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

You are free

to Share – to copy, distribute, display and perform the work

to Remix – to make derivative works

Page 71: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 72: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Chapter 11.05: Unscrambling the FFT (Contd.)

)0000(4f

)0001(4f

)0010(4f

)0100(4f

)0101(4f

)0110(4f

)0111(4f

)1000(4f

)1001(4f

)1010(4f

)1011(4f

)1100(4f

)1101(4f

)1110(4f

)0000(~

C

)0001(~

C

)0010(~

C

)0100(~

C

)0101(~

C

)0110(~

C

)0111(~

C

)1000(~

C

)1001(~

C

)1010(~

C

)1011(~

C

)1100(~

C

)1101(~

C

)1110(~

C

)1111(~

C

)0011(~

C

0

1

2

4

5

6

7

8

9

10

11

12

13

14

15

3

= skip the operation

)(4 kf )(~

nC

For the case

, (see Figure 2), the final “bit-reversing” operation for FFT is shown in Figure 3.

4216 rN

Figure 3. Final “bit-reversing” for FFT (with

)1622 4 rN72

http://numericalmethods.eng.usf.edu

Lecture # 15

Page 73: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For do-loop index k = 0 = (0, 0, 0, 0) i = (0, 0, 0, 0) = bit-reversion = 0If (i.GT.k) ThenT = f4(k) f4(k) = f4(i) f4(i) = TEndifHence, f4(0) = f4(0) no swapping.

55

73

http://numericalmethods.eng.usf.edu

Page 74: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu74

For k = 1 = (0,0,0,1) i = (1,0,0,0) = bit-reversion = 8If (i.GT.k) ThenT = f4(k=1) f4(k=1) = f4(i=8) f4(i=8) = TEndifHence, f4(1) = f4(8) are swapped.

Page 75: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu75

. For k=4=(0,1,0,0) i=(0,0,1,0)=2

In this case, since “i” is not greater than “k”.Hence, no swapping, since f4 (k = 2) and f4 (i = 4); had already been swapped earlier! .etc.

.For k=3=(0,0,1,1) i = (1,1,0,0) = 12Hence, f4(3) = f4(12); are swapped.

.For k=2=(0,0,1,0) i = (0,1,0,0) = 4Hence, f4(2) = f4(4); are swapped.

Page 76: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Computer Implementation of FFT case for N=2r

The pair of companion nodes computation are givenby Eqs.(17) and (18). To avoid “complex number” operations,Eq.(17) can be computed based on “real number” operations, as following

)()()()( 11 kifkfkifkf I

L

R

L

I

L

R

L

)

2()

2( 11

,,L

ILL

RL

IURU Nkif

NkfiEE

(21)In Eq. (21), the superscripts and denote real and imaginary components, respectively.

R I76

http://numericalmethods.eng.usf.edu

Page 77: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Computer Implementation cont.

Multiplying the last 2 complex numbers, one obtains

)()()()( 11 kifkfkifkf I

L

R

L

I

L

R

L

)

2()

2( 1

,1

,L

IL

IUL

RL

RU NkfE

NkfE

)

2()

2( 1

,1

,L

RL

IUL

IL

RU NkfE

NkfEi (22)

Equating the real (and then, imaginary) components on the Left-Hand-Side (LHS), and the Right-Hand-Side (RHS) of Eq. (22), one obtains

77

http://numericalmethods.eng.usf.edu

Page 78: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu78

)

2()

2()()( 1

,1

,1 L

IL

IUL

RL

RURL

RL

NkfE

NkfEkfkf

)

2()

2()()( 1

,1

,1 L

RL

IUL

IL

RUIL

IL

NkfE

NkfEkfkf

(23A)

(23B)

Computer implementation cont.

Page 79: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

http://numericalmethods.eng.usf.edu

Computer implementation cont.

Recall Eq. (4)Ni

eE2

Hence

)sin()cos(22

ieeeE iNU

iU

NiU

(24)

where

N

U

N

U 28.62

(25)

Thus:)cos(, RUE

)sin(, IUE

(26A)

(26B)79

Page 80: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

Computer Implementation cont.Substituting Eqs. (26A) and (26B) into Eqs. (23A) and (23B), one gets

)

2()sin()

2()cos()()( 111 L

I

LL

R

L

R

L

R

L

Nkf

Nkfkfkf

)

2()sin()

2()cos()()( 111 L

R

LL

I

L

I

L

I

L

Nkf

Nkfkfkf

(27B)

(27A)

Similarly, the single (complex number) Eq. (18) can be expressed as 2 equivalent (real number) Eqs. Like Eqs. (27A) and (27B).

80

http://numericalmethods.eng.usf.edu

Page 81: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

THE ENDhttp://numericalmethods.eng.usf.edu

Page 82: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://numericalmethods.eng.usf.eduCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 83: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

For instructional videos on other topics, go to

http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 84: Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform

The End - Really