DSP Algorithm Original PowerPoint slides prepared by S. K. Mitra

Similar documents
! Circular Convolution. " Linear convolution with circular convolution. ! Discrete Fourier Transform. " Linear convolution through circular

The Discrete-Time Fourier

ELEG 305: Digital Signal Processing

ELEG 305: Digital Signal Processing

Z-Transform. 清大電機系林嘉文 Original PowerPoint slides prepared by S. K. Mitra 4-1-1

Fall 2011, EE123 Digital Signal Processing

Discrete-Time Signals & Systems

The Fourier transform allows an arbitrary function to be represented in terms of simple sinusoids. The Fourier transform (FT) of a function f(t) is

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Module 3. Convolution. Aim

Frequency-domain representation of discrete-time signals

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

Lecture 19 IIR Filters

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY

Digital Signal Processing. Midterm 2 Solutions

Fundamentals of the DFT (fft) Algorithms

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Digital Signal Processing

Digital Filter Structures

ECE503: Digital Signal Processing Lecture 6

R13 SET - 1

EE123 Digital Signal Processing

EDISP (NWL3) (English) Digital Signal Processing DFT Windowing, FFT. October 19, 2016

VU Signal and Image Processing. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

Implementation of Discrete-Time Systems

Digital Filter Structures. Basic IIR Digital Filter Structures. of an LTI digital filter is given by the convolution sum or, by the linear constant

1. Calculation of the DFT

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

The Fourier Transform (and more )

Multirate Digital Signal Processing

Transforms and Orthogonal Bases

Introduction to Digital Signal Processing

Chap 2. Discrete-Time Signals and Systems

! Introduction. ! Discrete Time Signals & Systems. ! Z-Transform. ! Inverse Z-Transform. ! Sampling of Continuous Time Signals

Review of Discrete-Time System

Linear Convolution Using FFT

Analog vs. discrete signals

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

8 The Discrete Fourier Transform (DFT)

VII. Discrete Fourier Transform (DFT) Chapter-8. A. Modulo Arithmetic. (n) N is n modulo N, n is an integer variable.

SIDDHARTH GROUP OF INSTITUTIONS:: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Digital Signal Processing Lecture 3 - Discrete-Time Systems

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

Stability Condition in Terms of the Pole Locations

Chapter 8 The Discrete Fourier Transform

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Interchange of Filtering and Downsampling/Upsampling

Advanced Digital Signal Processing -Introduction

Sistemas de Aquisição de Dados. Mestrado Integrado em Eng. Física Tecnológica 2015/16 Aula 6-26 de Outubro

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year

Discrete-time signals and systems

