You are on page 1of 15

Frequency Domain Sampling

Signals, Spectra, and


Signal Processing The frequency domain
representation of a DT signal x(n) is
given by its Fourier transform X().
But since X() is a continuous
The Discrete Fourier Transform function of frequency, it is not a
computationally convenient
representation of x(n).
We consider the representation of
the sequence x(n) by samples of its
spectrum X().
Such a representation leads to the
discrete Fourier transform (DFT).

Reconstruction of DT Signals from Reconstruction of DT Signals from


Frequency Domain Samples Frequency Domain Samples
Recall that aperiodic finite-energy signals have a continuous The summation can be subdivided into an infinite number of
spectra given by the Fourier transform of the DT signal x(n) summations with each sum containing N terms.

2 1 N 1 2 N 1
X ( ) x ( n )e
n
j n
X k x(n)e j 2kn/ N x(n)e j 2kn/ N x(n)e j 2kn/ N
N n N n0 n N

Suppose we sample X() periodically with a frequency l N N 1


spacing of radians. For convenience, we take N samples x(n)e j 2kn/ N

from the interval 0 to 2, therefore = 2/N. l nl N

Evaluating X() at = 2k/N Changing the index of the inner summation from n to n lN
and interchange the order of summation we get
2
X k x(n)e j 2kn / N k 0, 1, , N 1
N n 2 N 1
X k x(n l N )e j 2kn / N k 0, 1, , N 1
N n0 l

1
Reconstruction of DT Signals from Reconstruction of DT Signals from
Frequency Domain Samples Frequency Domain Samples
We get a signal x(n lN) which is periodic every N samples. Therefore, we conclude that

1 2
x p n x( n l N ) ck X k k 0, 1, , N 1
l N N
Taking the Fourier series expansion we get And
N 1
x p n ck e j 2kn / N 1 N 1 2 j 2kn / N
k 0
n 0, 1, , N 1 x p ( n) X k e
N k 0 N
n 0, 1, , N 1

with Fourier coefficients Since xp(n) is the periodic extension of x(n), we can recover
1 N 1 x(n) from xp(n) if there is no time-domain aliasing.
ck x p (n)e j 2kn / N k 0, 1, , N 1
N n0 Time-domain aliasing happens when the period L of x(n), is
more than the period N of xp(n).

Reconstruction of DT Signals from Reconstruction of DT Signals from


Frequency Domain Samples Frequency Domain Samples
x(n)
If we assume that N > L, x(n) = xp(n). Therefore

1 N 1 2 j 2kn / N
x ( n) X k e
N k 0 N
0 n N 1
n
0 L
Substituting this into the formula for X() we have
xp(n) N>L N 1
1 N 1 2 j 2kn / N jn
X X k e e
n 0 N k 0 N
N 1
2 1 N 1

X k e j ( 2k / N ) n
n
0 L N
k 0 N N n0
N<L
xp(n)

n
0 N L Time-domain aliasing

2
Reconstruction of DT Signals from
Frequency Domain Samples Example
We define the phase as P() we have
Consider the signal
1 N 1
P e jn

1 1 e jN 1 e jN / 2 e jN / 2 e jN / 2
N n 0 N 1 e j
N e j / 2 e j / 2 e j / 2 xn a nu (n) 0 a 1
1 sin(N / 2)
e j ( N 1) / 2
N sin( / 2)
The spectrum of this signal is sampled at
Therefore X() is frequencies k = 2k/N, k = 0, 1,, N 1.
N 1
2 2
X X k P k NL
n 0 N N Determine the reconstructed spectra for
Where P() has the property
a = 0.8 when N = 5 and N = 50.

2 1, k 0
P k
N 0, k 1, 2, , N 1

The Discrete Fourier Transform (DFT) The Discrete Fourier Transform (DFT)

In general, the sampled frequency When x(n) has a finite duration of


