FFT for data filtering The Fourier Transformation Fourier Series Discrete FT The trick of Fast FT...

Post on 15-Dec-2015

217 views 0 download

Tags:

Transcript of FFT for data filtering The Fourier Transformation Fourier Series Discrete FT The trick of Fast FT...

FFT for data filteringFFT for data filteringFFT for data filteringFFT for data filtering

•The Fourier Transformation

•Fourier Series

•Discrete FT

•The trick of Fast FT

•Filter designs

•Examples

Timo Damm, CAU Kiel, tdamm@geophysik.uni-kiel.de

Curso Caracas, 2006

DefinitionsDefinitions

Curso Caracas, 2006

The Fourier TransformationThe Fourier Transformation

dfefXtx

dtetxfX

ift

ift

2

2

2

1

)(

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(λ).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 SeriesFourier Series

Most functions have an approximated Fourier Series representation:

T

n

T

n

nnn

dttnftxT

b

dttnftxT

a

Tftnfbtnfa

atx

0

0

0

0

1000

0

2sin2

2cos2

1,2sin2cos

2

Curso Caracas, 2006

Fourier Series Example 1Fourier Series Example 1

Curso Caracas, 2006

Fourier Series Example 2Fourier Series Example 2

Curso Caracas, 2006

Discrete FTDiscrete FT

1,...,1,0,1

1,...,1,0,

1

0

2

1

0

2

NneXN

x

NnexX

N

j

N

jni

jn

N

j

N

jni

jn

Amplitude and Phase diagram of a Fourier transformed sin-function

Amplitude and Phase diagram of a Fourier Transformed cosine-function

Curso Caracas, 2006

Discrete FT - problemsDiscrete FT - problems

WelchT

Txxg

HannT

xxg

BartlettT

Txxg

,

21

21

1

,2

cos12

1

,

21

21

1

2

Nonperiodic functions can be better handled using window functions, bringing the function down to 0 at both ends.

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.

tff Nyquist

2

1max

Curso Caracas, 2006

The trick of Fast FTThe 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 runtimeFFT: The difference in runtime

Curso Caracas, 2006

The trick of Fast FTThe trick of Fast FT

2

2

2

2

Nn

N

ni

Nn

n

nN

ni

nn

ZeYX

ZeYX

1

0

2.1,...,2,1,0,

N

j

N

nji

jn NnexX

Curso Caracas, 2006

The trick of Fast FT (sheme)The trick of Fast FT (sheme)

6420 ,,, xxxxy

62 , xxz

76543210 ,,,,,,, xxxxxxxx

40, xxy

7531 ,,, xxxxz

6

2

xz

xy

7

3

xz

xy

5

1

xz

xy

73, xxz 51, xxy

4

0

xz

xy

Curso Caracas, 2006

The trick of Fast FT (example)The trick of Fast FT (example)

0,1y

0,0,0,1

0,0z

0

0

z

y

0

1

z

y

Curso Caracas, 2006

FFT as Matrix MultiplicationFFT as Matrix Multiplication

3

2

1

0

010

001

010

001

100

100

001

001

3

1

2

0

3

2

1

0

1

1

1

1111

3

2

1

0

3

2

1

0

3

2

1

0

0

0

0

0

2

2

0

0

3

1

2

0

0

0

0

0

123

202

321

0

0

0

0

9630

6420

3210

0000

x

x

x

x

W

W

W

W

W

W

W

W

X

X

X

X

x

x

x

x

WWW

WWW

WWW

X

X

X

X

x

x

x

x

WWWW

WWWW

WWWW

WWWW

X

X

X

X

Curso Caracas, 2006

Filter designsFilter designs

•High Pass

•Low Pass

•Band Pass

•Upward Continuation

•Downward Continuation

In potential field analysis one often wants to seperate the regional from the local field

Curso Caracas, 2006

How to apply the filter?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 DataUnfiltered Data

Curso Caracas, 2006

Frequency domainFrequency domain

Curso Caracas, 2006

Low PassLow Pass

Curso Caracas, 2006

High PassHigh Pass

Curso Caracas, 2006

Band PassBand Pass

Curso Caracas, 2006

Upward ContinuationUpward Continuation

Curso Caracas, 2006

Downward continuationDownward continuation

Curso Caracas, 2006

Other Examples #1Other Examples #1

Curso Caracas, 2006

Other Examples #2Other Examples #2

Curso Caracas, 2006

Other Examples #3Other Examples #3

Curso Caracas, 2006

Other Examples #4Other Examples #4

Source: H.W. Lang, FH Flensburg

How to filter the diagonal stripes?

Now simply mask the dominant wavelength spots.

FFT

iFFT

Curso Caracas, 2006

JAVA FFT-Lab from Dave Hale, Stanford

(http://sepwww.stanford.edu/oldsep/hale/FftLab.html)

Curso Caracas, 2006

SummarySummary•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

ReferencesReferences

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-486-25862-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.fh-flensburg.de/lang/algorithmen/fft/fft.htm