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

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

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

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

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

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

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

didi titi Δt time series

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

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

Discrete Fourier Transform Fourier Transform turns into

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

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

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

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

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 )

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

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

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

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

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

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

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

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

Property 2 the Fourier Transform of a spike is constant

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

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

important property of spike

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

so

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

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

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

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

cos(ω 0 t ) has Fourier Trnsform

as is shown by inserting into the Inverse Fourier Transform

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

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

What’s a convolution ?

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!)

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

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

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

Similar presentations