0% found this document useful (0 votes)
44 views16 pages

Computation of DFT Chapter-9

The document discusses algorithms for computing the discrete Fourier transform (DFT), including direct computation and the Goertzel and fast Fourier transform (FFT) algorithms. It describes the baseline complexity of direct DFT computation and introduces the Goertzel algorithm, which has slightly lower complexity than direct computation. The document then covers decimation-in-time and decimation-in-frequency FFT algorithms, which have the lowest complexity of O(N log N) for an N-point DFT. It provides flow graphs and explanations of the butterfly computations in FFTs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views16 pages

Computation of DFT Chapter-9

The document discusses algorithms for computing the discrete Fourier transform (DFT), including direct computation and the Goertzel and fast Fourier transform (FFT) algorithms. It describes the baseline complexity of direct DFT computation and introduces the Goertzel algorithm, which has slightly lower complexity than direct computation. The document then covers decimation-in-time and decimation-in-frequency FFT algorithms, which have the lowest complexity of O(N log N) for an N-point DFT. It provides flow graphs and explanations of the butterfly computations in FFTs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Computation of DFT

Chapter-9

Discrete Fourier Transform


The DFT pair was given as

X[k ] =

N 1

x[n]e

j(2 / N )kn

n=0

1 N1
x[n] = X[k ]e j(2 / N)kn
N k =0

Baseline for computational 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

Complexity in terms of real operations


4N2 real multiplications
2N(N-1) real additions

Most fast methods are based on symmetry properties


Conjugate symmetry e j(2 / N)k (Nn) = e j(2 / N)kNe j(2 / N)k (n) = e j(2 / N)kn
Periodicity in n and k e j(2 / N)kn = e j(2 / N)k (n+N) = e j(2 / N)(k +N)n

The Goertzel Algorithm


Makes use of the periodicity

e j(2 / N)Nk = e j2k = 1

Multiply DFT equation with this factor

X[k ] = e
Define

j(2 / N )kN

yk [n] =

N 1

x[r]e

j(2 / N )rn

r =0

N 1

j 2 / N )r (N n )

x[r]e (

r =0

j(2 / N )k (n r )
x
[
r
]
e
u[n r ]

r =

With this definition and using x[n]=0 for n<0 and n>N-1

X[k ] = yk [n]n=N
X[k] can be viewed as the output of a filter to the input x[n]
Impulse response of filter:

e j(2 / N)knu[n]
X[k] is the output of the filter at time n=N

The Goertzel Filter


Goertzel Filter

Hk (z ) =

1
1e

2
k
N

z 1

Computational complexity
4N real multiplications
4N real additions
Slightly less efficient than the direct method

Multiply both numerator and denominator


j

2
k
N

2
k
N

1e
z 1
1e
z 1
Hk (z ) =
=
2
2
j k
j k

1 2 cos 2k z 1 + z 2
1
1
N
N
1 e z 1 e
z

Second Order Goertzel Filter


Second order Goertzel Filter

2
k
N

1e
z 1
Hk (z) =
2k 1
1 2 cos
z + z 2
N
Complexity for one DFT coefficient
Poles: 2N real multiplications and 4N real additions
Zeros: Need to be implement only once
4 real multiplications and 4 real additions

Complexity for all DFT coefficients


Each pole is used for two DFT coefficients
Approximately N2 real multiplications and 2N2 real additions

Do not need to evaluate all N DFT coefficients


Goertzel Algorithm is more efficient than FFT if
less than M DFT coefficients are needed
M < log2N

Decimation-In-Time FFT Algorithms


Makes use of both symmetry and periodicity
Consider special case of N an integer power of 2
Separate x[n] into two sequence of length N/2
Even indexed samples in the first sequence
Odd indexed samples in the other sequence
N1

X [ k ] = x[n]e

j ( 2 /N )kn

n=0

x[n]e

j ( 2 /N )kn

n even

+ x[n]e

j ( 2 /N )kn

n odd

Substitute variables n=2r for n even and n=2r+1 for odd

X[k ] =

N / 2 1

2rk
N

x[2r]W

r =0

N / 2 1

rk
N/2

N / 2 1

(2r +1)k
x
[
2
r
+
1
]
W

r =0

k
N

N / 2 1

rk
N/2

x[2r]W + W x[2r + 1]W


= G[k ] + W H[k ]
=

r =0

r =0

k
N

G[k] and H[k] are the N/2-point DFTs of each subsequence

Decimation In Time

Decimation In Time
N /21

G [k ] =

N /41

g[r]WNrk/2 = g[2l]WN2lk
/2 = +

r=0

l=0

N /41

N /41

x[2l +1]WN( /2

l=0
N /41

g[2l]W

lk
N /4

k
N /2

+W

g[2l +1]W

lk
N /4

l=0

l=0

N /41

N /41

and
H[k] =

h[2l]W

lk
N /4

l=0

+ WNk /2

h[2l +1]W

lk
N /4

l=0

2l+1)k

Decimation In Time Contd


After two steps of decimation in time

Decimation-In-Time FFT Algorithm


Final flow graph for 8-point decimation in time

Complexity:
Nlog2N complex multiplications and additions

Butterfly Computation
Flow graph constitutes of butterflies

We can implement each butterfly with one multiplication

Final complexity for decimation-in-time FFT


(N/2)log2N complex multiplications and additions

In-Place Computation
Decimation-in-time flow graphs require two sets of registers
Input and output for each stage

Note the arrangement of the input indices


Bit reversed indexing

X0 [0] = x[0] X0 [000] = x[000]


X0 [1] = x[4] X0 [001] = x[100]
X0 [2] = x[2] X0 [010] = x[010]
X0 [3] = x[6] X0 [011] = x[110]
X0 [4] = x[1] X0 [100] = x[001]
X0 [5] = x[5] X0 [101] = x[101]
X0 [6] = x[3] X0 [110] = x[011]
X0 [7] = x[7] X0 [111] = x[111]

In-Place Computation

Decimation-In-Frequency FFT Algorithm


The DFT equation

X[k ] =

N 1

nk
x
[
n
]
W

n=0

Split the DFT equation into even and odd frequency indexes

X[2r ] =

N1

n2r
N

x[n]W

n=0

N / 2 1

n2r
N

x[n]W

n=0

N1

n2r
N

x[n]W

n =N / 2

Substitute variables to get

X[2r ] =

N / 2 1

n2r
N

x[n]W

n=0

N / 2 1

x[n + N / 2]W

(n + N / 2 )2r

n=0

N / 2 1

n=0

Similarly for odd-numbered frequencies

X[2r + 1] =

N / 2 1

n 2r +1)
N/2

(x[n] x[n + N / 2])W (

n=0

nr
N/2

(x[n] + x[n + N / 2])W

Decimation-In-Frequency FFT Algorithm


Final flow graph for 8-point decimation in frequency

Decimation-In-Frequency FFT Algorithm


Final flow graph for 8-point decimation in time

You might also like