Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Chapter 5: Fourier Transforms


Lecture 15: Fourier transform in discrete
time

Assoc.Prof. Mai Duc Thanh

Department of Mathematics
International University Ho Chi Minh City
E-mail: mdthanh@hcmiu.edu.vn

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Outline

1 Fourier transform for sequences

2 The discrete Fourier transform

3 Fast Fourier transform

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Consider exponential form of Fourier series representation for


the periodic function F (ejθ ) of period 2π

X
F (ejθ ) = fn ejnθ , (1)
n=−∞

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Consider exponential form of Fourier series representation for


the periodic function F (ejθ ) of period 2π

X
F (ejθ ) = fn ejnθ , (1)
n=−∞

where Z π
1
fn = F (ejθ )e−jnθ dθ (2)
2π −π

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Consider exponential form of Fourier series representation for


the periodic function F (ejθ ) of period 2π

X
F (ejθ ) = fn ejnθ , (1)
n=−∞

where Z π
1
fn = F (ejθ )e−jnθ dθ (2)
2π −π

Thus, the operation generates a sequence of numbers {fn }


from the periodic function F (ejθ ) for the continuous variable θ

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Let us reverse the process and imagine that we start with a


sequence {gk } and use (1) to define a periodic function G̃0 (ejθ )
such that

X
G̃0 (ejθ ) = gn ejnθ (3)
n=−∞

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Let us reverse the process and imagine that we start with a


sequence {gk } and use (1) to define a periodic function G̃0 (ejθ )
such that

X
G̃0 (ejθ ) = gn ejnθ (3)
n=−∞

Thus, we have defined a transformation from the sequence


{gk } to G̃0 (ejθ )

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Let us reverse the process and imagine that we start with a


sequence {gk } and use (1) to define a periodic function G̃0 (ejθ )
such that

X
G̃0 (ejθ ) = gn ejnθ (3)
n=−∞

Thus, we have defined a transformation from the sequence


{gk } to G̃0 (ejθ )
This transformation can be reverted by (2):
Z π
1
gk = G̃0 (ejθ )e−jkθ dθ (4)
2π −π

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform for sequences

Let us reverse the process and imagine that we start with a


sequence {gk } and use (1) to define a periodic function G̃0 (ejθ )
such that

X
G̃0 (ejθ ) = gn ejnθ (3)
n=−∞

Thus, we have defined a transformation from the sequence


{gk } to G̃0 (ejθ )
This transformation can be reverted by (2):
Z π
1
gk = G̃0 (ejθ )e−jkθ dθ (4)
2π −π

so we recover the terms of {gk } from G̃0 (ejθ )

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform pair for the sequence


Make a change θ 7→ −θ in the above results. We define the
Fourier transform of the sequence {gk } as

X
F{gk } = G(ejθ ) = gn e−jnθ (5)
n=−∞

whenever the series converges

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform pair for the sequence


Make a change θ 7→ −θ in the above results. We define the
Fourier transform of the sequence {gk } as

X
F{gk } = G(ejθ ) = gn e−jnθ (5)
n=−∞

whenever the series converges


The inverse transform is given by
Z π
1
gk = G(ejθ )ejkθ dθ (6)
2π −π

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fourier transform pair for the sequence


Make a change θ 7→ −θ in the above results. We define the
Fourier transform of the sequence {gk } as

X
F{gk } = G(ejθ ) = gn e−jnθ (5)
n=−∞

whenever the series converges


The inverse transform is given by
Z π
1
gk = G(ejθ )ejkθ dθ (6)
2π −π

The results (5) and (6) constitute the Fourier transform pair for
the sequence {gk }
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The z and Fourier transform for sequences


Consider a causal linear time-invariant discrete-time system
with z transfer function G(z).
The relationship between the input sequence {uk } and output
sequence {yk } in the transform domain is

Y (z) = G(z)U(z)

where U(z) = Z{uk }, Y (z) = Z{yk }

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The z and Fourier transform for sequences


Consider a causal linear time-invariant discrete-time system
with z transfer function G(z).
The relationship between the input sequence {uk } and output
sequence {yk } in the transform domain is

Y (z) = G(z)U(z)

