0% found this document useful (0 votes)
19 views34 pages

2 Waveform Data Processing

The document discusses waveform data processing, focusing on the Fourier transform and its importance in frequency domain analysis. It covers concepts such as vector decomposition, orthogonal transforms, and the properties of trigonometric functions. Additionally, it introduces the discrete Fourier transform and its application to sample waveform data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views34 pages

2 Waveform Data Processing

The document discusses waveform data processing, focusing on the Fourier transform and its importance in frequency domain analysis. It covers concepts such as vector decomposition, orthogonal transforms, and the properties of trigonometric functions. Additionally, it introduces the discrete Fourier transform and its application to sample waveform data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

2.

Waveform data processing


• Fourier transform
• Time domain, amplitude & phase, real & imaginary
• Ambient noise

Almost all processing of active/passive surface wave methods


will be done in frequency domain.
Understanding frequency domain and Fourie transform is
quite important.

2. Waveform data processing 1


Fourier transform is
1. Orthogonal
The inner product of any two different harmonics is zero
2. Complete
No function can be orthogonal to all harmonics
3. Convenient
Can be calculate efficiency

2. Waveform data processing 2


Vector decomposition
Vector decomposition
 3
A =  
A(3,5)  5

c2

c1 Let’s Decompose into C1 and C2 !

2. Waveform data processing 3


Vector decomposition
Unit vectors
1 0
X = b1 =   Y = b2 =  
Y A(3,5)  0 1
c2 Calculating inner product !
 3
c1 = b A = (1 0)  = 3
T
1
b2  5
X
c1  3
c 2 = b A = (0 1)  = 5
b1 T
2
 5

 c1   1 0  3   3 
C =   = B A = 
T
  =  
 c2   0 1  5   5 

2. Waveform data processing 4


Vector decomposition
Vector decomposition with slope Unit vectors
 3  1
A(3,5)   − 
b1 =  2  b2 =  2 
 1   3
   
 2   2 
c2 c1 Remember! Inner product is 0
3 −1 1 3
b1  b2 =  +  =0
30° 2 2 2 2

 3 1  3 3 +5
   
 c1   3  2  =  5.098 
C =   = B T A =  2 2   = 
 c2   −1 3  5   5 3 − 3   2.830 
   
 2 2   2 

2. Waveform data processing 5


Vector decomposition
Vector decomposition with slope
A(3,5) Inverse transform

B and C A

30°

 3 − 1  3 3 +5  9 +5 3 −5 3 +3 
    
( )
A= B T −1
C = BC =  2 2  2 = 4  =  3 
 1 3  5 3 − 3   3 3 + 5 + 15 − 3 3   5 
    
 2 2  2   4 

2. Waveform data processing 6


Vector decomposition
and orthogonal transform
Orthogonal transform
C=B A T
 3 1  3 3 +5
   
 c1   3  2  =  5.098 
C =   = B A =  2
T 2   = 
 c2   −1 3  5   5 3 − 3   2.830 
   
 2 2   2 

Inverse transform
A = BC  3 − 1  3 3 +5  9+5 3 −5 3 +3 
    
( )
A = B C = BC = 
T −1 2 2  2 = 4  =  3 
 1 3  5 3 − 3   3 3 + 5 + 15 − 3 3   5 
    
 2 2  2   4 

2. Waveform data processing 7


Trigonometric functions are orthogonal
Two trigonometric functions (Two vectors)

 x   x 
b1 = sin 1   2  b2 = sin  2   2 
 16   16 

1.500

1.000

0.500
b1 & b2

sin(x/16×2π)
0.000
sin(2x/16×2π)
-0.500

-1.000

-1.500
0 5 10 15
x

2. Waveform data processing 8


Trigonometric functions are orthogonal
Inner product
x b1=sin(1×x/16×2π) b2=sin(2×x/16×2π) b1×b2
0 0.000 0.000 0.000
1 0.383 0.707 0.271
2 0.707 1.000 0.707
1.500
3 0.924 0.707 0.653
1.000
4 1.000 0.000 0.000
0.500
5 0.924 -0.707 -0.653
b1 & b2