spectrum X(2k/N), k = 0, 1,, N 1, do L N, then xp(n) is simply a periodic
not uniquely represent the original repetition of x(n), where
sequence x(n) when x(n) is infinite.
Instead, the sampled frequency x(n), 0 n L 1
x p n
spectrum correspond to a periodic 0, L n N 1
sequence xp(n) with period N, where
xp(n) is an aliased version of x(n), We do zero-padding on x(n) with
indicated by N L zeros such that one period
of xp(n) corresponds to x(n).

x p n x( n l N )
l

3
The Discrete Fourier Transform (DFT) The Discrete Fourier Transform (DFT)

In summary, a finite-duration When we sample X() using N


sequence x(n) of length L has the samples we get
Fourier transform
2 L 1

L 1
X ( ) 2 k X k X (k ) x(n)e j 2kn / N
X ( ) x(n)e jn
0 2 N N n 0

n 0 N 1
X (k ) x(n)e j 2kn / N k 0, 1, , N 1
Where x(n) = 0 outside of the n 0
range 0 n L 1.
Where the upper and lower indices
reflect x(n) xp(n) when N > L. This
is the discrete Fourier transform.

The Discrete Fourier Transform (DFT) The Discrete Fourier Transform (DFT)

In turn we can recover the


sequence x(n) from the frequency DFT
samples using N 1
X (k ) x(n)e j 2kn / N k 0, 1, , N 1
N 1 n0
1
x ( n)
N
X ( k )e
n 0
j 2kn / N
n 0, 1, , N 1
IDFT
and is called the inverse DFT (IDFT). 1 N 1
x ( n)
N
X ( k )e
n0
j 2kn / N
n 0, 1, , N 1

4
The Discrete Fourier Transform (DFT) The DFT as a Linear Transformation
We have the DFT and the IDFT as
Remember: N 1

The DFT X(k) of the signal x(n) is simply X (k ) x(n)e j 2kn / N k 0, 1, , N 1


n 0
its DTFT X() sampled using N points N 1
over the period of 2. x ( n)
1
X ( k )e j 2kn / N
n 0, 1, , N 1
N n 0
The number of sampled points N must
be greater than the length L of x(n) Let WN e j 2 / N (1)1 N N 1
(N L) to avoid time-domain aliasing.
Then
N 1
X (k ) x(n)WN k 0, 1, , N 1
kn

n0

N 1
1
X (k )W
kn
x ( n) N n 0, 1, , N 1
N n 0

The DFT as a Linear Transformation The DFT as a Linear Transformation


We note that the computation of each point of the DFT We can then compute for the N-point DFT as
involves N complex multiplications and (N 1) complex
additions. XN WN xN
Thus an N-point DFT requires N2 complex multiplications
and N(N 1) complex additions. We also observe that WN is a symmetric matrix. If the
inverse of WN is defined, we can get the IDFT as
To simplify the analysis of the DFT, let us define the signal
sequence x(n) as a column vector xN , and the frequency 1
samples X(2k/N) also as a column vector XN , and an xN WN XN
N N vector WN
Where we define the inverse of matrix WN as
x(0) X(0) 1 1 1 1
x(1) X(1) 1 W WN
2
WN
N1 1 1
WN WN
N
2(N1)
N
xN x(2) XN X(2) WN 1 WN WN
2 4
WN


x(N 1) X(N 1) 1 WN(N1) WN2(N1) WN
(N1)2

5
Example Properties of the DFT

Compute the DFT of the four-point Periodicity


sequence
If x(n) and X(k) are an N-point DFT pair
x(n) = {0, 1, 2, 3}
then
x(n + N) = x(n) for all n
X(k + N) = X(k) for all k

Properties of the DFT Properties of the DFT

Linearity Circular Symmetry

If x1 (n) X 1 (k )
DFT
and x2 (n) X 2 (k )
DFT
If x p ( n) x ( n) L , given that NL
N N N

then
and x p (n) x(n lN )
l

x(n) a1 x1 (n) a2 x2 ( n) X ( k ) a1 X 1 (k ) a2 X 2 (k )
DFT
N

then xp (n) x p (n k ) x(n k lN )
l

x (n k ), 0 n N 1
and x ( n ) p
0, otherwise

