Environmental Data Analysis with MatLab 2 nd Edition Lecture 14: Applications of Filters.

Slides:



Advertisements
Similar presentations
Notes 6.6 Fundamental Theorem of Algebra
Advertisements

Environmental Data Analysis with MatLab Lecture 10: Complex Fourier Series.
Environmental Data Analysis with MatLab
Environmental Data Analysis with MatLab Lecture 21: Interpolation.
Environmental Data Analysis with MatLab Lecture 15: Factor Analysis.
Environmental Data Analysis with MatLab Lecture 8: Solving Generalized Least Squares Problems.
Lecture 13 L1 , L∞ Norm Problems and Linear Programming
Lecture 15 Orthogonal Functions Fourier Series. LGA mean daily temperature time series is there a global warming signal?
Lecture 22 Exemplary Inverse Problems including Filter Design.
GG 313 Lecture 25 Transform Pairs and Convolution 11/22/05.
Environmental Data Analysis with MatLab Lecture 9: Fourier Series.
Environmental Data Analysis with MatLab
Chapter 10 Curve Fitting and Regression Analysis
Environmental Data Analysis with MatLab Lecture 13: Filter Theory.
Environmental Data Analysis with MatLab Lecture 16: Orthogonal Functions.
Lecture 3 Probability and Measurement Error, Part 2.
ELE Adaptive Signal Processing
Computational Methods in Physics PHYS 3437
Environmental Data Analysis with MatLab Lecture 23: Hypothesis Testing continued; F-Tests.
Spectral analysis for point processes. Error bars. Bijan Pesaran Center for Neural Science New York University.
Environmental Data Analysis with MatLab Lecture 11: Lessons Learned from the Fourier Transform.
Environmental Data Analysis with MatLab
Environmental Data Analysis with MatLab Lecture 12: Power Spectral Density.
Lecture 5 A Priori Information and Weighted Least Squared.
Environmental Data Analysis with MatLab Lecture 17: Covariance and Autocorrelation.
Lecture 19 Continuous Problems: Backus-Gilbert Theory and Radon’s Problem.
Lecture 4 The L 2 Norm and Simple Least Squares. Syllabus Lecture 01Describing Inverse Problems Lecture 02Probability and Measurement Error, Part 1 Lecture.
Lecture 9 Inexact Theories. Syllabus Lecture 01Describing Inverse Problems Lecture 02Probability and Measurement Error, Part 1 Lecture 03Probability and.
Lecture 17 spectral analysis and power spectra. Part 1 What does a filter do to the spectrum of a time series?
Environmental Data Analysis with MatLab Lecture 5: Linear Models.
Lecture 3 Review of Linear Algebra Simple least-squares.
MM3FC Mathematical Modeling 3 LECTURE 6 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
Lecture 19: Discrete-Time Transfer Functions
Environmental Data Analysis with MatLab Lecture 3: Probability and Measurement Error.
Lecture 8 The Principle of Maximum Likelihood. Syllabus Lecture 01Describing Inverse Problems Lecture 02Probability and Measurement Error, Part 1 Lecture.
Environmental Data Analysis with MatLab Lecture 24: Confidence Limits of Spectra; Bootstraps.
1 Simple Linear Regression Chapter Introduction In this chapter we examine the relationship among interval variables via a mathematical equation.
Lecture 11 Vector Spaces and Singular Value Decomposition.
Lecture 18 advanced topics is spectral analysis Parsival’s Theorem Multi-taper spectral analysis Auto- and Cross- Correlation Phase spectra.
6 6.3 © 2012 Pearson Education, Inc. Orthogonality and Least Squares ORTHOGONAL PROJECTIONS.
Environmental Data Analysis with MatLab Lecture 7: Prior Information.
Linear Prediction Problem: Forward Prediction Backward Prediction
Function approximation: Fourier, Chebyshev, Lagrange
Environmental Data Analysis with MatLab Lecture 20: Coherence; Tapering and Spectral Analysis.
LINEAR REGRESSION Introduction Section 0 Lecture 1 Slide 1 Lecture 5 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall.
Time-Series Analysis and Forecasting – Part V To read at home.
Properties and the Inverse of
STAT 497 LECTURE NOTES 2.
Environmental Data Analysis with MatLab Lecture 10: Complex Fourier Series.
Extrapolation Models for Convergence Acceleration and Function ’ s Extension David Levin Tel-Aviv University MAIA Erice 2013.
SUPA Advanced Data Analysis Course, Jan 6th – 7th 2009 Advanced Data Analysis for the Physical Sciences Dr Martin Hendry Dept of Physics and Astronomy.
Fourier Analysis of Discrete-Time Systems
Chapter 6 Simple Regression Introduction Fundamental questions – Is there a relationship between two random variables and how strong is it? – Can.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Normal Equations The Orthogonality Principle Solution of the Normal Equations.
11 Lecture 2 Signals and Systems (II) Principles of Communications Fall 2008 NCTU EE Tzu-Hsien Sang.
Review and Summary Box-Jenkins models Stationary Time series AR(p), MA(q), ARMA(p,q)
Linear Constant-Coefficient Difference Equations
ABE 463 Electro-hydraulic systems Laplace transform Tony Grift
Lecture 4: The z-Transform 1. The z-transform The z-transform is used in sampled data systems just as the Laplace transform is used in continuous-time.
Environmental Data Analysis with MatLab 2 nd Edition Lecture 22: Linear Approximations and Non Linear Least Squares.
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
ENME 392 Regression Theory
University of Virginia
Linear Predictive Coding Methods
Filtering and State Estimation: Basic Concepts
Lecture 22 IIR Filters: Feedback and H(z)
Lecture 23: Environmental Data Analysis with MatLab 2nd Edition
Environmental Data Analysis with MatLab
Load forecasting Prepared by N.CHATHRU.
Presentation transcript:

