0% found this document useful (0 votes)
7 views76 pages

ch11 DSP

signals

Uploaded by

Mass Time
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)
7 views76 pages

ch11 DSP

signals

Uploaded by

Mass Time
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/ 76

Chapter 11

DSP Algorithm
Implementations
清大電機系林嘉文
[email protected]
03-5731152 11-1
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Matrix Representation of Digital
Filter Structures
• Consider
Co s de

• This structure is described by the set of equations


w1[[n]] = x[n]
[ ] −α w5[[n]]
w2[n] = w1[n] − δ w3[n]
w3[n] = w2 [n−1]
w4[n] = w3[n] + ε w2[n]
w5[n] = w4 [n−1]
y[n] = β w1[n] + γ w5[n]
Original PowerPoint slides prepared by S. K. Mitra 11-2
© The McGraw-Hill Companies, Inc., 2007
Matrix Representation of Digital
Filter Structures
• Thiss o ordered
de ed set o of equat
equations
o s is
s sa
said
d to be noncomputable
o co putab e
because some variables on the left side are computed
before some right-side variables are made available
• For example, computation of w1[n] in the 1st step requires
the knowledge of w5[n] which is computed in the 5th step
• Likewise,
Likewise computation of w2[n] in the 2nd step requires the
knowledge of w3[n] that is computed in the 3rd step
• Supposepp we reorder the equations q
w3[n] = w2 [n−1]
w5[n] = w4 [n−1]
w1[n] = x[n] −α w5[n]
w2[n] = w1[n] − δ w3[n]
w4[n] = w3[n] + ε w2[n]
Original PowerPoint slides prepared by S.y[n] = β w1[n] + γ w5[n]
K. Mitra 11-3
© The McGraw-Hill Companies, Inc., 2007
Matrix Representation
• Thiss new
e o ordered
de ed set oof equat
equations
o s is s co
computable
putab e
• 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
p of the first ordered set of equations:
q

Original PowerPoint slides prepared by S. K. Mitra 11-4


© The McGraw-Hill Companies, Inc., 2007
Matrix Representation
• In co
compact
pact form
o
y[n] = x[n] + F y[n] + G y[n−1]
where
y[n] = [w1[n] w2[n] w3[n] w4[n] w5[n] y[n]]T
x[n] = [x[n] 0 0 0 0 0]T

• If a diagonal element of F is nonzero


nonzero, then computation of
present value of the corresponding variable requires the
knowledgeg of its p
present value implying
py gp presence of a
delay-free loop 11-5
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Matrix Representation
• Anyy nonzero
o eoe entries
t es in tthe
e sa
samee row
o abo
above e tthe
e main
a
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,
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,
q ,
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
© The McGraw-Hill Companies, Inc., 2007
Matrix Representation
• The
e F matrix
at foro tthe
e seco
second
doordered
de ed set o
of equat
equations
o s is
s

which is seen to satisfyy the computability


p y condition

Original PowerPoint slides prepared by S. K. Mitra 11-7


© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• The precedence graph can be used to test the
computability
t bilit off a di
digital
it l filt
filter structure
t t and
d tto d
develop
l ththe
proper ordering sequence for a set of equations describing
a computable structure
• It is developed from the signal-flow graph description of
g
the digital filter structure in which independent
p and
dependent signal variables are represented by nodes, and
the multiplier and delay branches are represented by
di t d branches
directed b h
• 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 11-8
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• The signal-flow graph representation of

is shown below

Original PowerPoint slides prepared by S. K. Mitra 11-9


© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• A reduced signal-flow graph is then developed by
removing
i ththe d
delay
l b branches
h andd allll b
branches
h going
i outt off
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


© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• The nodes in the reduced signal-flow graph are grouped as
f ll
follows:
• All nodes with only outgoing branches are grouped into one
set labeled {N1}
• Next, the set {N2} is formed containing nodes coming in
onlyy from one or more nodes in the set {N
{ 1} and have
outgoing branches to the other nodes
• Then, form the set {N3} containing nodes that have
b
branches
h comingi iin onlyl ffrom one or more nodes
d iin th
the
sets {N1} and {N2}, and have outgoing branches to other
nodes
• Continue the process until there is a set of nodes {Nf}
containingg only
y incoming g branches
• The rearranged graph is called a precedence graph 11-11
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• Since signal variables belonging to {N1} do not depend on
th presentt values
the l off other
th signal
i l variables,
i bl th
these variables
i bl
should be computed first
• Next,
Next signal variables belonging to {N2} can be computed
since they depend on the present values of signal variables
contained in {{N1} that have alreadyy been computed p
• This is followed by the computation of signal variables in
{N3}, {N4}, etc.
• Finally,
Fi ll iin ththe llastt step
t th the signal
i l variables
i bl iin {Nf} are
computed
• This process of sequential computation ensures the
development of a valid computational algorithm
• If there is no final set {{Nf} containing g only
y incomingg
branches, the digital filter structure is noncomputable 11-12
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Precedence Graph

• For the example precedence graph, pertinent groupings of


node
d variables
i bl are:
{N1} = {w3[n], w5[n]}
{N2} = {w1[n]}
{N3} = {w2[n]}
{{N4} = {w
{ 4[[n],
] y[
y[n]}
]}
Original PowerPoint slides prepared by S. K. Mitra 11-13
© The McGraw-Hill Companies, Inc., 2007
Precedence Graph
• Precedence graph redrawn according to the above
groupings
i iis as shown
h b
below
l

• Since the final node set {N4} has only incoming branches
branches,
the structure is computable

Original PowerPoint slides prepared by S. K. Mitra 11-14


© The McGraw-Hill Companies, Inc., 2007
Structure Verification
• A simple method to verify that the structure developed is
i d d characterized
indeed h t i db by the
th prescribed
ib d transfer
t f function
f ti
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),


H(z)D(z) which is equivalent to

Original PowerPoint slides prepared by S. K. Mitra 11-15


© The McGraw-Hill Companies, Inc., 2007
Structure Verification
• Evaluate above convolution sum for 0 ≤ n ≤ 6:
p0 = h[0]
p1 = h[1] + h[0]d1
p2 = h[2] + h[1]d1 + h[0]d2
p3 = h[3] + h[2]d1 + h[1]d2 + h[0]d3
0 = h[4]
[ ] + h[3]d
[ ] 1 + h[2]d
[ ] 2 + h[1]d
[ ] 3
0 = h[5] + h[4]d1 + h[3]d2 + h[2]d3
0 = h[6] + h[5]d1 + h[4]d2 + h[3]d3
• In
I matrix
t i form
f we gett

Original PowerPoint slides prepared by S. K. Mitra 11-16


© The McGraw-Hill Companies, Inc., 2007
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
© The McGraw-Hill Companies, Inc., 2007
Structure Verification
• Example: Consider the causal transfer function

• Here
h[0] = 2, h[1] = 4, h[2] = −5, h[3] = −3, h[4] =13
• Hence

• Solving the above we get

Original PowerPoint slides prepared by S. K. Mitra 11-18


© The McGraw-Hill Companies, Inc., 2007
Four Classes of Fourier Transforms
Continuous in Time Discrete in time
time-Periodic
Periodic in frequency

FT DTFT; T0
f(k) F(ejωT0)
ntinuous in

t k ω

frequency

T0
Con

1 ∞ T π

∫ ∫π F ( e jωT0 )e jkωT0 dω
jω t
f (t ) = F ( jω ) e dω f (k ) = 0 T0

2π −∞ 2π −
T0



F (ω ) = f ( t ) e − j ω t dt
−∞ F (e jωT0
)= ∑ f ( k )e
k = −∞
− jkωT0

Fourier transform Discrete time Fourier Transform


Original PowerPoint slides prepared by S. K. Mitra 11-19
© The McGraw-Hill Companies, Inc., 2007
Four Classes of Fourier Transforms
Continuous in Time Discrete in time-Periodic in frequency
q y
F(n)
dic in

f(t) F(n)
F(k)
ete in frequency – period

t nω0 k n


ω0 DFT:N
FSiω0
∞ N −1 2π
1
∑ ∑ F ( n )e
j kn
jnω 0 t
f (t ) = F ( n ) e f (k ) = N

n = −∞ N n =0

ω π N −1 2π
Discre

−j
∫ F ( n ) = ∑ f ( k )e
ω0 − jn ω 0 t kn
F (n ) = 0 f (t )e dt N
time

2π −π
ω0 k =0

Fourier series Discrete Fourier Transform


Original PowerPoint slides prepared by S. K. Mitra 11-20
© The McGraw-Hill Companies, Inc., 2007
Direct Computation of DFT
For a complex-valued sequence of N C
C DFT SUBROUTINE
points
i the
h DFT may bbe expressed
d as C ISEL = 0 : DFT
C ISEL = 1 : INVERSE DFT
N −1
⎡ 2πkn 2πkn ⎤
X R (k ) = ∑ ⎢ xR (n) cos
C
+ xi (n) sin
N ⎥⎦
SUBROUTINE DFT(N, XR, XI, XFR, XFI, ISEL)
n =0 ⎣ N DIMENSION XR(N), XI(N), XFR(N), XFI(N)
N −1
⎡ 2πkn 2πkn ⎤ WN = 6.2831853 / FLOAT(N)
X I (k ) = −∑ ⎢ xR (n) sin − xi (n) cos
N ⎥⎦
IF (ISEL.EQ.1) WN = - WN
n =0 ⎣ N DO 20 K = 1, N
XFR(K) = 0,
• The direct computation XFI(K) = 0,
0
KM1 = K – 1
requires: DO 20 I = 1, N
IM1 = I – 1
• 2N2 evaluations of trigonometric ARG = WN * KM1 * IM1
functions. C = COS(ARG)
S = SIN(ARG)
• 4N2 real multiplications. XFR(K) = XFR(K) + XR(I)*C + XI(I)*S
XFI(K) = XFI(K) – XR(I)*S + XI(I)*C
• 4N(N –11 ) real additions
additions. 10
0 CONTINUE
CO U
IF (ISEL – 1) 20, 30, 20
• A number of indexing and 30
20
XFR(K) = XFR(K) / FLOAT(N)
XFI(K) = XFI(K) / FLOAT(N)
addressing operations. CONTINUE
RETURN
END
Original PowerPoint slides prepared by S. K. Mitra 11-21
© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
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


© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
Goertzel s Algorithm
• Define
• Note: yk[n] is the direct convolution of the causal sequence

with a causal sequence

• Observe
Ob X[k] = yk[n]|
[ ]|n=N
• z-transform of yields

Original PowerPoint slides prepared by S. K. Mitra 11-23


© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
Goertzel s Algorithm
• Thus, yk[n] is the output of an initially relaxed LTI digital
filter Hk[z] with an input xe[n] and, when n = N, yk[n] = X[k]
• Structural interpretation of the algorithm

• Thus a recursive DFT computation scheme is

with yk[−1] = 0 and xe[N] = 0

Original PowerPoint slides prepared by S. K. Mitra 11-24


© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
Goertzel s Algorithm
• Since a complex multiplication needs 4 real multiplications
and 2 real additions, computation of each new value of yk[n]
requires 4 real multiplications and 4 real additions
• Thus computation of X[k] = yk[N] involves 4N real
multiplications and 4N real additions
• Computation
C t ti off allll N DFT samples l requires
i 4N2 reall
multiplications and 4N2 real additions
• Direct computation of all N samples of {X[k]} requires N2
complex multiplications and N(N-1) complex additions
• Equivalently,
Equivalently direct computation of all N samples of {X[k]}
requires 4N2 real multiplications and N(4N-2) real additions
• Thus, GoertzelGoertzel’s s algorithm requires 2N more real additions
than the direct DFT computation
Original PowerPoint slides prepared by S. K. Mitra 11-25
© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
Goertzel s Algorithm
• The algorithm can be made computationally more efficient
by observing that Hk[z] can be rewritten as

resulting in a second-order realization

Original PowerPoint slides prepared by S. K. Mitra 11-26


© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
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


© The McGraw-Hill Companies, Inc., 2007
Goertzel’s
Goertzel s Algorithm
• In realizing HN−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 Hk[[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 feed-
forward multiplier which is now that is the complex
conjugate
j t off
• 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 N2
real multiplications and approximately 2N2 real additions
Original PowerPoint slides prepared by S. K. Mitra 11-28
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Consider a sequence x[n] of length N = 2μ
• Using a 2-band polyphase decomposition we can express
its z-transform as
X( ) = X0(z
X(z) ( 2) + z−11X1(z
( 2)
where

• Evaluating on the unit circle at N equally spaced points


we arrive at the N-point
p DFT of x[n]:
[ ]

where X0[[k]] and X1[[k]] are the (N/2)-point


( )p DFTs of x0[[n]] and
x1[n] 11-29
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• That is

• Block diagram interpretation:

Original PowerPoint slides prepared by S. K. Mitra 11-30


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Flow-graph representation

Original PowerPoint slides prepared by S. K. Mitra 11-31


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Direct computation of the N-point DFT requires N2 complex
multiplications
lti li ti and d N2 − N ≈ N2 complex
l additions
dditi
• The modified scheme requires the computation of two
(N/2) point DFTs that are then combined with
(N/2)-point ith N complex
comple
multiplications and N complex additions resulting in a total
of (N2/2) + N complex multiplications and approximately
(N2/2) + N complex additions
• For N ≥ 3,, ((N2/2)) + N < N2

Original PowerPoint slides prepared by S. K. Mitra 11-32


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Continuing the process we can express and as a weighted
combination
bi ti off ttwo (N/4)
(N/4)-point
i t DFT
DFTs
• For example, we can write

where X00[k] and X01[k] are the (N/4)-point DFTs of the


(N/4) l
(N/4)-length
th sequences x00[n]
[ ] = x0 [2n]
[2 ] and
d x01[n]
[ ] = x0 [2n+1]
[2 1]
• Likewise, we can express

where X10[k] and X11[k] are the (N/4)-point DFTs of the


(N/4)-length sequences x10[n] = x1 [2n] and x11[n] = x1 [2n+1]

Original PowerPoint slides prepared by S. K. Mitra 11-33


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Block-diagram representation of the two-stage algorithm

Original PowerPoint slides prepared by S. K. Mitra 11-34


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Flow-graph representation

Original PowerPoint slides prepared by S. K. Mitra 11-35


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• 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, Xij[k], i, j = 0,1 can be easily
computed
• For
F example l

• C
Corresponding
di flflow-graph
h off th
the 2-point
2 i t DFT is
i shown
h
below obtained using the identity

Original PowerPoint slides prepared by S. K. Mitra 11-36


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Complete flow-graph of the 8-point DFT is shown below

Original PowerPoint slides prepared by S. K. Mitra 11-37


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• 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 t allll 8 DFT samples
l iis equall tto 8 + 8 + 8 = 24 = 8
8×3
3
• In the general case when N = 2μ, the number of stages for
computing the N-point
N point DFT in the algorithm will be μ = log2N
• Total number of complex multiplications and additions to
compute all N DFT samples is N(log2N)
Original PowerPoint slides prepared by S. K. Mitra 11-38
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• 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
t ti
Original PowerPoint slides prepared by S. K. Mitra 11-39
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• 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
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• New flow-graph using the modified butterfly computational
module
d l ffor N = 8

Original PowerPoint slides prepared by S. K. Mitra 11-41


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• Computational complexity can be reduced further by
avoiding
idi multiplications
lti li ti b
by , , , and
d

• The DFT computation algorithm described here also is


efficient with regard to memory requirements
• Note:
N t E Eachh stage
t employs
l th
the same b butterfly
tt fl computation
t ti tto
compute Ψr+1[α] and Ψr+1[β] from Ψr[α] and Ψr[β]
• At the end of computation at any stagestage, 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
p resulting
g in significant
g savings
g in overall
memory requirements 11-42
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• In the DFT computation scheme outlined, the DFT samples
X[k] appear att the
th output
t t in
i a sequential
ti l order
d while
hil th
the
input samples x[n] appear in a different order
• Thus,
Th s a sequentially
seq entiall ordered inp
inputt x[n]
[n] must
m st be reordered
appropriately before the fast algorithm described by this
structure can be implemented

Original PowerPoint slides prepared by S. K. Mitra 11-43


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• To understand the input reordering scheme, represent the
arguments t off input
i t samples
l x[n]
[ ] and
d their
th i sequentially
ti ll
ordered new representations Ψ1[m] in binary forms with the
relations between the arguments m and n as follows:

• Th
Thus, if (b2b1b0) representst the
th index
i d n off x[n],
[ ] then
th the
th
sample x[b2b1b0] appears at the location m = b0b1b2 as
Ψ1[b0b1b2] 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
p
computations such as input
p in normal order and outputp in bit-
reversed order, and both input and output in normal order 11-44
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• The fast algorithm described assumes that the length of x[n]
i a power off 2
is
• If it is not, the length can be extended by zero-padding and
make the length a po powerer 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


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
Complex Complex
For N = 2μ, this decimation can be N
multiplications in multiplications in
Direct Computation FFT algorithm,
performed μ = log2N times. N2 (N/2)log2N
4 16 4

The total number of 8 64 12

16 256 32
/ ) ⋅ log2N
Complex multiplications : ((N/2)
C
32 1,024 80
Complex additions : N ⋅ log2N
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


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• For example, the relation between x[n] and its even and odd
parts,
t x0[n]
[ ] andd x1[n],
[ ] generated
t d by
b the
th fifirstt stage
t off the
th DIT
algorithm is given by

• Likewise, the relation between x[n] and the sequences


x00[n], x01[n], x10[n], and x11[n], generated by the two-stage
decomposition of the DIT algorithm is given by

Original PowerPoint slides prepared by S. K. Mitra 11-47


© The McGraw-Hill Companies, Inc., 2007
Decimation in Time FFT Algorithm
Decimation-in-Time
• The subsequences x00[n], x01[n], x10[n], and x11[n] can be
generated
t d di
directly
tl bby a ffactor-of-4
t f4d decimation
i ti process
leading to a single-stage decomposition as shown below:

Original PowerPoint slides prepared by S. K. Mitra 11-48


© The McGraw-Hill Companies, Inc., 2007
Radix R FFT Algorithm
Radix-R
• Radix-R FFT algorithm - A each stage the decimation is by
a factor
f t off R
• Depending on N, various combinations of decompositions of
X[k] can be usedsed to develop
de elop different ttypes
pes 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 = r1‫ ڄ‬r2 ‫ ڄ … ڄ‬r ν
the total number of complex multiplications (additions) in a
DIT FFT algorithm
g based on a ν -stage g decomposition
p is
given by 11-49
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Decimation in Frequency FFT Algorithm
Decimation-in-Frequency
• For k even

• For k odd

• We can write

where

Original PowerPoint slides prepared by S. K. Mitra 11-50


© The McGraw-Hill Companies, Inc., 2007
Decimation in Frequency FFT Algorithm
Decimation-in-Frequency
• Thus X[2l] and X[2l+1] are the (N/2)-point DFTs of the
l
length-(N/2)
th (N/2) sequences x0[n][ ] and
d x1[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
(N/2) point DFT and the odd-indexed odd indexed samples appearing as
the output of the other (N/2)-point DFT
Original PowerPoint slides prepared by S. K. Mitra 11-51
© The McGraw-Hill Companies, Inc., 2007
Decimation in Frequency FFT Algorithm
Decimation-in-Frequency
• We next express the even- and odd-indexed samples of
each
h one off the
th two
t (N/2)-point
(N/2) i t DFTs
DFT as a sum off two
t (N/4)-
(N/4)
point DFTs
• The process is continued
contin ed until
ntil the smallest DFTs are 22-point
point
DFTs
• The flow-graph
flow graph of the decimation
decimation-in-frequency
in frequency (DIF) FFT
computation scheme for N = 8

Original PowerPoint slides prepared by S. K. Mitra 11-52


© The McGraw-Hill Companies, Inc., 2007
Decimation in Frequency FFT Algorithm
Decimation-in-Frequency
• Computational complexity of the radix-2 DIF FFT algorithm
i same as th
is thatt off the
th DIT FFT algorithm
l ith
• Various forms of DIF FFT algorithm can similarly be
de eloped
developed
• The DIT and DIF FFT algorithms described here are often
referred to as the Cooley-Tukey
Cooley Tukey FFT algorithms

Original PowerPoint slides prepared by S. K. Mitra 11-53


© The McGraw-Hill Companies, Inc., 2007
Inverse DFT Computation
• An FFT algorithm for computing the DFT samples can also
b used
be d tto calculate
l l t efficiently
ffi i tl th
the iinverse 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 off above is the N-point DFT off a sequence


X*[k]

Original PowerPoint slides prepared by S. K. Mitra 11-54


© The McGraw-Hill Companies, Inc., 2007
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


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• Consider a length-N sequence x[n] with an N-point DFT X[k]
where
h N = N1N2
• 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


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• Since , , and , we
have

where 0 ≤ k1 ≤ N1 −1 and 0 ≤ k2 ≤ N2 −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 n1 specifying the rows and n2 specifying the
columns of the array
• Inner parentheses of the last equation is seen to be the set
of N1-point DFTs of the N2-columns:

Original PowerPoint slides prepared by S. K. Mitra 11-57


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• Note: The column DFTs can be done in place
• Next, these row DFTs are multiplied in place by the twiddle
factors yielding

• Finally,
y, the outer sum is the set of N2-point
p DFTs of the
columns of the array:

• The row DFTs, X[k1+N1k1], can again


g be computed in place
• The input x[n] is entered into an array according to the index
map:

Original PowerPoint slides prepared by S. K. Mitra 11-58


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• Likewise, the output DFT samples X[k] need to extracted
f
from the
th array according
di tto th
the iindex
d map:

• Example: Let N = 8. Choose N1 = 2 and N2 = 4, then

for 0 ≤ k1 ≤ 1 and 0 ≤ k2 ≤ 3
• 2-D array representation of the input is

Original PowerPoint slides prepared by S. K. Mitra 11-59


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• The column DFTs are 2-point DFTs given by

• These DFTs require


q no multiplications
p
• 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


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• Note
• 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


© The McGraw-Hill Companies, Inc., 2007
Cooley Tukey FFT Algorithms
Cooley-Tukey
• By choosing N1 = 4 and N2 = 2 , we get the first stage of the
DIT FFT algorithm
l ith
• Alternate index mappings are given by

Original PowerPoint slides prepared by S. K. Mitra 11-62


© The McGraw-Hill Companies, Inc., 2007
Prime Factor Algorithms
• Twiddle factors can be eliminated by defining the index
mappings
i as

• To eliminate the twiddle factors we need to express

• Now
N

• It follows from above that if


‫ۃ‬AC‫ۄ‬N = N2, ‫ۃ‬BD‫ۄ‬N = N1, ‫ۃ‬AD‫ۄ‬N = ‫ۃ‬BC‫ۄ‬N = 0
then
Original PowerPoint slides prepared by S. K. Mitra 11-63
© The McGraw-Hill Companies, Inc., 2007
Prime Factor Algorithms
• One set of coefficients that eliminates the twiddle factors is
given
i b
by
A = N2, B = N1, C = N2‫ۃ‬N2−1‫ۄ‬N1, D = N1‫ۃ‬N1−1‫ۄ‬N2
• Here ‫ۃ‬N1−1‫ۄ‬N2 denotes the multiplicative in erse of N1
m ltiplicati e inverse
reduced modulo N2
• Ö If ‫ۃ‬N1−11‫ۄ‬N2 = α then ‫ۃ‬N1α‫ۄ‬N2 = 1 or,
or in other words N1α =
N2β + 1 where β is any integer
example if N1 = 4 and N2 = 3 , then ‫ۃ‬3−1‫ۄ‬4 = 3 and
• For example,
‫ۃ‬3‫ڄ‬3‫ۄ‬4 = 1
• Likewise, if ‫ۃ‬N2−1‫ۄ‬N1 = γ, then N2γ = N1δ + 1 where δ is any
integer

Original PowerPoint slides prepared by S. K. Mitra 11-64


© The McGraw-Hill Companies, Inc., 2007
Prime Factor Algorithms
• Now, ‫ۃ‬AC‫ۄ‬N = ‫ۃ‬N2‫(ڄ‬N2‫ۃ‬N2−1‫ۄ‬N1)‫ۄ‬N = ‫ۃ‬N2(N1δ+1)‫ۄ‬N =
‫ۃ‬N2N1δ+N N2)‫ۄ‬N = N2
• Similarly, ‫ۃ‬BD‫ۄ‬N = ‫ۃ‬N1‫(ڄ‬N1‫ۃ‬N1−1‫ۄ‬N2)‫ۄ‬N = ‫ۃ‬N1(N2δ+1)‫ۄ‬N =
‫ۃ‬N1N2δ+N1)‫ۄ‬N = N1
• Next,
‫ۃ‬AD‫ۄ‬N = ‫ۃ‬N2‫(ڄ‬N
(N1‫ۃ‬N1−11‫ۄ‬N2)‫ۄ‬N = ‫ۃ‬Nα‫ۄ‬
‫ۃ‬N ‫ۄ‬N = 0
• Likewise,
‫ۃ‬BC‫ۄ‬N = ‫ۃ‬N1‫(ڄ‬N
(N2‫ۃ‬N2−11‫ۄ‬N1)‫ۄ‬N = ‫ۃ‬Nγ‫ۄ‬
‫ۃ‬N ‫ۄ‬N = 0
• Hence,

Original PowerPoint slides prepared by S. K. Mitra 11-65


© The McGraw-Hill Companies, Inc., 2007
Prime Factor Algorithms
• Thus,

where

and 0 ≤ k1 ≤ N1 −1 and 0 ≤ k2 ≤ N2 −1

Original PowerPoint slides prepared by S. K. Mitra 11-66


© The McGraw-Hill Companies, Inc., 2007
Prime Factor Algorithms
• Example: Let N = 12. Choose N1 = 4 and N2 = 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


© The McGraw-Hill Companies, Inc., 2007
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 11-68
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
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
i
increment t Δω
Δ can beb chosen
h arbitrarily
bit il

Original PowerPoint slides prepared by S. K. Mitra 11-69


© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm
• The problem is thus to evaluate

or with
or, ith W defined as
W = e−jΔω
T evaluate
To l t

• Using
U i ththe id
identity
tit nkk = ½ [n
[ 2 + k2 − (k−n)
(k )2] we can write
it

• Letting
• We arrive at
Original PowerPoint slides prepared by S. K. Mitra 11-70
© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm
• Interchanging k and n we get

• Th
Thus,
s X(e−jωn) corresponds to the con
convolution
ol tion of the
sequence g[n] with the sequence W−n2/2 followed by
multiplication by the sequence Wn2/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 11-71
Original PowerPoint slides prepared by S. K. Mitra
© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
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


© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm
• Typical signals

Original PowerPoint slides prepared by S. K. Mitra 11-73


© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm
• The portion of the sequence W−n2/2 used in obtaining the
convolution
l ti sum iis ffrom th
the iinterval
t l −N
N +1
1 ≤ n ≤ M −1
1

• Let

as shown below

• It can be seen that

Original PowerPoint slides prepared by S. K. Mitra 11-74


© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm
• Hence, the computation of the frequency samples X(ejωn)
can be
b carried
i d outt using
i an FIR filt
filter as iindicated
di t d bbelow
l

where y[n] = X(ejω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
© The McGraw-Hill Companies, Inc., 2007
Chirp z-Transform
z Transform Algorithm

Original PowerPoint slides prepared by S. K. Mitra 11-76


© The McGraw-Hill Companies, Inc., 2007

You might also like