Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) in Signal Processing - P, Study notes of Electrical and Electronics Engineering

An overview of the discrete fourier transform (dft) and its algorithm, the fast fourier transform (fft). The dft is used to compute the discrete time fourier transform (dtft) at specific frequencies and to recover the original signal from its transform. However, when the length of the signal is less than the number of samples, aliasing occurs. The document also discusses interpolation and convolution in the context of the dft and fft.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-bej-4
koofers-user-bej-4 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EECS 451 DISCRETE FOURIER TRANSFORM (DFT)
DFT: Xk=PN1
n=0 x(n)ej2πnk/N ;x(n) = 1
NPN1
k=0 Xkej2πnk/N ; lengthN.
DTFT: Xk=X(z)|z=ej2πk/N =X(e )|ω=2πk/N sampled on unit circle.
DTFS: F{periodic extension of {x(n)}} =periodic extension of {Xk}.
except: factor of 1/N moved. Note: k= 0,1...N 1 and n= 0,1. . . N 1.
Text: Uses X(k) not Xk. I hate that–too easy to confuse with X(z)!
What: Use DFT to compute DTFT at ω=2πk
N: equispaced samples on u.c.
Why: Use for spectral analysis, and to recover x(n) from DTFT. BUT:
Finite x(n) has finite length Lusing NLrecover x(n) from Xk.
length: But N < L can only recover Pkx(n+kN)aliased x(n).
EX: x(n) = {1,2,3,4,5} X(e ) = 1 + 2e + 3e2 + 4ej3ω+ 5ej4ω
Sample DTFT on unit circle at ω= 0,π
2, π, 3π
2to get DFT:
DFT: X0= 1 + 2 + 3 + 4 + 5 = 15; X1= 1 2j3 + 4j+ 5 = 3 + 2j;
N=4: X2= 1 2+34 + 5 = 03; X3= 1 + 2j34j+ 5 = 3 2j=X
1.
IDFT: x(0) = 1
4[15 + (3 + 2j) + 3 + (3 2j)] = 6 incorrect (6=1+5 aliased).
x(1) = 1
4[15(1) + (3 + 2j)(j) + 3(1) + (3 2j)(j)] = 2 correct.
x(2) = 1
4[15(1) + (3 + 2j)(1) + 3(1) + (3 2j)(1)] = 3 correct.
x(3) = 1
4[15(1) + (3 + 2j)(j) + 3(1) + (3 2j)(j)] = 4 correct.
Why? Undersampled X(e ) on unit circlealiasing (just like before).
Inter- Let x(n) have length LN. We’re given X(ej2πk/N ), k = 0,1...N1.
polate Then interpolate X(ejω) = PN1
k=0 X(ej2πk/N )S(ω2πk
N)
DTFT: S(ω) = sin(ωN/2)
Nsin(ω/2) e (N1)/2=DT F T {1
NPN1
i=0 δ(ni)}.
Zero: N > L DF T {x(0) ...x(L1),0...0(zero pad)} above.
padding This smoothes DTFT (finer sampling in ω), BUT: no additional info.
EX: DF TN{PL1
i=0 δ(ni)}=sin(πkL/N)
sin(πk/N)ejπk(L1)/N . Window blurs.
Cyclic y(n) = h(n)c
x(n) = PN1
i=0 h(i)x((ni))NYk=HkXk.
convol: (x(n))NN-point periodic extension of x(n). ”Cyclic”=”circular.”
Ex: {1,2,3}c
{4,5,6}: Take one complete cycle of each:
y(0) = 1,2,3,1,2,3
4,6,5,4,6,5= 1 ·4+2·6+3·5 = 31.
y(1) = 1,2,3,1,2,3
5,4,6,5,4,6= 1 ·5+2·4+3·6 = 31.
y(2) = 1,2,3,1,2,3
6,5,4,6,5,4= 1 ·6+2·5+3·4 = 28.
Check: H0X0= (1 + 2 + 3)(4 + 5 + 6) = 90 = (31 + 31 + 28) = Y0checks.
pf2

Partial preview of the text

Download Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) in Signal Processing - P and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

EECS 451 DISCRETE FOURIER TRANSFORM (DFT)

DFT: Xk =

∑N − 1

n=0 x(n)e

−j 2 πnk/N (^) ; x(n) = 1 N

∑N − 1

k=0 Xke

