Errors in DFT Processing
Errors in DFT Processing
Mark Fowler
Discussion #9
Illustrating the Errors in DFT Processing DFT for Sonar Processing
Example #1
Illustrating The Errors in DFT Processing
Recall the processing setup: (Note: no anti-aliasing filter shown but we should have one!) sensor
x(t )
ADC
Inside Computer
x[n]
x[0] x[1]
X [0]
X ( ) CTFT (theory)
X () DTFT (theory)
x[2]
x[N-1] 0 0
DFT processing
X[1] X[2]
X[Nzp-3]
ZeroX[Nzp-2] padding to X[Nzp-1] length Nzp memory array Practical computed DFT to understand what this shows us
DTFTN (theory)
Now analyze what we will get from the DFT processing for this signal From our FT Table we find the FT of x(t) is:
1 1 X ( ) = X(f ) = j + b j 2f + b
CTFT Result(Theory)
If we sample x(t) at the rate of Fs samples/second That is, sample every T = 1/Fs sec we get the DT Signal coming out of the ADC is:
) u[n] = a u[n]
n
Now imagine that in theory we have all of the samples x[n] - < n < at the ADC output. Then, in theory the DTFT of this signal is found using the DTFT table to be:
1 X () = 1 ae j
DTFT Result(Theory)
C X N () = 1 (ae
j N
1 ae j
x N [n ] = x[n ]wN [n ]
..and DTFT theory tells us that
1, 0, 1, 2, K, N 1 wN [n ] = 0, otherwise
1 X N () = 2
( )WN ( )d = X () WN ()
A form of convolution (DT Freq. Domain Convolution) and this convolution has a smearing effect. Finally, the DFT of the zero-padded collected samples is
x[0] x[1] ... x zp [n] = x[ N 1] 0 ... 0
X zp [k ] =
Total of Nzp points
N zp 1 n =0
j zp
[ n]
2kn N zp
Our theory tells us that the zero-padded DFT is nothing more than points on DTFTN:
X zp [k ] = X N ( k )
where k =
2k N zp
k = 0, 1, 2, ..., N 1
Spacing between DFT points is 2/Nzp Increasing the amount of zero-padding gives closer spacing
Now run the m-file called DFT_Relations.m for different Fs , N, & Nap values
1 j 2f + b
Notice that this is not ideally bandlimited, but is essentially bandlimited. Therefore we expect some aliasing when we sample.
1 X () = 1 ae j
+ k 2 1 X () = X Fs T k = 2
(CTFT rescaled to and then shifted by multiples of 2)
So we should see replicas in X() and we do! We plot TX() to undo the 1/T here
X () =
1 1 ae j
Fs
Fs 2
0 0
Fs 2
Fs
The theory in
+ k 2 1 X () = X Fs T k = 2
says well see significant aliasing in X() unless Fs is high enough The first error visible in plot #2
DTFT
CTFT
We see that XN() shows signs of the smearing due to: X N () = X () WN () Also called leakage error The second error visible in plot #3
DTFT
DTFTN
This leakage error is less significant as we increase N, the number of collected samples
N zp 1 n =0
zp
[n ]e
j 2kn N zp
It is plotted vs. k =
2k N zp
but with the right half moved down to lie between - & 0 rad/sample
Theory says Xzp[k] points should lie on top of XN() not X() !! We see that this is true If Nzp is too small (i.e. Nzp = N) then there arent enough DFT points on XN() to allow us to see the real underlying shape of XN() This is Grid Error and it is less significant when Nzp is large. The third error visible in plot #4
DFT DTFTN
Summary of Results:
sensor
x(t )
ADC
x[n]
CTFT
DTFT
Aliasing Error
DFT processing
X[1] X[2]
memory array
Smearing /Leakage Error
memory array
DTFTN
Grid Error
DFT
Example #2
Sonar Processing using the DFT
Vs
Radar/Sonar
Tx = Transmit Rx = Receive
Physics tells us (Doppler effect) that the reflected signal received will be:
(for radars, this is generally in the kHz range) (for sonar, this is in the 100s of Hz range)
Our CTFT theory tells us that the CTFT of the Tx signal will be:
X tx ( f )
Beff
fo
fo
Beff
Assume that fo is large enough that this decays to a negligible level by f 0 Hz and by f Beff Center fo between 0 and Beff Fs 2 Beff Also CTFT theory tells us that the CTFT of the Rx signal will be: Peak is shifted from fo by the doppler shift
X tx ( f )
If we know fo and we can find where V = c f r 1 (m / s) s f this peak is then we can find Vs: o
Get Vs