The trick of Fast FT

Download Report

Transcript The trick of Fast FT

FFT for data filtering
•The Fourier Transformation
•Fourier Series
•Discrete FT
•The trick of Fast FT
•Filter designs
•Examples
Timo Damm, CAU Kiel, [email protected]
Definitions
Curso Caracas, 2006
The Fourier Transformation
The FT transforms data from the time
domain x(t) to the frequency domain X(f)
or from space domain f(x) to wavelength
domain F(λ).

X( f ) 


x
t
e

 2ift
dt

1
x t  
2



X
f
e


 2ift
df
Normally the FT
calculation is carried
out using complex
numbers. We usually
consider the amplitude
and phase or the real
and imaginary part.
Curso Caracas, 2006
Fourier Series
Most functions have an approximated
Fourier Series representation:
a0 
1
xt     an cos2nf0t   bn sin 2nf0t , f 0 
2 n 1
T
T
2
an   xt  cos2nf0t dt
T 0
T
2
bn   xt sin 2nf0t dt
T 0
Curso Caracas, 2006
Fourier Series Example 1
Curso Caracas, 2006
Fourier Series Example 2
Curso Caracas, 2006
Discrete FT
N 1
X n   x je
 2i
jn
N
, n  0,1,...,N  1
j 0
1
xn 
N
N 1
X e
j 0
j
 2i
jn
N
, n  0,1,...,N  1
Amplitude
andand
Phase
diagram
of a
Amplitude
Phase
diagram
Fourier
Transformed
cosine-function
of a Fourier
transformed
sinfunction
Curso Caracas, 2006
Discrete FT - problems
The Nyquist frequency is the limit for
the highest transformable sampling
frequency. Higher frequencies will be
mapped back into the spectrum
beginning with small frequencies! If
the Nyquist frequency is 5Hz, 8Hz
appears like 2Hz and 13Hz as 3Hz.
f max  f Nyquist
1

2 t
x 1 T
2 , Bartlett
g x   1 
1 T
2
Nonperiodic functions can
be better handled using
window functions,
bringing the function
down to 0 at both ends.
1 
 2x 
g  x    1  cos
, Hann
2 
 T 
2
 x 1 T 
2  , Welch
g x   1  
 1 T 
2


Curso Caracas, 2006
The trick of Fast FT
1965 published by Cooley & Tukey
1805 Mr. Gauss used already a
special shape of the algorithm for
calculation asteroid motion!
Classical “divide & conquer”-style
O(n log(n)) instead of O(n^2)
Using the symmetries of the
trigonometric functions
Curso Caracas, 2006
FFT: The difference in runtime
Curso Caracas, 2006
The trick of Fast FT
N 1
X n   x je
nj
2i
N
, n  0,1,2,...,N  1.
j 0
X n  Yn  e
Xn  Y
N
n
2
n
 2 i
N
e
Zn
n
 2 i
N
Curso Caracas, 2006
Z
N
n
2
The trick of Fast FT (sheme)
x0 , x1, x2 , x3, x4 , x5 , x6 , x7 
y  x0 , x2 , x4 , x6  z  x1, x3 , x5 , x7 
y  x0 , x4 
y  x1 , x5 
z  x2 , x6 
z  x3 , x7 
y  x0
y  x2
y  x1
y  x3
z  x4
z  x6
z  x5
z  x7
Curso Caracas, 2006
The trick of Fast FT (example)
1,0,0,0
y  1,0
z  0,0
y0
z0
y 1
z0
Curso Caracas, 2006
FFT as Matrix Multiplication
 X 0 W 0

  0
 X 1  W
 X 2   W 0

  0

 X 3  W
 X 0 1

 
 X 1  1
 X 2   1

 
 X 3  1
 X 0  1

 
 X 2   1
 X 1    0

 

 X 3   0
W0
W1
W2
W3
W0
W2
W4
W6
W 0  x0 0


3
W  x0 1 
W 6  x0 2 


9 
W  x0 3 
1
1
1  x0 0


1
2
3
W W W  x0 1 
W 2 W 0 W 2  x0 2 


3
2
1 
W W W  x0 3 
W0
W2
0
0
0 0  1

0 0  0
1 W 1  1

3 
1 W  0
0 W 0 0  x0 0


0
1 0 W  x0 1 
0 W 2 0  x0 2 


2 
1 0 W  x0 3 
Curso Caracas, 2006
Filter designs
In potential field analysis one often wants to
seperate the regional from the local field
•High Pass
•Low Pass
•Band Pass
•Upward Continuation
•Downward Continuation
Curso Caracas, 2006
How to apply the filter?
We multiply X(f) with
a special function
(Convolution) to
surpress or emphasis
particular frequency
ranges.
Curso Caracas, 2006
Unfiltered Data
Curso Caracas, 2006
Frequency domain
Curso Caracas, 2006
Low Pass
Curso Caracas, 2006
High Pass
Curso Caracas, 2006
Band Pass
Curso Caracas, 2006
Upward Continuation
Curso Caracas, 2006
Downward continuation
Curso Caracas, 2006
Other Examples #1
Curso Caracas, 2006
Other Examples #2
Curso Caracas, 2006
Other Examples #3
Curso Caracas, 2006
Other Examples #4
How to filter the
diagonal stripes?
FFT
iFFT
Now simply mask
the dominant
wavelength spots.
Source: H.W. Lang, FH Flensburg
Curso Caracas, 2006
JAVA FFT-Lab from Dave Hale, Stanford
(http://sepwww.stanford.edu/oldsep/hale/FftLab.html)
Curso Caracas, 2006
Summary
•Fourier Transformation is an important tool for
filtering data.
•Potential field data can be seperated in local and
regional components
•Noise reduction can be performed on
seismic/seismolgical data
•SAR processing can be achived
•Just the FFT makes the transformation quick enough
for processing huge data sets
•Besides geoscience, FFT is used for
encoding/compression telephone, internet, image and
video-streams.
Curso Caracas, 2006
References
1.
Buttkus: Spectral Analysis and Filter Theory in Applied
Geophysics, 2000, Springer-Verlag, Berlin, Germany
(ISBN: 3-540-62674-3)
2.
Brigham: FFT – Schnelle Fourier-Tranformation, 1985, R.
Oldenbourg Verlag, Munich, Germany (ISBN: 3-48625862-1)
3.
Götze, Barrio-Alvers, Schmidt, Alvers: Curso de
postgrado: Los métodos potenciales en la interpretación
geológica – geofísica integrada, 1996, Universidad
Nacional de La Plata, Argentina
4.
http://www.iti.fhflensburg.de/lang/algorithmen/fft/fft.htm
Curso Caracas, 2006