/
Environmental Data Analysis with Environmental Data Analysis with

Environmental Data Analysis with - PowerPoint Presentation

bikersquackers
bikersquackers . @bikersquackers
Follow
342 views
Uploaded On 2020-06-22

Environmental Data Analysis with - PPT Presentation

MatLab Lecture 9 Fourier Series Lecture 01 Using MatLab Lecture 02 Looking At Data Lecture 03 Probability and Measurement Error Lecture 04 Multivariate Distributions Lecture 05 ID: 783489

lecture cos frequencies frequency cos lecture frequency frequencies fourier time sin data number spectral axis gtgi series model matlab

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "Environmental Data Analysis with" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Environmental Data Analysis with MatLab

Lecture 9:

Fourier Series

Slide2

Lecture 01

Using

MatLabLecture 02 Looking At DataLecture 03 Probability and Measurement Error Lecture 04 Multivariate DistributionsLecture 05 Linear ModelsLecture 06 The Principle of Least SquaresLecture 07 Prior InformationLecture 08 Solving Generalized Least Squares ProblemsLecture 09 Fourier SeriesLecture 10 Complex Fourier SeriesLecture 11 Lessons Learned from the Fourier Transform Lecture 12 Power SpectraLecture 13 Filter Theory Lecture 14 Applications of Filters Lecture 15 Factor Analysis Lecture 16 Orthogonal functions Lecture 17 Covariance and AutocorrelationLecture 18 Cross-correlationLecture 19 Smoothing, Correlation and SpectraLecture 20 Coherence; Tapering and Spectral Analysis Lecture 21 InterpolationLecture 22 Hypothesis testing Lecture 23 Hypothesis Testing continued; F-TestsLecture 24 Confidence Limits of Spectra, Bootstraps

SYLLABUS

Slide3

purpose of the lecture

detect and quantify periodicities in data

Slide4

importance of periodicities

Slide5

Stream FlowNeuse River

discharge,

cfstime, days365 days1 year

Slide6

Air temperature

Black Rock Forest

365 days1 year

Slide7

Air temperature

Black Rock Forest

time, days1 day

Slide8

temporal periodicitiesand their periods

astronomical

rotationdailyrevolutionyearlyother naturalocean wavesa few secondsanthropogenicelectric power60 Hz

Slide9

delay,

t

0amplitude, Cperiod, Td(t)time, tsinusoidal oscillationf(t) = C cos{ 2π (t-t0

) / T }

Slide10

amplitude, C

lingo

temporalf(t) = C cos{ 2π t / T }spatialf(x) = C cos{ 2π x / λ }

amplitude,

C

period,

T

wavelength,

λ

frequency,

f=1/T

angular frequency,

ω=2

π

/T

wavenumber

,

k=2

π

/

λ

-

f(t)

= C

cos

(

ω

t)

f(x)

= C

cos

(

kx

)

Slide11

spatial periodicitiesand their wavelengths

natural

sand duneshundreds of meterstree ringsa few millimetersanthropogenicfurrows plowedin a fieldfew tens of cm

Slide12

pairing sines and cosines

to avoid using time delays

Slide13

derived using trig identity

A

B

Slide14

A

B

A=C cos(ωt0)B=C sin(ωt0)A2=C cos2 (ωt0)B2=C sin2 (ωt0)

A

2

+B

2

=C

2

[cos

2

(

ω

t

0

)

+sin

2

(

ω

t

0

)]

= C

2

Slide15

Fourier Serieslinear model containing nothing but

sines

and cosines

Slide16

A’s and

B

’s aremodel parametersω’s are auxiliary variables

Slide17

two choices

values of frequencies?

total number of frequencies?

Slide18

surprising fact about time series with evenly sampled data

Nyquist

frequency

Slide19

values of frequencies? evenly spaced,

ω

n = (n-1)Δ ω minimum frequency of zero maximum frequency of fnytotal number of frequencies? N/2+1 number of model parameters, M = number of data, N

Slide20

implies

Slide21

Number of Frequencieswhy

N/2+1

and not N/2 ?first and last sine are omitted from the Fourier Series since they are identically zero:

Slide22

cos

(

Δω t)cos(0t)sin(Δωt)cos(2Δω t)sin(2Δω t)cos(½NΔω t)

Slide23

Nyquist

Sampling Theorem

when m=n+Nanother way of stating itnote evenly sampled times

Slide24

ω

n

= (n-1)Δ ω and tk = (k-1) ΔtStep 1: Insert discrete frequencies and times into l.h.s. of equations.

Slide25

ω

n

= (n-1+N)Δ ω and tk = (k-1) ΔtStep 2: Insert discrete frequencies and times into r.h.s. of equations.

Slide26

same as

l.h.s

.same as l.h.s.Step 3: Note that l.h.s equals r.h.s.

Slide27

when

m=

n+Nor when ωm=ωn+2ωnyonly a 2ωny interval of the ω -axis is uniquesay from-ωny to +ωny Step 4: Identify unique region of ω-axis

Slide28

cos

(

ω t) has same shape as cos(-ω t) andsin(ω t) has same shape as sin(-ω t) so really only the0 to ωnypart of the ω-axis is unique Step 5: Apply symmetry of sines and cosines

Slide29

w

-

wnywny2wny3wny0

equivalent points on the

ω

-axis

Slide30

d

2

(t)d1(t)time, ttime, td1 (t) = cos(w1t), with w1=2Dwd2(t) = cos{w2t}, with w2=(2+N)Dw,

Slide31

problem of aliasing

high frequencies

masquerading as low frequenciessolution:pre-process data to remove high frequenciesbefore digitizing it

Slide32

Discrete Fourier Series

d

= Gm

Slide33

Least

S

quares Solution mest = [GTG]-1 GTdhas substantial simplification… since it can be shown that …

Slide34

% N = number of data, presumed even% Dt

is time sampling interval

t = Dt*[0:N-1]’;Df = 1 / (N * Dt );Dw = 2 * pi / (N * Dt);Nf = N/2+1;Nw = N/2+1;f = Df*[0:N/2];w = Dw*[0:N/2];frequency and time setupin MatLab

Slide35

% set up G G=zeros(N,M); % zero frequency column

G(:,1)=1;

% interior M/2-1 columns for i = [1:M/2-1] j = 2*i; k = j+1; G(:,j)=cos(w(i+1).*t); G(:,k)=sin(w(i+1).*t); end % nyquist column G(:,M)=cos(w(Nw).*t);Building G in MatLab

Slide36

gtgi = 2* ones(M,1)/N; gtgi

(1)=1/N;

gtgi(M)=1/N; mest = gtgi .* (G'*d);solving for model parameters in MatLab

Slide37

how to plot the model parameters?

A

’s and B ’splotagainst frequency

Slide38

power spectral density

big at frequency

ω whenwhen sine or cosine at the frequencyhas a large coefficient

Slide39

alternatively, plot

amplitude spectral density

Slide40

365.2

days

period, daysfrequency, cycles per dayamplitude spectral density182.6 days60.0 daysamplitude spectral densityStream FlowNeuse River

all interesting frequencies

near origin,

so plot period,

T=1/f

instead