where U(z) = Z{uk }, Y (z) = Z{yk }


We see the output sequence corresponding to the input
sequence

{uk } = {AejωkT } = {Aejk θ }, θ = ωT (7)

which represent samples drawn at equal intervals T from the


continuous-time complex sinusoidal signal ejωt
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The frequency response to the discrete-time system

The frequency response to the discrete-time system is then its


steady-state response to the sequence {uk } given by (7)
We have
Az
L{Aejk θ } = L{A(ejθ )k } =
z − ejθ
So, from Y (z) = G(z)U(z) we deduce that

Az
Y (z) = G(z) (8)
z − ejθ

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The frequency response...

Let the system have order n. Assume that n poles


pr , r = 1, 2, ..., n of G(z) are distinct and 6= ejθ , we can expand
Y (z)/z in terms of partial fractions to give
n
Y (z) c X cr
= + (9)
z z − ejθ r =1
z − pr

where in general, cr are complex.


Taking inverse z transform in (9) gives response sequence as
  n  
−1 −1 cz X
−1 cr z
{yk } = Z {Y (z)} = Z + Z
z − ejθ r =1
z − pr

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The frequency response...


That is
n
X
{yk } = cejk θ + cr {prk } (10)
r =1

If transfer function G(z) corresponds to a stable discrete-time


system then all its poles pr , r = 1, 2, ..., n lie within the unit
circle |z| < 1. Thus, all terms in (10) tend to zero as k → ∞,
since

pr = |pr |ejφr ⇒ prk = |pr |k ejkφr → 0 k → ∞

Consequently, for stable systems the steady-state response


corresponding to (10) is

{ykss } = cejkθ

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Steady-state response

c can be determined by c = AG(ejθ ), so steady-state response


is
{ykss } = AG(ejθ )ejkθ (11)
In the case of multiple poles it is shown that the same result as
(11) holds
The result (11) indicates that the steady-state response
sequence is simply the input sequence with each term
multiplied by G(ejθ ). So, G(ejθ ) is called the frequency transfer
function of the discrete-time system.
Since G(ejθ ) is simple G(z) for z = ejθ , so we simply evaluate z
transfer function around the unit circle |z| = 1. The z transfer
function G(z) will exists on |z| = 1 if and only if the system is
stable

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Discrete-time frequency transfer function


Let the impulse response for the linear causal discrete-time
system with z transfer function G(z) is
{ykδ } = Z −1 {G(z)} = {gk }∞
k=0

Taking inverse transforms gives, since gk = 0, k < 0:



X ∞
X
G(z) = gk z −k = gk z −k
n=0 k=−∞

Thus discrete-time frequency transfer function



X

G(e ) = gk e−jkθ
k=−∞

is equal to the Fourier transform of the impulse response


sequence {gk }
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The discrete Fourier transform


Assume that {gk } = {g(kT )}N
k=0
is a sequence of N samples
drawn from a continuous-time signal g(t), at equal intervals T

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The discrete Fourier transform


Assume that {gk } = {g(kT )}Nk=0
is a sequence of N samples
drawn from a continuous-time signal g(t), at equal intervals T
Since gn = 0, n < 0, n ≥ N, Fourier transform (5) of this
sequence is
N−1
X
F{gk } = G(ejθ ) = gn e−jnθ (12)
n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The discrete Fourier transform


Assume that {gk } = {g(kT )}Nk=0
is a sequence of N samples
drawn from a continuous-time signal g(t), at equal intervals T
Since gn = 0, n < 0, n ≥ N, Fourier transform (5) of this
sequence is
N−1
X
F{gk } = G(ejθ ) = gn e−jnθ (12)
n=0

Take θ = ωT , we have
N−1
X
G(ejωT ) = gn e−jnωT (13)
n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

The discrete Fourier transform


Assume that {gk } = {g(kT )}Nk=0
is a sequence of N samples
drawn from a continuous-time signal g(t), at equal intervals T
Since gn = 0, n < 0, n ≥ N, Fourier transform (5) of this
sequence is
N−1
X
F{gk } = G(ejθ ) = gn e−jnθ (12)
n=0