Environmental Data Analysis with MatLab 2 nd Edition Lecture 14: Applications of Filters

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 22Linear Approximations and Non Linear Least Squares Lecture 23Adaptable Approximations with Neural Networks Lecture 24 Hypothesis testing Lecture 25 Hypothesis Testing continued; F-Tests Lecture 26 Confidence Limits of Spectra, Bootstraps SYLLABUS

Goals of the lecture further develop the idea of the Linear Filter and its applications

from last lecture present output ∝ past and present values of input input output filter “convolution”, not multiplication

Part 1: Predicting the Present or

Part 1: Predicting the Present or very close to a convolution

input output “prediction error” filter

strategy for predicting the future 1. take all the data, d, that you have up to today 2. use it to estimate the prediction error filter, p (use generalized least-squares to solve p*d=0 ) 3. use the filter, p, and all the data, d, to predict d tomorrow

application to the Neuse River hydrograph

time t, days prediction error filter, p(t) here’s the best fit filter, p

time t, days prediction error filter, p(t) here’s the best fit filter, p in this case, only the first few coefficients are large what’s that?

importance of the prediction error since one is using least squares, the equation 0=p*d is not solved exactly the prediction error, e=p*d tells you what aspects of the data cannot be predicted on the basis of past behavior

time t, days prediction error, e(t) discharge, d(t) A) B)

time t, days prediction error, e(t) discharge, d(t) A) B) the error is spiky the error is small many spikes are at times when discharge increases

Part 2: Inverse Filters Can a convolution be undone? if θ = g * h is there another filter g inv for which h = g inv * θ ?

convolution c=a*b by hand: step 1 for simplicity, suppose a and b are of length 3 write a backward in time write b forward in time overlap the ends by one, and multiply. That gives c 1

convolution c = a*b by hand: step 2 slide a right one place multiply and add. That gives c 2

convolution c = a*b by hand: step 3 slide a right another place multiply and add. That gives c 3

convolution c = a*b by hand: keep going Multiply. That gives c 5

an important observation this is the same pattern that we obtain when we multiply polynomials

z-transform turn a filter into a polynomial g = [g 1, g 2, g 3, … g N ] T g(z) = g 1 + g 2 z + g 3 z 2 + … g N z N-1

inverse z-transform turn a polynomial into a filer g = [g 1, g 2, g 3, … g N ] T g(z) = g 1 + g 2 z + g 3 z 2 + … g N z N-1

why would we want to do this? because we know a lot about polynomials

the fundamental theorem of algebra a polynomial of n-th order has exactly n roots and thus can be factored into the product of n factors

the fundamental theorem of algebra a polynomial of n -th order has exactly n -roots and can be factored into the product of n factors largest power, z n solutions to g(z)=0 g(z) ∝ (z-r 1 ) (z-r 2 ) … (z-r n )

in the case of a polynomial constructed from a length- N filter, g where r 1, r 2, … r N-1 are the roots

so, the filter g is equivalent a “cascade” of N-1 length- 2 filters

now let’s try to find the inverse of a length- 2 filter the filter that undoes convolution by [-r i, 1] T is … ? the function that undoes multiplication by z-r i is 1 /(z-r i ) z-transform

problem: 1 /(z-r i ) is not a polynomial solution: compute its Taylor series

Taylor series

contains all powers of z

so the filter that undoes convolution by [-r i, 1] T is … an indefinitely long filter

this filter will only be useful if its coefficients fall off this happens when |r i | -1 > 1 or |r i | < 1 must decrease

this filter will only be useful if its coefficients fall off this happens when |r i | -1 < 1 or |r i | > 1 must decrease the root, r i, must lie outside the “unit circle”

the inverse filter for a length- N filter g step 1: find roots of g(z) step 2: check that roots are inside the unit circle step 3: construct inverse filter associated with each root step 4: convolve them all together

gjgj element j example construct inverse filter of:

only hard part of the process is finding the roots of a polynomial % find roots of g r = roots(flipud(g)); fortunately, MatLab does this easily

element j gjgj g j inv [g inv *g] j

element j gjgj g j inv [g inv *g] j short time series long timeseries spike

Part 3: Recursive Filters a way to make approximate a long filter with two short ones

in the standard filtering formula we compute the output θ 1, θ 2, θ 3, … in sequence but without using our knowledge of θ 1 when we compute θ 2 or θ 2 when we compute θ 3 etc

that’s wasted information

suppose we tried to put the information to work, as follows here we’ve introduced two new filters, u and v

convention al filter, g filter v that acts on already computed values of θ new but conventional filter, u

now define v 1 =1, so if we can find short filters u and v such that v inv * u ≈ g then we can speed up the convolution process

an example g*h is the weighted average of recent values of h if g is truncated to N≈10 elements, then each time step take s 10N multiplications and 10N additions

try this works, since the inverse of a length- 2 filter is

the convolution then becomes which requires only one addition and one multiplication per time step a savings of a factor of about ten

time, t h(t) and  (t) A) B) h(t) and  (t) time, t