6
Properties of the DFT Properties of the DFT

Circular Symmetry Circular Symmetry


x(n)

In general: x ( n ) x ( n k ) N
n
Example: If N = 4 and k = 2 0 1 2 3
xp(n)
We have x (n) x(n 2) 4

Then x (0) x(2) 4 x(2) n
-4 -3 -2 -1 0 1 2 3 4 5 6 7
x (1) x(1) 4 x(3) xp(n 2) x(n)

x (2) x(0) 4 x(0)


x (3) x(1) 4 x(1) n n
-4 -3 -2 -1 0 1 2 3 4 5 6 7 0 1 2 3

Properties of the DFT Properties of the DFT

Circular Symmetry Circular Convolution


x(1) x(1)
If x1 (n) X 1 (k )
DFT
and
x2 (n) X 2 (k )
DFT
N N
x(2) x(n) x(0) x(2) x(n) x(0)
then

x(3) x(3) x(n) x1 (n)x2 ( n) X (k ) X 1 (k ) X 2 (k )


DFT
N
Circular shift
Example: Perform the circular convolution of the sequences
Circularly even if the sequence is symmetric about x(0).
xp(n) = xp(n) = xp(N n) 1nN1
x1 (n) [2, 1, 2, 1]

Circularly odd if the sequence is anti-symmetric about x(0). x2 (n) [1, 2, 3, 4]
xp(n) = xp(n) = xp(N n) 1 n N 1

7
Multiplication of Two DFTs and Circular Multiplication of Two DFTs and Circular
Convolution Convolution
Suppose that we have two N-point sequences x1(n) and x2(n) 1
N 1 N 1
N 1 j 2kl / N j 2km / N
with their DFTs as x3 (m)
N
x (n)e
k 0 n0
1
j 2kn / N
x2 ( n ) e
l 0
e

N 1
X 1 (k ) x1 (n)e j 2kn / N k 0, 1, , N 1
1 N 1 N 1

N 1
n 0
N 1

N n 0
x1 (n) x2 (n) e j 2km / N e j 2kn / N e j 2kl / N
l 0 k 0
X 2 ( k ) x2 ( n ) e j 2kn / N
k 0, 1, , N 1
1 N 1 N 1 N 1

n 0

The product of the two DFTs is also a DFT



N n 0
x1 (n) x2 (n) e j 2km / N e j 2k n l / N
l 0 k 0
1 N 1 N 1 N 1
X 3 ( k ) X 1 (k ) X 2 ( k ) k 0, 1, , N 1

N n0

x1 (n) x2 (n) e j 2k m ( n l ) / N
l 0 k 0
With its IDFT as
N 1
1 The last summation has the form
x3 (m) X 3 (k )e j 2km / N k 0, 1, , N 1
N, a 1
e
N N 1 N 1
a e j 2 m ( n l ) / N
k 0
N 1
j 2 m ( n l ) / N k
a k 1 a N where:
1 1
X (k ) X j 2km / N
1 a , a
1 2 ( k )e k 0 k 0
N k 0

Multiplication of Two DFTs and Circular


Convolution Example
We observe that a = 1 for m (n + l) being a multiple of N,
and aN = 1 for any value of a 0. Consequently, the term
reduces to
Perform the circular convolution of
the sequences
N 1
N , l m n pN (m n) N
a k

k 0 0, otherwise

Substituting this into the equation for x3(n) we have x1(n) = {2, 1, 2, 1}
N 1
x3 (m) x1 (n) x2 (m n) N m 0,1, ..., N 1
n 0 x2(n) = {1, 2, 3, 4}
Which has a form similar to the convolution sum. Note
however that the index (m n)N refers to circular convolution.

Therefore the product of two DFTs of two sequences is


equivalent to the DFT of the circular convolution of the
sequences in the time domain.

8
Divide-and-Conquer Approach
Signals, Spectra, and
Signal Processing This approach is based on the
decomposition of an N-point DFT
into successively smaller DFTs.
Consider an N-point DFT. N can be
Fast Fourier Transform (FFT) factored into two integers such that
Algorithms N = LM
We can store the sequence x(n) into
a 2-dimensional matrix indexed by
indexed by l and m (l m matrix)