Take θ = ωT , we have
N−1
X
G(ejωT ) = gn e−jnωT (13)
n=0

We want 0 ≤ θ ≤ 2π so 0 ≤ ω ≤ 2π/T . Thus, take N equally


spaced sample points with step ∆ω = 2π/NT
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Determining samples in frequency domain


Sampling (13) at interval ∆ω produces the sequences
 
 N−1
X 
Gk = gn e−jnk ∆ωT (14)
 
n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Determining samples in frequency domain


Sampling (13) at interval ∆ω produces the sequences
 
 N−1
X 
Gk = gn e−jnk ∆ωT (14)
 
n=0

The sequence {Gk }∞


−∞ is periodic with period N, since

N−1
X N−1
X
−jn(k+N)∆ωT
Gk+N = gn e = gn e−jnk ∆ωT e−jn2π
n=0 n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Determining samples in frequency domain


Sampling (13) at interval ∆ω produces the sequences
 
 N−1
X 
Gk = gn e−jnk ∆ωT (14)
 
n=0

The sequence {Gk }∞


−∞ is periodic with period N, since

N−1
X N−1
X
−jn(k+N)∆ωT
Gk+N = gn e = gn e−jnk ∆ωT e−jn2π
n=0 n=0
N−1
X
= gn e−jnk∆ωT = Gk
n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...

Consider the sum


N−1
X
Sl = Gk e−jkl∆ωT (15)
k=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...

Consider the sum


N−1
X
Sl = Gk e−jkl∆ωT (15)
k=0

Substituting Gk from (14) we have


 
N−1
X N−1
X
Sl =  gm e−jmk∆ωT  e−jkl∆ωT
k=0 m=0
(16)
N−1 X
X N−1 N−1
X N−1
X
= gm e−jk ∆ω(m+l)T = gm e−jk∆ω(m+l)T
k=0 m=0 m=0 k=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Consider the geometric sequence

{e−jk∆ω(m+l)T }

with e0 = 1 and common ratio e−j∆ω(m+l)T .

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Consider the geometric sequence

{e−jk∆ω(m+l)T }

with e0 = 1 and common ratio e−j∆ω(m+l)T .


So, we can find partial sum for m 6= −l + nN:
N−1
X 1 − e−jN∆ω(m+l)T 1 − e−j(m+l)2π
e−jk∆ω(m+l)T = = =0
k=0
1 − e−j∆ω(m+l)T 1 − e−j∆ω(m+l)T

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Consider the geometric sequence

{e−jk∆ω(m+l)T }

with e0 = 1 and common ratio e−j∆ω(m+l)T .


So, we can find partial sum for m 6= −l + nN:
N−1
X 1 − e−jN∆ω(m+l)T 1 − e−j(m+l)2π
e−jk∆ω(m+l)T = = =0
k=0
1 − e−j∆ω(m+l)T 1 − e−j∆ω(m+l)T