sin(x/16×2π)
0.000
sin(2x/16×2π) 6 0.707 -1.000 -0.707
-0.500
7 0.383 -0.707 -0.271
-1.000 8 0.000 0.000 0.000
-1.500 9 -0.383 0.707 -0.271
0 5 10 15
10 -0.707 1.000 -0.707
x
11 -0.924 0.707 -0.653
12 -1.000 0.000 0.000
13 -0.924 -0.707 0.653
14 -0.707 -1.000 0.707
15 -0.383 -0.707 0.271

Total 0.000

2. Waveform data processing 9


Discrete Fourier transform
Let’s transform 8 samples discrete waveform data!

Waveform Vector notation


 1 
6  
5  2 
4
3
 3 
2  
1
 5 
0
-1
A= 
-2  2 
-3
-4  − 1
0 1 2 3 4 5 6 7  
 − 3
 3 
 
2. Waveform data processing 10
Discrete Fourier transform
Matrix consists of 8 trigonometric functions

  0   0   0 
 sin  0   2  sin 1  2       sin  7   2  
  8   8   8 
  1  
 sin  0   2    
  8  
 sin  0  2  2    
  8 
    x 
Bij =      = 
 sin  n   2  
    8 
    
 
    
    
 
 sin  0   2   7 
7
      sin  7   2  
  8   8 

2. Waveform data processing 11


Discrete Fourier transform
  0   0   0 
 sin  0   2  sin 1  2       sin  7   2  
  8   8   8 
  1  
 sin  0   2    
  8  
 sin  0  2  2    
  8 
    x 
Bij =      =  sin  n   2  
    8 
    
 
    
    
 
 sin  0   2   7 
7
      sin  7   2  
  8   8 

0 0 0 0 0 0 0 0
 
0 1 2 3 4 5 6 7
0 14 
Extract n×x 
2 4 6 8 10 12

0 3 6 9 12 15 18 21 
Wij =  = (n  x )
0 4 8 12 16 20 24 28 
0 5 10 15 20 25 30 35 
 
0 6 12 18 24 30 36 42 
0 49 
 7 14 21 28 35 42

2. Waveform data processing 12


Discrete Fourier transform
1 1 1 1 1 1 1 1
Real part (cos) 
0 − 0.71 −1 − 0.71 0

1 0.71 0.71 
1 0 −1 0 1 0 −1 0 
 
1 − 0.71 0 0.71 −1 0.71 0 − 0.71 1 
BRe =  = cos  2  Wij 
1 −1 1 −1 1 −1 1 −1  8 
1 − 0.71 0 0.71 −1 0.71 0 − 0.71
 
1 0 −1 0 1 0 −1 0 
1 0.71 0 − 0.71 −1 − 0.71 0 0.71 

Imaginary part (sin) 0 0 0 0 0 0 0 0 


 
 0 − 0.71 − 1 − 0.71 0 0.71 1 0.71 
0 −1 0 1 0 −1 0 1 
 
 0 − 0.71 1 − 0.71 0 0.71 − 1 0.71  1 
BIm =  = − sin   2  Wij 
0 0 0 0 0 0 0 0  8 
 0 0.71 − 1 0.71 0 − 0.71 1 − 0.71
 
 0 1 0 − 1 0 1 0 − 1 
 0 0.71 0.71 0 − 0.71 − 1 − 0.71
 1

2. Waveform data processing 13


Discrete Fourier transform
 12.00 
 
 − 0 . 29 
Fourier transform is  3.00 
 
 − 1 . 71 
C Re = 
 1 

C Re = B A
− 6 . 00
  T 
 − 1.71 

 2 
 3   
 
Re  3 . 00 
 − 0.29 
 5   
A= 
 2   0.00 
 − 1  
 − 

C Im = B A
9 . 54
  T  7.00 
 − 3  
 3   2.46 
  Im C Im = 
 0.00 
 − 2.46 
 
 − 7.00 
 9.54 
 

