Transcript Document
Fourier Analysis Using the DFT
Quote of the Day On two occasions I have been asked, “Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?” I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. Charles Babbage Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, ©1999-2000 Prentice Hall Inc.
Fourier Analysis of Signals Using DFT • One major application of the DFT: analyze signals • Let’s analyze frequency content of a continuous-time signal • Steps to analyze signal with DFT – Remove high-frequencies to prevent aliasing after sampling – Sample signal to convert to discrete-time – Window to limit the duration of the signal – Take DFT of the resulting signal Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 2
Example Continuous time signal Anti-aliasing filter Signal after filter Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 3
Example Cont’d Sampled discrete time signal Frequency response of window Windowed and sampled Fourier transform Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 4
Effect of Windowing on Sinusoidal Signals • The effects of anti-aliasing filtering and sampling is known • We will analyze the effect of windowing • Choose a simple signal to analyze this effect: sinusoids s x c A A 0 0 cos 0 t 0 A 1 cos 1 t • Assume ideal sampling and no aliasing we get cos 0 n 0 A 1 cos 1 n 1 1 • And after windowing we have
v
A
0
w
cos
0
n
0
A
1
w cos
1
n
1
v
• Calculate the DTFT of v[n] by writing out the cosines as
A 2
0
w
e
j 0
e
j 0 n
A
0
w
e
j 0
e
j 0 n
A 2
1
w
e
j 1
e
j 1 n
A 2
1
w
e V
A 2
0
A 2
1
e e
j 0 j 1
W
e W
e
j j 0 1 n n
2
A
0
2 A
1
2 e
e
j 0 j 1
W
e W
e
j j 0 1 n n j 1
e
j 1 n 5 Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing
Example • Consider a rectangular window w[n] of length 64 • Assume 1/T=10 kHz, A 0 =1 and A 1 =0.75 and phases to be zero • Magnitude of the DTFT of the window Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 6
Example Cont’d • Magnitude of the DTFT of the sampled signal • We expect to see dirac function at input frequencies • Due to windowing we see, instead, the response of the window • Note that both tones will affect each other due to the smearing – This is called leakage: pretty small in this example Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 7
Example Cont’d • If we the input tones are close to each other • On the left: the tones are so close that they have considerable affect on each others magnitude • On the right: the tones are too close to even separate in this case – They cannot be resolved using this particular window Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 8
Window Functions • Two factors are determined by the window function – Resolution: influenced mainly by the main lobe width – Leakage: relative amplitude of side lobes versus main lobe • We know from filter design chapter that we can choose various windows to trade-off these two factors • Example: – Kaiser window Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 9
The Effect of Spectral Sampling • DFT samples the DTFT with N equally spaced samples at k
2
N k k
0,1,..., N 1
• Or in terms of continuous-frequency
Ω
k
2
k NT k
• Example: Signal after windowing
0 , 1 ,..., N / 2
v cos 2 14 n 0 .
75 cos 4 15 0 n 0 n 63 else Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 10
Example Cont’d • Note the peak of the DTFTs are in between samples of the DFT 1 2 14 2 64 k k 4 .
5714 2 4 peaks 15 2 64 k k 8 .
5333 real magnitude of spectral Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 11
Example Cont’d • Let’s consider another sequence after windowing we have v cos 2 16 n 0 .
75 cos 2 8 0 n 0 n 63 else 1 2 2 16 2 8 2 64 2 64 k k k k 4 8 Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 12
Example Cont’d • In this case N samples cover exactly 4 and 8 periods of the tones • The samples correspond to the peak of the lobes • The magnitude of the peaks are accurate • Note that we don’t see the side lobes in this case Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 13
Example: DFT Analysis with Kaiser Window • The windowed signal is given as v w K cos 2 14 n 0 .
75 w K cos 4 15 n • Where w K [n] is a Kaiser window with β=5.48 for a relative side lobe amplitude of -40 dB • The windowed signal Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 14
Example Cont’d • DFT with this Kaiser window • The two tones are clearly resolved with the Kaiser window Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 15