Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 9 Computation of the Discrete Fourier Transform

Similar presentations


Presentation on theme: "Chapter 9 Computation of the Discrete Fourier Transform"— Presentation transcript:

1 Chapter 9 Computation of the Discrete Fourier Transform
Biomedical Signal processing Chapter 9 Computation of the Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control Science and Engineering, Shandong University 2018/9/12 1 Zhongguo Liu_Biomedical Engineering_Shandong Univ.

2 Chapter 9 Computation of the Discrete Fourier Transform
9.0 Introduction 9.1 Direct Computation Of The Discrete Fourier Transform 9.2 decimation-in-time FFT Algorithms 9.3 decimation-in-frequency FFT Algorithms 9.4 practical considerations

3 9.0 Introduction Implement a convolution of two sequences by the following procedure: 1. Compute the N-point DFT and of the two sequence and 2. Compute for 3. Compute as the inverse DFT of Why not convolve the two sequences directly? DFT has efficient FFT(Fast Fourier Transform) algorithms that can be orders of magnitude more efficient than others.

4 9.1 Direct Computation of the Discrete Fourier Transform
The DFT pair was given as DFTcomputational complexity: Each DFT coefficient requires N complex multiplications; N-1 complex additions All N DFT coefficients require N2 complex multiplications; N(N-1) complex additions 4 4

5 9.1 Direct Computation of the Discrete Fourier Transform
Most fast methods are based on Periodicity properties Periodicity in n and k; Complex conjugate symmetry 5 5

6 9.1.1 Direct Evalutation of the Defination of DFT
Complexity in terms of real operations 4N2 real multiplications N(4N-2) real additions : N (2(N-1) +2N ) 6 6

7 9.1.1 Direct Evalutation of the Defination of DFT
Conjugate symmetry: group terms in the summation for n and (N-n): 乘法次数减少一半 7

8 9.1.1 Direct Evalutation of the Defination of DFT
Conjugate symmetry: group terms in the summation for n and (N-n): similarly, 乘法次数减少一半 8

9 9.1.2 The Goertzel Algorithm
Makes use of the periodicity Multiply DFT equation with this factor Define using x[n]=0 for n<0 and n>N-1, yk[n] can be viewed as output of a filter to input x[n] Filter impulse response : X[k] is the output of the filter at time n=N. DFT of x[n] Goertzel Filter 9 9

10 9.1.2 The Goertzel Algorithm
Goertzel Filter: for causal LTI system x[n]=0, n<0 Computational complexity for one X[k]. 4N real multiplications; 4N real additions; Slightly less efficient than the direct method(4N, 4N-2); But it avoids computation and storage of (N2 个) (N 个) 10

11 Second Order Goertzel Filter
为便于分析 Goertzel Filter x[n]=0, n<0 Multiply both numerator and denominator for causal LTI system 实现极点因式 实现零点因式 每个K只需计算 1次 11 11

12 Second Order Goertzel Filter
除n=0时y[0]=x[0], y[n]对每个n有两个实数乘4个实数加 实现极点因式: 实现零点因式: same Complexity for one X[k] ( x[n], y[n] is complex). Poles: 2N real multiplications and 4N real additions Zeros: computed only once: 4 real ×and 4 real + . total: 2(N+2) real ×and 4(N+1) real + . 乘 N /2 Complexity for all N X[k] Each pole is used for X[k], X[N-k] Approximately N2 real multiplications and 2N2 real additions. More efficient than the direct method. 12 12

13 Second Order Goertzel Filter
If we only need to evaluate M X[k] , the total computation is proportional to NM, Goertzel method is attractive when M is small. The computation for FFT algorithm is Nlog2N. if M < log2N, either Goertzel Algorithm or direct method is more efficient than FFT. 13 13

14 9.2 Decimation-in-Time FFT Algorithms
Makes use of periodicity and symmetry of Consider special case of N=2ν : integer ν power of 2 Separate x[n] into two sequences of length N/2 Even-numbered sequence ; Odd-numbered sequences . 14 14

15 9.2 decimation-in-time FFT Algorithms
Substitute variables n=2r for n even and n=2r+1 for odd N/2-point DFT g[r] h[r] G[k] and H[k] are the N/2-point DFTs of each subsequence: g[n]=x[2n] and h[n] =x[2n+1] 15 15

16 9.2 decimation-in-time FFT Algorithms
G[k] and H[k] are the N/2-point DFTs of each subsequence: g[n]=x[2n] and h[n] =x[2n+1] 16 16

17 2018年9月12日3时8分 8-point DFT using DIT Figure 9.4

18 computational complexity
Two N/2-point DFTs 2(N/2)2 complex multiplications 2(N/2)2 complex additions Combining the DFT outputs N complex multiplications N complex additions Total complexity N2/2+N complex multiplications N2/2+N complex additions. More efficient than direct DFT when N>2 18 18