Divide-and-Conquer Approach Divide-and-Conquer Approach


x(n) = { x(0), x(1), x(2), , x(N 1) }
Similarly, we can store the
m computed DFT values X(k) into a
l
0 1 2 M1 2-dimensional matrix indexed by
0 indexed by p and q (p q matrix)
1

n = l + mL 2

Column-wise .
distribution
L1

9
Divide-and-Conquer Approach Divide-and-Conquer Approach
X(k) = { X(0), X(1), X(2), , X(N 1)} We rewrite the equation for the DFT using the new index
mappings for n and k.
M 1 L 1
q
X ( p, q) x(l , m)WN
( Mp q )( mL l ) where: k Mp q
0 1 2 P1
p m 0 l 0 n mL l
0
( Mp q )( mL l )
But WN
MLmp Mpl mLq lq
WN WN WN WN
1
and WN e j 2 / N also N LM
k = Mp + q 2

Row-wise .
We have WN
MLmp
WN
Nmp

e j 2 / N Nmp
e j 2mp 1
distribution
Q1
WN
mqL

e j 2 / N mqL

e j 2L / N e
mq
W
j 2 / M mq
M
mq

e
j 2 / N Mpl
e e
j 2M / N pl
W
j 2 / L pl
Mpl pl
WN L

Divide-and-Conquer Approach Divide-and-Conquer Approach


Using the aforementioned simplifications, we can express Steps:
the DFT as 1. Compute for the M-point DFTs
M 1
L 1
lq
M 1
mq
X ( p, q) WN x(l , m)WM WL F (l , q) x(l , m)WM , 0 q M 1
lp mq

l 0 m0 m0

for each row l = 0, 1, , L 1


Where the expression involves the computation of
length M and length L DFTs. 2. Compute for a new rectangular array G(l, q)
0 l L 1
G (l , q ) WN F (l , q )
lq

0 q M 1
3. Compute for the L-point DFTs
L 1
X ( p, q ) G (l , q )WL , 0 q M 1
lp

l 0

for each column q = 0, 1, , M 1, of the array G(l, q)

10
Divide-and-Conquer Approach Divide-and-Conquer Approach

Using this method, the To summarize, we simplify the


computational complexity of the steps into an algorithm:
DFT simplifies to Algorithm 1
N(M + L + 1) complex multiplications 1. Store the signal column-wise.
N(M + L 2) complex additions 2. Compute for the M-point DFT of
each row.
3. Multiply the resulting array by the
phase factors WNlq.
4. Compute for the L-point DFT of
each column.
5. Read the resulting array row-wise.

Example Divide-and-Conquer Approach


For a 15-point sequence
Alternatively, we can also store
x(n) = { x(0) x(1) x(2)
the signal row-wise and the DFT
x(3) x(4) x(5) x(6) x(7) x(8) x(9) x(10) x(11) x(12) x(13) x(14) }

column-wise:
Phase factor
WNlq

x(10)
tD
FT X(2)
Algorithm 2
x(5)
x(11)
3-p
oin X(1)
X(5) 1. Store the signal row-wise.
x(0)
x(6)
X(0)
X(4) 2. Compute for the M-point DFT of each
column.
x(12) X(8)
5-point DFT

x(1) X(3)

3. Multiply the resulting array by the


x(7) x(13) X(7) X(11)
x(2)
x(8)
x(14)
X(6)
X(10)
X(14)
phase factors WNlq.
x(3)
x(9)
X(9)
X(13)
4. Compute for the L-point DFT of each
x(4) X(12)
row.
5. Read the resulting array column-wise.

11
Decimation in Time (DIT)
Radix-2 FFT Algorithms Radix-2 Algorithm
Consider the sequence x(n) and its DFT X(k)
When N is a highly-composite
number (N = p1p2p3pk), we can x(n) {x(0), x(1), x(2), , x( N 1)}
divide the DFT into even smaller N 1

