Filters and Noise Optional Assessment of Practical Importance Rubin - - PowerPoint PPT Presentation

filters and noise
SMART_READER_LITE
LIVE PREVIEW

Filters and Noise Optional Assessment of Practical Importance Rubin - - PowerPoint PPT Presentation

Filters and Noise Optional Assessment of Practical Importance Rubin H Landau Sally Haerer, Producer-Director Based on A Survey of Computational Physics by Landau, Pez, & Bordeianu with Support from the National Science Foundation Course:


slide-1
SLIDE 1

Filters and Noise

Optional Assessment of Practical Importance Rubin H Landau

Sally Haerer, Producer-Director

Based on A Survey of Computational Physics by Landau, Páez, & Bordeianu with Support from the National Science Foundation

Course: Computational Physics II

1 / 1

slide-2
SLIDE 2

Problem: Cleaning Up Noisy a Signal

2 4 6 8 1 0 1 2

t (s)

Problem: What is pure signal? Two Simple Approaches

1

Autocorrelation functions

2

Digital Filters

Both wide applications More filters in Wavelet Analysis & Data Compression

2 / 1

slide-3
SLIDE 3

Noise Reduction via Autocorrelation (Theory)

Assumption: Noise just adds to signal Measure = Signal + Noise y(t) = s(t) + n(t) s(t) = ?

2 4 6 8 1 0 1 2

t (s)

Science: assume simplest (+) Science: noise ≃ random (∞ o F) Recall “random” sequence; ri

  • ri+1

⇒ n(t) not correlated with s(t), n(t)

3 / 1

slide-4
SLIDE 4

Correlation Function c(t)

How measure correlation? y(t) = sin ω, x(t) = sin(nωt + φ) correlated c(τ) = +∞

−∞

dt y∗(t) x(t + τ) (Correlation Function) Correlated (τ = lag time = variable):

Integrand > 0 for some τ ⇒ Constructive interference ⇒ c(τ) → ∞

Not correlated:

2 functions oscillate independently +, - equally likely ⇒ Destructive interference ⇒ c(τ) ≃ 0

4 / 1

slide-5
SLIDE 5

More Correlation Function

Properties Express c, y∗, x via FT & substitute: (FT) c(τ) = +∞

−∞

dω′ C(ω′)eiω′τ √ 2π (1) (Def) c(τ) def = +∞

−∞

dt y∗(t) x(t + τ) (2) ⇒ C(ω) = √ 2π Y ∗(ω)X(ω) (3) Requires convergence to rearrange Related to convolution theorem (soon)

5 / 1

slide-6
SLIDE 6

Special Correlation Function: Autocorrelation

Measure Correlation with Itself: a(τ) a(τ) def = +∞

−∞

dt y∗(t) y(t + τ) To compute: fold or convolute with self: y(t) = measured signal Average over time for “all” τ values a(0) = “large”

6 / 1

slide-7
SLIDE 7

Averaging Removes Random Noise from a(t)

Proof by substitution y(t) =s(t) + n(t) (Noisy Signal) (4) ay(τ) def = +∞

−∞

dt y∗(t) y(t + τ) (Def a(t)) (5) = +∞

−∞

dt [s(t)s(t + τ) + s(t)n(t + τ) + n(t)n(t + τ)] ⇒ ay(τ) ≃ +∞

−∞

dt s(t) s(t + τ) = as(τ) QED Magic (6) So As(ω) ≃ √ 2π |S(ω)|2 ∝ Power Spectrum (7)

7 / 1

slide-8
SLIDE 8

How Apply to Data?

Start with Noisy signal

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 x10

3

5 10 15 20 25 30 35 40 45 Power฀Spectrum฀(with฀Noise)

Frequency P

2 4 6 8 10 2 4 6 8 10 12

Function฀฀y(t)฀+฀Noise฀After฀Low฀pass฀Filter t฀(s) y

tau฀(s)

0.4 0.6 0.8 1.0 1.2 1.4 x10

2

2 4 6 8 10 12 Autocorrelation฀Function฀A(tau)

A

2 4 6 8 1 0 2 4 6 8 1 0 1 2 In itia l F u n c tio n y (t) + N o ise

t (s) y

A B C D

1

Compute autocorrelation function 2 DFT: a(t) ⇒ A(ω) 3 ⇒ power spectrum w/o random noise

8 / 1

slide-9
SLIDE 9

Autocorrelation Function Exercises (Noise.java)

Example

1

Signal: s(t) =

1 1−0.9 sin t ≃ 1 + 0.9 sin t + (0.9 sin t)2 · · ·

2

DFT ⇒ S(ω), Plot |S(ω)|2.

3

Autocorrelation function a(t) of s(t)?

4

Power spectrum a(t) vs |S(ω)|2?

5

Add noise y(ti) = s(ti) + α(2ri − 1), 0fuss ≤ α ≤ hide

6

Plot y(t), Y(ω), Power spectrum.

7

a(t) → A(ω).

8

Compare A(ω) to power spectrum.

9 / 1

slide-10
SLIDE 10

Filtering with Transforms (Theory)

Action of Filter g(t) = +∞

−∞

dτ f(τ) h(t − τ) (8)

def

= f(t) ∗ h(t)

(analog filter)

(9) h(t) def = unit impulse response h(t) = +∞

−∞ dτ δ(τ) h(t − τ)

Greens function h(0) = max, h(< 0) = 0 ∗ = Convolution

10 / 1

slide-11
SLIDE 11

Convolution Theorem

Filter as Convolution g(t) = +∞

−∞

dτ f(τ) h(t − τ) (10) G(ω) = √ 2π F(ω) H(ω) (11) Proof: FT,δ,

  • Simpler in ω than t

Digital: response (ωn) Lowpass: ↓ high ω Highpass: ↓ low ω

11 / 1

slide-12
SLIDE 12

Digital Filters

Filter Coefficients cn = Complete Description

Filter Def:

g(t) = +∞

−∞

dτ f(τ) h(t − τ) (12)

Digital Transfer:

h(t) =

N

  • n=0

cn δ(t − nτ) (13) ⇒ g(t) =

N

  • n=0

cn f(t − nτ) (14) cn: integration wts N point DFT + response

12 / 1

slide-13
SLIDE 13

Exploration: Windowed Sinc Filters (Filter.java)⊙

Lowpass Filter to Reduce Noise, Aliasing

0.0 0.2 0.4 0.6 0.8 1.0 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50

Ideal฀frequency฀response

Frequency A m p l i t u d e 0.0 0.5 1.0 1.5

3

0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4

Windowed-sinc฀filter฀kernel

Time฀ A m p l i t u d e

Ideal lowpass Y(ω) = rectangular pulse ⇒ y(t) = sinc function +∞

−∞

dω e−iωtrect(ω) = sinc t 2

  • def

= sin(πt/2) πt/2 ⇒ filter out high ω: convolute with sin(ωct)/(ωct) Exercise: Repeat random noise addition using sinc filter

13 / 1