j 2 πnk/N (^) ; length≤ N. DTFT: Xk = X(z)|z=ej 2 πk/N = X(ejω^ )|ω=2πk/N sampled on unit circle. DTFS: F{periodic extension of {x(n)}} =periodic extension of {Xk}. except: factor of 1/N moved. Note: k = 0, 1... N − 1 and n = 0, 1... N − 1. Text: Uses X(k) not Xk. I hate that–too easy to confuse with X(z)!

What: Use DFT to compute DTFT at ω = (^2) Nπk : equispaced samples on u.c. Why: Use for spectral analysis, and to recover x(n) from DTFT. BUT: Finite x(n) has finite length L →using N ≥ L →recover x(n) from Xk. length: But N < L →can only recover

k x(n^ +^ kN^ )^ →^ aliased x(n).

EX: x(n) = { 1 , 2 , 3 , 4 , 5 } → X(ejω^ ) = 1 + 2e−jω^ + 3e−^2 jω^ + 4e−j^3 ω^ + 5e−j^4 ω Sample DTFT on unit circle at ω = 0, π 2 , π, 32 π to get DFT: DFT: X 0 = 1 + 2 + 3 + 4 + 5 = 15; X 1 = 1 − 2 j − 3 + 4j + 5 = 3 + 2j; N=4: X 2 = 1 − 2 + 3 − 4 + 5 = 03; X 3 = 1 + 2j − 3 − 4 j + 5 = 3 − 2 j = X 1 ∗. IDFT: x(0) = 14 [15 + (3 + 2j) + 3 + (3 − 2 j)] = 6 incorrect (6=1+5 aliased). x(1) = 14 [15(1) + (3 + 2j)(j) + 3(−1) + (3 − 2 j)(−j)] = 2 correct. x(2) = 14 [15(1) + (3 + 2j)(−1) + 3(1) + (3 − 2 j)(−1)] = 3 correct. x(3) = 14 [15(1) + (3 + 2j)(−j) + 3(−1) + (3 − 2 j)(j)] = 4 correct. Why? Undersampled X(ejω^ ) on unit circle→aliasing (just like before).

Inter- Let x(n) have length L ≤ N. We’re given X(ej^2 πk/N^ ), k = 0, 1... N −1. polate Then interpolate X(ejω^ ) =

∑N − 1

k=0 X(e

j 2 πk/N (^) )S(ω − 2 πk N ) DTFT: S(ω) = (^) Nsin( sin(ωN/ω/2)2) e−jω(N^ −1)/^2 = DT F T { (^) N^1

∑N − 1

i=0 δ(n^ −^ i)}.

Zero: N > L → DF T {x(0)... x(L − 1), 0... 0(zero − pad)} →above. padding This smoothes DTFT (finer sampling in ω), BUT: no additional info.

EX: DF TN {

∑L− 1

i=0 δ(n^ −^ i)}^ =^

sin(πkL/N ) sin(πk/N ) e

−jπk(L−1)/N (^). Window blurs.

Cyclic y(n) = h(n) c©x(n) =

∑N − 1

i=0 h(i)x((n^ −^ i))N^ ⇔^ Yk^ =^ HkXk. convol: (x(n))N ⇔N-point periodic extension of x(n). ”Cyclic”=”circular.” Ex: { 1 , 2 , 3 } ©{c 4 , 5 , 6 } : Take one complete cycle of each: y(0) = 14 ,,^26 ,,^35 ,,^14 ,,^26 ,,^35 = 1 · 4 + 2 · 6 + 3 · 5 = 31. y(1) = 15 ,,^24 ,,^36 ,,^15 ,,^24 ,,^36 = 1 · 5 + 2 · 4 + 3 · 6 = 31. y(2) = 16 ,,^25 ,,^34 ,,^16 ,,^25 ,,^34 = 1 · 6 + 2 · 5 + 3 · 4 = 28. Check: H 0 X 0 = (1 + 2 + 3)(4 + 5 + 6) = 90 = (31 + 31 + 28) = Y 0 checks.

EECS 451 FAST FOURIER TRANSFORM (FFT)

Goal: Compute DFT Xk =

∑N − 1

n=0 x(n)W^

nk N where^ WN^ =^ e

