0% found this document useful (0 votes)
80 views23 pages

10-1 Introduction: Chapter 10 The Discrete Fourier Transform and Fast Fourier Transform Algorithms

This document provides an overview of the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. It discusses how the DFT can be used to analyze discrete-time signals obtained by sampling continuous-time signals. Key points covered include: - The DFT provides a way to analyze frequency content when only discrete samples of a signal are available, as it is not possible to directly apply the continuous Fourier transform. - Error sources in the DFT include aliasing due to sampling, leakage effects from using a finite time window, and limited frequency resolution. Increasing the sampling frequency and time window can minimize errors. - The FFT is a more efficient algorithm than directly computing the DFT,
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 DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views23 pages

10-1 Introduction: Chapter 10 The Discrete Fourier Transform and Fast Fourier Transform Algorithms

This document provides an overview of the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. It discusses how the DFT can be used to analyze discrete-time signals obtained by sampling continuous-time signals. Key points covered include: - The DFT provides a way to analyze frequency content when only discrete samples of a signal are available, as it is not possible to directly apply the continuous Fourier transform. - Error sources in the DFT include aliasing due to sampling, leakage effects from using a finite time window, and limited frequency resolution. Increasing the sampling frequency and time window can minimize errors. - The FFT is a more efficient algorithm than directly computing the DFT,
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 DOC, PDF, TXT or read online on Scribd
You are on page 1/ 23

EE 422G Notes: Chapter 10

Instructor: Zhang

Chapter 10 The Discrete Fourier Transform and Fast Fourier Transform Algorithms 10-1 Introduction
1. x(t) --- Continuous-time signal X(f) --- Fourier Transform, frequency characteristics Can we find
ft X ( f ) =x (t )e j 2 dt

if we dont have a mathematical equation for x(t) ? No! 2. What can we do? (1) Sample x(t) => x0, x1, , xN-1 over T (for example 1000 seconds) t Sampling period (interval) N (samples) over T => t = T / N Can we have infinite T and N? Impossible! (2) Discrete Fourier Transform (DFT):
j 2kn / N => X k = x n e n =0 N 1

k = 1, 2,..., N
k T

for the line spectrum at frequency k = (2 ) 3. Limited N and T => limited frequency resolution 2
1 T

limited frequency band (from to in Fourier transform to):


j 2kn / N 4. xn = N X k e ---- periodic function (period N) k =0 x(t) --- general function sampling and inverse transform xn --- periodic function

N 1

0 < 2N / T

5. X k

( k = 2

k T

line spectrum) period function (period N)

Xk =

N 1 n =0

xn e j 2kn / N

Page 10-1

EE 422G Notes: Chapter 10

Instructor: Zhang

10-2 Error Sources in the DFT


1. Preparations (1) Ideal sampling waveform

y s (t ) =

m =

(t mTs ) :

y s (t ) f s ( f nf s ) n =
Fourier Transform Pair

( fs =

1 ) Ts

in DFT Ts = t = T / N (2) Rectangular Pulse (window)

t t 0 ) T sin c (Tf )e j 2t0 f T


width of the window

Center of the window


sin x x sin Tf sin c (Tf ) = Tf sin cX =

when t0 = 0

t ( ) T sin c (Tf ) T

(3) x1 (t ) * x2 (t ) X 1 ( f ) X 2 ( f ) (4) x1 (t ) x2 (t ) X 1 ( f ) * X 2 ( f )

2. Illustration of Error Sources Example 10-1: Continuous time signal: two-sided exponential signal
x (t ) = e
|t |

Its Fourier transform

Page 10-2

EE 422G Notes: Chapter 10


X(f ) = 2 1 + (2f ) 2 ( ,+) in
not lim ited as

Instructor: Zhang

(1) If we sample x(t)

in

DFT

with sampling frequency fs :

sampled signal x (t ) = y (t )e s s its Fourier transform:


X s ( f ) = Ys ( f ) * F ( e X s ( f ) = fs
n =

|t |

|t |

) = Ys ( f ) * X ( f )
n =

X ( f nf s ) = 2f s

1 + (2 ( f

1 nf s )) 2