DFTs. X (k ) x(n)WN
nk

n0

A special case is when p1 = p2 = p3 = pk, x(n) can be split (decimated) into its even and odd terms
thus N = pn. This way, the operations
xeven (m) x(2m) m 0, 1, , N
1
are repetitive n number of times. 2

xodd (m) x(2m 1) m 0, 1, , 1


When p = 2, the operation is called
N
2

the radix-2 algorithm, where p is The DFT then becomes


the radix. N 1 N 1

X (k ) xeven (m)WN xodd (m)WN


2 2
mk mk

m 0 m 0

Decimation in Time (DIT) Decimation in Time (DIT)


Radix-2 Algorithm Radix-2 Algorithm
N 1 N 1

X (k ) x(2m)WN x(2m 1)WN


2 2
2 mk ( 2 m 1) k
F1(k) and F2(k) are the N/2-point DFTs of f1(m) and f2(m)
m 0 n0 repectively.
N 1 N 1
Furthermore, F1(k) and F2(k) are periodic every N/2 samples.
x(2m)WN x(2m 1)WN
2 2
2 mk 2 mk k
WN Thus
m0 n 0
k N 2
X k N 2 F1 (k N 2 ) WN F2 (k N 2 )
Let f1(m) = x(2m) and f2(m) = x(2m+1), therefore N 2
F1 (k ) WN WN
k
N 1 N 1
F2 (k )
X (k ) f1 (m)WN f
2 2

WN
2 mk k 2 mk

e 2 j / N
(m)WN N 2 N 2
e j 1
2
m 0 n0 But WN

But WN
2 mk

e 2 j / N
2 mk

e 2 j ( 2 / N ) mk

e 2 j /(
N
2)

mk
WN 2
mk Therefore, the DFT X(k) can be expressed as

X k F1 (k ) WN F2 (k ) k 0, 1, , 1
k N
N 1 N 1 2
X (k ) f1 (m)WN 2
2 2

WN
mk k mk
So f 2 (m)WN 2
X k F1 (k ) WN k 0, 1, , 1
k N
m0 n 0
N
2 F2 (k ) 2

F1 (k ) WN F2 (k ) k 0, 1, , N 1
k

12
Decimation in Time (DIT) Decimation in Time (DIT)
Radix-2 Algorithm Radix-2 Algorithm
Using this method, we have reduced the number of By computing the N/4-point DFTs, we can obtain the N/2-point
complex multiplications from N 2 (direct DFT computation) DFTs F1(k) and F2(k) from
to (N/2)2 + N/2, which is a reduction by a factor of 4.
F1 k F1 A (k ) WN 2 F1B (k ) k 0, 1, , 1
k N
4
We can further divide the sequences f1(m) and f2(m)
F1 k F1 A (k ) W k 0, 1, , 1
k N
into even smaller N/4-point sequences.
N
4 N
2
F1B (k ) 4

For f1(m): f1a (m) f1 (2m) m 0, 1, , 1 F2 k F2 A (k ) WN 2 F2 B (k )


N
k 0, 1, , 1
k N
4 4
f1b (m) f1 (2m 1) m 0, 1, , N
1
F2 k F2 A (k ) W k 0, 1, , 1
4 k N
N
4 N
2
F2 B (k ) 4

For f2(m): f 2 a (m) f 2 (2m) m 0, 1, , N


4
1 Where F1A(k), F1B(k), are the N/4-point DFTs of the sequences
f 2b (m) f 2 (2m 1) m 0, 1, , N
4
1 f1a(m), f1b(m),

This further decomposition reduces the number of complex


multiplications by a factor of 16.

Decimation in Time (DIT) Decimation in Time (DIT)


Radix-2 Algorithm Radix-2 Algorithm
Input 8-point Input 8-point
sequence DFT sequence DFT
x(n) X(k) x(n) X(k)
First stage Second stage Third stage First stage Second stage Third stage

x(0) X(0) x(0) + + + X(0)