x (2) k even h n=(n) + (n+% x(6) X(3), x (5) 4 x(4)- x(), x (2), Decomposition of an N-point DFT into 2 N/2-point DFT's.

University Question Paper Solution

Lecture 3 : Introduction to Binary Convolutional Codes

LECTURE NOTES DIGITAL SIGNAL PROCESSING III B.TECH II SEMESTER (JNTUK R 13)

Chapter Intended Learning Outcomes: (i) Understanding the relationship between transform and the Fourier transform for discrete-time signals

ELEG 305: Digital Signal Processing

LTI H. the system H when xn [ ] is the input.

Homework #1 Solution

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

DISCRETE-TIME SIGNAL PROCESSING

Discrete Fourier Transform

DSP-I DSP-I DSP-I DSP-I

Digital Signal Processing, Homework 1, Spring 2013, Prof. C.D. Chung

Lecture 10. Digital Signal Processing. Chapter 7. Discrete Fourier transform DFT. Mikael Swartling Nedelko Grbic Bengt Mandersson. rev.

Question Bank. UNIT 1 Part-A

ESE 531: Digital Signal Processing

Examples. 2-input, 1-output discrete-time systems: 1-input, 1-output discrete-time systems:

Course Name: Digital Signal Processing Course Code: EE 605A Credit: 3

DISCRETE FOURIER TRANSFORM

ECE-314 Fall 2012 Review Questions for Midterm Examination II

Discrete Time Systems

DEPARTMENT OF EI DIGITAL SIGNAL PROCESSING ASSIGNMENT 1

Signals & Systems Handout #4

ELEN 4810 Midterm Exam

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

Digital Signal Processing. Lecture Notes and Exam Questions DRAFT

DIGITAL SIGNAL PROCESSING

Module 4 : Laplace and Z Transform Problem Set 4

Very useful for designing and analyzing signal processing systems

EE482: Digital Signal Processing Applications

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

Lecture 7 January 26, 2016

7.17. Determine the z-transform and ROC for the following time signals: Sketch the ROC, poles, and zeros in the z-plane. X(z) = x[n]z n.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. Fall Solutions for Problem Set 2

Definition. A signal is a sequence of numbers. sequence is also referred to as being in l 1 (Z), or just in l 1. A sequence {x(n)} satisfying

Lecture 19: Discrete Fourier Series

(i) Represent discrete-time signals using transform. (ii) Understand the relationship between transform and discrete-time Fourier transform

Lecture 11 FIR Filters

Multidimensional digital signal processing

EE 225D LECTURE ON DIGITAL FILTERS. University of California Berkeley

Discrete Fourier transform (DFT)

EEO 401 Digital Signal Processing Prof. Mark Fowler

DIGITAL SIGNAL PROCESSING UNIT I

DFT-Based FIR Filtering. See Porat s Book: 4.7, 5.6

ESE 531: Digital Signal Processing

Discrete Time Fourier Transform (DTFT)

Digital Signal Processing Lecture 4

Transcription:

Chapter 11 DSP Algorithm Implementations 清大電機系林嘉文 cwlin@ee.nthu.edu.tw Original PowerPoint slides prepared by S. K. Mitra 03-5731152 11-1

Matrix Representation of Digital Consider Filter Structures This structure is described by the set of equations w 1 1[ [n] = x[n] [ ] α w 5 5[ [n] w 2 [n] =w 1 [n] δ w 3 [n] w 3 [n] = w 2 [n 1] w 4 [n] = w 3 [n] + ε w 2 [n] w 5 [n] = w 4 [n 1] y[n] =ββ w 1 [n] + γ w 5 [n] Original PowerPoint slides prepared by S. K. Mitra 11-2

Matrix Representation of Digital Filter Structures This ordered ed set of equations is said to be noncomputable because some variables on the left side are computed before some right-side variables are made available For example, computation of w 1 [n] in the 1st step requires the knowledge of w 5 [n] which is computed in the 5th step Likewise, computation of w 2 [n] in the 2nd step requires the knowledge of w 3 [n] that is computed in the 3rd step Suppose we reorder the equations w 3 [n] = w 2 [n 1] w 5 [n] = w 4 [n 1] w 1 [n] = x[n] α w 5 [n] w 2 [n] =w 1 [n] δ w 3 [n] w 4 [n] =w w 3 [n] +εε w 2 [n] y[n] = β w 1 [n] + γ w 5 [n] Original PowerPoint slides prepared by S. K. Mitra 11-3

Matrix Representation This new ordered ed set of equations is computable In most practical applications, equations describing a digital filter structure can be put into a computable order by inspection A simple way to examine the computability of equations describing a digital filter structure is by writing the equations in a matrix form A matrix representation of the first ordered set of equations: Original PowerPoint slides prepared by S. K. Mitra 11-4

Matrix Representation In compact form y[n] = x[n] + F y[n] + G y[n 1] where y[n] = [w 1 [n] w 2 [n] w 3 [n] w 4 [n] w 5 [n] y[n]] T x[n] = [x[n] 0 0 0 0 0] T If a diagonal element of F is nonzero, then computation of present value of the corresponding variable requires the knowledge of its present value implying py presence of a delay-free loop Original PowerPoint slides prepared by S. K. Mitra 11-5

Matrix Representation Any nonzero o entries es in the same row above the main diagonal of F imply that the computation of present value of the corresponding variable requires present values of other variables not yet computed, making the set of equations noncomputable Hence, for computability all elements of F matrix on the diagonal and above diagonal must be zeros In the F matrix for the first ordered set of equations, diagonal elements are all zeros, indicating absence of delay-free loops However, there are nonzero entries above the diagonal in the first and second rows of F indicating that the set of equations are not in proper order for computation Original PowerPoint slides prepared by S. K. Mitra 11-6

Matrix Representation The F matrix for the second ordered ed set of equations is which is seen to satisfy the computability condition Original PowerPoint slides prepared by S. K. Mitra 11-7

Precedence Graph The precedence graph can be used to test the computability of a digital filter structure and to develop the proper ordering sequence for a set of equations describing a computable structure It is developed from the signal-flow graph description of the digital filter structure in which independent and dependent signal variables are represented by nodes, and the multiplier and delay branches are represented by directed d branches The directed branch has an attached symbol denoting the branch gain or transmittance For a multiplier branch, the branch gain is the multiplier coefficient value For a delay branch, the branch gain is simply z 1 Original PowerPoint slides prepared by S. K. Mitra 11-8

Precedence Graph The signal-flow graph representation of is shown below Original PowerPoint slides prepared by S. K. Mitra 11-9

Precedence Graph A reduced signal-flow graph is then developed by removing the delay branches and all branches going out of the input node The reduced signal-flow graph of the example digital filter structure is shown below Original PowerPoint slides prepared by S. K. Mitra 11-10

Precedence Graph The nodes in the reduced signal-flow graph are grouped as follows: All nodes with only outgoing branches are grouped into one set labeled {N 1 } Next, the set {N 2 } is formed containing nodes coming in only from one or more nodes in the set {N 1 1} and have outgoing branches to the other nodes Then, form the set {N 3 } containing nodes that have branches coming in only from one or more nodes in the sets {N 1 } and {N 2 }, and have outgoing branches to other nodes Continue the process until there is a set of nodes {N f } containing only incoming branches The rearranged graph is called a precedence graph Original PowerPoint slides prepared by S. K. Mitra 11-11

Precedence Graph Since signal variables belonging to {N 1 } do not depend on the present values of other signal variables, these variables should be computed first Next, signal variables belonging to {N 2 } can be computed since they depend on the present values of signal variables contained in {N 1 1} that have already been computed This is followed by the computation of signal variables in {N 3 }, {N 4 }, etc. Finally, in the last step the signal variables in {N f } are computed This process of sequential computation ensures the development of a valid computational algorithm If there is no final set {N f f} } containing only incoming branches, the digital filter structure is noncomputable Original PowerPoint slides prepared by S. K. Mitra 11-12

Precedence Graph For the example precedence graph, pertinent groupings of node variables are: {N 1 } = {w 3 [n], w 5 [n]} {N 2 }={w 1 [n]} {N 3 } = {w 2 [n]} {N 4 4} = {w 4 4[ [n], y[n]} Original PowerPoint slides prepared by S. K. Mitra 11-13

Precedence Graph Precedence graph redrawn according to the above groupings is as shown below Since the final node set {N 4 } has only incoming branches, the structure is computable Original PowerPoint slides prepared by S. K. Mitra 11-14

Structure Verification A simple method to verify that the structure developed is indeed characterized by the prescribed transfer function H(z) Consider for simplicity a causal 3rd order IIR transfer function If {h[n]} denotes its impulse response, then Note P(z) = H(z)D(z), which is equivalent to Original PowerPoint slides prepared by S. K. Mitra 11-15

Structure Verification Evaluate above convolution sum for 0 n 6: p 0 = h[0] p 1 = h[1] + h[0]d 1 p 2 =h[2] +h[1]d 1 +h[0]d 2 p 3 = h[3] + h[2]d 1 + h[1]d 2 + h[0]d 3 0 = h[4] [ ] + h[3]d[ ] 1 + h[2]d[ ] 2 + h[1]d[ ] 3 0 = h[5] + h[4]d 1 + h[3]d 2 + h[2]d 3 0 = h[6] + h[5]d 1 + h[4]d 2 + h[3]d 3 In matrix form we get Original PowerPoint slides prepared by S. K. Mitra 11-16

Structure Verification In partitioned form above matrix equation can be written as Where Solving second equation we get Substituting above in the first equation we get In the case of an N-th order IIR filter, the coefficients of its transfer function can be determined from the first 2N+1 impulse response samples Original PowerPoint slides prepared by S. K. Mitra 11-17

Structure Verification Example: Consider the causal transfer function Here Hence h[0] = 2, h[1] = 4, h[2] = 5, h[3] = 3, h[4] =13 Solving the above we get Original PowerPoint slides prepared by S. K. Mitra 11-18

Four Classes of Fourier Transforms Continuous in Time Discrete in time-periodic in frequency FT DTFT; T 0 f(k) F(e jωt 0 ) in Con ntinuous freq uency f F t k ω 1 jω t T0 ( t ) = F ( jω ) e dω ( k) = 2π 2π jω t = f ( t e dt ( ω ) ) π T0 f π T 0 F ( e jωt 0 ) jωt jk T F e 0 = f k ) ω 0 ( ) ( e k = e jkωt 0 2π T 0 dω Fourier transform Discrete time Fourier Transform Original PowerPoint slides prepared by S. K. Mitra 11-19

Four Classes of Fourier Transforms Continuous in Time Discrete in time-periodic in frequency period dic in quency Discre ete in fre time 2π ω 0 f ( t) F F(n) f(t) F(k) F(n) t nω 0 k n FS i ω 0 DFT:N N jnω t F ( n) e 1 2π 1 j kn N f ( k) = F( n) e n= N n= 0 = 0 ω 2π π 0 ω0 ( n) = π ω 0 f ( t) e jnω t 0 dt F( n) = N 1 2π j kn N f ( k) e k = 0 Fourier series Discrete Fourier Transform Original PowerPoint slides prepared by S. K. Mitra 11-20

Direct Computation of DFT For a complex-valued sequence of N C C DFT SUBROUTINE points the DFT may be expressed as C ISEL = 0 : DFT C ISEL = 1 : INVERSE DFT N C 1 2πkn 2πkn X R ( k) = xr ( n)cos + xi ( n)sin SUBROUTINE DFT(N, XR, XI, XFR, XFI, ISEL) n= 0 N N DIMENSION XR(N), XI(N), XFR(N), XFI(N) N WN = 6.2831853 / FLOAT(N) 1 2πkn 2πkn X I ( k) = xr ( n)sin xi ( n)cos IF (ISEL.EQ.1) WN = - WN n= 0 N N DO 20 K = 1, N XFR(K) = 0, The direct computation XFI(K) = 0, KM1 = K 1 requires: DO 20 I = 1, N 2N 2 IM1 = I 1 evaluations of trigonometric ARG = WN * KM1 * IM1 C = COS(ARG) functions. S = SIN(ARG) 4N 2 XFR(K) = XFR(K) + XR(I)*C + XI(I)*S real multiplications. XFI(K) = XFI(K) XR(I)*S + XI(I)*C 10 CONTINUE 4N(N 1 ) real additions. IF (ISEL 1) 20, 30, 20 30 XFR(K) = XFR(K) / FLOAT(N) A number of indexing and 20 XFI(K) = XFI(K) / FLOAT(N) addressing operations. CONTINUE RETURN END Original PowerPoint slides prepared by S. K. Mitra 11-21

Goertzel s Algorithm A recursive DFT computation scheme that makes use of the identity obtained using the periodicity of Using this identity we can write Original PowerPoint slides prepared by S. K. Mitra 11-22

Define Goertzel s Algorithm Note: y k [n] is the direct convolution of the causal sequence with a causal sequence Observe X[k] = y k [n] n=n z-transform of yields Original PowerPoint slides prepared by S. K. Mitra 11-23

Goertzel s Algorithm Thus, y k [n] is the output of an initially relaxed LTI digital filter H k [z] with an input x e [n] and, when n = N, y k [n] = X[k] Structural interpretation of the algorithm Thus a recursive DFT computation scheme is with y k [ 1] = 0 and x e [N] = 0 Original PowerPoint slides prepared by S. K. Mitra 11-24

Goertzel s Algorithm Since a complex multiplication needs 4 real multiplications and 2 real additions, computation of each new value of y k [n] requires 4 real multiplications and 4 real additions Thus computation of X[k] = y k [N] involves 4N real multiplications and 4N real additions Computation ti of all N DFT samples requires 4N 2 real multiplications and 4N 2 real additions Direct computation of all N samples of {X[k]} requires N 2 complex multiplications and N(N-1) complex additions Equivalently, direct computation of all N samples of {X[k]} requires 4N 2 real multiplications and N(4N-2) real additions Thus, Goertzel s algorithm requires 2N more real additions than the direct DFT computation 11-25 Original PowerPoint slides prepared by S. K. Mitra

Goertzel s Algorithm The algorithm can be made computationally more efficient by observing that H k [z] can be rewritten as resulting in a second-order realization Original PowerPoint slides prepared by S. K. Mitra 11-26

Goertzel s Algorithm DFT computation equations are now Computation of each sample of involves only 2 real multiplications and 4 real additions Complex multiplication by needs to be performed only once at n = N Thus, computation of one sample of X[k] requires (2N+4) real multiplications and (4N+4) real additions Computation of all N DFT samples requires 2N(N+2) real multiplications and 4N(N+1) real additions Original PowerPoint slides prepared by S. K. Mitra 11-27

Goertzel s Algorithm In realizing H N k [z], the multiplier in the feedback path is 2cos(2π(N k)/n) = 2cos(2πk/N) which is same as that in the realization of H k k[ [z] ν N k [n] = ν k [n], i.e., the intermediate variables computed to determine X[k] can again be used to determine X[N k] Only difference between the two structures is the feedforward multiplier which is now that is the complex conjugate of Thus, computation of X[k] and X[N k] require 2(N+4) real multiplications and 4(N+2) real additions Computation of all N DFT samples require approximately N 2 real multiplications and approximately 2N 2 real additions Original PowerPoint slides prepared by S. K. Mitra 11-28

Decimation-in-Time in FFT Algorithm Consider a sequence x[n] of length N = 2 μ Using a 2-band polyphase decomposition we can express its z-transform as where X(z) ) = X 1 0 (z 2 ) + z 1 X 1 (z 2 ) Evaluating on the unit circle at N equally spaced points we arrive at the N-point p DFT of x[n]: [ ] where X 0 0[ [k] and X 1 1[ [k] are the (N/2)-point DFTs of x 0 0[ [n] and x 1 [n] 11-29 Original PowerPoint slides prepared by S. K. Mitra

Decimation-in-Time in FFT Algorithm That is Block diagram interpretation: Original PowerPoint slides prepared by S. K. Mitra 11-30

Decimation-in-Time in FFT Algorithm Flow-graph representation Original PowerPoint slides prepared by S. K. Mitra 11-31

Decimation-in-Time in FFT Algorithm Direct computation of the N-point DFT requires N 2 complex multiplications and N 2 N N 2 complex additions The modified scheme requires the computation of two (N/2)-point DFTs that are then combined with N complex multiplications and N complex additions resulting in a total of (N 2 /2) + N complex multiplications and approximately (N 2 /2) + N complex additions For N 3,, (N 2 /2)) + N < N 2 Original PowerPoint slides prepared by S. K. Mitra 11-32

Decimation-in-Time in FFT Algorithm Continuing the process we can express and as a weighted combination of two (N/4)-point DFTs For example, we can write where X 00 [k] and X 01 [k] are the (N/4)-point DFTs of the (N/4)-length sequences x 00 [n] = x 0 [2n] and x 01 [n] = x 0 [2n+1] Likewise, we can express where X 10 [k] and X 11 [k] are the (N/4)-point DFTs of the (N/4)-length sequences x 10 [n] = x 1 [2n] and x 11 [n] = x 1 [2n+1] Original PowerPoint slides prepared by S. K. Mitra 11-33

Decimation-in-Time in FFT Algorithm Block-diagram representation of the two-stage algorithm Original PowerPoint slides prepared by S. K. Mitra 11-34

Decimation-in-Time in FFT Algorithm Flow-graph representation Original PowerPoint slides prepared by S. K. Mitra 11-35

Decimation-in-Time in FFT Algorithm In the flow-graph shown N = 8 Hence, the (N/4)-point DFT here is a 2-point DFT and no further decomposition is possible The four 2-point DFTs, X ij [k], i, j = 0,1 can be easily computed For example Corresponding flow-graph of the 2-point DFT is shown below obtained using the identity Original PowerPoint slides prepared by S. K. Mitra 11-36

Decimation-in-Time in FFT Algorithm Complete flow-graph of the 8-point DFT is shown below Original PowerPoint slides prepared by S. K. Mitra 11-37

Decimation-in-Time in FFT Algorithm The flow-graph consists of 3 stages First stage computes the four 2-point DFTs Second stage computes the two 4-point DFTs Last stage computes the desired 8-point DFT The number of complex multiplications and additions at each stage is equal to 8, the size of the DFT Total number of complex multiplications and additions to compute all 8 DFT samples is equal to 8 + 8 + 8 = 24 = 8 3 In the general case when N = 2 μ, the number of stages for computing the N-point DFT in the algorithm will be μ =logn 2 N Total number of complex multiplications and additions to compute all N DFT samples is N(log 2 N) Original PowerPoint slides prepared by S. K. Mitra 11-38

Decimation-in-Time in FFT Algorithm Note, and Besides, the coefficients have the symmetry property of These properties can be exploited to reduce the computational complexity further In the following basic module two output variables are generated by a weighted combination of two input variables The basic computational module is called a butterfly computation ti Original PowerPoint slides prepared by S. K. Mitra 11-39

Decimation-in-Time in FFT Algorithm The input-output relations of the basic module are: Substituting in the second equation given above we get The modified butterfly computation requires only one complex multiplication as indicated below Use of the above modified butterfly computation module reduces the total number of complex multiplications by 50% Original PowerPoint slides prepared by S. K. Mitra 11-40

Decimation-in-Time in FFT Algorithm New flow-graph using the modified butterfly computational module for N = 8 Original PowerPoint slides prepared by S. K. Mitra 11-41

Decimation-in-Time in FFT Algorithm Computational complexity can be reduced further by avoiding multiplications by,,, and The DFT computation algorithm described here also is efficient with regard to memory requirements Note: Each stage employs the same butterfly computation ti to compute Ψ r+1 [α] and Ψ r+1 [β] from Ψ r [α] and Ψ r [β] At the end of computation at any stage, output variables Ψ r+1 [m] can be stored in the same registers previously occupied by the corresponding input variables Ψ r [m] This type of memory location sharing is called in-place computation resulting in significant savings in overall memory requirements Original PowerPoint slides prepared by S. K. Mitra 11-42

Decimation-in-Time in FFT Algorithm In the DFT computation scheme outlined, the DFT samples X[k] appear at the output in a sequential order while the input samples x[n] appear in a different order Thus, a sequentially entiall ordered input x[n] must be reordered appropriately before the fast algorithm described by this structure can be implemented Original PowerPoint slides prepared by S. K. Mitra 11-43

Decimation-in-Time in FFT Algorithm To understand the input reordering scheme, represent the arguments of input samples x[n] and their sequentially ordered new representations Ψ 1 [m] in binary forms with the relations between the arguments m and n as follows: Thus, if (b 2 b 1 b 0 ) represents the index n of x[n], [ ] then the sample x[b 2 b 1 b 0 ] appears at the location m = b 0 b 1 b 2 as Ψ 1 [b 0 b 1 b 2 ] before the DFT computation is started i.e., the location of Ψ 1 [m] is in bit-reversed order from that of x[n] Alternative forms can be obtained by reordering the computations such as input in normal order and output in bitreversed order, and both input and output in normal order Original PowerPoint slides prepared by S. K. Mitra 11-44

Decimation-in-Time in FFT Algorithm The fast algorithm described assumes that the length of x[n] is a power of 2 If it is not, the length can be extended by zero-padding and make the length a power of 2 Even after zero-padding, the DFT computation based on the fast algorithm may be computationally more efficient than a direct DFT computation of the original shorter sequence The fast DFT computation schemes described are called decimation-in-time (DIT) fast Fourier transform (FFT) algorithms as input x[n] is first decimated to form a set of subsequences before the DFT is computed Original PowerPoint slides prepared by S. K. Mitra 11-45

Decimation-in-Time in FFT Algorithm For N = 2 μ, this decimation can be performed μ = log 2 N times. The total number of Complex multiplications : (N/2) log 2 N Complex additions : N log 2 N N Complex multiplications in Direct Computation N 2 Complex multiplications in FFT algorithm, (N/2)log 2 N 4 16 4 8 64 12 16 256 32 32 1,024 80 64 4,096 192 128 16,384 448 256 65,535 1,024 512 262,144 2,304 1,024 1,048,576 5,120 Original PowerPoint slides prepared by S. K. Mitra 11-46

Decimation-in-Time in FFT Algorithm For example, the relation between x[n] and its even and odd parts, x 0 [n] and x 1 [n], generated by the first stage of the DIT algorithm is given by Likewise, the relation between x[n] and the sequences x 00 [n], x 01 [n], x 10 [n], and x 11 [n], generated by the two-stage decomposition of the DIT algorithm is given by Original PowerPoint slides prepared by S. K. Mitra 11-47

Decimation-in-Time in FFT Algorithm The subsequences x 00 [n], x 01 [n], x 10 [n], and x 11 [n] can be generated directly by a factor-of-4 decimation process leading to a single-stage decomposition as shown below: Original PowerPoint slides prepared by S. K. Mitra 11-48

Radix-RR FFT Algorithm Radix-R FFT algorithm - A each stage the decimation is by a factor of R Depending on N, various combinations of decompositions of X[k] can be used to develop elop different types of DIT FFT algorithms If the scheme uses a mixture of decimations by different factors, it is called a mixed radix FFT algorithm For N which is a composite number expressible in the form of a product of integers: N = r 1 r 2 r ν the total number of complex multiplications (additions) in a DIT FFT algorithm based on a ν -stage decomposition is given by Original PowerPoint slides prepared by S. K. Mitra 11-49

Decimation-in-Frequency in FFT Algorithm For k even For k odd We can write where Original PowerPoint slides prepared by S. K. Mitra 11-50

Decimation-in-Frequency in FFT Algorithm Thus X[2l] and X[2l+1] are the (N/2)-point DFTs of the length-(n/2) sequences x 0 [n] and x 1 [n], The flow-graph of the first-stage of the DFT: The output DFT samples appear in a decimated form with the even-indexed samples appearing as the output of one (N/2)-point DFT and the odd-indexed samples appearing as the output of the other (N/2)-point DFT 11-51 Original PowerPoint slides prepared by S. K. Mitra

Decimation-in-Frequency in FFT Algorithm We next express the even- and odd-indexed samples of each one of the two (N/2)-point DFTs as a sum of two (N/4)- point DFTs The process is continued until the smallest DFTs are 2-point DFTs The flow-graph of the decimation-in-frequency in (DIF) FFT computation scheme for N = 8 Original PowerPoint slides prepared by S. K. Mitra 11-52

Decimation-in-Frequency in FFT Algorithm Computational complexity of the radix-2 DIF FFT algorithm is same as that of the DIT FFT algorithm Various forms of DIF FFT algorithm can similarly be developed eloped The DIT and DIF FFT algorithms described here are often referred to as the Cooley-Tukey FFT algorithms Original PowerPoint slides prepared by S. K. Mitra 11-53

Inverse DFT Computation An FFT algorithm for computing the DFT samples can also be used to calculate efficiently the inverse DFT (IDFT) Consider a length-n sequence x[n] with an N-point DFT X[k] Recall Multiplying both sides by N and taking the complex conjugate we get Right-hand side of above is the N-point DFT of a sequence X*[k] Original PowerPoint slides prepared by S. K. Mitra 11-54

Inverse DFT Computation The desired IDFT x[n] is then obtained as Inverse DFT computation is shown below: Original PowerPoint slides prepared by S. K. Mitra 11-55

Cooley-Tukey FFT Algorithms Consider a length-n sequence x[n] with an N-point DFT X[k] where N = N 1 N 2 Represent the indices n and k as Using these index mappings we can write as Original PowerPoint slides prepared by S. K. Mitra 11-56

Cooley-Tukey FFT Algorithms Since,, and, we have where 0 k 1 N 1 1 and 0 k 2 N 2 1 The effect of the index mapping is to map the 1-D sequence x[n] into a 2-D sequence that can be represented as a 2-D array with n 1 specifying the rows and n 2 specifying the columns of the array Inner parentheses of the last equation is seen to be the set of N 1 -point DFTs of the N 2 -columns: Original PowerPoint slides prepared by S. K. Mitra 11-57

Cooley-Tukey FFT Algorithms Note: The column DFTs can be done in place Next, these row DFTs are multiplied in place by the twiddle factors yielding Finally, the outer sum is the set of N 2-point DFTs of the columns of the array: The row DFTs, X[k 1 +N 1 k 1 ], can again be computed in place 1 1 1 The input x[n] is entered into an array according to the index map: Original PowerPoint slides prepared by S. K. Mitra 11-58

Cooley-Tukey FFT Algorithms Likewise, the output DFT samples X[k] need to extracted from the array according to the index map: Example: Let N = 8. Choose N 1 = 2 and N 2 = 4, then for 0 k 1 1 and 0 k 2 3 2-D array representation of the input is Original PowerPoint slides prepared by S. K. Mitra 11-59

Cooley-Tukey FFT Algorithms The column DFTs are 2-point DFTs given by These DFTs require no multiplications 2-D array of row transforms is After multiplying by the twiddle factors array becomes Original PowerPoint slides prepared by S. K. Mitra 11-60

Note Cooley-Tukey FFT Algorithms Finally, the 4-point DFTs of the rows are computed: Output 2-D array is given by The process illustrated is precisely the first stage of the DIF FFT algorithm Original PowerPoint slides prepared by S. K. Mitra 11-61

Cooley-Tukey FFT Algorithms By choosing N 1 = 4 and N 2 = 2, we get the first stage of the DIT FFT algorithm Alternate index mappings are given by Original PowerPoint slides prepared by S. K. Mitra 11-62

Prime Factor Algorithms Twiddle factors can be eliminated by defining the index mappings as To eliminate the twiddle factors we need to express Now It follows from above that if AC N = N 2, BD N = N 1, AD N = BC N = 0 then Original PowerPoint slides prepared by S. K. Mitra 11-63

Prime Factor Algorithms One set of coefficients that eliminates the twiddle factors is given by A = N 2, B = N 1, C = N 2 N 1 2, D = N 1 N 1 1 N 1 N 2 Here N 1 1 denotes the multiplicative inverse N of N 2 1 reduced modulo N 2 If N 1 1 1 = α then N N =1or α 2 1α or, in other words N N 2 1α = N 2 β + 1 where β is any integer For example, if N = = 1 1 4 and N 2 3, then 3 4 = 3 and 3 3 4 = 1 Likewise, if N 1 = 2 N γ, then N 2γ = + 1 2 γ N 1 δ 1 where δ is any integer Original PowerPoint slides prepared by S. K. Mitra 11-64

Prime Factor Algorithms Now, AC N = N 2 (N 2 N 1 2 ) N 1 N = N 2 (N 1 δ+1) N = N 2 N 1 δ+n 2 ) N = N 2 Similarly, BD N = N 1 (N 1 N 1 1 ) N 2 N = N 1 (N 2 δ+1) N = N 1 N 2 δ+n 1 ) N = N 1 Next, Likewise, Hence, AD 1 N = N 2 (N 1 N 1 1 ) N 2 N = Nα N = 0 BC 1 N = N 1 (N 2 N 1 2 ) N 1 N = Nγ N = 0 Original PowerPoint slides prepared by S. K. Mitra 11-65

Prime Factor Algorithms Thus, where and 0 k 1 N 1 1 and 0 k 2 N 2 1 Original PowerPoint slides prepared by S. K. Mitra 11-66

Prime Factor Algorithms Example: Let N = 12. Choose N 1 = 4 and N 2 = 3 Then, A = 3, B = 4, C = 3 3 1 4 = 9, and D = 4 4 1 3 = 4 The index mappings are 2-D array representation of input is Original PowerPoint slides prepared by S. K. Mitra 11-67

Prime Factor Algorithms 4-point transforms of the columns lead to Final DFT array is 4-point DFTs require no multiplications, whereas the 3-point DFTs require 4 complex multiplications Thus, the algorithm requires 16 complex multiplications Original PowerPoint slides prepared by S. K. Mitra 11-68

Chirp z-transform Algorithm Let x[n] be a length-n sequence with a Fourier transform We consider evaluation of M samples of that are equally spaced in angle on the unit circle at frequencies ω k = ω o + kδω, 0 k M 1 where the starting frequency ω o and the frequency increment Δω can be chosen arbitrarily il Original PowerPoint slides prepared by S. K. Mitra 11-69

Chirp z-transform Algorithm The problem is thus to evaluate or, with W defined as To evaluate W = e jδω Using the identity nk = ½[ [n 2 + k 2 (k n) 2 ] we can write Letting We arrive at Original PowerPoint slides prepared by S. K. Mitra 11-70

Chirp z-transform Algorithm Interchanging k and n we get Thus, X(e jω n) corresponds to the convolution ol of the sequence g[n] with the sequence W n2 /2 followed by multiplication by the sequence W n2 /2 as indicated below We arrive at The sequence can be thought of as a complex exponential sequence with linearly increasing frequency Such signals, in radar systems, are called chirp signals Original PowerPoint slides prepared by S. K. Mitra 11-71

Chirp z-transform Algorithm For the evaluation of the output of the system depicted earlier need to be computed over a finite interval Since g[n] is a length-n sequence, only a finite portion of the infinite length sequence W n2 /2 is used in obtaining the convolution sum over the interval 0 n M 1 1 Original PowerPoint slides prepared by S. K. Mitra 11-72

Chirp z-transform Algorithm Typical signals Original PowerPoint slides prepared by S. K. Mitra 11-73

Chirp z-transform Algorithm The portion of the sequence W n2 /2 used in obtaining the convolution sum is from the interval N +1 n M 1 Let as shown below It can be seen that Original PowerPoint slides prepared by S. K. Mitra 11-74

Chirp z-transform Algorithm Hence, the computation of the frequency samples X(e jω n) can be carried out using an FIR filter as indicated below where y[n] = X(e jω n), 0 n M 1 Advantages N = M is not required as in FFT algorithms Neither N nor M do not have to be composite numbers Parameters ω o and Δω are arbitrary Convolution with h[n] can be implemented using FFT techniques Original PowerPoint slides prepared by S. K. Mitra 11-75

Chirp z-transform Algorithm Original PowerPoint slides prepared by S. K. Mitra 11-76