sampling => (1) possible overlapping if f s 2 f h is not held. (2) periodic function, introduce frequencies beyond fs . (2) Limited T (over which x(t) is sampled to collect data for DFT)
t ) T t x sw (t ) = x s (t )( ) T

window

X sw ( f ) = ( 2f s

n =

{1 + 2 ( f

nf s ) 2 }1 ) * (T sin c(Tf ))

Fourier transform given by sampled data in limited window (T) X sw ( f ) is a worse estimate of X(f) than Xs(f) due to the introduction of ( Tsinc( Tf ) ) for convolution! Effect of limited T X ( f ) (3) Dose DFT give s for every f ? No! only discrete frequencies. DFT as an estimate for X(f): even worse than X s ( f ) due to the limited frequency resolution.

Page 10-3

EE 422G Notes: Chapter 10

Instructor: Zhang

3. Effect of sampling frequency (or number of points) on accuracy when T is given: Example for e 4. Effect of T (window size) use Compare
t ( ) 4 t ( ) 4
|t |

and

t ( ) 8

for e

|t |

Page 10-4

EE 422G Notes: Chapter 10

Instructor: Zhang

Page 10-5

EE 422G Notes: Chapter 10

Instructor: Zhang

5. DFT Errors (1) Aliasing


X s ( f ) = fs
n =

X ( f

nf s )

superposition of the analog signal spectrum X(f) and its translates (X(f-nfs) n0)