2. Waveform data processing 14


Discrete Fourier transform
Inverse Fourier transform is  1 
 12.00   
   2 
 − 0.29 
 3.00   3 
 
= (BRe C Re − (− BIm )C Im )

 − 1.71 
 1  5 
C Re =
− 6 . 00  ARe ARe =  
 
 − 1.71  8  2 
   −1
 3.00   
 − 0.29 
   − 3
 3 
AIm = 0  
 0.00 
 
 − 9 . 54 

= (BRe C Im + (− BIm )C Re )
 7.00 
 
1
 2.46  AIm
=
C Im
 0.00 
 8
 − 2.46 
 
 − 7 . 00 
 9.54 
 

2. Waveform data processing 15


Fourier series
Any waveform data can be decomposed into trigonometric functions!

f (t ) = a0 +  (an cos 2Tnt + bn sin 2nt
T
)
n =1

Decompose into each frequencies


Frequency(Hz)

Trigonometric functions

2. Waveform data processing


16
Fourier transform
Calculating Fourier coefficients(a0, a1 to ak, b1to bk)

f (t ) = a0 +  (an cos 2Tnt + bn sin 2nt
T
)
n =1
Fourier transform
+
F ( ) = f (t )  exp−it dt
1
2  −

Inverse Fourier transform


+
f (t ) =  F ( )  exp−it d
−

2. Waveform data processing 17


Amplitude and phase in frequency domain
Where trigonometric
function starts ?

Frequency(Hz)
Frequency(Hz)

Amplitude

Phase

2. Waveform data processing 18


Amplitude and phase in terms of complex number
Complex number Complex number
with amplitude (A) and phase (Φ) with cos (X : Real) and sin (Y : Imaginary)

Y : sin
(Imaginary)
Phase (Φ)

X : cos(Real)

Phase is defined between 0 ~ 360 (-180 ~ 180) degrees


or 0 ~ 2 (– to )

2. Waveform data processing 19


Phase is defined between 0 ~ 360 (-180 ~ 180) degrees
Phase (degree)

Phase wrapping
180

Frequency

-180
Add 360

2. Waveform data processing 20


Complex numbers
Complex plane with amplitude (A) and phase (Φ) Complex plane with cos and sin
sin
A = A + i A = a + ib
A sin  A
A
b

A cos  a cos

A = A cos  + iA sin  2t 2t


A = a cos + b sin
b T T
 = tan −1
a A= a 2 + b2
2. Waveform data processing 21
Amplitude and phase Frequency domain

Time domain

Amplitude


Phase

2. Waveform data processing 22


Complex numbers Frequency domain

Time domain

Real part(cos)


Imaginary part(sin)

2. Waveform data processing 23


Time domain, amplitude & phase, real & imaginary
Time domain Frequency domain

Amplitude Phase
spectra
Ricker wavelet

Real part Imaginary part

2. Waveform data processing 24


Time domain, amplitude & phase, real & imaginary
Time domain Frequency domain

Amplitude Phase
Delta function spectra

Real part Imaginary part

2. Waveform data processing 25


Time domain, amplitude & phase, real & imaginary
Time domain Frequency domain

Amplitude Phase
spectra
Trigonometric function

Real part Imaginary part

2. Waveform data processing 26


Time domain, amplitude & phase, real & imaginary
Time domain Frequency domain

Amplitude Phase
Random noise spectra

Real part Imaginary part

2. Waveform data processing 27


Ambient noise is random stochastic phenomena
Stack many files in time domain Amplitude approaches to zero

+…..+ =

2. Waveform data processing 28


Fourier transform using Excel (time domain data)
4
time(sec) 10m 20m
0 0 0
3 0.1 0 0
0.2 1 0
0.3 3 1
2
0.4 -2 3
0.5 1 -2
1 0.6 0 1
Amplitude

10m 0.7 0 0
20m 0.8 0 0
0 0.9 0 0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1 0 0
-1 1.1 0 0
1.2 0 0
1.3 0 0
-2 1.4 0 0
1.5 0 0
-3
Time(sec)
x 10
c= = = 100(m / s )
t 0.1
2. Waveform data processing 29
Fourier transform using Excel

