Microsoft PowerPoint - ch11_Mitra_dsp []DSP Algorithm
Implementations
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Consider
• This structure is described by the set of equations w1[n] = x[n]
−α w5[n]
w2[n] = w1[n] − δ w3[n]
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-2
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]
2008/6/11
2
Matrix Representation of Digital Filter Structures
• This ordered set of equations is said to be noncomputable because
some variables on the left side are computed before some right side
ariables are made a ailablebefore 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, computation of w2[n] in the 2nd step requires the
knowledge of w3[n] that is computed in the 3rd step
• Suppose we reorder the equations w3[n] = w2 [n−1]
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-3
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] y[n] = β w1[n] + γ w5[n]
Matrix Representation • This new ordered set of equations is
computable • In most practical applications, equations describing a
digital
filter str ct re can be p t into a comp table order bfilter
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:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-4
2008/6/11
3
Matrix Representation • In compact form
y[n] = x[n] + F y[n] + G y[n−1] herewhere
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-5
• 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 presence of a delay-free loop
Matrix Representation • Any nonzero entries in the same row above
the main
diagonal of F imply that the computation of present value of the
corresponding ariable req ires present al es of otherthe
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-6
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
2008/6/11
4
Matrix Representation • The F matrix for the second ordered set of
equations is
which is seen to satisfy the computability condition
© The McGraw-Hill Companies, Inc., 2007 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 describingproper
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 branches
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-8
• 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
2008/6/11
5
is shown below
© The McGraw-Hill Companies, Inc., 2007 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
nodethe input node
• The reduced signal-flow graph of the example digital filter
structure is shown below
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-10
2008/6/11
6
Precedence Graph • The nodes in the reduced signal-flow graph are
grouped as
follows: • All nodes with only outgoing branches are grouped into
oneAll nodes with only outgoing branches are grouped into one
set labeled {N1} • Next, the set {N2} is formed containing nodes
coming in
only from one or more nodes in the set {N1} and have outgoing
branches to the other nodes
• Then, form the set {N3} containing nodes that have branches
coming in only from one or more nodes in the
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-11
sets {N1} and {N2}, and have outgoing branches to other nodes
• Continue the process until there is a set of nodes {Nf}
containing only incoming branches
• The rearranged graph is called a precedence graph
Precedence Graph • Since signal variables belonging to {N1} do not
depend on
the present values of other signal variables, these variables
should be computed firstshould be computed first
• Next, signal variables belonging to {N2} can be computed since
they depend on the present values of signal variables contained in
{N1} that have already been computed
• This is followed by the computation of signal variables in {N3},
{N4}, etc.
• Finally, in the last step the signal variables in {Nf} are
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-12
computed • This process of sequential computation ensures the
development of a valid computational algorithm • If there is no
final set {Nf} containing only incoming
branches, the digital filter structure is noncomputable
2008/6/11
7
Precedence Graph
• For the example precedence graph, pertinent groupings of node
variables are:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-13
{N1} = {w3[n], w5[n]} {N2} = {w1[n]} {N3} = {w2[n]}
{N4} = {w4[n], y[n]}
Precedence Graph • Precedence graph redrawn according to the
above
groupings is as shown below
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-14
• Since the final node set {N4} has only incoming branches, the
structure is computable
2008/6/11
8
Structure Verification • A simple method to verify that the
structure developed is
indeed characterized by the prescribed transfer function
H(z)H(z)
• Consider for simplicity a causal 3rd order IIR transfer
function
• If {h[n]} denotes its impulse response, then
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-15
• Note P(z) = H(z)D(z), which is equivalent to
Structure Verification • Evaluate above convolution sum for 0 ≤ n ≤
6:
p0 = h[0] p1 = h[1] + h[0]d1p1 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]d1 +
h[2]d2 + h[1]d3 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 matrix form we get
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-16
2008/6/11
9
Structure Verification • In partitioned form above matrix equation
can be written as
• Where
• Substituting above in the first equation we get
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-17
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
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-18
• Solving the above we get
2008/6/11
10
Four Classes of Fourier Transforms Continuous in Time Discrete in
time-Periodic in frequency
FT DTFT; T0
f(k) F(ejωT0)
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-19
C fr
Four Classes of Fourier Transforms
in
f(t) F(n) F(k) F(n)
DFT:N
F(k)
n
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-20
D is
cr et
e in
2008/6/11
11
( )∑ −
N knnxknnxkX ππ
For a complex-valued sequence of N points the DFT may be expressed
as
• The direct computation requires:
• 2N2 evaluations of trigonometric functions.
SUBROUTINE DFT(N, XR, XI, XFR, XFI, ISEL) DIMENSION XR(N), XI(N),
XFR(N), XFI(N) WN = 6.2831853 / FLOAT(N) IF (ISEL.EQ.1) WN = - WN
DO 20 K = 1, N XFR(K) = 0, XFI(K) = 0, KM1 = K – 1 DO 20 I = 1,
N
∑
∑ −
=
=
−−=
+=
ππ
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-21
• 4N2 real multiplications. • 4N(N –1 ) real additions. • A number
of indexing and
addressing operations.
S = SIN(ARG) XFR(K) = XFR(K) + XR(I)*C + XI(I)*S XFI(K) = XFI(K) –
XR(I)*S + XI(I)*C
10 CONTINUE IF (ISEL – 1) 20, 30, 20
30 XFR(K) = XFR(K) / FLOAT(N) 20 XFI(K) = XFI(K) / FLOAT(N)
CONTINUE RETURN END
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-22
2008/6/11
12
Goertzel’s Algorithm • Define • Note: yk[n] is the direct
convolution of the causal sequence
with a causal sequence
• Observe X[k] = yk[n]|n=N
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• z-transform of yields
11-23
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• Structural
interpretation of the algorithm
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Thus a recursive DFT computation scheme is
with yk[−1] = 0 and xe[N] = 0
11-24
2008/6/11
13
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 additionsrequires 4 real
multiplications and 4 real additions
• Thus computation of X[k] = yk[N] involves 4N real multiplications
and 4N real additions
• Computation of all N DFT samples requires 4N2 real
multiplications and 4N2 real additions
• Direct computation of all N samples of {X[k]} requires N2
l lti li ti d N(N 1) l dditi
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
complex multiplications and N(N-1) complex additions •
Equivalently, direct computation of all N samples of {X[k]}
requires 4N2 real multiplications and N(4N-2) real additions •
Thus, Goertzel’s algorithm requires 2N more real additions
than the direct DFT computation 11-25
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-26
2008/6/11
14
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)
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
, p p [ ] q ( ) 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
11-27
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 of
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 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
11-28
2008/6/11
15
Decimation-in-Time FFT Algorithm • Consider a sequence x[n] of
length N = 2μ
• Using a 2-band polyphase decomposition we can express its
z-transform asits z transform as
X(z) = X0(z2) + z−1X1(z2) where
• Evaluating on the unit circle at N equally spaced points
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Evaluating on the unit circle at N equally spaced points we
arrive at the N-point DFT of x[n]:
where X0[k] and X1[k] are the (N/2)-point DFTs of x0[n] and x1[n]
11-29
Decimation-in-Time FFT Algorithm • That is
• Block diagram interpretation:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-30
2008/6/11
16
Decimation-in-Time FFT Algorithm • Flow-graph representation
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-31
Decimation-in-Time FFT Algorithm • Direct computation of the
N-point DFT requires N2 complex
multiplications and N2 − N ≈ N2 complex additions • The modified
scheme requires the computation of two• 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
(N2/2) + N complex multiplications and approximately (N2/2) + N
complex additions
• For N ≥ 3, (N2/2) + N < N2
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-32
2008/6/11
17
Decimation-in-Time FFT Algorithm • Continuing the process we can
express and as a weighted
combination of two (N/4)-point DFTs • For example we can write• For
example, we can write
where X00[k] and X01[k] are the (N/4)-point DFTs of the
(N/4)-length sequences x00[n] = x0 [2n] and x01[n] = x0
[2n+1]
• Likewise, we can express
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
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]
11-33
Decimation-in-Time FFT Algorithm • Block-diagram representation of
the two-stage algorithm
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-34
2008/6/11
18
Decimation-in-Time FFT Algorithm • Flow-graph representation
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-35
Decimation-in-Time 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 possiblefurther decomposition is possible
• The four 2-point DFTs, Xij[k], i, j = 0,1 can be easily
computed • For example
• Corresponding flow-graph of the 2-point DFT is shown
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
below obtained using the identity
11-36
2008/6/11
19
Decimation-in-Time FFT Algorithm • Complete flow-graph of the
8-point DFT is shown below
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-37
Decimation-in-Time 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• 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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• In the general case when N = 2μ, the number of stages for
computing the 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)
11-38
2008/6/11
20
Decimation-in-Time 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 McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• The basic computational module is called a butterfly
computation
11-39
Decimation-in-Time 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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Use of the above modified butterfly computation module reduces
the total number of complex multiplications by 50%
11-40
2008/6/11
21
module for N = 8
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-41
Decimation-in-Time 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 to
compute Ψr+1[α] and Ψr+1[β] from Ψr[α] and Ψr[β]
• At the end of computation at any stage, output variables Ψ [ ] b
t d i th i t i l
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
Ψ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
11-42
2008/6/11
22
Decimation-in-Time 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 orderinput samples x[n] appear
in a different order
• Thus, a sequentially ordered input x[n] must be reordered
appropriately before the fast algorithm described by this structure
can be implemented
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-43
Decimation-in-Time 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 theordered new
representations Ψ1[m] in binary forms with the relations between
the arguments m and n as follows:
• Thus, if (b2b1b0) represents the index n of x[n], then the sample
x[b2b1b0] appears at the location m = b0b1b2 as Ψ1[b0b1b2] before
the DFT computation is started i h l i f Ψ [ ] i i bi d d f h
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 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 bit- reversed order,
and both input and output in normal order
11-44
2008/6/11
23
Decimation-in-Time 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• 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)
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
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
11-45
N2
(N/2)log N
For N = 2μ, this decimation can be performed μ = log2N times. N2
(N/2)log2N
4 16 4
8 64 12
16 256 32
32 1,024 80
64 4,096 192
Complex multiplications : (N/2) ⋅ log2N Complex additions : N ⋅
log2N
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-46
128 16,384 448
256 65,535 1,024
512 262,144 2,304
1,024 1,048,576 5,120
2008/6/11
24
Decimation-in-Time FFT Algorithm • For example, the relation
between x[n] and its even and odd
parts, x0[n] and x1[n], generated by the first stage of the DIT
algorithm is given byalgorithm 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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-47
Decimation-in-Time FFT Algorithm • The subsequences x00[n], x01[n],
x10[n], and x11[n] can be
generated directly by a factor-of-4 decimation process leading to a
single-stage decomposition as shown below:leading to a single stage
decomposition as shown below:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-48
2008/6/11
25
Radix-R 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• Depending on N, various combinations of
decompositions of
X[k] can be used to develop 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:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
of a product of integers: N = r1 r2 … r ν
the total number of complex multiplications (additions) in a DIT
FFT algorithm based on a ν -stage decomposition is given by
11-49
• For k odd
• We can write
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
We can write
where
11-50
2008/6/11
26
Decimation-in-Frequency FFT Algorithm • Thus X[2l] and X[2l+1] are
the (N/2)-point DFTs of the
length-(N/2) sequences x0[n] and x1[n], • The flow-graph of the
first-stage of the DFT:• The flow-graph of the first-stage of the
DFT:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 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
Decimation-in-Frequency 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
DFTspoint DFTs
• The process is continued until the smallest DFTs are 2-point
DFTs
• The flow-graph of the decimation-in-frequency (DIF) FFT
computation scheme for N = 8
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-52
2008/6/11
27
Decimation-in-Frequency 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• Various forms of DIF FFT algorithm can
similarly be
developed • The DIT and DIF FFT algorithms described here are
often
referred to as the Cooley-Tukey FFT algorithms
© The McGraw-Hill Companies, Inc., 2007 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]• 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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Right-hand side of above is the N-point DFT of a sequence
X*[k]
11-54
2008/6/11
28
Inverse DFT Computation • The desired IDFT x[n] is then obtained
as
• Inverse DFT computation is shown below:
© The McGraw-Hill Companies, Inc., 2007 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 = N1N2
• Represent the indices n and k as• Represent the indices n and k
as
• Using these index mappings we can write
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
as
11-56
2008/6/11
29
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
l f th
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
columns of the array • Inner parentheses of the last equation is
seen to be the set
of N1-point DFTs of the N2-columns:
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 yieldingfactors yielding
• Finally, the outer sum is the set of N2-point DFTs of the columns
of the array:
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• The row DFTs, X[k1+N1k1], can again be computed in place • The
input x[n] is entered into an array according to the index
map:
11-58
2008/6/11
30
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 N1 = 2 and N2 = 4, then
for 0 ≤ k1 ≤ 1 and 0 ≤ k2 ≤ 3 f
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 2-D array representation of the input is
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• After multiplying by the twiddle factors array becomes
11-60
2008/6/11
31
Cooley-Tukey FFT Algorithms • Note • Finally, the 4-point DFTs of
the rows are computed:
• Output 2-D array is given by
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• The process illustrated is precisely the first stage of the DIF
FFT algorithm
11-61
Cooley-Tukey FFT Algorithms • By choosing N1 = 4 and N2 = 2 , we
get the first stage of the
DIT FFT algorithm • Alternate index mappings are given by•
Alternate index mappings are given by
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-62
2008/6/11
32
Prime Factor Algorithms • Twiddle factors can be eliminated by
defining the index
mappings as
• Now
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• It follows from above that if AC N = N2, BD N = N1, AD N = BC N =
0
then 11-63
Prime Factor Algorithms • One set of coefficients that eliminates
the twiddle factors is
given by A = N2, B = N1, C = N2 N2
−1 N1, D = N1 N1
−1 N2A N2, B N1, C N2 N2 N1, D N1 N1 N2
• Here N1 −1
N2 denotes the multiplicative inverse of N1 reduced modulo N2
• If N1 −1
N2 = α then N1α N2 = 1 or, in other words N1α = N2β + 1 where β is
any integer
• For example, if N1 = 4 and N2 = 3 , then 3−1 4 = 3 and
3 3 = 1
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
3 3 4 = 1 • Likewise, if N2
−1 N1 = γ, then N2γ = N1δ + 1 where δ is any
integer
11-64
2008/6/11
33
−1 N1) N = N2(N1δ+1) N =
N2N1δ+N2) N = N2
• Similarly BD = N (N N −1 ) = N (N δ+1) =• Similarly, BD N = N1
(N1 N1 N2) N = N1(N2δ+1) N = N1N2δ+N1) N = N1
• Next, AD N = N2 (N1 N1
−1 N2) N = Nα N = 0
• Likewise, BC N = N1 (N2 N2
−1 N1) N = Nγ N = 0
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
1 • Hence,
where
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
and 0 ≤ k1 ≤ N1 −1 and 0 ≤ k2 ≤ N2 −1
11-66
2008/6/11
34
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• The index mappings are
• 2-D array representation of input is
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
2 D array representation of input is
11-67
Prime Factor Algorithms • 4-point transforms of the columns lead
to
• Final DFT array is
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 4-point DFTs require no multiplications, whereas the 3-point DFTs
require 4 complex multiplications
• Thus, the algorithm requires 16 complex multiplications
11-68
2008/6/11
35
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 frequenciesspaced 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
© The McGraw-Hill Companies, Inc., 2007 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 W = e−jΔω
To evaluate
• Using the identity nk = ½ [n2 + k2 − (k−n)2] we can write
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• Letting • We arrive at
Chirp z-Transform Algorithm • Interchanging k and n we get
• Thus, X(e−jωn) corresponds to the convolution 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 McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• 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
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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra 11-72
2008/6/11
37
Chirp z-Transform Algorithm • Typical signals
© The McGraw-Hill Companies, Inc., 2007 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
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
• It can be seen that
11-74
2008/6/11
38
Chirp z-Transform Algorithm • Hence, the computation of the
frequency samples X(ejωn)
can be carried out using an FIR filter as indicated below
where y[n] = X(ejωn), 0 ≤ n ≤ M −1 • Advantages
– N = M is not required as in FFT algorithms
© The McGraw-Hill Companies, Inc., 2007 Original PowerPoint slides
prepared by S. K. Mitra
q g – 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 11-75
Chirp z-Transform Algorithm