−j 2 π/N (^). Names: FFT is an algorithm for computing the DFT, which is a transform. Why? Direct computation requires N 2 mults and N (N − 1) adds: too many! Cooley- 1965 at IBM. Serious DSP dates from this algorithm. Tukey: Divide up large DFT into smaller DFTs: N = N 1 N 2. coarse: n = n 1 + N 1 n 2 where n 1 = 0... N 1 − 1 and n 2 = 0... N 2 − 1. vernier: k = k 2 + N 2 k 1 where k 1 = 0... N 1 − 1 and k 2 = 0... N 2 − 1. indices nk = (n 1 + N 1 n 2 )(k 2 + N 2 k 1 ) = n 1 k 2 + N 1 n 2 k 2 + N 2 n 1 k 1 + N 1 N 2 n 2 k 1. exponent: W (^) Nnk = W (^) Nn^1 k^2 W (^) Nn^22 k 2 W (^) Nn^11 k^1 using W (^) NN 11 N 2 = WN 2 and W (^) NN 1 N^2 = 1.

DFT: Xk = Xk 2 +N 2 k 1 =

∑N 1 − 1

n 1 =

∑N 2 − 1

n 2 =0 x(n^1 +^ N^1 n^2 )W^

(n 1 +N 1 n 2 )(k 2 +N 2 k 1 ) N. rewrite: Xk 2 +N 2 k 1 =

∑N 1 − 1

n 1 =0 W^

n 1 k 1 N 1

[

W (^) Nn^1 k^2

∑N 2 − 1

n 2 =0 W^

n 2 k 2 N 2 x(n^1 +^ N^1 n^2 )

]

  1. Compute N 1 (for each n 1 ) N 2 -point DFTs of x(n 1 + N 1 n 2 ) (in n 2 ).
  2. Multiply result by twiddle factors W (^) Nn^1 k^2. These are twiddle mults.
  3. Compute N 2 (for each k 2 ) N 1 -point DFTs of the result. Now done!
  4. (N 1 N 2 )-point→ N 1 (N 2 -point)+N 2 (N 1 -point)+(N 1 −1)(N 2 −1) twiddle since n 1 = 0 or k 2 = 0 → W (^) Nn^1 k^2 = 1. This is important below. Visual: (N 1 × N 2 ) arrays: xn 1 ,n 2 = x(n 1 + N 1 n 2 ); Xk 1 ,k 2 = X(k 2 + N 2 k 1 ).
  5. Take N 2 -point DFT of each row (fixed n 1 ). Yields ˆxn 1 ,k 2.
  6. Multiply ˆxn 1 ,k 2 point-by-point by twiddle factor W (^) Nn^1 k^2.
  7. Take N 1 -point DFT of each column (fixed k 2 ). Yields Xk 1 ,k 2.

Radix-2 Cooley-Tukey Fast Fourier Transforms

N = 2 N 2 → Decimation-in-time FFT: N 1 = 2; N 2 = N/2; n 1 = 0, 1; k 1 = 0, 1.

Xk 2 = 1

∑N/ 2 − 1

n 2 =0 W^

n 2 k 2 N/ 2 x(2n^2 ) +^ W^

1 k 2 N

∑N/ 2 − 1

n 2 =0 W^

n 2 k 2 N/ 2 x(2n^2 + 1). Xk 2 +N/ 2 = 1

∑N/ 2 − 1

n 2 =0 W^

n 2 k 2 N/ 2 x(2n^2 )^ −^ W^

1 k 2 N

∑N/ 2 − 1

n 2 =0 W^

n 2 k 2 N/ 2 x(2n^2 + 1). N-point→ 2( N 2 -point)+ N 2 (2-point)+( N 2 − 1)twiddle mults. Total: N 2 log 2 N mults. Note: (N 1 − 1)(N 2 − 1) = (2 − 1)( N 2 − 1) = N 2 − 1 : 12 twiddle mults trivial!

N = N 2 2 → Decimation-in-freq. FFT: N 2 = 2; N 1 = N/2; n 2 = 0, 1; k 2 = 0, 1.

X 2 k 1 =

∑N/ 2 − 1

n 1 =0 W^

n 1 k 1 N/ 2 [x(n^1 ) +^ x(n^1 +^ N/2)]1. X 2 k 1 +1 =

∑N/ 2 − 1

n 1 =0 W^

n 1 k 1 N/ 2 [x(n^1 )^ −^ x(n^1 +^ N/2)]W^

1 n 1 N. N-point→ N 2 (2-point)+2( N 2 -point)+( N 2 − 1)twiddle mults. Total: N 2 log 2 N mults.