Caused by sampling Overlapping of X(f) and its translates: aliasing (sampling effect) (2) Leakage Effect limited window size T
( )) ( T t ( f ) = F (( )) T t t X s ( f ) = X s ( f ) * F (( )) T

worse than Xs(f) as approximation of X(f).


X s ( f ) : contribution of X s ( f + f ) to X s ( f ) : determined by
( f) weight frequency energy leaks from one frequency to another!

(3) Picket Fence Effect: As an estimation of X(f), does X s ( f ) have picket fence effect? No! DFT: discrete frequencies (not blocked by the fence). 6. Minimization of DFT Error Effects.

Major ways: increase T and fs Problem: DFT for large N.

10-3 Examples Illustrating the computation of the DFT


(Preparation for Mathematical Derivation of FFT)
Page 10-6

EE 422G Notes: Chapter 10

Instructor: Zhang

1. DFT Algorithm
X ( k ) = x ( n )e
n =0 N 1 j 2kn / N

= x ( n ) e j 2 / N
n =0

N 1

nk

Denote WN = e
X (k ) =
N 1 n =0

j 2 / N

, then

x(n)WN nk
WN N = e j 2 = 1

Properties of WN m : (1) WN 0 = (e j 2 / N )0 = e 0 = 1, N +m m = WN (2) W N


WN N + m = (e j 2 / N ) N + m = (e j 2 / N ) N (e j 2 / N ) m = 1 (e j 2 / N ) m = WN m

(3) WN N / 2 = e j 2 /( N / 2) / N = e j = 1

WN N / 4 = e j 2 /( N / 4) / N = e j / 2 = j
WN
3N / 4

= e j 2 /(3 N / 4) / N = e j 3 / 2 = j

2. Examples Example 10-3: Two-Point DFT


nk x(0), x(1): X (k ) = x(n)W2 n =0 1 1 1

k = 0,1

X (0) = x(n)W2 n 0 = x(n) = x(0) + x(1)


n =0
1

n =0
1

X (1) = x (n)W2
n =0 0

n1

= x (n)W2
n =0 1 (1 / 2 ) 2

= x(0)W2 + x(1)W2 = x(0) + x(1)W2 = x(0) x(1) = x(0) + x(1)(1)

Example 10-4: Generalization of derivation in example 10-3 to a four-point DFT x(0), x(1), x(2), x(3)
X (k ) =
n =0

x(n)W4 nk

k = 0,1 ,2,3,

Page 10-7

EE 422G Notes: Chapter 10


X ( 0) =

Instructor: Zhang
3

n =0
3

x(n)W4 n0 = x(n) = x(0) + x(1) + x(2) + x(3)


n =0
n 0 1 2 3

X (1) = x ( n)W4 = x (0)W4 + x (1)W4 + x ( 2)W4 + x (3)W4


n =0

= x (0) jx (1) x ( 2) + jx (3)

X ( 2) = x(n)W4
n =0

2n

= x (0)W4 + x(1)W4 + x( 2)W4 + x(3)W4


2

= x(0) + x(1)(1) + x(2)(1) + x(3)W4 = x(0) x(1) + x( 2) x(3)


X (3) = x( n)W4
n =0 3 3n 0

= x(0)W4 + x(1)W4 + x( 2)W4 + x(3)W4


3 2 1

= x(0) + x(1)W4 + x( 2)(1)W4 + x (3)W4 = x(0) + jx(1) + ( 1) x( 2) + ( j ) x (3) = x(0) + jx(1) x ( 2) jx (3)
X (0) =[ x (0) + x ( 2)] +[ x (1) + x (3)]

X (1) =[ x (0) x ( 2)] +( j )[ x (1) x (3)] X ( 2) =[ x (0) + x ( 2)] [ x (1) + x (3)] X (3) =[ x (0) x ( 2)] + j[ x (1) x (3)]

Two point DFT If we denote z(0) = x(0), z(1) = x(2) => Z(0) = z(0) + z(1) = x(0) + x(2) Z(1) = z(0) - z(1) = x(0) - x(2) v(0) = x(1), v(1) = x(3) => V(0) = v(0) + v(1) = x(1) + x(3) V(1) = v(0) - v(1) = x(1) - x(3) Four point DFT Two-point DFT

X(0) = Z(0) + V(0) X(1) = Z(1) + (-j)V(1)


Page 10-8

EE 422G Notes: Chapter 10

Instructor: Zhang

X(2) = Z(0) - V(0) X(3) = Z(1) + jV(1)

One Four point DFT

Two Two point DFT

10-4 Mathematical Derivation of the FFT


10-4A Decimation-in-Time FFT Algorithm x(0), x(1), , x(N-1)
N = 2m

N g ( 0 ), g ( 1 ), , g ( 1) 2 (( x(0), x (2),, x( N 2)) => h(0), h(1),, h( N 1) 2 (( x(1), x(3),, x( N 1))

enen

N po int s 2 ( g ( r ) = x (2r )) N odd po int s 2 (h( r ) = x(2r + 1))

Page 10-9

EE 422G Notes: Chapter 10


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

Instructor: Zhang

= =
2 kr

N / 2 1 r =0

g (r )WN g (r )WN
r =0

k (2r )

N / 2 1 r =0 k

h(r )W
N / 2 1 r =0

k ( 2 r +1) N

(k = 0,1,..., N 1)

N / 2 1

2 kr

+ WN

h(r )W

2 kr N

WN

= (e j 2 . / N ) 2 kr = (e j 2 /(. N / 2 ) ) kr = W N
2 N / 2 1 r =0

kr

X (k ) =

g (r )W

kr N /2 k

+WN

N / 2 1 r =0

h(r )W

kr N /2

= G ( k ) + W N H (k )

( G(k): N/2 point DFT output (even indexed), H(k) : N/2 point DFT output (odd indexed))
X ( k ) = G ( k ) + WN k H ( k ) G (k ) = H (k ) =
N / 2 1 r =0

k = 0,1,..., N 1
N / 2 1 r =0

g ( r )WN / 2

kr

x ( 2r )WN / 2

kr

N / 2 1 r =0

h ( r )WN / 2 kr =

N / 2 1 r =0

x ( 2r + 1)WN / 2 kr

Question: X(k) needs G(k), H(k), k= N-1 How do we obtain G(k), H(k), for k > N/2-1 ? G(k) = G(N/2+k) k <= N/2-1 H(k) = H(N/2+k) k <= N/2-1

Page 10-10

EE 422G Notes: Chapter 10

Instructor: Zhang

Future Decimation g(0), g(1), , g(N/2-1) h(0), h(1), , h(N/2-1)


N g (0), g ( 2), , g ( 2) 2 N ge(0), ge(1),...ge( 1) 4 N g (1), g (3), , g ( 1) 2 N go(0), go(1),...go( 1) 4

G(k) H(k)
G (k ) = =
N / 4 1 m =0 N / 2 1 r =0

g (r )W
N / 4 1 m =0

kr

( N / 2)

ge(m)W
k

km

( N / 4)

+W( N / 2 )

go(m)W
k

km ( N / 4)

= GE ( k ) +W( N / 2 ) Go( k )

even indexed g (N/4 point)


WN / 2 k = WN 2 k ?

odd indexed g (N/4 point)

Page 10-11

EE 422G Notes: Chapter 10


WN / 2 k = ( e j 2 /( N / 2 ) ) k = ( e j 2 2 / N ) k = ( e j 2 / N ) 2 k = WN 2 k

Instructor: Zhang

=> G ( k ) = GE ( k ) + WN 2 k Go( k ) Similarly,


H ( k ) = HE ( k ) + WN 2 k Ho(k )

even indexed h (N/4 point) For 8 point


g ( 0) x ( 0) ge( 0) g (1) x ( 2) go (0) g ( 2) x ( 4) ge(1) g ( 3) x ( 6) go(1)

odd indexed h (N/4 point)

h ( 0) x (1) he( 0)

h (1) x ( 3) ho(0)

h ( 2) x (5) he(1)

h ( 3) x ( 7) ho(1)

Page 10-12

EE 422G Notes: Chapter 10

Instructor: Zhang

10-4B Decimation-in-Frequency FFT Algorithm


x(0), x(1), , x(N-1)
X ( k ) = x ( n)W N
n =0 N 1 nk

N = 2m

N / 2 1 n =0

x(n)W N

nk

n =N / 2

x(n)W

N 1

nk N

let m = n-N/2 (n = N/2+m)

n = N/2 => m = N/2-N/2 = 0

Page 10-13

EE 422G Notes: Chapter 10

Instructor: Zhang

n = N-1 => m = N-1-N/2 = N/2-1


X (k ) = =
N / 2 1 n =0
N

N / 2 1 n =0

x ( n )WN nk +
N / 2 1 m =0

N / 2 1 m =0

x ( N / 2 + m )WN ( N / 2 + m ) k
N

x ( n )WN nk +
N

x ( N / 2 + m )WN mkWN 2 k

WN 2 = 1 WN 2 k = ( 1) k X (k ) = =
N / 2 1 n =0 N / 2 1 n =0

x ( n )WN nk +

N / 2 1 m =0

( 1) k x ( N / 2 + m )WN mk

[ x ( n ) + ( 1) k x ( N / 2 + n )]WN nk
N / 2 1 n =0

k : even (k = 2r ) X (k ) = X (2r ) = WN
N/2 point DFT
2 rn

[ x(n) + x( N / 2 + n)]W

2 rn N rn

= (e

j 2 / N

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

X ( k ) = X ( 2r ) =
Y (r) =

N / 2 1 n =0

x(n) + x( N / 2 + n)]W [
y (n)

rn

N / 2 1 n =0

y ( n )WN / 2 rn

Z (r )

k : odd k = 2r + 1 X (k ) = X ( 2r + 1) = = = =
N / 2 1 n =0

[ x(n) x( N / 2 + n)]W
n =0 z (n) 2 rn N

n ( 2 r +1) N

N / 2 1

x( n) x( N / 2 + n)]W W [
n N

2 rn N

N / 2 1 n =0

z (n)W z (n)W

N / 2 1

rn N /2

Z (r ) =

n =0 N / 2 1

z (n)W
n =0

rn N /2

N po int 2

DFT

of

z (0), ,

z(

N 1) 2

X(k) : N-point DFT of x(0), , x(N) two N/2 point DFT

Page 10-14

EE 422G Notes: Chapter 10

Instructor: Zhang

One N/2 point DFT => two N/4 point DFT two point DFTs Consider N/2 point DFT y(0), y(1), , y(N/2-1)
Y (k ) = =
N / 4 1 n =0 N / 2 1 n =0

y ( n )WN / 2 rn

[ y ( n ) + ( 1) k y ( N / 4 + n )]WN / 2 nk

k : even k = 2 r Y (k ) = Y (2r ) = Y 1( r ) =
N / 4 1 n =0 N / 4 1 n =0

[ y( (N n )]WN / 2 nk n )+ y /4 +
y1( n )

y1( n )WN / 4 nk N / 4

po int

DFt

Page 10-15

EE 422G Notes: Chapter 10 k : odd k = 2 r + 1 Y ( k ) = Y ( 2 r + 1) = Y 2( r ) =


N / 4 1 n =0 N / 4 1 n =0

Instructor: Zhang

[ y ( n ) x ( N / 4 + n )]WN / 2 n WN / 2 2 rn
y 2( n )

y 2( n )WN / 4 rn N / 4

po int

DFT

10-4 C Computation
N point DFT : 4N(N-1) real multiplications 4N(N-1) real additions N point FFT : 2Nlog2N real multiplications (N = 2m) 3Nlog2N real additions Computation ration

Page 10-16

EE 422G Notes: Chapter 10


FFT ' s DFT ' s computations 5 log2 N = computations 8( N 1) 5 12 = 0.18% 8 4095

Instructor: Zhang

N =212 =4096

10-5 Properties of the DFT


Assumptions (1)
x(n ) X (k ) and y(n) Y (k ) ( n = 0,..., N 1) ( k = 0,..., N 1)

(2) A, B: arbitrary constants (3) Subscript e: Subscript o:

xe(n) : even about

N1 if N even 2 N if N odd 2

Page 10-17

EE 422G Notes: Chapter 10

Instructor: Zhang

xo(n) : odd about

N1 if N even 2 N if N odd 2

N = 10, xe(n)

N = 9, xe(n)

x(4) = x(5) x(3) = x(6) N 1 = 4.5 x(2) = x(7) 2 x(1) = x(8) x(0) = x(9) x(4) = x(5) x(3) = x(6) N = 4.5 x(2) = x(7) 2 x(1) = x(8) x(0) = x(9)

(4) Any real sequence can be expressed in terms of its even and odd parts according to
x ( n ) = xe ( n ) + xo ( n ) 1 1 = [ x ( n ) + x ( N n )] + [ x ( n ) x ( N n )] 2 2

even odd Question 1: x(n) = 1/2[ ] +1/2 [ ] ? Question 2: x(n) + x(N-n) even ? x(n) - x(N-n) odd ?

Yes!

Example: N = 9 => N/2 = 4.5 Consider n = 2 x(2) + x(9-2) = x(2) + x(7)

Page 10-18

EE 422G Notes: Chapter 10

Instructor: Zhang

is

x(2) + x(7) = x(4.5+(4.5-2)) +x(4.5-(7-4.5))?

4.5 + (4.5-2) = 9-2 = 7 4.5 - (7-4.5) = 9-7 = 2 x(2) + x(7) = x(7) + x(2) ? Yes! => x(n) + x(N-n) even Is x(2) - x(7) = - [x(7) + x(2)] ? Yes! => x(n) - x(N-n) odd (5) subscript r : xr(n) a real sequence subscript i : xi(n) Imaginary part of a complex sequence x ( n ) X ( k ) (6) left right side: side: DFT sequence (7) sequences are assumed periodically repeated if necessary Properties 1. Linearity : 2. Time Shift:
Ax ( n ) + By ( n ) AX ( k ) + BX ( k )

x ( n m) X ( k )e j 2km / N = X ( k )WN k m
x ( n )e j 2km / N X ( k m )
N 1 m =0 N 1 n =0

3. Frequency Shift: 4. Duality : why?

N 1 x ( n) X ( k )

X (k ) =

x (m)e j 2mk / N

DFT ( X ( n )) =

X (n )e j 2nk / N

DFT of x(m)

Page 10-19

EE 422G Notes: Chapter 10


x ( n ) = x ( N n ) = e 1 N
N 1 k =0

Instructor: Zhang

X (k )e j 2k ( N n ) / N
= e j 2kN / N e j 2kn / N 1 N
N 1 k =0

j 2k ( N n ) / N

x ( n ) =

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

DFT ( N 1 X ( n )) =

X (n )e j 2nk / N

= x ( k )

5. Circular convolution
N 1 m =0

x(m) y (n m) = x(n)y (n) X (k )Y (k )


N 1 m =0

circular convolution

6. Multiplication

new sequence z ( n) = x( n) y ( n)

x ( n) y ( n) N

X (m)Y (k m) = N 1 X (k )Y (k )

7. Parsevals Theorem

| x(n) |2 = N 1 | X (k ) | 2
n =0 k =0

N 1

N 1

8. Transforms of even real functions:


x er ( n) X er ( k )

(the DFT of an even real sequence is even and real ) 9. Transform of odd real functions:
x or ( n) jX oi (k )

(the DFT of an odd real sequence is odd and imaginary ) 10. z(n) = x(n) + jy(n) z(n) Z(k) = X(k) + jY(k) Example 10-7

z (n) = x( n) + jy (n) = e jn / 2 n = 0,1,2,3

= cos( n / 2) + j sin( n / 2)

Four point DFT for x(0), x(1), x(2), x(3):

Page 10-20

EE 422G Notes: Chapter 10

Instructor: Zhang

X(0) = [x(0) + x(2)] + [x(1) + x(3)] X(1) = [x(0) - x(2)] + (-j)[x(1) - x(3)] X(2) = [x(0) + x(2)] - [x(1) + x(3)] X(3) = [x(0) - x(2)] + j[x(1) - x(3)] For x(n) = cos(n / 2) =>
x(0) = 1 x (1) = 0 x (2) = 1 x (3) = 0

X (0) = 1

X (1) = 2

X (2) = 0

X (3) = 2

For y (n) = sin( n / 2) =>

y (0) = 0 y (1) = 1 y ( 2) = 0 y (3) = 1

Y (0) = 1 Y (1) = j 2
Z ( 0) = 0 Z (1) = 2 j 2 Z ( 2) = 0 Z (3) = 2 + j 2

Y ( 2) = 0

Y (3) = j 2

Example 10-8 DFT of x(n) = (n) :


X (k ) = ( n)W N
n =0 N 1 nk

= 1 k = 0,1,..., N 1

Time-shift property
DFT [ x(n n0 )] = (n n0 )W N
n=0 n k N 1 nk

= WN 0 = e j 2kn0 / N Example 10-9: Circular Convolution


x1 (n) = 1 x2 (n) = 1 0 n N 1

Define x3c (n) = x1 (n)x2 (n) = x1 (m) x2 (n m)


m =0

N 1

Page 10-21

EE 422G Notes: Chapter 10

Instructor: Zhang

X 1 (k ) = X 2 (k ) = =
N1 n= 0

N1 n= 0

x1(n)WN = x2 (n)WN nk
nk n= 0

N1

WN

nk

N = 0

k= 0 k 0 k= 0 k 0

N2 X 3 (k ) = X 1 (k ) X 2 (k ) = 0
x3c ( n) = = 1 N
N 1 k =0 N 1 k =0

1 N

N 1 k =0

x3 (k )e j 2nk / N

N 2 (k )e j 2nk / N

= N e j 2nk / N = Ne j 2nk / N = N x3c ( n) = N

10-6 Applications of FFT


1. Filtering x(0), , x(N-1) FFT (DFT) => X(0), , X(1), , X(N-1) X(k): Line spectrum at k = Inverse DFT:

2kt 2k = T N

(1 =

2 T

t =

T ) N

(Over T: x(0), , x(N-1) are sampled.)

x(n) = X (k )e j 2nk / N
k =0 N0

N 1

x(n) = X (k )e j 2nk / N
k =0

Frequencies with > Example 10-10

2N 0 have been filtered! N

Page 10-22

EE 422G Notes: Chapter 10


x( n) = cos

Instructor: Zhang

n 4

+ cos
2 =(

1 =

2 2 ( ) 8 N

2 4 )2= = N 8 2

n 2

0n7

x(0), x(1), , x(7)


X (0), 0 X (1), non zero X ( 2), non zero 0 X (7 ) 0

How to filter frequency higher than

2. Spectrum Analyzers Analog oscilloscopes => time-domain display Spectrum Analyzers: Data Storage, FFT 3. Energy Spectral Density x(0), , x(N-1): its energy definition
E=
N 1 n =0

| x(n) |2

Parsevals Theorem
E=
N 1

| x ( k ) |2 N k =0

Page 10-23

You might also like