0% found this document useful (0 votes)
62 views117 pages

Lot-Wise DFT Overview

This document discusses the discrete Fourier transform (DFT) and its inverse. It begins by explaining that the DFT can be used to calculate the frequency spectrum of a discrete-time signal using a digital computer, unlike the continuous-time Fourier transform. It then builds the DFT formula by relating it to the discrete-time Fourier transform (DTFT) and sampling the DTFT. The document provides the formulas for the DFT and its inverse, and covers notation conventions. It also gives examples of calculating the DFT and inverse DFT of simple signals.
Copyright
© Attribution Non-Commercial (BY-NC)
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)
62 views117 pages

Lot-Wise DFT Overview

This document discusses the discrete Fourier transform (DFT) and its inverse. It begins by explaining that the DFT can be used to calculate the frequency spectrum of a discrete-time signal using a digital computer, unlike the continuous-time Fourier transform. It then builds the DFT formula by relating it to the discrete-time Fourier transform (DTFT) and sampling the DTFT. The document provides the formulas for the DFT and its inverse, and covers notation conventions. It also gives examples of calculating the DFT and inverse DFT of simple signals.
Copyright
© Attribution Non-Commercial (BY-NC)
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

CHAPTER 5:

CHAPTER 5:
D
D
ISCRETE
ISCRETE
F
F
OURIER
OURIER
T
T
RANSFORM (DFT)
RANSFORM (DFT)
Lesson #19: DTFT of DT periodic signals
Lesson #20: DFT and Inverse DFT
Lesson #21: DFT properties
Lesson #22: Fast Fourier Transform (FFT)
Lesson #23: Applications of DFT/FFT
Lesson #24: Using of DFT/FFT
Lecture #19
Lecture #19
DTFT of periodic signals
DTFT of periodic signals
1. Review of Fourier Transforms (FT)
2. Fourier Series expansions
3. DTFT of periodic signals
FT of CT periodic signals
FT of CT periodic signals
T
dt e t x
T
a e a t x
t jk
T
k
t jk
k
k