Time domain Frequency domain


time(sec) 10m 20m Frequency(Hz) Re(10m) Im(10m) Re(20m) Im(20m)
0 0 0 0 3 0 3 0
0.1 0 0 0.625 1.472474 -2.40262 0.440944 -2.78323
0.2 1 0 1.25 -0.82843 -2.41421 -2.29289 -1.12132
0.3 3 1 1.875 -2.55487 -1.17637 -2.06453 1.91021
0.4 -2 3 2.5 -3 2 2 3
0.5 1 -2 3.125 1.140652 4.237841 3.478745 -2.67558
0.6 0 1 3.75 4.828427 -0.41421 -3.70711 -3.12132
0.7 0 0 4.375 -0.05826 -4.98841 -1.85516 4.630986
0.8 0 0 5 -5 0 5 0
0.9 0 0 5.625 -0.05826 4.988411 -1.85516 -4.63099
1 0 0 6.25 4.828427 0.414214 -3.70711 3.12132
1.1 0 0 6.875 1.140652 -4.23784 3.478745 2.675577
1.2 0 0 7.5 -3 -2 2 -3
1.3 0 0 8.125 -2.55487 1.176373 -2.06453 -1.91021
1.4 0 0 8.75 -0.82843 2.414214 -2.29289 1.12132
1.5 0 0 9.375 1.472474 2.402625 0.440944 2.783227

Fourier transform
2. Waveform data processing 30
Fourier transform using Excel
(Amplitude spectrum and phase spectrum)
Amplitude spectrum
6

Frequency(Hz) Re(10m) Im(10m) Amplitude(10m) Phase(10m) 4

0 3 0 3 0

Amplitude
0.625 1.472473646 -2.402624911 2.817939868 -1.020974282 3

1.25 -0.828427125 -2.414213562 2.552394685 -1.901351909


2
1.875 -2.554865846 -1.176373052 2.812684314 -2.710087387
2.5 -3 2 3.605551275 2.55359005
1
3.125 1.140652284 4.237840511 4.388664925 1.307868654
3.75 4.828427125 -0.414213562 4.846161509 -0.085576919
0
4.375 -0.058260084 -4.988411349 4.98875155 -1.582474882 0 2 4 6 8 10
5 -5 0 5 3.141592654 Frequency(Hz)
5.625 -0.058260084 4.988411349 4.98875155 1.582474882
6.25 4.828427125 0.414213562 4.846161509 0.085576919 Phase spectrum
6.875 1.140652284 -4.237840511 4.388664925 -1.307868654 4
7.5 -3 -2 3.605551275 -2.55359005
8.125 -2.554865846 1.176373052 2.812684314 2.710087387 3

8.75 -0.828427125 2.414213562 2.552394685 1.901351909 2


9.375 1.472473646 2.402624911 2.817939868 1.020974282
1

Phase
0
0 2 4 6 8 10
-1

-2

-3

-4
Frequency(Hz)

2. Waveform data processing 31


