UNIT-I
DISCRETE FOURIER TRANSFORM
Syllabus
• Discrete Signals and Systems- A Review
• Introduction to DFT
• Properties of DFT
• Circular Convolution
• Filtering methods based on DFT
• FFT Algorithms
• Decimation in time Algorithms,
• Decimation in frequency Algorithms
• Use of FFT in Linear Filtering.
Signal Processing
• Humans are the most advanced signal processors
– speech and pattern recognition, speech synthesis,…
• We encounter many types of signals in various applications
– Electrical signals: voltage, current, magnetic and electric fields,…
– Mechanical signals: velocity, force, displacement,…
– Acoustic signals: sound, vibration,…
– Other signals: pressure, temperature,…
• Most real-world signals are analog
– They are continuous in time and amplitude
– Convert to voltage or currents using sensors and transducers
• Analog circuits process these signals using
– Resistors, Capacitors, Inductors, Amplifiers,…
• Analog signal processing examples
– Audio processing in FM radios
– Video processing in traditional TV sets
Limitations of Analog Signal Processing
• Accuracy limitations due to
– Component tolerances
– Undesired nonlinearities
• Limited repeatability due to
– Tolerances
– Changes in environmental conditions
• Temperature
• Vibration
• Sensitivity to electrical noise
• Limited dynamic range for voltage and currents
• Inflexibility to changes
• Difficulty of implementing certain operations
– Nonlinear operations
– Time-varying operations
• Difficulty of storing information
Digital Signal Processing
• Represent signals by a sequence of numbers
– Sampling or analog-to-digital conversions
• Perform processing on these numbers with a digital processor
– Digital signal processing
• Reconstruct analog signal from processed numbers
– Reconstruction or digital-to-analog conversion
A/D DSP D/A
analog
signal
analog
signal
digital
signal
digital
signal
• Analog input – analog output
– Digital recording of music
• Analog input – digital output
– Touch tone phone dialing
• Digital input – analog output
– Text to speech
• Digital input – digital output
– Compression of a file on computer
Pros and Cons of Digital Signal Processing
• Pros
– Accuracy can be controlled by choosing word length
– Repeatable
– Sensitivity to electrical noise is minimal
– Dynamic range can be controlled using floating point numbers
– Flexibility can be achieved with software implementations
– Non-linear and time-varying operations are easier to implement
– Digital storage is cheap
– Digital information can be encrypted for security
– Price/performance and reduced time-to-market
• Cons
– Sampling causes loss of information
– A/D and D/A requires mixed-signal hardware
– Limited speed of processors
– Quantization and round-off errors
Discrete Signals and
Systems
Discrete-Time Signals: Sequences
• Discrete-time signals are represented by sequence of numbers
– The nth number in the sequence is represented with x[n]
• Often times sequences are obtained by sampling of continuous-time signals
– In this case x[n] is value of the analog signal at xc(nT)
– Where T is the sampling period
0 20 40 60 80 100
-10
0
10
t (ms)
0 10 20 30 40 50
-10
0
10
n (samples)
Basic Sequences and Operations
• Delaying (Shifting) a sequence
• Unit sample (impulse) sequence
• Unit step sequence
• Exponential sequences
]
n
n
[
x
]
n
[
y o









0
n
1
0
n
0
]
n
[






0
n
1
0
n
0
]
n
[
u
n
A
]
n
[
x 

-10 -5 0 5 10
0
0.5
1
1.5
-10 -5 0 5 10
0
0.5
1
1.5
-10 -5 0 5 10
0
0.5
1
Sinusoidal Sequences
• Important class of sequences
• An exponential sequence with complex
• x[n] is a sum of weighted sinusoids
• Different from continuous-time, discrete-time sinusoids
– Have ambiguity of 2k in frequency
– Are not necessary periodic with 2/o
   



 n
cos
n
x o





 j
j
e
A
A
and
e o
   
     















 




n
sin
A
j
n
cos
A
n
x
e
A
e
e
A
A
n
x
o
n
o
n
n
j
n
n
j
n
j
n o
o
 
   








 n
cos
n
k
2
cos o
o
    integer
an
is
k
2
N
if
only
N
n
cos
n
cos
o
o
o
o












Discrete-Time Systems
• Discrete-Time Sequence is a mathematical operation that maps a given
input sequence x[n] into an output sequence y[n]
• Example Discrete-Time Systems
– Moving (Running) Average
– Maximum
– Ideal Delay System
]}
n
[
x
{
T
]
n
[
y  T{.}
x[n] y[n]
]
3
n
[
x
]
2
n
[
x
]
1
n
[
x
]
n
[
x
]
n
[
y 






 
]
2
n
[
x
],
1
n
[
x
],
n
[
x
max
]
n
[
y 


]
n
n
[
x
]
n
[
y o


Memoryless System
• Memoryless System
– A system is memoryless if the output y[n] at every value of n
depends only on the input x[n] at the same value of n
• Example Memoryless Systems
– Square
– Sign
• Counter Example
– Ideal Delay System
 2
]
n
[
x
]
n
[
y 
 
]
n
[
x
sign
]
n
[
y 
]
n
n
[
x
]
n
[
y o


Linear Systems
• Linear System: A system is linear if and only if
• Examples
– Ideal Delay System
   
    (scaling)
]
n
[
x
aT
]
n
[
ax
T
and
y)
(additivit
]
n
[
x
T
]
n
[
x
T
]}
n
[
x
]
n
[
x
{
T 2
1
2
1




]
n
n
[
x
]
n
[
y o


 
 
  ]
n
n
[
ax
]
n
[
x
aT
]
n
n
[
ax
]
n
[
ax
T
]
n
n
[
x
]
n
n
[
x
]
n
[
x
T
]}
n
[
x
{
T
]
n
n
[
x
]
n
n
[
x
]}
n
[
x
]
n
[
x
{
T
o
1
o
1
o
2
o
1
1
2
o
2
o
1
2
1














Time-Invariant Systems
• Time-Invariant (shift-invariant) Systems
– A time shift at the input causes corresponding time-shift at output
• Example
– Square
• Counter Example
– Compressor System
 
]
n
n
[
x
T
]
n
n
[
y
]}
n
[
x
{
T
]
n
[
y o
o 




 2
]
n
[
x
]
n
[
y 
   
   2
o
o
2
o
1
]
n
n
[
x
n
-
n
y
gives
output
the
Delay
]
n
n
[
x
n
y
is
output
the
input
the
Delay




]
Mn
[
x
]
n
[
y 
 
   
 
o
o
o
1
n
n
M
x
n
-
n
y
gives
output
the
Delay
]
n
Mn
[
x
n
y
is
output
the
input
the
Delay




Causal System
• Causality
– A system is causal it’s output is a function of
only the current and previous samples
• Examples
– Backward Difference
• Counter Example
– Forward Difference
]
n
[
x
]
1
n
[
x
]
n
[
y 


]
1
n
[
x
]
n
[
x
]
n
[
y 


Stable System
• Stability (in the sense of bounded-input bounded-output BIBO)
– A system is stable if and only if every bounded input produces a
bounded output
• Example
– Square
• Counter Example
– Log






 y
x B
]
n
[
y
B
]
n
[
x
 2
]
n
[
x
]
n
[
y 






2
x
x
B
]
n
[
y
by
bounded
is
output
B
]
n
[
x
by
bounded
is
input
if
 
]
n
[
x
log
]
n
[
y 10

     
  







n
x
log
0
y
0
n
x
for
bounded
not
output
B
]
n
[
x
by
bounded
is
input
if
even
10
x
DFS,DTFT & DFT
Fourier Transform of continuous time
signals
  





 dt
e
t
x
t
x
FT
f
X ft
j 
2
)
(
)
(
)
(
  




 df
e
f
X
f
X
IFT
t
x ft
j 
2
)
(
)
(
)
(
Linear Time Invariant (LTI) Systems and z-Transform
]
[n
x ]
[n
y
]
[n
h
If the system is LTI we compute the output with the convolution:







m
m
n
x
m
h
n
x
n
h
n
y ]
[
]
[
]
[
*
]
[
]
[
If the impulse response has a finite duration, the system is called FIR (Finite Impulse
Response):
]
[
]
[
...
]
1
[
]
1
[
]
[
]
0
[
]
[ N
n
x
N
h
n
x
h
n
x
h
n
y 





  






n
n
z
n
x
n
x
Z
z
X ]
[
]
[
)
(
Z-Transform
Facts:
)
(
)
(
)
( z
X
z
H
z
Y 
]
[n
x ]
[n
y
)
(z
H
Frequency Response of a filter:
f
j
e
z
z
H
f
H 
2
)
(
)
( 

Frequency-Domain Properties
Time
Continuous
Discrete
Periodicity
Periodic Aperiodic
Fourier Series
Continuous-Time
Fourier Transform
DFT
Duration
Finite Infinite
Discrete-Time
Fourier Transform
and z-Transform
Discrete
&
Aperiodic
Continuous
&
Aperiodic
Continuous
&
Periodic (2)
Discrete
&
Periodic
Signal Processing Methods
Time
Continuous
Discrete
Periodicity
Periodic Aperiodic
Fourier Series
Continuous-Time
Fourier Transform
DFS
Duration
Finite Infinite
Discrete-Time
Fourier Transform
and z-Transform
The Four Fourier Methods
28
Relations Among Fourier Methods
29
The Family of Fourier Transform
 Aperiodic-Continuous-Fourier Transform
















d
e
j
X
t
x
dt
e
t
x
j
X
t
j
t
j
)
(
2
1
)
(
)
(
)
(

The Family of Fourier Transform
 Periodic-Continuous-Fourier Series













k
t
jk
T
T
t
jk
e
jk
X
t
x
dt
e
t
x
T
jk
X
0
0
0
0
)
(
)
(
)
(
1
)
(
0
2
2
0
0
0
0
2
2
T
F

 


The Family of Fourier Transform
 Periodic-Discrete-DFS (DFT)









1
0
2
1
0
2
)
(
1
)
(
)
(
)
(
N
k
nk
N
j
N
n
nk
N
j
e
k
X
N
n
x
e
n
x
k
X


 Introduction
The Discrete Fourier Transform (DFT)
 The DFS provided us a mechanism for numerically
computing the discrete-time Fourier transform. But most
of the signals in practice are not periodic. They are likely
to be of finite length.
 Theoretically, we can take care of this problem by
defining a periodic signal whose primary shape is that of
the finite length signal and then using the DFS on this
periodic signal.
 Practically, we define a new transform called the
Discrete Fourier Transform, which is the primary period
of the DFS.
 This DFT is the ultimate numerically computable
Fourier transform for arbitrary finite length sequences.
 Finite-length sequence & periodic sequence
The Discrete Fourier Transform (DFT)
)
(n
x Finite-length sequence that has N samples
)
(
~ n
x periodic sequence with the period of N
)
(
)
(
~
)
(
,
0
1
0
),
(
~
)
(
n
R
n
x
n
x
elsewhere
N
n
n
x
n
x
N



 



))
((
)
(
~
)
(
)
(
~
N
r
n
x
n
x
rN
n
x
n
x


 



Window operation
Periodic extension
The Family of Fourier Transform
 Aperiodic-Discrete-DTFT

















d
e
e
X
n
x
e
n
x
e
X
n
j
j
n
n
j
j
)
(
2
1
)
(
)
(
)
(
DFT and IDFT
IDFT
 The definition of DFT
The Discrete Fourier Transform (DFT)
1
0
,
)
(
1
)]
(
[
IDFT
)
(
1
0
,
)
(
)]
(
[
DFT
)
(
1
0
1
0

















N
n
W
k
X
N
k
X
n
x
N
k
W
n
x
n
x
k
X
N
n
nk
N
N
n
nk
N
)
(
)
(
~
)
(
)
(
1
)
(
)
(
)
(
~
)
(
)
(
)
(
1
0
1
0
n
R
n
x
n
R
W
k
X
N
n
x
k
R
k
X
k
R
W
n
x
k
X
N
N
n
N
nk
N
N
N
n
N
nk
N











Twiddle factor
Relationship of DFT to other
transforms
Problems on DFT
Example of DFT
• Find X[k]
– We know k=1,.., 7; N=8
Example of DFT
Example of DFT
Time shift Property of DFT
Polar plot for
Example of DFT
Example of DFT
Example of DFT
Summation for X[k]
Using the shift property!
Example of DFT
Summation for X[k]
Using the shift property!
Example of IDFT
Remember:
Example of IDFT
Remember:
Problems on DFT
Problems on DFT
Circular shift of a sequence
The Properties of DFT
 Linearity
)
(
)
(
)]
(
)
(
[
DFT 2
1
2
1 k
bX
k
aX
n
bx
n
ax 


N3-point DFT, N3=max(N1,N2)
 Circular shift of a sequence
)
(
)]
(
))
((
[
DFT k
X
W
n
R
m
n
x km
N
N
N 

)
(
))
((
)]
(
[
DFT k
R
l
k
X
n
x
W N
N
nl
N 


 Circular shift in the frequency domain
The Properties of DFT
 The sum of a sequence










1
0
0
1
0
0
)
(
)
(
)
(
N
n
k
N
n
nk
N
k
n
x
W
n
x
k
X
 The first sample of sequence




1
0
)
(
1
)
0
(
N
k
k
X
N
x

)
(
))
((
)]
(
[
)
(
)]
(
[
k
R
k
N
Nx
n
X
DFT
k
X
n
x
DFT
N
N



The Properties of DFT
 Circular convolution
)
(
)
(
)
(
))
((
)
(
)
(
))
((
)
(
)
(
)
(
1
2
1
0
1
2
1
0
2
1
2
1
n
x
n
x
n
R
m
n
x
m
x
n
R
m
n
x
m
x
n
x
n
x
N
N
m
N
N
N
m
N























N
N
)
(
)
(
)]
(
)
(
[
DFT 2
1
2
1 k
X
k
X
n
x
n
x 
N
)
(
)
(
1
)]
(
)
(
[
DFT 2
1
2
1 k
X
k
X
N
n
x
n
x 
 N
 Multiplication
The Properties of DFT
 Circular convolution
)
(
)
(
)
(
))
((
)
(
)
(
))
((
)
(
)
(
)
(
1
2
1
0
1
2
1
0
2
1
2
1
n
x
n
x
n
R
m
n
x
m
x
n
R
m
n
x
m
x
n
x
n
x
N
N
m
N
N
N
m
N























N
N
)
(
)
(
)]
(
)
(
[
DFT 2
1
2
1 k
X
k
X
n
x
n
x 
N
)
(
)
(
1
)]
(
)
(
[
DFT 2
1
2
1 k
X
k
X
N
n
x
n
x 
 N
 Multiplication
The Properties of DFT
 Circular correlation












n
n
xy n
y
m
n
x
m
n
y
n
x
m
r )
(
*
)
(
)
(
*
)
(
)
(
Circular correlation
)
(
)
(
*
))
((
)
(
))
((
*
)
(
)
(
1
0
1
0
m
R
n
y
m
n
x
m
R
m
n
y
n
x
m
r
N
N
n
N
N
N
n
N
xy










Linear correlation
The Properties of DFT
)
(
)
(
*
))
((
)
(
))
((
*
)
(
)]
(
[
IDFT
)
(
)
(
)
(
)
(
1
0
1
0
*
m
R
n
y
m
n
x
m
R
m
n
y
n
x
k
R
m
r
then
k
Y
k
X
k
R
if
N
N
n
N
N
N
n
N
xy
xy
xy













The Properties of DFT
 Parseval’s theorem







1
0
*
1
0
*
)
(
)
(
1
)
(
)
(
N
k
N
n
k
Y
k
X
N
n
y
n
x















1
0
2
1
0
2
1
0
*
1
0
*
)
(
1
)
(
)
(
)
(
1
)
(
)
(
then
)
(
)
(
let
N
k
N
n
N
k
N
n
k
X
N
n
x
k
X
k
X
N
n
x
n
x
n
y
n
x
The Properties of DFT
 Conjugate symmetry properties of DFT
 and
)
(n
xep )
(n
xop
Let be a N-point sequence
)
(n
x N
n
x
n
x ))
((
)
(
~ 
]
))
((
))
((
[
2
1
)]
(
~
)
(
~
[
2
1
)
(
~
]
))
((
))
((
[
2
1
)]
(
~
)
(
~
[
2
1
)
(
~
N
N
o
N
N
e
n
N
x
n
x
n
x
n
x
n
x
n
N
x
n
x
n
x
n
x
n
x
















It can be proved that
)
(
~
)
(
~
)
(
~
)
(
~
*
*
n
x
n
x
n
x
n
x
o
o
e
e





The Properties of DFT
 
  )
(
))
((
))
((
2
1
)
(
)
(
~
)
(
)
(
))
((
))
((
2
1
)
(
)
(
~
)
(
n
R
n
N
x
n
x
n
R
n
x
n
x
n
R
n
N
x
n
x
n
R
n
x
n
x
N
N
N
N
o
op
N
N
N
N
e
ep










Circular
conjugate
symmetric
component
Circular
conjugate
antisymmetric
component
The Properties of DFT
)
(
)
(
)
( n
x
n
x
n
x op
ep 

)
(
))
((
)
(
)
(
))
((
)
(
*
*
n
R
n
N
x
n
x
n
R
n
N
x
n
x
N
N
op
op
N
N
ep
ep





The Properties of DFT
)
(
)
(
)
( k
X
k
X
k
X op
ep 

)
(
))
((
)
(
)
(
))
((
)
(
*
*
k
R
k
N
X
k
X
k
R
k
N
X
k
X
N
N
op
op
N
N
ep
ep





 and
)
(k
Xep )
(k
Xop
The Properties of DFT
)]
(
))
((
Im[
)]
(
Im[
)]
(
))
((
Re[
)]
(
Re[
k
R
k
N
X
k
X
k
R
k
N
X
k
X
N
N
ep
ep
N
N
ep
ep





)]
(
))
((
Im[
)]
(
Im[
)]
(
))
((
Re[
)]
(
Re[
k
R
k
N
X
k
X
k
R
k
N
X
k
X
N
N
op
op
N
N
op
op





The Properties of DFT
)
(
))
((
)
(
then
)
(
))
((
)
(
if
k
R
k
N
X
k
X
n
R
n
N
x
n
x
N
N
N
N




 Circular even sequences
 Circular odd sequences
)
(
))
((
)
(
then
)
(
))
((
)
(
if
k
R
k
N
X
k
X
n
R
n
N
x
n
x
N
N
N
N






Circular convolution in Time
domain
Circular convolution
Circular convolution-Example
85
x1(n)=(1,2,3) and x2(n)=(4,5,6).
One sequence is distributed clockwise and
the other counterclockwise and the shift of the inner circle is
clockwise.
1
2
3
6
5
4
*
+
* *
+
+
=6+10+12=28
1st term
1
2
3
4
6
5
*
+
* *
+
+
=4+12+15=31
2st term
86
1
2
3
5
4
6
*
+
* *
+
+
=5+8+18=31
3rd term
x1(n)*
x2(n)=(1,2,3)*(4,5,6)=(18,31,31)
.
We have the same symmetry
as before
˜
y(n)  ˜
x1 (k) ˜
x2 (n  k)
k 0
N 1

˜
y(n)  ˜
x2(k) ˜
x1(n  k)
k 0
N 1

Cirular convolution-Matrix method
Circular convolution property
Use of DFT in linear filtering





1
0
]
[
]
[
]
[
L
k
k
n
h
k
x
n
y
DFT- based filtering always performs circular convolution.
But by zero padding adequetly,Circular convoltion can
yield the same result.
where n=0.....(L+M-1)-1
Linear convolution using DFT
1
]
[
]
[
)
( 2
1 


 L
L
N
of
length
to
n
h
and
n
x
padding
zero
a
]
[
*
]
[
]
[
)
( n
h
n
x
n
y
a 
(2) calculate linear convolution by circular convolution
1
]
[
]
[
)
( 2
1 


 L
L
N
of
length
to
n
h
and
n
x
padding
zero
a
1
]
[
]
[
)
( 2
1 


 L
L
N
of
length
to
n
h
and
n
x
padding
zero
a
(1)calculate N point circular convolution by linear convolution
(3) calculate linear convolution by DFT
]
[
]
[
]
[
)
](
[
)
( n
R
rN
n
y
n
h
N
n
x
b N
r






]
[
)
](
[
]
[
]
[
)
( n
h
N
n
x
n
h
n
x
b 

]
[
]
[
int
)
( n
h
and
n
x
of
D FT
s
po
N
b
]
[
)
](
[
]
[
*
]
[
]}
[
]
[
{
]
[
)
](
[
)
(
n
h
N
n
x
n
h
n
x
k
H
k
X
IDFT
n
h
N
n
x
c


LINEAR & CIRCULAR CONVOLUTION
Example:Cir.conv
Circular conv
FAST FOURIER TRANSFORM
Discrete Fourier Transform
• The DFT pair was given as
• 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
– Periodicity in n and k
   





1
N
0
k
kn
N
/
2
j
e
k
X
N
1
]
n
[
x
   






1
N
0
n
kn
N
/
2
j
e
]
n
[
x
k
X
           kn
N
j
n
k
N
j
kN
N
j
n
N
k
N
j
e
e
e
e /
2
/
2
/
2
/
2 




 




        n
N
k
N
j
N
n
k
N
j
kn
N
j
e
e
e 




 /
2
/
2
/
2 


Properties-Example
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
• Substitute variables n=2r for n even and n=2r+1 for odd
• G[k] and H[k] are the N/2-point DFT’s of each subsequence
       













1
odd
n
/
2
1
even
n
/
2
1
0
/
2
]
[
]
[
]
[
N
kn
N
j
N
kn
N
j
N
n
kn
N
j
e
n
x
e
n
x
e
n
x
k
X 


   
   
k
H
W
k
G
W
r
x
W
W
r
x
W
r
x
W
r
x
k
X
k
N
N
rk
N
k
N
N
rk
N
N
k
r
N
N
rk
N





















]
1
2
[
]
2
[
]
1
2
[
]
2
[
1
2
/
0
r
2
/
1
2
/
0
r
2
/
1
2
/
0
r
1
2
1
2
/
0
r
2
Decimation In Time
• 8-point DFT example using
decimation-in-time
• Two N/2-point DFTs
– 2(N/2)2 complex multiplications
– 2(N/2)2 complex additions
• Combining the DFT outputs
– N complex multiplications
– N complex additions
• Total complexity
– N2/2+N complex multiplications
– N2/2+N complex additions
– More efficient than direct DFT
• Repeat same process
– Divide N/2-point DFTs into
– Two N/4-point DFTs
– Combine outputs
DIT-FFT
Decimation In Time Cont’d
• After two steps of decimation in time
• Repeat until we’re left with two-point DFT’s
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
       
       
       
       
       
       
       
       
111
x
111
X
7
x
7
X
011
x
110
X
3
x
6
X
101
x
101
X
5
x
5
X
001
x
100
X
1
x
4
X
110
x
011
X
6
x
3
X
010
x
010
X
2
x
2
X
100
x
001
X
4
x
1
X
000
x
000
X
0
x
0
X
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
























Example: 8 point FFT
(1)Number of stages:
– Nstages = 3
(2)Blocks/stage:
– Stage 1: Nblocks = 4
– Stage 2: Nblocks = 2
– Stage 3: Nblocks = 1
(3)B’flies/block:
– Stage 1: Nbtf = 1
– Stage 2: Nbtf = 2
– Stage 3: Nbtf = 2
FFT Implementation
W0 -1
W0 -1
W0 -1
W0 -1
W2 -1
W0
-1
W0
W2 -1
-1
W0
W1 -1
W0
W3 -1
-1
W2
-1
Stage 2 Stage 3
Stage 1
• Decimation in time FFT:
– Number of stages = log2N
– Number of blocks/stage = N/2stage
– Number of butterflies/block = 2stage-1
FFT Implementation
Start Index 0
Input Index 1
Twiddle Factor Index N/2 = 4 4/2 = 2 2/2 = 1
Indicies Used W0 W0
W2
W0
W1
W2
W3
0
2
0
4
W0 -1
W0 -1
W0 -1
W0 -1
W2 -1
W0
-1
W0
W2 -1
-1
W0
W1 -1
W0
W3 -1
-1
W2
-1
Stage 2 Stage 3
Stage 1
Decimation-in-time FFT algorithm
Most conveniently illustrated by considering the special case of N
an integer power of 2, i.e, N=2v.
Since N is an even integer, we can consider computing X[k] by
separating x[n] into two (N/2)-point sequence consisting of the
even numbered point in x[n] and the odd-numbered points in x[n].
or, with the substitution of variable n=2r for n even and n=2r+1
for n odd

 

dd
]
[
]
[
]
[
o
n
nk
N
even
n
nk
N W
n
x
W
n
x
k
X










1
)
2
/
(
0
)
1
2
(
1
)
2
/
(
0
2
]
1
2
[
]
2
[
]
[
N
r
k
r
N
N
r
rk
N W
r
x
W
r
x
k
X









1
)
2
/
(
0
2
1
)
2
/
(
0
2
)
](
1
2
[
)
](
2
[
N
r
rk
N
k
N
N
r
rk
N W
r
x
W
W
r
x
Since
That is, WN
2 is the root of the equation WN/2=1
Consequently,
Both G[k] and H[k] can be computed by (N/2)-point DFT, where
G[k] is the (N/2)-point DFT of the even numbered points of the
original sequence and the second being the (N/2)-point DFT of
the odd-numbered point of the original sequence.
Although the index ranges over N values, k = 0, 1, …, N-1, each of
the sums must be computed only for k between 0 and (N/2)-1,
since G[k] and H[k] are each periodic in k with period N/2.
2
/
)
2
/
/(
2
)
/
2
(
2
2
N
N
j
N
j
N W
e
e
W 

 

1
,...,
1
,
0
],
[
]
[ 


 N
k
k
H
W
k
G k
N









1
)
2
/
(
0
2
1
)
2
/
(
0
2
)
](
1
2
[
)
](
2
[
]
[
N
r
rk
N
k
N
N
r
rk
N W
r
x
W
W
r
x
k
X
Decomposing N-point DFT into two (N/2)-point DFT for the
case of N=8
We can further decompose the (N/2)-point DFT into two
(N/4)-point DFTs. For example, the upper half of the previous
diagram can be decomposed as
Hence, the 8-point DFT can be obtained by the following
diagram with four 2-point DFTs.
Flow graph of a 2-point DFT
Finally, each 2-point DFT can be implemented by the following
signal-flow graph, where no multiplications are needed.
Flow graph of complete decimation-in-time decomposition of an 8-point DFT.
In each stage of the decimation-in-time FFT algorithm, there
are a basic structure called the butterfly computation:
The butterfly computation can be simplified as follows:
Flow graph of a basic butterfly
computation in FFT.
Simplified butterfly computation.
]
[
]
[
]
[
]
[
]
[
]
[
1
1
1
1
q
X
W
p
X
q
X
q
X
W
p
X
p
X
m
r
N
m
m
m
r
N
m
m








Flow graph of 8-point FFT using the simplified butterfly computation
In the above, we have introduced the decimation-in-time
algorithm of FFT.
Here, we assume that N is the power of 2. For N=2v, it requires
v=log2N stages of computation.
The number of complex multiplications and additions required was
N+N+…N = Nv = N log2N.
When N is not the power of 2, we can apply the same principle
that were applied in the power-of-2 case when N is a composite
integer. For example, if N=RQ, it is possible to express an N-
point DFT as either the sum of R Q-point DFTs or as the sum of
Q R-point DFTs.
In practice, by zero-padding a sequence into an N-point sequence
with N=2v, we can choose the nearest power-of-two FFT
algorithm for implementing a DFT.
The FFT algorithm of power-of-two is also called the Cooley-
Tukey algorithm since it was first proposed by them.
For short-length sequence, Goertzel algorithm might be more
efficient.
Decimation-In-Frequency FFT Algorithm
• Final flow graph for 8-point decimation in
frequency
Decimation-In-Frequency FFT Algorithm
• The DFT equation
• Split the DFT equation into even and odd
frequency indexes
• Substitute variables to get
• Similarly for odd-numbered frequencies
  



1
N
0
n
nk
N
W
]
n
[
x
k
X
  











1
2
/
2
1
2
/
0
2
1
0
2
]
[
]
[
]
[
2
N
N
n
r
n
N
N
n
r
n
N
N
n
r
n
N W
n
x
W
n
x
W
n
x
r
X
   
 
















1
2
/
0
2
/
1
2
/
0
2
2
/
1
2
/
0
2
]
2
/
[
]
[
]
2
/
[
]
[
2
N
n
nr
N
N
n
r
N
n
N
N
n
r
n
N W
N
n
x
n
x
W
N
n
x
W
n
x
r
X
     








1
2
/
0
1
2
2
/
]
2
/
[
]
[
1
2
N
n
r
n
N
W
N
n
x
n
x
r
X
Decimation in Frequency algorithm
Decimation in Frequency
DIF-FFT ALGORITHM
DIF-FFT ALGORITHM
Example
• Using decimation-in-time FFT algorithm compute
DFT of the sequence
{-1 –1 –1 –1 1 1 1 1}
• Solution: Twiddle factors are
Solution and signal flow graph of the example
IDFT Using DIF-FFT
unit 11.ppt
unit 11.ppt

unit 11.ppt

  • 1.
  • 2.
    Syllabus • Discrete Signalsand Systems- A Review • Introduction to DFT • Properties of DFT • Circular Convolution • Filtering methods based on DFT • FFT Algorithms • Decimation in time Algorithms, • Decimation in frequency Algorithms • Use of FFT in Linear Filtering.
  • 3.
    Signal Processing • Humansare the most advanced signal processors – speech and pattern recognition, speech synthesis,… • We encounter many types of signals in various applications – Electrical signals: voltage, current, magnetic and electric fields,… – Mechanical signals: velocity, force, displacement,… – Acoustic signals: sound, vibration,… – Other signals: pressure, temperature,… • Most real-world signals are analog – They are continuous in time and amplitude – Convert to voltage or currents using sensors and transducers • Analog circuits process these signals using – Resistors, Capacitors, Inductors, Amplifiers,… • Analog signal processing examples – Audio processing in FM radios – Video processing in traditional TV sets
  • 4.
    Limitations of AnalogSignal Processing • Accuracy limitations due to – Component tolerances – Undesired nonlinearities • Limited repeatability due to – Tolerances – Changes in environmental conditions • Temperature • Vibration • Sensitivity to electrical noise • Limited dynamic range for voltage and currents • Inflexibility to changes • Difficulty of implementing certain operations – Nonlinear operations – Time-varying operations • Difficulty of storing information
  • 5.
    Digital Signal Processing •Represent signals by a sequence of numbers – Sampling or analog-to-digital conversions • Perform processing on these numbers with a digital processor – Digital signal processing • Reconstruct analog signal from processed numbers – Reconstruction or digital-to-analog conversion A/D DSP D/A analog signal analog signal digital signal digital signal • Analog input – analog output – Digital recording of music • Analog input – digital output – Touch tone phone dialing • Digital input – analog output – Text to speech • Digital input – digital output – Compression of a file on computer
  • 7.
    Pros and Consof Digital Signal Processing • Pros – Accuracy can be controlled by choosing word length – Repeatable – Sensitivity to electrical noise is minimal – Dynamic range can be controlled using floating point numbers – Flexibility can be achieved with software implementations – Non-linear and time-varying operations are easier to implement – Digital storage is cheap – Digital information can be encrypted for security – Price/performance and reduced time-to-market • Cons – Sampling causes loss of information – A/D and D/A requires mixed-signal hardware – Limited speed of processors – Quantization and round-off errors
  • 8.
  • 12.
    Discrete-Time Signals: Sequences •Discrete-time signals are represented by sequence of numbers – The nth number in the sequence is represented with x[n] • Often times sequences are obtained by sampling of continuous-time signals – In this case x[n] is value of the analog signal at xc(nT) – Where T is the sampling period 0 20 40 60 80 100 -10 0 10 t (ms) 0 10 20 30 40 50 -10 0 10 n (samples)
  • 13.
    Basic Sequences andOperations • Delaying (Shifting) a sequence • Unit sample (impulse) sequence • Unit step sequence • Exponential sequences ] n n [ x ] n [ y o          0 n 1 0 n 0 ] n [       0 n 1 0 n 0 ] n [ u n A ] n [ x   -10 -5 0 5 10 0 0.5 1 1.5 -10 -5 0 5 10 0 0.5 1 1.5 -10 -5 0 5 10 0 0.5 1
  • 14.
    Sinusoidal Sequences • Importantclass of sequences • An exponential sequence with complex • x[n] is a sum of weighted sinusoids • Different from continuous-time, discrete-time sinusoids – Have ambiguity of 2k in frequency – Are not necessary periodic with 2/o         n cos n x o       j j e A A and e o                                n sin A j n cos A n x e A e e A A n x o n o n n j n n j n j n o o                n cos n k 2 cos o o     integer an is k 2 N if only N n cos n cos o o o o            
  • 16.
    Discrete-Time Systems • Discrete-TimeSequence is a mathematical operation that maps a given input sequence x[n] into an output sequence y[n] • Example Discrete-Time Systems – Moving (Running) Average – Maximum – Ideal Delay System ]} n [ x { T ] n [ y  T{.} x[n] y[n] ] 3 n [ x ] 2 n [ x ] 1 n [ x ] n [ x ] n [ y          ] 2 n [ x ], 1 n [ x ], n [ x max ] n [ y    ] n n [ x ] n [ y o  
  • 17.
    Memoryless System • MemorylessSystem – A system is memoryless if the output y[n] at every value of n depends only on the input x[n] at the same value of n • Example Memoryless Systems – Square – Sign • Counter Example – Ideal Delay System  2 ] n [ x ] n [ y    ] n [ x sign ] n [ y  ] n n [ x ] n [ y o  
  • 18.
    Linear Systems • LinearSystem: A system is linear if and only if • Examples – Ideal Delay System         (scaling) ] n [ x aT ] n [ ax T and y) (additivit ] n [ x T ] n [ x T ]} n [ x ] n [ x { T 2 1 2 1     ] n n [ x ] n [ y o         ] n n [ ax ] n [ x aT ] n n [ ax ] n [ ax T ] n n [ x ] n n [ x ] n [ x T ]} n [ x { T ] n n [ x ] n n [ x ]} n [ x ] n [ x { T o 1 o 1 o 2 o 1 1 2 o 2 o 1 2 1              
  • 19.
    Time-Invariant Systems • Time-Invariant(shift-invariant) Systems – A time shift at the input causes corresponding time-shift at output • Example – Square • Counter Example – Compressor System   ] n n [ x T ] n n [ y ]} n [ x { T ] n [ y o o       2 ] n [ x ] n [ y         2 o o 2 o 1 ] n n [ x n - n y gives output the Delay ] n n [ x n y is output the input the Delay     ] Mn [ x ] n [ y          o o o 1 n n M x n - n y gives output the Delay ] n Mn [ x n y is output the input the Delay    
  • 20.
    Causal System • Causality –A system is causal it’s output is a function of only the current and previous samples • Examples – Backward Difference • Counter Example – Forward Difference ] n [ x ] 1 n [ x ] n [ y    ] 1 n [ x ] n [ x ] n [ y   
  • 21.
    Stable System • Stability(in the sense of bounded-input bounded-output BIBO) – A system is stable if and only if every bounded input produces a bounded output • Example – Square • Counter Example – Log        y x B ] n [ y B ] n [ x  2 ] n [ x ] n [ y        2 x x B ] n [ y by bounded is output B ] n [ x by bounded is input if   ] n [ x log ] n [ y 10                  n x log 0 y 0 n x for bounded not output B ] n [ x by bounded is input if even 10 x
  • 22.
  • 23.
    Fourier Transform ofcontinuous time signals          dt e t x t x FT f X ft j  2 ) ( ) ( ) (         df e f X f X IFT t x ft j  2 ) ( ) ( ) (
  • 24.
    Linear Time Invariant(LTI) Systems and z-Transform ] [n x ] [n y ] [n h If the system is LTI we compute the output with the convolution:        m m n x m h n x n h n y ] [ ] [ ] [ * ] [ ] [ If the impulse response has a finite duration, the system is called FIR (Finite Impulse Response): ] [ ] [ ... ] 1 [ ] 1 [ ] [ ] 0 [ ] [ N n x N h n x h n x h n y      
  • 25.
             n n z n x n x Z z X] [ ] [ ) ( Z-Transform Facts: ) ( ) ( ) ( z X z H z Y  ] [n x ] [n y ) (z H Frequency Response of a filter: f j e z z H f H  2 ) ( ) (  
  • 26.
    Frequency-Domain Properties Time Continuous Discrete Periodicity Periodic Aperiodic FourierSeries Continuous-Time Fourier Transform DFT Duration Finite Infinite Discrete-Time Fourier Transform and z-Transform Discrete & Aperiodic Continuous & Aperiodic Continuous & Periodic (2) Discrete & Periodic
  • 27.
    Signal Processing Methods Time Continuous Discrete Periodicity PeriodicAperiodic Fourier Series Continuous-Time Fourier Transform DFS Duration Finite Infinite Discrete-Time Fourier Transform and z-Transform
  • 28.
    The Four FourierMethods 28
  • 29.
  • 30.
    The Family ofFourier Transform  Aperiodic-Continuous-Fourier Transform                 d e j X t x dt e t x j X t j t j ) ( 2 1 ) ( ) ( ) ( 
  • 31.
    The Family ofFourier Transform  Periodic-Continuous-Fourier Series              k t jk T T t jk e jk X t x dt e t x T jk X 0 0 0 0 ) ( ) ( ) ( 1 ) ( 0 2 2 0 0 0 0 2 2 T F     
  • 32.
    The Family ofFourier Transform  Periodic-Discrete-DFS (DFT)          1 0 2 1 0 2 ) ( 1 ) ( ) ( ) ( N k nk N j N n nk N j e k X N n x e n x k X  
  • 33.
     Introduction The DiscreteFourier Transform (DFT)  The DFS provided us a mechanism for numerically computing the discrete-time Fourier transform. But most of the signals in practice are not periodic. They are likely to be of finite length.  Theoretically, we can take care of this problem by defining a periodic signal whose primary shape is that of the finite length signal and then using the DFS on this periodic signal.  Practically, we define a new transform called the Discrete Fourier Transform, which is the primary period of the DFS.  This DFT is the ultimate numerically computable Fourier transform for arbitrary finite length sequences.
  • 34.
     Finite-length sequence& periodic sequence The Discrete Fourier Transform (DFT) ) (n x Finite-length sequence that has N samples ) ( ~ n x periodic sequence with the period of N ) ( ) ( ~ ) ( , 0 1 0 ), ( ~ ) ( n R n x n x elsewhere N n n x n x N         )) (( ) ( ~ ) ( ) ( ~ N r n x n x rN n x n x        Window operation Periodic extension
  • 35.
    The Family ofFourier Transform  Aperiodic-Discrete-DTFT                  d e e X n x e n x e X n j j n n j j ) ( 2 1 ) ( ) ( ) (
  • 36.
  • 37.
  • 38.
     The definitionof DFT The Discrete Fourier Transform (DFT) 1 0 , ) ( 1 )] ( [ IDFT ) ( 1 0 , ) ( )] ( [ DFT ) ( 1 0 1 0                  N n W k X N k X n x N k W n x n x k X N n nk N N n nk N ) ( ) ( ~ ) ( ) ( 1 ) ( ) ( ) ( ~ ) ( ) ( ) ( 1 0 1 0 n R n x n R W k X N n x k R k X k R W n x k X N N n N nk N N N n N nk N           
  • 39.
  • 40.
    Relationship of DFTto other transforms
  • 42.
  • 44.
    Example of DFT •Find X[k] – We know k=1,.., 7; N=8
  • 45.
  • 46.
    Example of DFT Timeshift Property of DFT Polar plot for
  • 47.
  • 48.
  • 49.
    Example of DFT Summationfor X[k] Using the shift property!
  • 50.
    Example of DFT Summationfor X[k] Using the shift property!
  • 51.
  • 52.
  • 53.
  • 54.
  • 58.
  • 62.
    The Properties ofDFT  Linearity ) ( ) ( )] ( ) ( [ DFT 2 1 2 1 k bX k aX n bx n ax    N3-point DFT, N3=max(N1,N2)  Circular shift of a sequence ) ( )] ( )) (( [ DFT k X W n R m n x km N N N   ) ( )) (( )] ( [ DFT k R l k X n x W N N nl N     Circular shift in the frequency domain
  • 63.
    The Properties ofDFT  The sum of a sequence           1 0 0 1 0 0 ) ( ) ( ) ( N n k N n nk N k n x W n x k X  The first sample of sequence     1 0 ) ( 1 ) 0 ( N k k X N x  ) ( )) (( )] ( [ ) ( )] ( [ k R k N Nx n X DFT k X n x DFT N N   
  • 64.
    The Properties ofDFT  Circular convolution ) ( ) ( ) ( )) (( ) ( ) ( )) (( ) ( ) ( ) ( 1 2 1 0 1 2 1 0 2 1 2 1 n x n x n R m n x m x n R m n x m x n x n x N N m N N N m N                        N N ) ( ) ( )] ( ) ( [ DFT 2 1 2 1 k X k X n x n x  N ) ( ) ( 1 )] ( ) ( [ DFT 2 1 2 1 k X k X N n x n x   N  Multiplication
  • 65.
    The Properties ofDFT  Circular convolution ) ( ) ( ) ( )) (( ) ( ) ( )) (( ) ( ) ( ) ( 1 2 1 0 1 2 1 0 2 1 2 1 n x n x n R m n x m x n R m n x m x n x n x N N m N N N m N                        N N ) ( ) ( )] ( ) ( [ DFT 2 1 2 1 k X k X n x n x  N ) ( ) ( 1 )] ( ) ( [ DFT 2 1 2 1 k X k X N n x n x   N  Multiplication
  • 66.
    The Properties ofDFT  Circular correlation             n n xy n y m n x m n y n x m r ) ( * ) ( ) ( * ) ( ) ( Circular correlation ) ( ) ( * )) (( ) ( )) (( * ) ( ) ( 1 0 1 0 m R n y m n x m R m n y n x m r N N n N N N n N xy           Linear correlation
  • 67.
    The Properties ofDFT ) ( ) ( * )) (( ) ( )) (( * ) ( )] ( [ IDFT ) ( ) ( ) ( ) ( 1 0 1 0 * m R n y m n x m R m n y n x k R m r then k Y k X k R if N N n N N N n N xy xy xy             
  • 68.
    The Properties ofDFT  Parseval’s theorem        1 0 * 1 0 * ) ( ) ( 1 ) ( ) ( N k N n k Y k X N n y n x                1 0 2 1 0 2 1 0 * 1 0 * ) ( 1 ) ( ) ( ) ( 1 ) ( ) ( then ) ( ) ( let N k N n N k N n k X N n x k X k X N n x n x n y n x
  • 69.
    The Properties ofDFT  Conjugate symmetry properties of DFT  and ) (n xep ) (n xop Let be a N-point sequence ) (n x N n x n x )) (( ) ( ~  ] )) (( )) (( [ 2 1 )] ( ~ ) ( ~ [ 2 1 ) ( ~ ] )) (( )) (( [ 2 1 )] ( ~ ) ( ~ [ 2 1 ) ( ~ N N o N N e n N x n x n x n x n x n N x n x n x n x n x                 It can be proved that ) ( ~ ) ( ~ ) ( ~ ) ( ~ * * n x n x n x n x o o e e     
  • 70.
    The Properties ofDFT     ) ( )) (( )) (( 2 1 ) ( ) ( ~ ) ( ) ( )) (( )) (( 2 1 ) ( ) ( ~ ) ( n R n N x n x n R n x n x n R n N x n x n R n x n x N N N N o op N N N N e ep           Circular conjugate symmetric component Circular conjugate antisymmetric component
  • 71.
    The Properties ofDFT ) ( ) ( ) ( n x n x n x op ep   ) ( )) (( ) ( ) ( )) (( ) ( * * n R n N x n x n R n N x n x N N op op N N ep ep     
  • 72.
    The Properties ofDFT ) ( ) ( ) ( k X k X k X op ep   ) ( )) (( ) ( ) ( )) (( ) ( * * k R k N X k X k R k N X k X N N op op N N ep ep       and ) (k Xep ) (k Xop
  • 73.
    The Properties ofDFT )] ( )) (( Im[ )] ( Im[ )] ( )) (( Re[ )] ( Re[ k R k N X k X k R k N X k X N N ep ep N N ep ep      )] ( )) (( Im[ )] ( Im[ )] ( )) (( Re[ )] ( Re[ k R k N X k X k R k N X k X N N op op N N op op     
  • 74.
    The Properties ofDFT ) ( )) (( ) ( then ) ( )) (( ) ( if k R k N X k X n R n N x n x N N N N      Circular even sequences  Circular odd sequences ) ( )) (( ) ( then ) ( )) (( ) ( if k R k N X k X n R n N x n x N N N N      
  • 75.
  • 78.
  • 84.
  • 85.
    85 x1(n)=(1,2,3) and x2(n)=(4,5,6). Onesequence is distributed clockwise and the other counterclockwise and the shift of the inner circle is clockwise. 1 2 3 6 5 4 * + * * + + =6+10+12=28 1st term 1 2 3 4 6 5 * + * * + + =4+12+15=31 2st term
  • 86.
    86 1 2 3 5 4 6 * + * * + + =5+8+18=31 3rd term x1(n)* x2(n)=(1,2,3)*(4,5,6)=(18,31,31) . Wehave the same symmetry as before ˜ y(n)  ˜ x1 (k) ˜ x2 (n  k) k 0 N 1  ˜ y(n)  ˜ x2(k) ˜ x1(n  k) k 0 N 1 
  • 87.
  • 88.
  • 93.
    Use of DFTin linear filtering      1 0 ] [ ] [ ] [ L k k n h k x n y DFT- based filtering always performs circular convolution. But by zero padding adequetly,Circular convoltion can yield the same result. where n=0.....(L+M-1)-1
  • 94.
    Linear convolution usingDFT 1 ] [ ] [ ) ( 2 1     L L N of length to n h and n x padding zero a
  • 95.
    ] [ * ] [ ] [ ) ( n h n x n y a  (2)calculate linear convolution by circular convolution 1 ] [ ] [ ) ( 2 1     L L N of length to n h and n x padding zero a 1 ] [ ] [ ) ( 2 1     L L N of length to n h and n x padding zero a (1)calculate N point circular convolution by linear convolution (3) calculate linear convolution by DFT ] [ ] [ ] [ ) ]( [ ) ( n R rN n y n h N n x b N r       ] [ ) ]( [ ] [ ] [ ) ( n h N n x n h n x b   ] [ ] [ int ) ( n h and n x of D FT s po N b ] [ ) ]( [ ] [ * ] [ ]} [ ] [ { ] [ ) ]( [ ) ( n h N n x n h n x k H k X IDFT n h N n x c   LINEAR & CIRCULAR CONVOLUTION
  • 96.
  • 97.
  • 98.
  • 99.
    Discrete Fourier Transform •The DFT pair was given as • 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 – Periodicity in n and k          1 N 0 k kn N / 2 j e k X N 1 ] n [ x           1 N 0 n kn N / 2 j e ] n [ x k X            kn N j n k N j kN N j n N k N j e e e e / 2 / 2 / 2 / 2                    n N k N j N n k N j kn N j e e e       / 2 / 2 / 2   
  • 100.
  • 101.
    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 • Substitute variables n=2r for n even and n=2r+1 for odd • G[k] and H[k] are the N/2-point DFT’s of each subsequence                      1 odd n / 2 1 even n / 2 1 0 / 2 ] [ ] [ ] [ N kn N j N kn N j N n kn N j e n x e n x e n x k X            k H W k G W r x W W r x W r x W r x k X k N N rk N k N N rk N N k r N N rk N                      ] 1 2 [ ] 2 [ ] 1 2 [ ] 2 [ 1 2 / 0 r 2 / 1 2 / 0 r 2 / 1 2 / 0 r 1 2 1 2 / 0 r 2
  • 102.
    Decimation In Time •8-point DFT example using decimation-in-time • Two N/2-point DFTs – 2(N/2)2 complex multiplications – 2(N/2)2 complex additions • Combining the DFT outputs – N complex multiplications – N complex additions • Total complexity – N2/2+N complex multiplications – N2/2+N complex additions – More efficient than direct DFT • Repeat same process – Divide N/2-point DFTs into – Two N/4-point DFTs – Combine outputs
  • 104.
  • 107.
    Decimation In TimeCont’d • After two steps of decimation in time • Repeat until we’re left with two-point DFT’s
  • 108.
    Decimation-In-Time FFT Algorithm •Final flow graph for 8-point decimation in time • Complexity: – Nlog2N complex multiplications and additions
  • 109.
    Butterfly Computation • Flowgraph 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
  • 110.
    In-Place Computation • Decimation-in-timeflow graphs require two sets of registers – Input and output for each stage • Note the arrangement of the input indices – Bit reversed indexing                                                                 111 x 111 X 7 x 7 X 011 x 110 X 3 x 6 X 101 x 101 X 5 x 5 X 001 x 100 X 1 x 4 X 110 x 011 X 6 x 3 X 010 x 010 X 2 x 2 X 100 x 001 X 4 x 1 X 000 x 000 X 0 x 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0                        
  • 111.
    Example: 8 pointFFT (1)Number of stages: – Nstages = 3 (2)Blocks/stage: – Stage 1: Nblocks = 4 – Stage 2: Nblocks = 2 – Stage 3: Nblocks = 1 (3)B’flies/block: – Stage 1: Nbtf = 1 – Stage 2: Nbtf = 2 – Stage 3: Nbtf = 2 FFT Implementation W0 -1 W0 -1 W0 -1 W0 -1 W2 -1 W0 -1 W0 W2 -1 -1 W0 W1 -1 W0 W3 -1 -1 W2 -1 Stage 2 Stage 3 Stage 1 • Decimation in time FFT: – Number of stages = log2N – Number of blocks/stage = N/2stage – Number of butterflies/block = 2stage-1
  • 112.
    FFT Implementation Start Index0 Input Index 1 Twiddle Factor Index N/2 = 4 4/2 = 2 2/2 = 1 Indicies Used W0 W0 W2 W0 W1 W2 W3 0 2 0 4 W0 -1 W0 -1 W0 -1 W0 -1 W2 -1 W0 -1 W0 W2 -1 -1 W0 W1 -1 W0 W3 -1 -1 W2 -1 Stage 2 Stage 3 Stage 1
  • 113.
    Decimation-in-time FFT algorithm Mostconveniently illustrated by considering the special case of N an integer power of 2, i.e, N=2v. Since N is an even integer, we can consider computing X[k] by separating x[n] into two (N/2)-point sequence consisting of the even numbered point in x[n] and the odd-numbered points in x[n]. or, with the substitution of variable n=2r for n even and n=2r+1 for n odd     dd ] [ ] [ ] [ o n nk N even n nk N W n x W n x k X           1 ) 2 / ( 0 ) 1 2 ( 1 ) 2 / ( 0 2 ] 1 2 [ ] 2 [ ] [ N r k r N N r rk N W r x W r x k X          1 ) 2 / ( 0 2 1 ) 2 / ( 0 2 ) ]( 1 2 [ ) ]( 2 [ N r rk N k N N r rk N W r x W W r x
  • 114.
    Since That is, WN 2is the root of the equation WN/2=1 Consequently, Both G[k] and H[k] can be computed by (N/2)-point DFT, where G[k] is the (N/2)-point DFT of the even numbered points of the original sequence and the second being the (N/2)-point DFT of the odd-numbered point of the original sequence. Although the index ranges over N values, k = 0, 1, …, N-1, each of the sums must be computed only for k between 0 and (N/2)-1, since G[k] and H[k] are each periodic in k with period N/2. 2 / ) 2 / /( 2 ) / 2 ( 2 2 N N j N j N W e e W      1 ,..., 1 , 0 ], [ ] [     N k k H W k G k N          1 ) 2 / ( 0 2 1 ) 2 / ( 0 2 ) ]( 1 2 [ ) ]( 2 [ ] [ N r rk N k N N r rk N W r x W W r x k X
  • 119.
    Decomposing N-point DFTinto two (N/2)-point DFT for the case of N=8
  • 120.
    We can furtherdecompose the (N/2)-point DFT into two (N/4)-point DFTs. For example, the upper half of the previous diagram can be decomposed as
  • 121.
    Hence, the 8-pointDFT can be obtained by the following diagram with four 2-point DFTs.
  • 122.
    Flow graph ofa 2-point DFT Finally, each 2-point DFT can be implemented by the following signal-flow graph, where no multiplications are needed.
  • 123.
    Flow graph ofcomplete decimation-in-time decomposition of an 8-point DFT.
  • 124.
    In each stageof the decimation-in-time FFT algorithm, there are a basic structure called the butterfly computation: The butterfly computation can be simplified as follows: Flow graph of a basic butterfly computation in FFT. Simplified butterfly computation. ] [ ] [ ] [ ] [ ] [ ] [ 1 1 1 1 q X W p X q X q X W p X p X m r N m m m r N m m        
  • 125.
    Flow graph of8-point FFT using the simplified butterfly computation
  • 126.
    In the above,we have introduced the decimation-in-time algorithm of FFT. Here, we assume that N is the power of 2. For N=2v, it requires v=log2N stages of computation. The number of complex multiplications and additions required was N+N+…N = Nv = N log2N. When N is not the power of 2, we can apply the same principle that were applied in the power-of-2 case when N is a composite integer. For example, if N=RQ, it is possible to express an N- point DFT as either the sum of R Q-point DFTs or as the sum of Q R-point DFTs. In practice, by zero-padding a sequence into an N-point sequence with N=2v, we can choose the nearest power-of-two FFT algorithm for implementing a DFT. The FFT algorithm of power-of-two is also called the Cooley- Tukey algorithm since it was first proposed by them. For short-length sequence, Goertzel algorithm might be more efficient.
  • 128.
    Decimation-In-Frequency FFT Algorithm •Final flow graph for 8-point decimation in frequency
  • 129.
    Decimation-In-Frequency FFT Algorithm •The DFT equation • Split the DFT equation into even and odd frequency indexes • Substitute variables to get • Similarly for odd-numbered frequencies       1 N 0 n nk N W ] n [ x k X               1 2 / 2 1 2 / 0 2 1 0 2 ] [ ] [ ] [ 2 N N n r n N N n r n N N n r n N W n x W n x W n x r X                       1 2 / 0 2 / 1 2 / 0 2 2 / 1 2 / 0 2 ] 2 / [ ] [ ] 2 / [ ] [ 2 N n nr N N n r N n N N n r n N W N n x n x W N n x W n x r X               1 2 / 0 1 2 2 / ] 2 / [ ] [ 1 2 N n r n N W N n x n x r X
  • 131.
  • 132.
  • 134.
  • 135.
  • 138.
    Example • Using decimation-in-timeFFT algorithm compute DFT of the sequence {-1 –1 –1 –1 1 1 1 1} • Solution: Twiddle factors are
  • 139.
    Solution and signalflow graph of the example
  • 143.