2
; ) (
1
; ) (
0
0 0
= = =

Discrete and aperiodic in


frequency domain
Continuous and periodic
in time domain
FT of CT aperiodic signals
FT of CT aperiodic signals
Continuous and aperiodic
in time domain
1
Continuous and aperiodic in
frequency domain
FT of DT aperiodic signals
FT of DT aperiodic signals
Discrete and aperiodic
in time domain
Continuous and periodic in
frequency with period 2
Recapitulation
Recapitulation
Can guess?
Can guess?
Lecture #19
Lecture #19
DTFT of periodic signals
DTFT of periodic signals
1. Review of Fourier Transforms (FT)
2. Fourier Series expansions
3. DTFT of periodic signals

> <

> <
= =
n
n jk
k
n jk
k
k
e n x

a e a n x
0 0
] [
1
; ] [
N
2
0

=
dt e t x
T
a e a t x
t jk
T
k
t jk
k
k
0 0
) (
1
; ) (

= =
CT periodic signals with period T:
DT periodic signals with period N:
Note: finite sums over an interval length of one periodic N
n ) N k ( j
n
N
2
) N k ( j n
N
2
jk
n jk
0 0
e e e e
+

= = =
T
2
0

=
Fourier Series expansion
Fourier Series expansion
Given a DT periodic signals with period N:
Example of Fourier Series expansion
Example of Fourier Series expansion
[ ] [ ]
k
p n n k

=
= .

N
1
e ] n [ p
N
1
a
1 N
0 n
N / n 2 jk
k
= =

=

. . . -2N -N 0 N 2N . . . . .

=
=
1
0
2
] [

k
n

jk
k
e a n p

Lecture #19
Lecture #19
DTFT of periodic signals
DTFT of periodic signals
1. Review of Fourier Transforms (FT)
2. Fourier Series expansions
3. DTFT of periodic signals
CT periodic signals with period T:
DT periodic signals with period N:
DTFT of periodic signals
DTFT of periodic signals
) k ( a 2 ) ( X e a ) t ( x
0
k
k
F
t jk
k
k
0
= =


=

=
) k ( a 2 ) ( X ] n [ x
0
k
k
F
=

=
. . . -2N -N 0 N 2N . . . . . . . . n
Example of calculating DTFT of
Example of calculating DTFT of
periodic signals
periodic signals
( )


=

=
|

\
|

= =
k k
0 k
N
2
k
N
2
k a 2 ) ( P
2/N 2/N 2/N 2/N 2/N
. . . -4/N -2/N 0 2/N 4/N . . . .
Height = 1
Spacing = N
Height = 2/N
Spacing = 2/N
Another approach to get DTFT of
Another approach to get DTFT of
periodic signals
periodic signals
0
[ ] 0 1
[ ]
0 otherwise
x n n
x n
,

=

, .

0 N-1
x(n) is periodic signal; x
0
(n) is a part of x(n) that is repeated
Another approach (cont)
Another approach (cont)
0
[ ] 0 1
[ ]
0 otherwise
x n n
x n
,

=

, .

0 0 0
[ ] [ ] [ ] [ ] [ ] [ ]
k k k
x n x n k x n n k x n n k

= = =
= = =

p(n) in previous
example
0 0
[ ] [ ] [ ] ( ) ( ) ( )
F
x n x n p n X P X = =
Another approach (cont)
Another approach (cont)
0 0
[ ] [ ] [ ] ( ) ( ) ( )
F
x n x n p n X P X = =


=
|

\
|
=
k
k

k X

X X
)
2
( )
2
(
2
)
2
(
2
) ( ) (
0
0

It has N distinct values at k = 0, 1, , N-1


Inverse DTFT
Inverse DTFT
{ }

=

= =

=
= =
1
0
2
0
2
0
0
2
0
0
2
0
1
)
2
(
1
)
2
( )
2
(
1
)
2
( )
2
(
2
2
1
) (
2
1
] [ ) (

n k
j
k
n j
n j
k
n j
e

k X

d e

k X

d e

k X

d e X n x X DFT

This is obtained from this property of the impulse:

<
=

elsewhere
b t a t f
dt t t t f
b
a
0
) (
) ( ) (
0 0
0

Summary
Summary
Procedure to calculate DTFT of
Procedure to calculate DTFT of
periodic signals
periodic signals
Step 1:
Start with x
0
(n) one period of x(n), with zero everywhere else
Step 2:
Find the DTFT X
0
() of the signal x
0
[n] above
Step 3:
Find X
0
() at N equally spacing frequency points X
0
(k2/N)
Step 4:
Obtain the DTFT of x(n):

=
k

k

k X

X )
2
( )
2
(
2
) (
0


Example of calculating DTFT of
Example of calculating DTFT of
periodic signals
periodic signals

=

+ + = =

3
3
0
0 0
2 1 ) ( ) (
j j
n
n j
e e e n x X
k = 0 X
0
(0) = 4; k = 1 X
0
(1) = 1+j
k = 2 X
0
(2) = -2; k = 3 X
0
(3) = 1-j
0 1 2 3
Example (cont)
Example (cont)
Example (cont)
Example (cont)
a) Draw the magnitude plot of the FT of a CT sinusoid x(t), that
has a frequency of 24 Hz
b) Sample this signal x(t) at 40 Hz. Draw the magnitude plot of
the FT of the sampled signal
c) Reconstruct a CT signal from the samples above with a LPF, it
will look like a CT sinusoid of what frequency?
d) Consider DT signal that is obtained by the sampling x(t) at a
sampling frequency of 40 Hz is x(n). Is x(n) a periodic signal?
If yes, what is its period?
e) Specify the DTFT of the DT signal x(n).
DTFT and DFS example
DTFT and DFS example
a) Draw the magnitude plot of the FT of a CT sinusoid x(t), that has
a frequency of 24 Hz
The FT of a sinusoidal has nonzero values only at certain points
DTFT and DFS examples
DTFT and DFS examples
-24 24 f [Hz]
-48 48 [rad/s]
b) Sample this signal x(t) at 40 Hz. Draw the magnitude plot of the
FT of the sampled signal
Sampled signal FT magnitude = copies of unsampled signal FT
magnitude; each copy is centered at k40(Hz) or k80(rad/s)
DTFT and DFS examples
DTFT and DFS examples
-64 -56 -24 -16 0 16 24 40 56 64 f[Hz]
-128 -48 -32 32 48 80 112 [rad/s]
f
s
= 40Hz f
s
= 40Hz
8Hz
c) Reconstruct a CT signal from the samples above with a LPF, it will
look like a CT sinusoid of what frequency?
The unit circle represents the scale of frequency range for a
signal sampled at 40Hz the reconstructed signal looks like
16Hz.
DTFT and DFS examples
DTFT and DFS examples
20
24
16
0 16 24 40 56 64 f[Hz]
32 48 80 112 [rad/s]
8Hz
d) Consider DT signal that is obtained by the sampling x(t) at
a sampling frequency of 40 Hz is x(n). Is x(n) a periodic
signal? If yes, what is its period?
The unsampled signal: x(t) = cos(2.24t)
The sampled signal:
x[n] = cos(2.24.(1/40)t) = cos(6/5)n = cos (4/5)n
The sampled signal is periodic with N = 5 N = 5 N = 5 N = 5
DTFT and DFS examples
DTFT and DFS examples
e) Specify the DTFT of the DT signal x(n).
DTFT and DFS examples
DTFT and DFS examples
Lecture #20
Lecture #20
DFT and inverse DFT
DFT and inverse DFT
1. DFT and inverse DFT formulas
2. DFT and inverse DFT examples
3. Frequency resolution of the DFT
DFT to the rescue!
DFT to the rescue!
Both CTFT and DTFT produce continuous function of
frequency cant calculate an infinite continuum of frequencies
using a computer
Most real-world data is not in the form like a
n
u(n)
DFT can be used as a FT approximation that can calculate a finite
set of discrete-frequency spectrum values from a finite set of
discrete-time samples of an analog signal
Could we calculate the frequency spectrum of a signal
using a digital computer with CTFT/DTFT?
Building the DFT formula
Building the DFT formula
Window x(n) is like multiplying
the signal by the finite length
rectangular window
Discrete time
signal x(n)
Continuous time
signal x(t)
Discrete time
signal x
0
(n)
Finite length
sample
window
Building the DFT formula (cont)
Building the DFT formula (cont)
Discrete time
signal x(n)
Continuous time
signal x(t)
Discrete time
signal x
0
(n)
Finite length
sample
window
DTFT


=

=