2-point
x(1)
DFT Combine X(1) x(1)
W80 1
+ + + X(1)
Upper 2-point DFTs W80
half x(2) to form X(2) x(2) + + + X(2)
2-point 4-point DFT Combine
1
DFT 4-point DFTs
W80 1
+
W82 1
+ +
x(3) X(3) Input x(3) X(3)
to form sequence W80
x(4) 8-point DFT X(4) shuffling x(4) + + + X(4)
2-point 1
x(5) DFT Combine X(5) x(5)
W80 1
+ +
W81
+ X(5)
2-point DFTs 1
Lower W80 W82 1
to form X(6) + + + X(6)
half x(6)
2-point
x(6) 1
4-point DFT
DFT W80 1 W82 1 W83 1
x(7) X(7) x(7) + + + X(7)

Three-stage computation of an 8-point DFT, where s = log2 N. Butterfly diagram of an 8-point radix-2 DIT FFT computation.

13
Decimation in Frequency (DIF) Decimation in Frequency (DIF)
Radix-2 Algorithm Radix-2 Algorithm

The DIF FFT algorithm is obtained via the But WN


N
2k

e 2 j / N
N
2k
1
e j
k k

divide-and-conquer approach by setting N 1 N 1

X (k ) x(n)WN 1 x(n
2 2

Then
nk k nk
N )WN
M = 2 and L = N/2. n0 n
2

We begin by dividing the DFT equation


N 1

x(n) 1 xn N 2 WN
2
k nk

into the first N/2 data points and the last n0

N/2 data points.


Decimating X(k) into odd and even samples we have
N 1
N 1
X (k ) x(n)WN x(n)WN
2


nk nk N 1

X (2k ) x(n) 1 xn N 2 WN
n 2 k
2
2k
n0 n N2
Even:
N 1 N 1 n0
n N 2 k
x(n)WN xn N 2 WN
2 2

12 k 1 n 2 k
nk
WN 2
nk
But and WN
n 0 n0
N 1
X (2k ) x(n) xn N 2 WN 2
N 1 N 1 2

k 0, 1, , 1
nk
So
x(n)WN xn WN
2 2 N
nk nk N
2k
N
2 WN 2
n0
n0 n0

Decimation in Frequency (DIF) Decimation in Frequency (DIF)


Radix-2 Algorithm Radix-2 Algorithm

N 1 8-point
X (2k 1) x(n) 1 xn N 2 WN
n 2 k 1
2
2 k 1 Input Shuffled
Odd: sequence output DFT
X(k)
n 0 x(n) sequence
N 1

x(n) 1xn N 2 WN
n 2 k
2
n
WN x(0) + X(0)
n0


N 1 x(1) + X(4)
X (2k 1) x(n) xn N 2 WN WN 2
2
Upper 4-point DFT
k 0, 1, , 1
n nk N
2 half x(2) + X(2)
n 0

If we define our N/2-point sequences as x(3) + X(6)

f1 (n) x(n) xn N 2
W80
n 0, 1, , N
2
1 x(4)
1
+ X(1)
W81
f 2 (n) x(n) xn N 2 WN n 0, 1, , 1
n N x(5) + X(5)
1
2 Lower 1 W82 4-point DFT
+ X(3)
half x(6)
N 1
W83
X (2k ) f1 (n)WN 2
2 1
Then nk x(7) + X(7)
n0
N 1
First stage in the computation of an 8-point DIF DFT.
X (2k 1) f 2 (n)WN 2
2
nk

n 0

14
Decimation in Frequency (DIF)
Radix-2 Algorithm
Input Shuffled 8-point
sequence output DFT
X(k)
x(n) sequence

x(0) + + + X(0)
1 W80
x(1) + + + X(4)
W80
x(2) + + + X(2)
1
1 W82 1 W80
x(3) + + + X(6)
W80
x(4) + + + X(1)
1
W81 1 W80
x(5) + + + X(5)
1
1 W82 W80
x(6) + + + X(3)
1
1 W83 1 W82 1 W80
x(7) + + + X(7)

Butterfly diagram of an 8-point radix-2 DIF FFT computation.

15

You might also like