19 9.2 decimation-in-time FFT Algorithms
Repeat same process , Divide N/2-point DFTs into Two N/4-point DFTs Combine outputs N=8 19 19

20 9.2 decimation-in-time FFT Algorithms
After two steps of decimation in time Repeat until we’re left with two-point DFT’s 20 20

21 9.2 decimation-in-time FFT Algorithms
flow graph for 8-point decimation in time binary code: N=8=23 3 stages: N=2m m=log2N m级: 每级乘法和加法个数为N Complexity: Nlog2N complex multiplications and additions 21 21

22 Butterfly Computation
Flow graph of basic butterfly computation We can implement each butterfly with one multiplication Final complexity for decimation-in-time FFT (N/2)log2N complex multiplications and Nlog2N additions 22 22

23 9.2 decimation-in-time FFT Algorithms
DIT flow graph for 8-point decimation in time N=8=23 generalized to N=2m m=log2N m级: 每级乘法和加法个数为N Complexity: Nlog2N complex multiplications and Nlog2N additions 23 23

24 9.2.1 Generalization and Programming the FFT
Final flow graph for 8-point decimation in time N=8=23 generalized to N=2m m=log2N -1 m级: 每级乘法N/2个,加法N个 -1 the figure serves as proof, and for FFT programming. -1 Complexity: (Nlog2N)/2 complex multiplications and Nlog2N additions 24 24

25 9.2.2 In-Place Computation同址运算
DIT flow graphs require two sets of registers: Input, output or memory units In-Place Computation needs one set of registers. 25 25

26 9.2.2 In-Place Computation同址运算
Note the arrangement of the input indices Bit reversed indexing(码位倒置) 26 26

27 normal order binary coding for position: 对应x[n]的序号 从上向下出现的顺序 000 001
2018年9月12日3时8分 normal order binary coding for position: 对应x[n]的序号 从上向下出现的顺序 000 001 010 011 100 101 110 111 出现的顺序不是输入序号 Figure 9.13

28 cause of bit-reversed order
binary coding for position: 对应x[n]的序号 从上向下出现的顺序 是把二进制序号翻转了 序号的3次奇偶分解 000 001 010 011 100 101 110 111 Figure 9.13

29 9.2.3 Alternative forms Bit reversed indexing(码位倒置)
Note the arrangement of the input indices Bit reversed indexing(码位倒置) 29 29

30 input in normal order and output in bit-reversed order
Alternative forms Figure 9.14 input in normal order and output in bit-reversed order strongpoint:in-place computations shortcoming:non-sequential access of elements of intermediate arrays.

31 strongpoint: Input, output same normal order
Figure 9.15 strongpoint: Input, output same normal order shortcoming:not in-place computation; non-sequential access of elements of intermediate arrays.

32 Same structure, Input bit-reversed order , output normal order
Figure 9.16 Same structure, Input bit-reversed order , output normal order shortcoming:not in-place computation strongpoint: sequential access of data

33 9.3 Decimation-In-Frequency FFT Algorithm
The DFT equation Split the DFT equation into even and odd frequency indexes N/2-point DFT 33 33

34 9.3 Decimation-In-Frequency FFT Algorithm
The DFT equation N/2-point DFT 34 34

35 DIF decomposition: N-point DFT to N/2-point DFT
35 35

36 DIF decomposition: N-point DFT to N/2-point DFT
2点 DFT 8=23 N=2m m=log2N 36 36

37 2-point DFT in the last stage of decimation-in-frequency decomposition
37 37

38 (Nlog2N)/2 complex multiplications and Nlog2N additions
Final flow graph of decimation-in-frequency decomposition of 8-point DFT N=8=23 generalized to N=2m m=log2N m级: 每级乘法N/2个,加法N个 N/2=4-point DFT N/4=2-point DFT Complexity: (Nlog2N)/2 complex multiplications and Nlog2N additions 42 42

39 9.3 .1 In-Place Computation同址运算
DIF FFT 结构相同,乘数排列区别大 DIT FFT 43 43

40 9.3 .1 In-Place Computation同址运算
DIF FFT transpose DIT FFT 44 44

41 9.3 .2 Alternative forms transpose
decimation-in-frequecy Butterfly Computation transpose decimation-in-time Butterfly Computation 45 45

42 The DIF FFT is the transpose of the DIT FFT
46 46

43 Alternative forms DIF FFT transpose DIT FFT

44 Zhongguo Liu_Biomedical Engineering_Shandong Univ.
Chapter 9 HW 9.1, 9.6, 9.7, Zhongguo Liu_Biomedical Engineering_Shandong Univ. 50 2018/9/12 返 回 上一页 下一页


Download ppt "Chapter 9 Computation of the Discrete Fourier Transform"

Similar presentations


Ads by Google