= =
1
0
0 0 0
] [ ] [ ) (

n
n j
n
n j
e n x e n x X
Building the DFT formula (cont)
Building the DFT formula (cont)
Discrete time
signal x(n)
Continuous time
signal x(t)
Discrete time
signal x
0
(n)
Finite length
sample
window
DTFT
Sample
at N
values
around
the unit
circle
Discrete Fourier Transform DFT X(k)
Discrete + periodic with period N
X
0
()
Continuous + periodic
with period 2
D
F
T
Notation conventions
Notation conventions
Notation conventions (cont)
Notation conventions (cont)
DFT and inverse DFT formulas
DFT and inverse DFT formulas
Notation
You only have to store N points
N
2
j
N
e W

=
Lecture #20
Lecture #20
DFT and inverse DFT
DFT and inverse DFT
1. DFT and inverse DFT formulas
2. DFT and inverse DFT examples
3. Frequency resolution of the DFT
DFT and IDFT examples
DFT and IDFT examples
Ex.1. Find the DFT of x(n) = 1, n = 0, 1, 2, , (N-1)
k = 0 X(k) = X(0) = N
k 0 X(k) = 0
DFT and IDFT examples
DFT and IDFT examples
Ex.2. Given y(n) = (n-2) and N = 8, find Y(k)
DFT and IDFT examples
DFT and IDFT examples
Ex.3. Find the IDFT of X(k) = 1, k = 0, 1, , 7.
DFT and IDFT examples
DFT and IDFT examples
Ex.4. Given x(n) = (n) + 2(n-1) +3(n-2) + (n-3) and
N = 4. Find X(k).
DFT and IDFT examples
DFT and IDFT examples
Ex.5. Given X(k) = 2(k) + 2(k-2) and N = 4. Find x(n).
DFT in matrix forms
DFT in matrix forms
(
(
(
(
(

=
(
(
(
(

=
(
(
(
(

=
= =

) 1 )( 1 ( ) 1 ( 2 1
) 1 ( 2 1
1
0
1
1
1 1 1 1
] 1 [
] 1 [
] 0 [
] 1 [
] 1 [
] 0 [
: '
1 ,..., 1 , 0 ] [ ] [

n
kn

W W W
W W W
W
X
X
X
X
x
x
x
x
define s Let
k W n x k X
K
M
M M
The N-point DFT
may be expressed
in matrix form as:
X
N
= W
N
x
N
IDFT in matrix forms
IDFT in matrix forms
(
(
(
(
(

=
(
(
(
(

=
(
(
(
(

=
= =

) 1 )( 1 ( ) 1 ( 2 1
) 1 ( 2 1
1
0
1
1
1 1 1 1
] 1 [
] 1 [
] 0 [
] 1 [
] 1 [
] 0 [
: '
1 ,..., 1 , 0 ] [
1
] [

k
kn

W W W
W W W
W
X
X
X
X
x
x
x
x
define s Let
n W k X

n x
K
M
M M
The N-point DFT
may be expressed
in matrix form as:
matrix identity I
I W W
X W

X W x



:
1
*
* 1
=
= =

Example of calculation of DFT in matrix form
Example of calculation of DFT in matrix form
Find DFT of the signal
x[n] =
[n-1] + 2[n-2] + 3[n-3]
(
(
(
(

+
= =
(
(
(
(




=
(
(
(
(
(

=
(
(
(
(

=
j
j
x W X Then
j j
j j
W W W
W W W
W W W
W
x
define s Let
2 2
2
2 2
6
.
1 1
1 1 1 1
1 1
1 1 1 1
1
1
1
1 1 1 1
3
2
1
0
: '
4 4 4
9
4
6
4
3
4
6
4
4
4
2
4
3
4
2
4
1
4
4
4
Lecture #20
Lecture #20
DFT and inverse DFT
DFT and inverse DFT
1. DFT and inverse DFT formulas
2. DFT and inverse DFT examples
3. Frequency resolution of the DFT
Discrete frequency spectrum computed from DFT has the
spacing between frequency samples of:
Frequency resolution of the DFT
Frequency resolution of the DFT
N
f
f
s
=
N
2
=
The choice of N determines the resolution of the frequency
spectrum, or vice-versa
To obtain the adequate resolution:
1. Increasing of the duration of data input to the DFT
2. Zero padding, which adds no new information, but effects a better
interpolator
0 0.5 1 1.5 2 2.5 3 3.5 4
0
1
2
3
4
5
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
0 5 10 15 20 25 30
0
1
2
3
4
5
Examples of N = 5 and N = 15
Examples of N = 5 and N = 15
0 0. 5 1 1.5 2 2.5 3 3.5 4
0
2
4
6
0 5 10 15 20 25 30
0
2
4
6
0 10 20 30 40 50 60
0
2
4
6
Examples of N = 15 and N = 30
Examples of N = 15 and N = 30
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
DFT properties
DFT properties
x(n)
Finite length
x
p
(n)
Periodic
N periodic extension
truncate
N periodic extension
truncate
X(k)
Finite length
X
p
(k)
Periodic
D
F
T
s
a
m
p
l
i
n
g
r
e
c
o
n
s
t
r
u
c
t
i
o
n
D
F
T
-
1
X
p
()
Periodic
DTFT
DTFT
-1
DFT properties
DFT properties
x(n)
Finite length
x
p
(n)
Periodic
N periodic extension
truncate
N periodic extension
truncate
X(k)
Finite length
X
p
(k)
Periodic
D
F
T
s
a
m
p
l
i
n
g
r
e
c
o
n
s
t
r
u
c
t
i
o
n
D
F
T
-
1
X
p
()
Periodic
DTFT
DTFT
-1
Periodicity
Periodicity
x[n+N] = x[n] for all n
X[k+N] = X[k] for all k
If x[n] and X[k] are an N-point DFT pair, then
Linearity
Linearity
Note: The length of x
1
[n] is same with the length of x
2
[n]
] [ ] [ ] [ ] [
2 2 1 1 2 2 1 1
k X a k X a n x a n x a
DFT
+ +
Proof:
Infer from the definition formula of DFT
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
Circular time shift property
Circular time shift property
] k [ X W ] m n [ x
km
DFT

Proof:
Infer from the relation between DFT and DTFT
] [ ] [ ) (
:
2
) ( ] [
2
k X W k X e X e

k
X e m n x
km
m

jk
m j
m j
DTFT
=

Circular
Circular
time
time
shift
shift
Circular shift by m is the same as a shift by m modulo N
x(n)
x
p
(n)
x
p
(n+2)
x(n+2)
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
Circular frequency shift property
Circular frequency shift property
] [ ] [
ln
l k X W n x
DFT

Proof:
Similar to the circular time shift property
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
Circular convolution property
Circular convolution property
The non-zero length of x
1
(n) and x
2
(n) can be no longer
than N
The shift operation is circular shift
The flip operation is circular flip

=
=
1
0
2 1 2 1 2 1
] [ ] [ ] [ ] [ ] [ ]. [

p
DFT
p n x p x n x n x k X k X
The circular convolution is not the linear convolution in chapter 2
Direct method to calculate circular
Direct method to calculate circular
convolution
convolution
1. Draw a circle with N values of x(n) with N equally spaced angles
in a counterclockwise direction.
2. Draw a smaller radius circle with N values of h(n) with equally
spaced angles in a clockwise direction. Superimpose the centers of 2
circles, and have h(0) in front of x(0).
3. Calculate y(0) by multiplying the corresponding values on each
radial line, and then adding the products.
4. Find succeeding values of y(n) in the same way after rotating the
inner disk counterclockwise through the angle 2k/N
Example to calculate circular convolution
Example to calculate circular convolution
Evaluate the circular convolution, y(n) of 2 signals:
x
1
(n) = [ 1 2 3 4 ]; x
2
(n) = [ 0 1 2 3 ]
1
2
3
4
0
1
2
3
y(0) = 16
1
2
3
4
1
2
3
0
y(1) = 18
Example (cont)
Example (cont)
Evaluate the circular convolution, y(n) of 2 signals:
x
1
(n) = [ 1 2 3 4 ]; x
2
(n) = [ 0 1 2 3 ]
1
2
3
4
2
3
0
1
y(2) = 16
1
2
3
4
3
0
1
2
y(3) = 10
Another method to calculate circular convolution
Another method to calculate circular convolution
x
1
(n)
x
2
(n)
X
1
(k)
X
2
(k)
DFT
DFT
IDFT
y(n)
Ex. x
1
(n) = [ 1 2 3 4 ]; x
2
(n) = [ 0 1 2 3 ]
X
1
(k) = [ 10, -2+j2, -2, -2-j2 ];
X
2
(k) = [ 6, -2+j2, -2, -2-j2 ];
Y(k) = X
1
(k).X
2
(k) = [ 60, -j8, 4, j8 ]
y(n) = [ 16, 18, 16, 10 ]
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
Multiplication
Multiplication
The non-zero length of X
1
(k) and X
2
(k) can be no longer
than N
The shift operation is circular shift
The flip operation is circular flip

=
=
1
0
2 1 2 1 2 1
] [ ] [
1
] [ ] [
1
] [ ]. [

l
DFT
l k X l X

k X k X

n x n x
Lecture #21
Lecture #21
DFT properties
DFT properties
1. Periodicity and Linearity
2. Circular time shift
3. Circular frequency shift
4. Circular convolution
5. Multiplication
6. Parsevals theorem
Parseval
Parseval

s
s
theorem
theorem
The general form:
Special case:


=

=
=
1
0
1
0
] [ * ] [
1
] [ * ] [

k

n
k Y k X

n y n x


=

=
=
1
0
2
1
0
2
| ] [ |
1
| ] [ |

k

n
k X

n x
Parseval
Parseval

s
s
theorem example
theorem example
Given x(n) = (n) + 2(n-1) +3(n-2) + (n-3) and N = 4.

=
= = + + + + + =
= + + + =
1
0
2 2 2 2 2 2 2
2 2 2 2
1
0
2
15
4
60
) 1 2 1 1 2 7 (
4
1
| ] [ |
1
15 1 3 2 1 | ] [ |

n
k X

n x
Multiple choice questions
Multiple choice questions
Ex1:
It is desired to build a sampling system which takes a
recorded orchestra music signal s(t) and converts it to a
discretely-sampled form. In order to experimentally determine
the bandwidth (in frequency) of this signal the best transform
would be
a. The Fourier transform of a continuous function or a discrete
sequence
b. The Z-transform
c. The Fourier series
d. The discrete Fourier transform
Multiple choice questions
Multiple choice questions
Ex2:
A mathematical model of human speech puts out a perfectly
periodic signal for steady vowel sounds. In order to accurately
determine the harmonics of the fundamental frequency for
this mathematical model, the best transform should be
a. The Fourier transform of a continuous function or a discrete
sequence
b. The Z-transform
c. The Fourier series
d. The discrete Fourier transform
Multiple choice questions
Multiple choice questions
Ex3:
A student wishes to convolve the continuous-time mathematical
functions g(t) and h(t). She/he uniformly samples these
functions, and uses a computer to get, at best, an approximate
result. Another student claims to be able to get an exact result
via a transform. She/he must be thinking of which transform
a. The Fourier transform of a continuous function or a discrete
sequence
b. The Z-transform
c. The Fourier series
d. The discrete Fourier transform
Multiple choice questions
Multiple choice questions
Ex4:
A student wishes to convolve the discrete-time mathematical
functions g(n) and h(n). She/he claims to be able to get an
exact result via one of the transforms below. She/he must be
thinking of which transforms
a. The Fourier transform of a continuous function or a discrete
sequence
b. The Z-transform
c. The Fourier series
d. The discrete Fourier transform
Lecture #22
Lecture #22
Fast Fourier Transform (FFT)
Fast Fourier Transform (FFT)
1. What is FFT?
2. The decomposition-in-time Fast Fourier
Transform algorithm (DIT-FFT)
3. The decomposition-in-frequency Fast
Fourier Transform algorithm (DIF-FFT)
Using some "tricks" and choosing the appropriate N value, the DFT
can be implemented in a very computationally efficient way this is
the Fast Fourier Transform (FFT) - which is the basis of lots of
contemporary DSP hardware
N
2
j
N
e W

=
1 N n 0 W ] k [ X
N
1
] n [ x
1 N k 0 W ] n [ x ] k [ X
1 N
0 n
nk
N
1 N
0 n
nk
N
=
=

=
Recall DFT and IDFT definition
Recall DFT and IDFT definition
N
th
complex
root of unity:
What does it take to compute DFT or IDFT?
N
2
complex multiplications for all N points of X(k) or x[n]
FFT: the algorithm to optimize the computational process by
breaking the N-point DFT into smaller DFTs
Ex.: N is a power of 2: split N-point DFT into two N/2-point
DFTs, then split each of these into two of length N/4, etc., until
we have N/2 subsequences of length 2
Cooley and Tukey (1965):
Fast Fourier Transform (FFT)
Fast Fourier Transform (FFT)
tions multiplica complex
2
log
2
2


0 10 20 30 40 50 60 70 80 90 100
-2000
0
2000
4000
6000
8000
10000
N C
o
m
p
l
e
x

m
u
l
t
i
p
l
i
c
a
t
i
o
n

n
u
m
b
e
r
s
D
F
T
FFT
Comparison of DFT and FFT efficiency
Comparison of DFT and FFT efficiency
Comparison of DFT and FFT efficiency
Comparison of DFT and FFT efficiency
Number of Complex multiplications Complex multiplications Speed improvement
points N in direct DFT in FFT factor
4
8
16
32
64
128
256
512
1024
16
64
256
1,024
4,096
16,384
65,536
262,144
1,048,576
4
12
32
80
192
448
1,024
2,304
5,120
4.0
5.3
8.0
12.8
21.3
36.6
64.0
113.8
204.8
Some properties of can be exploited in performing
FFT:
Other useful properties:
{ }
W
nk

( )
k and n in y periodicit ,
symmetry conjugate complex ,
) ( ) (
*
) (
W W W
W
W W
n k

n k

kn

kn

n k

kn

+ +

= =
= =
W W
W
W
e W W W W
kn

kn

kn

kn

jn kn

kn

2
2
2
)
2
(
odd n if ,
even n if ,
=

= = =

+
FFT (cont)
FFT (cont)
Lecture #22
Lecture #22
Fast Fourier Transform (FFT)
Fast Fourier Transform (FFT)
1. What is FFT?
2. The decomposition-in-time Fast
Fourier Transform algorithm (DIT-FFT)
3. The decomposition-in-frequency Fast
Fourier Transform algorithm (DIF-FFT)
G(k) is N/2 points DFT of the even numbered data: x(0),
x(2), x(4), ., x(N-2).
H(k) is the N/2 points DFT of the odd numbered data:
x(1), x(3), , x(N-1).
even odd
[ ] [ ] [ ]
kn kn
n n
X k x n W x n W = +

DIT
DIT
-
-
FFT with N as a 2
FFT with N as a 2
-
-
radix number
radix number
1 N ,..., 1 , 0 k ), k ( H ) k ( G ) k ( X
W
k
N
= + =
We divide X(k) into 2 parts:
2 2
1 1
2 (2 1)
0 0
[ ] [2 ] [2 1]

mk k m
m m
X k x m W x m W

+
= =
= + + =

2 2
1 1
2 2
0 0
[2 ]( ) [2 1]( )

mk k mk
m m
x m W W x m W

= =
+ + =

=
( )
2 / N
) 2 / N /( 2 j
2
N / 2 j 2
N
W e e W = = =

G(k) and H(k) are of length N/2; X(k) is of length N
G(k)=G(k+N/2) and H(k)=H(k+N/2)
) ( ) ( ] [ ] [ ) (
1
0
2 /
1
0
2 /
2 2
k H k G W m h W W m g k X
W
k

m
mk

m
mk


+ = + =


=

=
DIT
DIT
-
-
FFT (cont)
FFT (cont)
Note:
4
k
8 4 8
] k [ H W ] k [ G ] k [ X + =
] 3 [ H W ] 3 [ G ] 7 [ X ] 3 [ H W ] 3 [ G ] 3 [ X
] 2 [ H W ] 2 [ G ] 6 [ X ] 2 [ H W ] 2 [ G ] 2 [ X
] 1 [ H W ] 1 [ G ] 5 [ X ] 1 [ H W ] 1 [ G ] 1 [ X
] 0 [ H W ] 0 [ G ] 4 [ X ] 0 [ H W ] 0 [ G ] 0 [ X
7
8
3
8
6
8
2
8
5
8
1
8
4
8
0
8
+ = + =
+ = + =
+ = + =
+ = + =
DIT
DIT
-
-
FFT of length N = 8
FFT of length N = 8
DFT
N = 4
DFT
N = 4
# complex multiplications are reduced: 8
2
= 64 2x(4)
2
+ 8 = 40
Signal
Signal
flow
flow
graph
graph
for
for
8
8
-
-
point
point
FFT
FFT
2 4 2 4
] [ ] [ ] [ k H W k G k X
k
+ =
DIT
DIT
-
-
FFT of length N = 4
FFT of length N = 4
] 1 [ ] 1 [ ] 3 [
] 0 [ ] 0 [ ] 2 [
] 1 [ ] 1 [ ] 1 [
] 0 [ ] 0 [ ] 0 [
3
4
2
4
1
4
0
4
H W G X
H W G X
H W G X
H W G X
+ =
+ =
+ =
+ =
] 1 [ ] 1 [ ] 3 [
3
4
H W G X + =
] 1 [ ] 1 [ ] 1 [
1
4
H W G X + =
] 0 [ ] 0 [ ] 2 [
2
4
H W G X + =
] 0 [ ] 0 [ ] 0 [
0
4
H W G X + =
DFT
N = 2
DFT
N = 2
W
0
x[0]
x[2]
x[1]
x[3]
W
1
W
2
W
3
# multiplications are reduced: 4
2
= 16 2x(2)
2
+ 4 = 12
DIT
DIT
-
-
FFT of length N = 2
FFT of length N = 2
# multiplications are
reduced: 2
2
= 4 0;
just 2 additions!!!
x[1] - 1
x[0]
X[0]
X[1]
] 1 [ ] 0 [ ] 1 [ ] 0 [ ] 1 [
] 1 [ ] 0 [ ] 1 [ ] 0 [ ] 0 [
1 , 1 0 , ] [ ] [
1 . 1 1 . 0
0 . 1 0 . 0
2
2
1
0
x x W x W x X
x x W x W x X
e W k W n x k X
j
n
nk
= + =
+ = + =
= = =

=


Butterfly diagram
DFT
N = 4
DFT
N = 4
First step: split 8-point DFT into two 4-point DFTs
Example
Example
of
of
8
8
-
-
point
point
FFT
FFT
0
W
0
W
W
4
W
2
W
0
W
0
W
6
W
6
W
2
W
4
DFT N = 2
DFT N = 2
DFT N = 2
DFT N = 2
G[0]
G[1]
G[2]
G[3]
H[0]
H[1]
H[2]
H[3]
Example
Example
of
of
8
8
-
-
point
point
FFT
FFT
(cont)
(cont)
Second step: split each of 4-point DFT into two 2-point DFTs
Example
Example
of
of
8
8
-
-
point
point
FFT
FFT
(cont)
(cont)
0
W
0
W
W
4
W
2
W
0
W
0
W
6
W
6
W
2
W
4
Third step: combine all signal flow graphs of step 1 and step 2
W
0
W
1
W
2
W
3
W
4
W
5
W
6
W
7
There are 3 = log
2
8 stages; 4 butterfly diagrams in each stage
W
r+N/2
= -W
r
W
r
- 1
Butterfly diagram
Butterfly diagram
Now the overall computation is reduced to:
tions multiplica complex
2
log
2
2


The
The
overall
overall
signal
signal
flow
flow
graph
graph
for
for
8
8
-
-
point
point
DIT
DIT
-
-
FFT
FFT
W
r
- 1
In
In
-
-
place computation
place computation
a
b
A
B
Each butterfly takes (a,b) to produce (A,B) no need to save
(a,b) can store (A,B) in the same locations as (a,b)
We need 2N store registers to store the results at each stage and
these registers are also used throughout the computation of the
N-point DFT
The order of the input: bit-reversed order
The order of the output: natural order
Lecture #22
Lecture #22
Fast Fourier Transform (FFT)
Fast Fourier Transform (FFT)
1. What is FFT?
2. The decomposition-in-time Fast Fourier
Transform algorithm (DIT-FFT)
3. The decomposition-in-frequency Fast
Fourier Transform algorithm (DIF-FFT)
Rewrite the second half:
DIF
DIF
-
-
FFT with N as a 2
FFT with N as a 2
-
-
radix number
radix number
( )


=

=
+

=
|

\
|
+ =
|

\
|
+ =
1 ) 2 / (
0
1 ) 2 / (
0
1
) 2 / (
2 2
) (
2 2

n
kn

n
n k

n
kn

n x W W

n x W n x

1 ,..., 1 , 0 , ) ( ) ( ) (
1 ) 2 / (
0
1
) 2 / (
= + =

=
k W n x W n x k X

n

n
kn

kn

k j k j
k

e e W

) 1 (
) 2 / )( / 2 (
2
= = =

We divide X(k) in half first half and second half
Since:
then
| | 1 ,..., 1 , 0 , ) 2 / ( ) 1 ( ) ( ) (
1 ) 2 / (
0
= + + =

=
k W n x n x k X

n
kn

k
DIF
DIF
-
-
FFT (cont)
FFT (cont)
| |
| | { } 1
2
,..., 1 , 0 , ) 2 / ( ) ( ) 1 2 (
1
2
,..., 1 , 0 , ) 2 / ( ) ( ) 2 (
1 ) 2 / (
0
2 /
1 ) 2 / (
0
2 /
= + = +
= + + =

k W W n x n x k X

k W n x n x k X

n
kn

n
kn

2
2 /
2

W W =
Decompose X(k) into two frequency sequences, even and odd:
Since:
then,
| |
| | 1
2
,..., 1 , 0 , ) 2 / ( ) ( ) 1 2 (
1
2
,..., 1 , 0 , ) 2 / ( ) ( ) 2 (
1 ) 2 / (
0
) 1 2 (
1 ) 2 / (
0
2
= + = +
= + + =

=
+

k W n x n x k X

k W n x n x k X

n
n k

n
kn

DIF
DIF
-
-
FFT butterfly
FFT butterfly
x[n]
x[n+N/2]
x[n] + x[n+N/2]
(x[n] - x[n+N/2])W
N
n
-1
W
N
n
DIF
DIF
-
-
FFT of length N = 4
FFT of length N = 4
-1
-1
-1
-1
W
4
1
W
4
0
x[0] + x[2]
x[1] + x[3]
(x[0] - x[2])W
4
0
(x[1] - x[3])W
4
1
x[0]
x[1]
x[2]
x[3]
X[0]
X[2]
X[1]
X[3]
Lecture #23
Lecture #23
DFT applications
DFT applications
1. Approximation of the Fourier Transform
of analog signals
2. Linear convolution
Approximation of Fourier Transform
Approximation of Fourier Transform
Using DFT as a discrete-frequency approximation of the DTFT
and also an approximation of the CTFT
Step1. Determine the resolution = 2/N required for the DFT to
be useful for its intended purpose determine N (N often = 2
n
)
Step 2. Determine the sampling frequency required to sample the
analog signal so as to avoid aliasing
s
2
M
Step 3. Accumulate N samples of the analog signal over N.T
seconds (T = 2 / // /
s
)
Step 4. Calculate DFT directly or using FFT algorithm
0 0.5 1 1. 5 2 2.5 3
0
0.5
1
n
f
[
n
]
0 1 2 3 4 5
0
1
2
3
omega
m
a
g
n
i
t
u
d
e
Example
Example
f(t) = rect[(t-1)/2]
F() = 2sinc()e
-j
T
s
= 1s
%Error of sample 1 = 50%
Example
Example
0 5 10 15
0
0.5
1
n
f
[
n
]
0 5 10 15 20 25 30
0
1
2
3
omega
m
a
g
n
i
t
u
d
e
f(t) = rect[(t-1)/2]
F() = 2sinc()e
-j
T
s
= 0.2s
%Error of sample 1 = 10%
0 5 10 15 20 25 30 35
0
0.5
1
n
f
[
n
]
0 10 20 30 40 50 60 70
0
1
2
3
omega
m
a
g
n
i
t
u
d
e
Example
Example
f(t) = rect[(t-1)/2]
F() = 2sinc()e
-j
T
s
= 0.1s
%Error of sample 1 = 5%
Windowing
Windowing
Source of error: truncation or windowing of the periodic
extension of the DT sequence implied in the DFT development
Windowing = multiplying the periodic extension of x[n] by a
rectangular function with duration N.T DFT involves a convolution
DFT = sampled(DTFT*sinc)
This multiplication causes spectrum-leakage distortion
To reduce the affect of spectrum-leakage distortion:
- Increase the sampling frequency
- Increase the number of samples
- Choose an appropriate windowing function (Hamming, Hanning)
Lecture #23
Lecture #23
DFT applications
DFT applications
1. Approximation of the Fourier Transform of
analog signals
2. Linear convolution
Recall linear convolution
Recall linear convolution
N
1
: the non-zero length of x
1
(n); N
2
: the non-zero
length of x
2
(n); N
y
= N
1
+ N
2
-1
The shift operation is the regular shift
The flip operation is the regular flip

=
= =
p
p n x p x n x n x n y ] [ ] [ ] [ * ] [ ] [
2 1 2 1
Recall circular convolution
Recall circular convolution
The non-zero length of x
1
(n) and x
2
(n) can be no longer
than N
The shift operation is circular shift
The flip operation is circular flip

=
= =
1
0
2 1 2 1
] [ ] [ ] [ ] [ ] [

p
p n x p x n x n x n y
Calculation of the linear convolution
Calculation of the linear convolution
The circular convolution of 2 sequences of length N
1
and N
2
can be made equal to the linear convolution of 2 sequences
by zero padding both sequences so that they both consists
of N
1
+N
2
-1 samples.
x
1
(n)
N
1
samples
x
2
(n)
N
2
samples
x
1
(n)
x
2
(n)
Zero padding
(N
2
-1) zeros
IDFT
x
1
(n)*x
2
(n)
Zero padding
(N
1
-1) zeros
DFT
DFT
Example of calculation of the linear convolution
Example of calculation of the linear convolution
x
1
(n) = [ 1 2 3 4 ]; x
2
(n) = [ 0 1 2 3 ]
x
1
(n) = [ 1 2 3 4 0 0 0 ]; x
2
(n) = [ 0 1 2 3 0 0 0 ]
X
1
(k) = [ 10, -2.0245-j6.2240, 0.3460+j2.4791, 0.1784-
j2.4220, 0.1784+j2.4220, 0.3460-j2.4791, -2.0245-j6.2240 ];
X
2
(k) = [ 6, -2.5245-j4.0333, -0.1540+j2.2383, -0.3216-
j1.7950, -0.3216+j1.7950, -0.1540-j2.2383, -2.5245+j4.0333];
Y(k) = [ 60, -19.9928+j23.8775, -5.6024+j0.3927, -5.8342-
j0.8644, -4.4049+j0.4585, -5.6024-j0.3927, -19.9928
+j23.8775 ]
IDFT{Y(k)} = y(n) = [ 0 1 4 10 16 17 12 ]
Lecture #24
Lecture #24
Using DFT/FFT in filtering
Using DFT/FFT in filtering
The response, y(n) of a filter with the impulse response, h(n)
to an input, x(n) can be calculated by using the DFT
Limitations: All sample values of the signal must be
accumulated before the process begins
Great memory
Long time delay
Not suitable for long duration input
Solution: block filtering
Divide long input signal, x(n) into non-overlapped blocks,
x
b
(n) of appropriate length for FFT calculation.
Convolve each block x
b
(n) and h(n) to get the output,
y
b
(n)
Overlap-add outputs, y
b
(n) together to form the output
signal, y(n)
Overlap
Overlap
-
-
add technique in block filtering
add technique in block filtering
Example of overlap
Example of overlap
-
-
add technique
add technique
h(n)
x(n)
Example of overlap
Example of overlap
-
-
add technique
add technique
x
0
(n)
x
1
(n)
x
2
(n)
Example (cont)
Example (cont)
y
0
(n)
y
1
(n)
y
2
(n)
Prob.1 Prob. 5
12.10 12.18
Prob. 2 Prob. 6
12.11 12.22
Prob. 3 Prob. 7
12.12 12.24
Prob. 4 Prob. 8
12.15 12.30
HW
HW
Prob.9
Given signals below and their DFT-5
HW
HW
] n [ ] n [ s ) c (
] 1 n [ ] n [ x ) b (
] 4 n [ 4 ] 3 n [ 3 ] 2 n [ 2 ] 1 n [ ] n [ x ) a (
2
1
=
=
+ + + =
1. Find y[n] so that Y[k] = X
1
[k].X
2
[k]
2. Does x
3
[n] exist, if S[k] = X
1
[k].X
3
[k]?
Prob.10
Prove the Parsevals theorem
HW
HW


=

=
=
1
0
1
0
] [ * ] [
1
] [ * ] [

k

n
k Y k X

n y n x

Common questions

Powered by AI

Convolution in the context of DTFT refers to the operation on two discrete-time signals to produce a third signal that represents the overlap between one signal's data points and another's shifted and flipped version. In signal processing, convolution is equivalent to filtering, where a signal is passed through a filter to emphasize or de-emphasize certain features. The DTFT of a convolved signal is the product of the DTFTs of the individual signals, allowing for straightforward manipulation in the frequency domain, a property that simplifies analysis and system design .

Aliasing occurs when a signal is sampled at a rate less than twice its highest frequency component, violating the Nyquist-Shannon sampling theorem. In the context of DTFT, aliasing results in the overlap of frequency components, causing distortions and loss of original information in the frequency domain. This is because DTFT assumes periodicity with period 2π, and any frequencies beyond the Nyquist limit fold back into this interval, appearing as different frequencies (aliases) which misrepresent the original signal's frequency content .

The Fast Fourier Transform (FFT) significantly enhances computational efficiency by reducing the number of arithmetic operations required to compute the DFT. While the standard DFT algorithm requires O(N^2) computations for N data points, the FFT reduces this to O(N log N), making it much faster, especially for large data sets. This is achieved through algorithmic improvements like the Cooley-Tukey algorithm, which decomposes a DFT of any composite size N = N1N2 into smaller DFTs of sizes N1 and N2, drastically reducing the computational complexity .

The implications of using the Inverse DTFT are profound, as it enables the conversion of a frequency domain signal back to the time domain, allowing an understanding of how different frequency components construct the time signal. This process is essential because many practical applications, such as audio processing, telecommunications, and image processing, require manipulating signals in the frequency domain for various enhancements or analyses. After processing, reverting to the time domain is crucial to perceive the changes made and to apply them to real-world applications .

Symmetry properties play a crucial role in FFT computations by simplifying the calculations involved. These properties include even and odd symmetries in complex exponentials and conjugate symmetry for real input data. By leveraging these symmetries, the FFT can halve the computational effort required, as results for negative frequencies can be derived from positive ones, and many computations become redundant. This not only improves computational efficiency but also reduces the number of multiplications and additions, making FFT an attractive choice for signal processing .

The use of finite sums in Fourier Series involves representing a periodic signal as a finite sum of sinusoidal functions, each representing a harmonic of the signal with a specific frequency, amplitude, and phase. This approach is efficient for analyzing signals over a complete period. In contrast, DTFT uses infinite sums, providing a continuous representation in the frequency domain. While Fourier Series offers a discrete set of frequency components, DTFT gives a continuous spectrum, offering more precise control and insight into the behavior of periodic signals, especially concerning spectral leakage and aliasing .

The Decimation-In-Time Fast Fourier Transform (DIT-FFT) technique offers computational advantages by systematically breaking down a DFT of N points into smaller DFTs of size N/2 at each stage of computation. This hierarchical decomposition reduces arithmetic operations significantly, changing the computational complexity from O(N^2) in a classical DFT to O(N log N) for FFT. DIT-FFT also utilizes the symmetry and periodicity properties efficiently, optimizing memory usage and allowing parallel computing, which expedites processing speed and reduces resource consumption .

The sampling frequency critically determines the fidelity of signal reconstruction from its discrete counterparts. According to the Nyquist-Shannon sampling theorem, a continuous signal must be sampled at a frequency at least twice its highest frequency component to be accurately reconstructed without aliasing. If this condition is met, Fourier Transform techniques such as DTFT allow perfect reconstruction of the original continuous-time signal from its samples via an ideal low-pass filter. If undersampled, the reconstructed signal will suffer from aliasing, distorting its frequency representation and making accurate reconstruction impossible .

The Discrete Fourier Transform (DFT) is used to analyze digital signals by converting a finite sequence of equally spaced samples of a function (in the time domain) into its frequency domain representation. When a periodic digital signal with period N is considered, its analysis through DFT requires examining the signal's frequency components over a complete period. The DFT decomposes the signal into a sum of sinusoids with different frequencies and amplitudes, providing insight into its frequency spectrum. For periodic digital signals, it effectively captures the harmonic content and shows how much of each frequency exists in the original signal .

In the frequency representation of a Discrete-Time Fourier Transform (DTFT), periodicity manifests as a function that is periodic with period 2π. This results because the DTFT is essentially the Fourier transform of a sampled signal, which inherently repeats in the frequency domain due to the sampling process. Each period of length 2π contains the entire frequency content of the original continuous signal, evenly spaced along the frequency axis at intervals of 2π/N, where N is the number of samples in a single period of the corresponding time domain signal .

You might also like