Presentation is loading. Please wait.

Presentation is loading. Please wait.

Environmental Data Analysis with MatLab Lecture 11: Lessons Learned from the Fourier Transform.

Similar presentations


Presentation on theme: "Environmental Data Analysis with MatLab Lecture 11: Lessons Learned from the Fourier Transform."— Presentation transcript:

1 Environmental Data Analysis with MatLab Lecture 11: Lessons Learned from the Fourier Transform

2 Lecture 01Using MatLab Lecture 02Looking At Data Lecture 03Probability and Measurement Error Lecture 04Multivariate Distributions Lecture 05Linear Models Lecture 06The Principle of Least Squares Lecture 07Prior Information Lecture 08Solving Generalized Least Squares Problems Lecture 09Fourier Series Lecture 10Complex Fourier Series Lecture 11Lessons Learned from the Fourier Transform Lecture 12Power Spectra Lecture 13Filter Theory Lecture 14Applications of Filters Lecture 15Factor Analysis Lecture 16Orthogonal functions Lecture 17Covariance and Autocorrelation Lecture 18Cross-correlation Lecture 19Smoothing, Correlation and Spectra Lecture 20Coherence; Tapering and Spectral Analysis Lecture 21Interpolation Lecture 22 Hypothesis testing Lecture 23 Hypothesis Testing continued; F-Tests Lecture 24 Confidence Limits of Spectra, Bootstraps SYLLABUS

3 purpose of the lecture understand some of the properties of the Discrete Fourier Transform

4 from last week … time series = sum of sines and cosines remember exp(iωt) = cos(ωt) + i sin(ωt) k

5 time series from last week … Discrete Fourier Transform of a time series coefficients power spectral density = 2

6 didi titi Δt time series

7 didi titi Δt a time series is a discrete representation of a continuous function continuous function

8 d(t) t continuous function What happens when to the Discrete Fourier Transform when we switch from discrete to continuous?

9 Discrete Fourier Transform Fourier Transform turns into

10 note the use of the tilde to distinguish a the Fourier Transform from the function itself. The two functions are different! Fourier Transform

11 function of timefunction of frequency Fourier Transform power spectral density = 2

12 function of time function of frequency the inverse of the Fourier Transform is

13 t recall that an integral can be approximated by a summation integral = area under curve =  area of rectangle =  width × height = Δt  i  f(t i ) f(t) f(t i ) Δt titi

14 then if we use N rectangles each of width Δ t and each of height d(t k ) exp(-iωt k ) then the Fourier Transform becomes provided that d(t) is “transient” zero outside of the interval (0,t max )

15 so except for a scaling factor of Δ t the Discrete Fourier Transform is the discrete version of the Fourier Transform of a transient function, d(t) scaling factor

16 similarly the Fourier Series is an approximation of the Inverse Fourier Transform Inverse Fourier TransformFourier Series (up to an overall scaling of Δω )

17 Fourier Transform in some ways integrals are easier to work with than summations

18 Property 1 the Fourier Transform of a Normal curve with variance σ t 2 is a Normal curve with variance σ ω 2 = σ t -2

19 let a 2 = ½σ t -2 [cos(ωt ) + i sin(ωt )] dt cos(ωt ) dt + i sin(ωt ) dt symmetric about zeroantisymmetric about zero so integral zero Normal curve with variance ½a -2 = σ t 2

20 look up in table of integrals Normal curve with variance 2a 2 = σ t -2

21 time series with broad features Fourier Transform with mostly low frequencies power spectral density with mostly low frequencies time series with narrow features Fourier Transform with both low and high frequencies power spectral density with broad range of frequencies

22 increasing variance time, t frequency, f A) increasing variance B) t max f max 00

23 Property 2 the Fourier Transform of a spike is constant

24 spike “Dirac Delta Function” Normal curve with infinitesimal variance infinitely high but always has unit area

25 δ(t-t 0 ) t depiction of spike t0t0

26 important property of spike

27 t since the spike is zero everywhere except t 0 t0t0 t t0t0 f(t 0 ) this product … … is equivalent to this one

28 so

29 use the previous result when computing the Fourier Transform of a spike

30 A spiky time series has a “flat” Fourier Transform and a “flat” power spectral density

31 A) spike function B) its transform frequency, f time, t d(t) d(f) ^

32 Property 3 the Fourier Transform of cos(ω 0 t ) is a pair of spikes at frequencies ±ω 0

33 cos(ω 0 t ) has Fourier Trnsform

34 as is shown by inserting into the Inverse Fourier Transform

35 An oscillatory time series has spiky Fourier Transform and a power spectral density with spectral peaks

36 Property 4 the area under a time series is the zero-frequency value of the Fourier Transform

37

38 A time series with zero mean has a Fourier Transform that is zero at zero frequency

39 MatLab dt=fft(d); area = real(dt(1));

40 Property 5 multiplying the Fourier Transform by exp( -i ω t 0 ) delays the time series by t 0

41 use transformation of variables t’ = t - t 0 and note dt’ = dt and t  ±∞ corresponds to t’  ±∞

42 d(t) time, t d(t) d shifted (t)

43 MatLab t0 = t(16); ds=ifft(exp(-i*w*t0).*fft(d));

44 Property 6 multiplying the Fourier Transform by i ω differentiates the time series

45

46 use integration by parts and assume that the times series is zero as t  ±∞ dvuuvduv

47 time, t A) B) C) d(t) dd/dt

48 MatLab dddt=ifft(i*w.*fft(d));

49 Property 7 dividing the Fourier Transform by i ω integrates the time series

50 this is another derivation by integration by parts but we’re skipping it here

51 Fourier Transform of integral of d(t) note that the zero-frequency value is undefined (divide by zero) this is the “integration constant”

52 time, t A) B) C) d(t)  d(t) dt

53 MatLab int2=ifft(i*fft(d).*[0,1./w(2:N)']'); set to zero to avoid dividing by zero (equivalent to an integration constant of zero)

54 Property 8 Fourier Transform of the convolution of two time series is the product of their transforms

55 What’s a convolution ?

56 the convolution of f(t) and g(t) is the integral which is often abbreviated f(t) * g(t) not multiplication not complex conjugation (too many uses of the asterisk!)

57 uses of convolutions will be presented in the lecture after next right now, just treat it as a mathematical quantity

58

59 transformation of variables t’ = t-τ so dt’ = dt and t’  ±∞ when t  ± reverse order of integration change variables: t’ = t-τ use exp(a+b)=exp(a)exp(b) rearrange into the product of two separate Fourier Transforms

60 Summary 1.FT of a Normal is a Normal curve 2.FT of a spike is constant. 3.FT of a cosine is a pair of spikes 4.Multiplying FT by exp( -i ω t 0 ) delays time series 5.Multiplying the FT by i ω differentiates the time series 6.Dividing the FT by i ω integrates the time series 7.FT of convolution is product of FT’s


Download ppt "Environmental Data Analysis with MatLab Lecture 11: Lessons Learned from the Fourier Transform."

Similar presentations


Ads by Google