When m = −l:
N−1
X N−1
X
e−jk∆ω(m+l)T = 1=N
k=0 k=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Summary, we have
N−1 N−1
(
X
−jk ∆ω(m+l)T
X 1 (i = j),
e = 1 = Nδm,−l , δij =
k=0 k=0
0 (i 6= j)

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Summary, we have
N−1 N−1
(
X
−jk ∆ω(m+l)T
X 1 (i = j),
e = 1 = Nδm,−l , δij =
k=0 k=0
0 (i 6= j)
So from (16):
N−1
X
Sl gm Nδm,−l = Ng−l
m=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Recovering time-domain samples...


Summary, we have
N−1 N−1
(
X
−jk ∆ω(m+l)T
X 1 (i = j),
e = 1 = Nδm,−l , δij =
k=0 k=0
0 (i 6= j)
So from (16):
N−1
X
Sl gm Nδm,−l = Ng−l
m=0
Substituting this into (15) and taking n = −l to get
N−1
1 X
gn = Gk ejkn∆ωT (17)
N k=0

(17) determines the time-domain samples {gn }N−1


n=0 fromthe
frequency samples exactly
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Discrete Fourier transform (DFT) pair

N−1
Let ∆ω = 2π/NT , the two sequences {gn }n=0 , {Gk }N−1
k=0
,
where
N−1 N−1
X 1 X
Gk = gn e−jnk∆ωT , gn = Gk ejkn∆ωT
n=0
N k=0

are the discrete Fourier transform (DFT) pair.


DFT pair provides pathways between time and frequency
domains for discrete-time signals

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Example on Discrete Fourier transform (DFT) pair

The sequence {gk }2k=0 = {1, 2, 1} is generated by sampling a


time signals g(t) at intervals with T = 1. Determine the DFT
pair.

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform (FFT)

Fast Fourier transform is introduced to deal with the


computation of discrete Fourier transform based on N sample
values
For simplicity we consider N = 2γ for some integer γ. The idea
can be applied for other values of γ.
The approach consists of three stages
(a) Matrix formulation
(b) Matrix factorization
(c) Re-arranging

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform


As seen earlier, the Fourier transform sequence {Gk }N−1
k=0
of the
N−1
sequence {gn }n=0 is
N−1
X
Gk = gn e−j2πnk /N , k = 0, 1, ..., N − 1 (18)
n=0

Consider the particular case γ = 2, that is N = 22 = 4. Define

W = e−j2π/N = e−jπ/2

so that (18) becomes


N−1
X 3
X
nk
Gk = gn W = gn W nk , k = 0, 1, 2, 3
n=0 n=0

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform: Stage 1

Writing out this in matrix form:


   0
W0 W0 W0
 
G0 W g0
G1  W 0 W1 W2 W 3 g 1 
 =
G2  W 0 W 2
  (19)
W2 W 6  g 2 
G3 W0 W3 W6 W9 g3

In general, we have an equation in matrix form

Gk = Wnk gn

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform: Stage 1

Observe that W nk = W nk +pN , where p is integer. So,


W 4 = W 0 = 1, W 6 = W 2 , W 9 = W 1 and (19) becomes
     
G0 1 1 1 1 g0
G1  1 W 1 W 2 W 3  g1 
 =
G2  1 W 2 W 0 W 2  = g2 
   (20)
G3 1 W3 W2 W1 g3

This terminates Stage 1.

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform: Stage 2


Matrix A is obtained by changing the 2nd and the 3rd rows of
the matrix of coefficient of (20), and set matrices L, R as follows
 
1 1 1 1
1 W 2 W 0 W 2 
A= 1 W 1 W 2 W 3  ,

1 W3 W2 W1
(21)
1 W0 0 0 1 0 W0 0
   
1 W 2 0 0  0
 , R = 0 1 0 W 

L= 0 0 1 W 1  1 0 W 2 0 
0 0 1 W 3 0 1 0 W2

Then A = LR, where we have used W 5 = W 1 , W 0 = 1 in the


top row.
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Fast Fourier transform: Stage 2


Set

G0 = [G0 G2 G1 G3 ]T , g = [g0 g2 g1 g 3 ]T (22)

Then, (20) becomes

G0 = Ag = (LR)g = L(Rg) (23)

which can be computed by a two-step process

g 0 = Rg,
(24)
G0 = Lg 0

The matrices L, R contain many zeros, so the computational


efforts are reduced significantly
Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

FFT Stage 3: Re-arrangement into ”natural” order

Instead of indexing G0 , G1 , G2 , G3 in decimal form, an


alternative binary notation is used, and [G0 G1 G2 G3 ]T
becomes [G00 G01 G10 G11 ]T
”Bit reversal” process = writing a binary number with its bits or
digits in reverse order. Applying this to [G00 G01 G10 G11 ]T
gives us

[G00 G10 G01 G11 ]T = [G0 G2 G1 G3 ]T = G0

with decimal labeling. This later form is exactly the one


obtained in Stage 2. The natural order G can be easily
recovered by re-arranging the output G0 on the basis of bit
reversal of the binary indexed version.

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform
Fourier transform for sequences The discrete Fourier transform Fast Fourier transform

Example on Fast Fourier transform

Use the method of FFT algorithm to compute the Fourier


transform of the sequence

{gn }3n=0 = {1, 2, 1, 0}

Assoc.Prof. Mai Duc Thanh Chapter 5: Fourier Transforms Lecture 15: Fourier transform

You might also like