MatLab 2 nd Edition Lecture 19 Smoothing Correlation and Spectra Lecture 01 Using MatLab Lecture 02 Looking At Data Lecture 03 Probability and Measurement Error Lecture 04 Multivariate Distributions ID: 783752
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.
Slide1
Environmental Data Analysis with MatLab2nd Edition
Lecture 19:
Smoothing, Correlation and Spectra
Slide2Lecture 01 Using MatLabLecture 02 Looking At Data
Lecture 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 Problems Lecture 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 Interpolation Lecture 22 Linear Approximations and Non Linear Least Squares Lecture 23 Adaptable Approximations with Neural NetworksLecture 24 Hypothesis testing Lecture 25 Hypothesis Testing continued; F-TestsLecture 26 Confidence Limits of Spectra, Bootstraps
SYLLABUS
Slide3Goals of the lectureexamine interrelationships betweensmoothing, correlation and power spectral density
Slide4review
Slide5AutocorrelationandCross-correlation
Slide6Autocorrelation
Measure of correlation in time series
at different lagstu(t)
Slide7Autocorrelation
Measure of correlation in time series
at different lagsttlag, t
a(t)
0
lag, multiply and sum area
no lag
Slide8Autocorrelation
Measure of correlation in time series
at different lagsttlag, t
a(t)
0
lag, multiply and sum area
small lag
Slide9Autocorrelation
Measure of correlation in time series
at different lagsttlag, t
a(t)
0
lag, multiply and sum area
large lag
Slide10Autocorrelation
Measure of correlation in time series
at different lagsttlag, t
a(t)
0
lag, multiply and sum area
Slide11Autocorrelation
Measure of correlation in time series
at different lagsttlag, t
a(t)
0
lag, multiply and sum area
a(t)=u(t)
⋆
u(t)
Slide12crooss
-correlation
Measure of correlation between two time seriesat different lagst
t
u(t)
v(t)
Slide13crooss
-correlation
Measure of correlation between two time seriesat different lagst
t
u(t)
v(t)
c(t)=u(t)
⋆
v(t)
Slide14important relationshipsc(t) = u(t)⋆v(t) = u(-t)*v(t)c(
ω
) = u*(ω) v(ω) a(ω)= |u(ω)|2
Slide15rough time series
frequency,
ω0
t
u(t)
lag, t
a(t)
0
sharp autocorrelation
wide spectrum
|u(
ω
)|
2
Slide16smooth time series
frequency,
ω0tu(t)lag, ta(t)0wide autocorrelationnarrow spectrum|u(ω)|2
Slide17lag, t
a(t)
0rough timeserieslag, ta(t)0
t
v(t)
t
v(t)
lag, t
a(t)
0
Slide18Part 1Smoothing a Time Series
Slide19smoothing as filtering(example of 3-point smoothing)
Slide20non-causal
smoothing as filtering
(example of 3-point smoothing)
Slide21fix-up
allow for a delay
Slide22fix-upallow for a delay
d
smoothed and delayed = s * dobscausal filter, s
Slide23triangular smoothing filters
s
i
s
i
index,
i
index,
i
3 points
21 points
Slide24smoothing if
Neuse River Hydrograph
Slide25questionhow does smoothing effect thethe autocorrelation of
d
Slide26answerthe autocorrelation of s
acts as a smoothing filter on
the autocorrelation of d
Slide27effect of smoothing on autocorrelation
Slide28effect of smoothing on autocorrelation
autocorrelation of smoothed time series
Slide29effect of smoothing on autocorrelation
autocorrelation of smoothed time series
everything written as convolution
Slide30effect of smoothing on autocorrelation
autocorrelation of smoothed time series
everything written as convolutionregrouped
Slide31effect of smoothing on autocorrelation
autocorrelation of smoothing filter
autocorrelation of time seriesconvolved with*
Slide32answerthe autocorrelation of s
acts as a smoothing filter on
the autocorrelation of d
Slide33Part 2What Makes a Good Smoothing Filter?
Slide34then by the convolution theorem
d
smoothed(t) = s(t) * dobs(t)
Slide35then by the convolution theorem
d
smoothed(t) = s(t) * dobs(t)so what’s this look like?
Slide36example of auniform or “boxcar” smoothing filter
s(t)
time, tT
0
1/T
Slide37take Fourier Transform
where
sinc(x) = sin(πx) / (πx)
Slide38A) T=3
B)
T=21
Slide39B) T=21
falls off with frequency (good)
Slide40B) T=21
bumpy side lobes (bad)
Slide41a box car filter does not suppress high frequencies evenlythe challenge
find a filter
that suppresses high frequencies evenly
Slide42Normal FunctionFourier Transform of a Normal Functionis aNormal Function(which has no side lobes)
Slide43A) L=3
B)
T=21B) T=3
Slide44but a Normal Functionis non-causal(unless you truncate it, in which case it is not exactly a Normal Function)
Slide45Normal FunctionBox
Car
Trianglesimplicitysidelobes
Slide46Part 3Designing a Filter that Suppresses Specific Frequencies
Slide47General form of the IIR Filter, f
Slide48z-transform of the IIR filter
Slide49General form of the IIR Filter
z-transform
Slide50General form of the IIR Filter
z-transform
ratio of polynomials
Slide51z-transform
v(z)
as a product of its factorsu(z) as a product of its factorsroots of u(z)
roots of
v(z)
z-transform of the IIR filter
ratio of polynomials
Slide52so designing a filteris equivalent tospecifying the roots
of the two
polynomailsu(z) and v(z)
Slide53at this point we need to explore the relationship between theFourier Transformand the
z-transform
Slide54Answerthe Fourier Transformis thez-transformevaluated at a specific set of
z’s
Slide55Relationship between Fourier Transform and Z-transform
since
Slide56Relationship between Fourier Transform and Z-transform
since
Fourier Transform
Slide57Relationship between Fourier Transform and Z-transform
since
Fourier Transformdiscrete times and frequencies
Slide58Relationship between Fourier Transform and Z-transform
since
Fourier Transformdiscrete times and frequenciesz-transform
Slide59Relationship between Fourier Transform and Z-transform
since
Fourier Transformdiscrete times and frequenciesz-transform
specific choice of
z’
s
Slide60in wordsthe Fourier Transformis thez-transformevaluated at a specific set of
z’s
Slide61there are N specific z’s
z
kor with θ
Slide62real zq
imag
zunit circle, |z|2=1they plot as equally-spaced points around a “unit circle” in the complex z-plane
zero frequency
Nyquist
frequency
Slide63Back to the IIR Filter
roots of
u(z)roots of v(z)
Slide64Back to the IIR Filter(z-
z
ju) is zero at z=zjuproduces a low amplitude region near z=zjucalled a “zero”
Slide65Back to the IIR Filter1/(z-
z
kv) is infinite at z=zkuproduces a high amplitude region near z=zkvcalled a “pole”
Slide66so build a filter by placing the poles and zeros atstrategic points in the complex z-plane
Slide67Rules zeros suppress frequencies
poles amplify frequencies
all poles must be outside the unit circle(so vinv converges)all poles, zeros must be in complex conjugate pairs(so filter is real)
Slide68A)
B)
Slide69A)
B)
zero near zero frequency suppresses low frequencies“high pass filter”zero near the Nyquist frequency suppresses high frequencies“low pass filter”
Slide70A)
B)
Slide71A)
B)
poles near ± a given frequency amplify that frequency“band pass filter”
poles and zeros near
± a given
frequency attenuate that frequency
“notch filter”
Slide72something usefula tunable band pass filter
frequency,
f-fny+fny0|f(ω)|
2
f
1
f
2
-f
2
-f
1
Slide73Chebychev
band-pass filter: 4 zeros, 4 poles
Slide74Chebychev
band-pass filter: 4 zeros, 4 poles
2 zeros2 zerospole
pole
pole
pole
Slide75Slide76not quite as boxy as one might hope …
Slide77Slide78In MatLab
Slide79Ground velocity at Palisades NY
Slide80Ground velocity at Palisades NYLow pass filter
Slide81Ground velocity at Palisades NYhigh pass filter