Fourier transform using Excel (Decomposition in Fourier series)
Time (sec)
Frequency(Hz) Amplitude(10m) Phase(10m) n 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5
0
0.625
3 0
2.817939868 -1.020974282
0
1
0.19
0.09
0.19
0.14
0.19
0.17
0.19
0.17
0.19
0.15
0.19
0.1
0.19
0.04
0.19
-0
0.19
-0.1
0.19
-0.1
0.19
-0.2
0.19
-0.2
0.19
-0.2
0.19
-0.1
0.19
-0
0.19
0.03
𝑎 = 𝐴 𝑓 ∙ cos(𝜙(𝑓) + 2𝜋𝑛 ∙ 𝑡/1.6)
1.25 2.552394685 -1.901351909 2 -0.1 0.07 0.15 0.14 0.05 -0.1 -0.2 -0.1 -0.1 0.07 0.15 0.14 0.05 -0.1 -0.2 -0.1
1.875 2.812684314 -2.710087387 3 -0.2 0.01 0.16 0.12 -0.1 -0.2 -0.1 0.13 0.16 -0 -0.2 -0.1 0.07 0.18 0.06 -0.1
2.5 3.605551275 2.55359005 4 -0.2 -0.1 0.19 0.13 -0.2 -0.1 0.19 0.13 -0.2 -0.1 0.19 0.13 -0.2 -0.1 0.19 0.13
3.125 4.388664925 1.307868654 5 0.07 -0.3 0.14 0.17 -0.3 0.04 0.24 -0.2 -0.1 0.27 -0.1 -0.2 0.26 -0 -0.2 0.22
3.75
4.375
4.846161509 -0.085576919
4.98875155 -1.582474882
6
7
0.3
-0
-0.2
0.12
-0
-0.2
0.23
0.29
-0.3
-0.3
0.2
0.29
0.03
-0.2
-0.2
0.12
0.3
0
-0.2
-0.1
-0
0.22
0.23
-0.3
-0.3
0.31
0.2
-0.3
0.03
0.22
-0.2
-0.1
A(f) : Amplitude
5
5.625
5
4.98875155
3.141592654
1.582474882
8
9
-0.3
-0
0.31
0.12
-0.3
-0.2
0.31
0.29
-0.3
-0.3
0.31
0.29
-0.3
-0.2
0.31
0.12
-0.3
0
0.31
-0.1
-0.3
0.22
0.31
-0.3
-0.3
0.31
0.31
-0.3
-0.3
0.22
0.31
-0.1
(f) : Phase
6.25 4.846161509 0.085576919 10 0.3 -0.2 -0 0.23 -0.3 0.2 0.03 -0.2 0.3 -0.2 -0 0.23 -0.3 0.2 0.03 -0.2
6.875 4.388664925 -1.307868654 11 0.07 -0.3 0.14 0.17 -0.3 0.04 0.24 -0.2 -0.1 0.27 -0.1 -0.2 0.26 -0 -0.2 0.22
7.5 3.605551275 -2.55359005 12 -0.2 -0.1 0.19 0.13 -0.2 -0.1 0.19 0.12 -0.2 -0.1 0.19 0.12 -0.2 -0.1 0.19 0.12
8.125 2.812684314 2.710087387 13 -0.2 0.01 0.16 0.12 -0.1 -0.2 -0.1 0.13 0.16 -0 -0.2 -0.1 0.07 0.18 0.06 -0.1
8.75 2.552394685 1.901351909 14 -0.1 0.07 0.15 0.14 0.05 -0.1 -0.2 -0.1 -0.1 0.07 0.15 0.14 0.05 -0.1 -0.2 -0.1
9.375 2.817939868 1.020974282 15 0.09 0.14 0.17 0.17 0.15 0.1 0.04 -0 -0.1 -0.1 -0.2 -0.2 -0.2 -0.1 -0 0.03

Total 0 0 1 3 -2 1 -0 -0 -0 -0 -0 0 0 -0 0 0

0.4

0.3

0.2 0Hz
0.625Hz
0.1 1.25Hz
Amplitude

1.875Hz
0 2.5Hz
3.125Hz
-0.1 3.75Hz
4.375Hz
-0.2 5Hz

-0.3

-0.4
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Time(sec)

2. Waveform data processing 32


Fourier transform by Python
import numpy as np fft and cc.ipynb
import matplotlib.pyplot as plt
import math
Results
f=[0,0,1,3,-2,1,0,0,0,0,0,0,0,0,0,0]
g=[0,0,0,1,3,-2,1,0,0,0,0,0,0,0,0,0]

plt.plot(f)
plt.plot(g)

F = np.fft.fft(f)
G = np.fft.fft(g)

freq = np.fft.fftfreq(16, d=0.1)

print(F) Results
print(freq)

plt.plot(abs(F))
2. Waveform data processing 33
Install SeisImager

2. Waveform data processing 34

You might also like