PART 1 Review of DSP Mauricio Sacchi University of Alberta, Edmonton, AB, Canada The Fourier Transform F() = f (t) = 1 2π f (t)e it dt F()e it d Fourier Transform Inverse Transform f (t) F () Part 1 Review of DSP 2 1
Forward / Inverse Pairs FT -1 f (t) F() FT Part 1 Review of DSP 3 Amplitude and Phase Amplitude and Phase of a complex number X = R + i G α = tan 1 G R G A X = R + i G A = (R 2 + G 2 ) α R Part 1 Review of DSP 4 2
Amplitude and Phase Amplitude and Phase of the FT F() = R() + i G() α() = tan 1 G() R() G A X = R + i G A() = (R() 2 + G() 2 ) α R Part 1 Review of DSP 5 Symmetries of the FT If the signal is real, then R() = R( ) Even A() = A( ) G() = G( ) Odd α() = α() Part 1 Review of DSP 6 3
FT: a simple physical interpretation A signal can be represented as a superposition of elementary signals (complex exponentials) of frequency k scaled by a complex amplitude F( k ) f (t) = 1 2π F()e it d Δ 2π f (t) f k (t), f k (t) = Δ 2π F( k )ei k t k k F( k )e i k t Part 1 Review of DSP 7 Properties of the FT f (t) F () g(t) G() Linearity Scale Shifting Modulation in time Convolution Convolution in Frequency f (t) + g(t) F() + G() f (ta) 1 a F ( a ) f (t τ ) F ()e iτ f (t)e iϕ t F( ϕ) f (τ )g(t τ )dτ F()G() f (t)g(t) 1 2π F(ϕ)G( ϕ)dϕ Part 1 Review of DSP 8 4
Delta function f (t) F () δ (t) 1 f (t) = δ (t) F() = 1 t 1 represents the delta function which cannot be drawn Part 1 Review of DSP 9 Cosine f (t) = cos( 0 t), < t < f (t) R() t G() f (t) F() = R() + ig() cos( 0 t) πδ ( 0 ) + πδ ( + 0 ) Part 1 Review of DSP 10 5
Sine f (t) = sin( 0 t), < t < f (t) R() t f (t) F() = R() + ig() G() sin( 0 t) i πδ ( 0 ) + i πδ ( + 0 ) Part 1 Review of DSP 11 Truncation: zeros or??? Atmospheric pressure FCAG - UNLP - La Plata (1909-1989) Part 1 Review of DSP 12 6
Boxcar FT of the truncation operator (Boxcar) t t Part 1 Review of DSP 13 The truncation problem Time Frequency Desire Aperture X t 0 * 2 Peaks Acquisition window t 0 = = 1 Peak Data t 0 Part 1 Review of DSP 14 7
The discrete world Analog signals (waveforms) are transformed into digital signals by acquisition systems How the FT of the true underlying continue signal/process relates to its discrete version?? This is answered by Nyquist theorem Acquisition System Time (s) Sample * Part 1 Review of DSP 15 The discrete world Analog signal Digital Signal sampled every Δt secs s(t) S() s(t n ) S d () t n = (n 1) Δt Part 1 Review of DSP 16 8
Nyquist theorem The FT of the discrete signal is a distorted version of the FT of the analog signal. The distortion is given by Poisson Formula: This formula can be found in any book on harmonic analiyis S d () = 1 Δt S( k 0 ), 0 = 2π Δt k= What you can measure S() is what you would have liked to measure Part 1 Review of DSP 17 Nyquist theorem Nyquist theorem or formula provides the sampling condition to compute the FT of the discrete signal is such a way that it is a perfect representation of the FT of the analog signal. The theorem is derived by simple inspection of Poisson formula. In a graphical manner: S d () = 1 S( k 0 ), 0 = 2π Δt Δt k= S() max S d () max S( + 2 0 ) S( + 0 ) S() S( 0 ) S( 2 0 ) 2 0 0 max max 0 2 0 Non-aliased Spectrum 2 max < 0 Part 1 Review of DSP 18 9
Nyquist theorem S d () = 1 S( k 0 ), 0 = 2π Δt Δt k= S() max S d () max S( + 2 0 ) S( + 0 ) S() S( 0 ) S( 2 0 ) 2 0 0 max max 0 2 0 Non-aliased Spectrum 2 max = 0 Part 1 Review of DSP 19 Nyquist theorem S d () = 1 S( k 0 ), 0 = 2π Δt Δt k= S() max S d () max S( + 2 0 ) S( + 0 ) S() S( 0 ) S( 2 0 ) 2 0 0 0 2 0 Non-aliased Spectrum 2 max > 0 Part 1 Review of DSP 20 10
Nyquist theorem S d () = 1 S( k 0 ), 0 = 2π Δt Δt k= S() Alias, the true spectrum is distorted!! S( + 2 0 ) S( + 0 ) max S d () S() max S( 0 ) S( 2 0 ) 2 0 0 0 2 0 Non-aliased Spectrum 2 max > 0 Part 1 Review of DSP 21 Nyquist theorem From the previous figures we have found the condition to avoid aliasing: 2 max < 0 0 = 2π /Δt max < π /Δt If we prefer to use frequency (Hz) rather than angular frequency (rad/sec): 1 2π f max < π /Δt Δt < 2 f max Famous Nyquist condition Part 1 Review of DSP 22 11
Nyquist theorem From now on, we consider signals where the sampling interval satisfies the Nyquist condition. It is clear that discrete signals must arise from the discretization of a band-limited analog signal. Electronic filters are often placed prior to discretization to guarantee that the signal to sample does contain not energy above a maximum frequency. Nyquist condition is easy to satisfied in the time domain (temporal sampling) Spatial sampling is often dictated by cost & logistics not by hardware!! Δx Multi-dimensional sampling in space is a problem of current research since prestack seismic data are often under sampled in one or more coordinates (4 spatial coordinates) x Part 1 Review of DSP 23 DFT When dealing with discrete time series or evenly sample data along the spatial domain we will use the Discrete Fourier Transform (DFT) S() = N 1 k= 0 s k e ik : angular frequency [rads, no dimensions] l = 2π l N S( l ) = N 1 k= 0, l = 0,...N 1 discrete angular frequency s k e i l k Example N=8 = π, k = 4 = π /2,k = 2 = 0,k = 0 = π /2,k = 6 Part 1 Review of DSP 24 12
IDFT We also need a transform to come back Inverse Discrete Fourier Transform (IDFT) s k = 1 N A note about frequency N 1 k= 0 S( l )e i l k l = 2π l N l = 2π l N Δt,, l = 0,...N 1 f l = l 2π = l N Δt, discrete angular frequency radians/secs Hertz Part 1 Review of DSP 25 Notes Wrong wording à The FFT Spectrum, You should say the DFT Spectrum because the FFT is just the tool that is used to compute the DFT in a fast way Remember that to apply the DFT is equivalent to multiply a Matrix times a Vector (N 2 operations) FFT is a simple matrix multiplication via a faster algorithm ( N log 2 N operations ) Part 1 Review of DSP 26 13
Linear systems Linear systems An easy way of describing physical phenomena A good approximation to some inverse problems in geophysics Given x 1 (t) y 1 (t) x 2 (t) y 2 (t) The system is linear if αx 1 (t) + β x 2 (t) α y 1 (t) + β y 2 (t) Part 1 Review of DSP 27 Linear systems x 1 (t) x 2 (t) LS LS y 1 (t) y 2 (t) αx 1 (t) + β x 2 (t) LS α y 1 (t) + β y 2 (t) LS: Linear System (the Earth, if you do not consider important phenomena!) Part 1 Review of DSP 28 14
Linear systems and Invariance Invariance [Linear Time Invariant System] Consider a system that is linear and also impose the condition of invariance: x (t) y(t) x(t τ ) y(t τ ) x(t) x(t τ ) τ LTIS LTIS τ y(t) y(t τ ) Example: deconvolution operator Part 1 Review of DSP 29 Linear systems and Invariance If the system is linear and time invariant, input and output are related by the following expression (it can be proven) y(t) = h(t τ )x(τ )dτ = h(t) * x(t) Convolution Symbol We are saying that if our process is represented by an LTIS then the I/O can be represented via a convolution integral The new signal h(t) is called the impulse response of the system Part 1 Review of DSP 30 15
Linear systems and Invariance Impulse response (hitting the system with an impulse) y(t) = h(t τ )x(τ )dτ = h(t) * x(t) x(t) = δ (t) x(t) h(t) h(t) h(t) y(t) Input δ (t) h(t) Input Part 1 Review of DSP 31 Linear systems and Invariance - Discrete case Convolution Sum y n = h k n x k = h n * x n k Signals are time series or vectors x = [1,0,0,0,0,0...] h h = [h 0,h 1,h 2,...] x = [ x 0, x 1, x 2,...] h y = [ y 0, y 1, y 2,...] Part 1 Review of DSP 32 16
Discrete convolution Formula Finite length signals y n = h n k x k = h n * x n k x k, k = 0,NX 1 y k, h k, k = 0,NY 1 k = 0,NH 1 How do we do the convolution with finite length signals? With paper and pencil Computer code Matrix times vector Polinomial multiplication DFT Part 1 Review of DSP 33 Discrete convolution % Initialize output y(1: NX + HH -1) = 0 % Do convolution sum for i = 1: NX for j = 1: NH y(i+ j -1) = y(i+ j -1) + x(i)h(j) end end Part 1 Review of DSP 34 17
Discrete convolution Example: x = [ x 0, x 1, x 2, x 3, x 4 ], NX = 5 h = [h 0,h 1,h 2 ], NH = 3 y 0 = x 0 h 0 y 1 = x 1 h 0 + x 0 h 1 y 2 = x 2 h 0 + x 1 h 1 + x 0 h 2 y 3 = x 3 h 0 + x 2 h 1 + x 1 h 2 y 4 = x 4 h 0 + x 3 h 1 + x 2 h 2 y 5 = x 4 h 1 + x 3 h 2 y 6 = x 4 h 2 " # y 0 y 1 y 2 y 3 y 4 y 5 y 6 y n = h k n x k = h n * x n k % " x 0 0 0 % ' ' ' x 1 x 0 0 ' ' x 2 x 1 x 0 ' " ' ' ' = x 3 x 2 x 1 ' ' x 4 x 3 x 2 ' # ' ' 0 x 4 x 3 ' ' & # 0 0 x 4 & h 0 h 1 h 2 % ' ' & Part 1 Review of DSP 35 Transient-free Convolution Matrix " # y 0 y 1 y 2 y 3 y 4 y 5 y 6 % " x 0 0 0 % ' ' ' x 1 x 0 0 ' ' x 2 x 1 x 0 ' " ' ' ' = x 3 x 2 x 1 ' ' x 4 x 3 x 2 ' # ' ' 0 x 4 x 3 ' ' & # 0 0 x 4 & Classical convolution h 0 h 1 h 2 % ' ' & " # y 2 y 3 y 4 % " x 2 x 1 x 0 % " ' ' = ' x 3 x 2 x 1 ' & # x 4 x 3 x 2 & # h 0 h 1 h 2 Transient-free convolution % ' ' & Part 1 Review of DSP 36 18
Discrete convolution and the z-transform Z-transform: a compact way of dealing with time series The z-transform of x = [ x 0, x 1, x 2, x 3, x 4 ], NX = 5 is given by X(z) = x 0 + x 1 z + x 2 z 2 + x 3 z 3 + x 4 z 4 Example: x = [2, 1,3] Casual x = [ 1,2, 1,3] Non-causal X(z) = 2 1z + 3z 2 X(z) = 1z 1 + 2 1z + 3z 2 Indicates sample n=0 Part 1 Review of DSP 37 What can we do with the z-transform? Convolve series x = [ x 0, x 1, x 2, x 3, x 4 ] h = [h 0,h 1,h 2 ] y = x * h X(z) = x 0 + x 1 z + x 2 z 2 + x 3 z 3 + x 4 z 4 H (z) = h 0 + h 1 z + h 2 z Y (z) = X(z).H (z) Design inverse filters (finally some seismology ) x Unknown Filter h y Let s see how one can use the z-transform to find Inverse Filters of simple signals Part 1 Review of DSP 38 19
Dipoles and inverse of a dipole Dipole: a signal made of two elements x = [1,a] h y = [1,0] Unknown Inverse filter that turns the dipole into a spike Find the inverse filter with the z-transform: X(z) = 1+ az, Y (z) = 1 Geometric Series y = x * h Y (z) = X (z).h (z) H (z) = Y (z) X (z) = 1 1+ az = 1 az + a 2 z 2 a 3 z 3 + a 4 z 4... h = [1, a,a 2, a 3,a 4,...] Part 1 Review of DSP 39 Inversion of a dipole using geometric series x = [1,a] h y a = 0.5 a = 0.5 Part 1 Review of DSP 40 20
Inversion of a dipole using geometric series: Truncation of the operator x = [1,a] h y a = 0.99 a = 0.99 Part 1 Review of DSP 41 Inversion of a dipole using geometric series: Deconvolution of a simple reflectivity series x = [1,a] h y Filter design a = 0.5 r s = x * r r = h * s Filter Application Part 1 Review of DSP 42 21
Inversion of a dipole using geometric series: Deconvolution of a simple reflectivity series Truncation in the operator introduces false reflections in the deconvolution output x = [1,a] h y Filter design a = 0.99 r s = x * r r = h * s Wrong estimate of the reflectivity Filter Application Part 1 Review of DSP 43 Minimum and Maximum Phase dipoles In simple terms Minimum Phase Maximum Phase x = [1,a], a < 1 x = [1,a], a > 1 Min Max Part 1 Review of DSP 44 22
Dipoles and Phase duality Take two dipoles x MIN = [1,a], a < 1 x MAX = [a,1] = a[1,1/a] = a[1,b], b > 1 You can show that X MAX () = X MIN () θ MAX () θ MIN () Same amplitude spectrum Different phase spectrum If only the amplitude spectrum is measured, one cannot uniquely determine the dipole (two dipoles produce the same amplitude) Part 1 Review of DSP 45 Dipoles and Phase duality x MIN = [1,a], a < 1 x MAX = [a,1] = a[1,1/a] = a[1,b], b > 1 Part 1 Review of DSP 46 23
Dipole filters - careful here Some signal processing schemes attempt o increase BW by convolution with dipole filters. The amplitude spectrum of the dipole filter can be Low Pass or High Pass according to the sign of a Examples: Low Pass x MIN = [1,a], a = 0.9 High Pass x MIN = [1,a], a = 0.9 Part 1 Review of DSP 47 Dipole filters - careful here Differentiator (Extreme High Pass dipole) Examples: Wavelet convolved n times with differentiator - Cosmetic freq. enhancement?? N=4 High Pass x = [1,a], a = 1 N=1 Wavelet Part 1 Review of DSP 48 24
Dipole filters - careful here N=2 (two differentiations) Reflectivity Data Data after 2 differentiations Part 1 Review of DSP 49 Dipole filters - careful here N=2 (two differentiations) Oops!! Reflectivity Data Data after 2 differentiations Part 1 Review of DSP 50 25
More about dipoles: Spectral Decomposition Some modern seismic interpretation methods are based on properties of dipoles filters Spectral Decomposition attempts to image thing layers by the spectral behaviour of signals similar to dipoles Impedance Reflectivity Trace Amplitude Spectrum Time Time This is the basis of spectral decomposition. Partyka, G., 2005, Spectral Decomposition: Recorder, 30 (www.cseg.ca). Time Frequency Spectral notch is proportional to layer thickness One, for instance, can map the amplitude at that particular frequency. This will provide an attribute for the x-y variability of layer thickness Interesting to point out that rather than whitening (flattening) the spectrum like in conventional decon, spectral decomposition attempts to track spectral features/attributes Part 1 Review of DSP 51 More about dipoles: Spectral Decomposition τ = 4.Δt Thin Layer r = [a,0,0,0,0,b,0,0,0...] R() = a + be iτ Spectrum R() 2 = a 2 + b 2 + 2 a b cos(τ ) Min/Max condition Frequency at stationary point d R() 2 = 0 sin(τ ) = 0 τ = πk, k = 0,1,2,3,4 d f s = k /(2τ ) The second derivative can be used to determine if the stationary point is a min or max. Min or max depends on the signs of the reflection coefficients a and b. Part 1 Review of DSP 52 26
More about dipoles: Spectral Decomposition For trace #3: τ = 0.028s T (s) f (Hz) f s = 17.8, 35.7, 53.6, 71.4Hz Part 1 Review of DSP 53 More about dipoles: Spectral Decomposition For trace #3: τ = 0.028s T (s) f (Hz) f s = 17.8, 35.7, 53.6, 71.4Hz Part 1 Review of DSP 54 27
More about dipoles: Spectral Decomposition For trace #3: τ = 0.028s T (s) f (Hz) f s = 17.8, 35.7, 53.6, 71.4Hz Part 1 Review of DSP 55 28