
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 Problem: Cleaning Up Noisy a Signal � � � � � � � � � ����� 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 Noise Reduction via Autocorrelation (Theory) Assumption: Noise just adds to signal Measure = Signal + Noise � � � � � � � � � ����� y(t) = s(t) + n(t) s(t) = ? Science: assume simplest (+) Science: noise ' random( 1 o F) Recall “random” sequence; ri ; ri+1 ) n(t) not correlated with s(t), n(t) 3 / 1 Correlation Function c(t) How measure correlation? y(t) = sin !; x(t) = sin(n!t + φ) correlated Z +1 c(τ) = dt y ∗(t) x(t + τ) (Correlation Function) −∞ Correlated (τ = lag time = variable): Integrand > 0 for some τ ) Constructive interference ) c(τ) ! 1 Not correlated: 2 functions oscillate independently +, - equally likely ) Destructive interference ) c(τ) ' 0 4 / 1 More Correlation Function Properties Express c, y ∗, x via FT & substitute: 0 Z +1 ei! τ (FT) c(τ) = d!0 C(!0)p (1) −∞ 2π Z +1 (Def) c(τ) def= dt y ∗(t) x(t + τ) (2) −∞ p ) C(!)= 2π Y ∗(!)X(!) (3) Requires convergence to rearrange Related to convolution theorem (soon) 5 / 1 Special Correlation Function: Autocorrelation Measure Correlation with Itself: a(τ) Z +1 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 Averaging Removes Random Noise from a(t) Proof by substitution y(t) =s(t) + n(t) (Noisy Signal) (4) Z +1 def ∗ ay (τ) = dt y (t) y(t + τ) (Def a(t)) (5) −∞ Z +1 = dt [s(t)s(t + τ) + s(t)n(t + τ) + n(t)n(t + τ)] −∞ Z +1 ) ay (τ) ' dt s(t) s(t + τ) = as(τ) QED Magic (6) −∞ p 2 So As(!) ' 2π jS(!)j / Power Spectrum (7) 7 / 1 How Apply to Data? Start with Noisy signal 2 �� ���� ��� � � � ��� � �� ����� �� � ��� x10 Autocorrelation Function A(tau) � � 1.4 B � A 1.2 � 1.0 � A � 0.8 0.6 � 0.4 � � � � � � � � � � 0 2 4 6 8 10 12 ����� tau (s) 3 x10 Power Spectrum (with Noise) Function y(t) + Noise After Low pass Filter 3.5 10 3.0 C 2.5 8 D P 2.0 6 1.5 y 4 1.0 0.5 2 0.0 0 0 5 10 15 20 25 30 35 40 45 0 2 4 6 8 10 12 Frequency t (s) 2 DFT: a(t) ) A(!) 1 Compute autocorrelation ) function 3 power spectrum w/o random noise 8 / 1 Autocorrelation Function Exercises (Noise.java) Example 1 1 2 Signal: s(t) = 1−0:9 sin t ' 1 + 0:9 sin t + (0:9 sin t) ··· 2 DFT ) S(!), Plot jS(!)j2. 3 Autocorrelation function a(t) of s(t)? 4 Power spectrum a(t) vs jS(!)j2? 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 Filtering with Transforms (Theory) Action of Filter Z +1 g(t) = dτ f (τ) h(t − τ) (8) −∞ def = f (t) ∗ h(t) (analog filter) (9) def h(t) = unit impulse Greens function response h(0) = max, h(< 0) = 0 R +1 h(t) = −∞ dτ δ(τ) h(t − τ) ∗ = Convolution 10 / 1 Convolution Theorem Filter as Convolution Z +1 g(t) = dτ f (τ) h(t − τ) (10) −∞ p G(!) = 2π F(!) H(!) (11) Proof: FT,δ, R Lowpass: # high ! Simpler in ! than t Highpass: # low ! Digital: response (!n) 11 / 1 Digital Filters Filter Coefficients cn = Complete Description Z +1 Filter Def: g(t) = dτ f (τ) h(t − τ) (12) −∞ N X Digital Transfer: h(t) = cn δ(t − nτ) (13) n=0 N X ) g(t) = cn f (t − nτ) (14) n=0 cn: integration wts N point DFT + response 12 / 1 Exploration: Windowed Sinc Filters (Filter.java) Lowpass Filter to Reduce Noise, Aliasing Ideal frequency response 3 Windowed-sinc filter kernel 1.0 A A 1.5 m 0.8 m p p 1.0 l 0.6 l i i t 0.4 t 0.5 u u 0.0 d 0.2 d e e 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Frequency Time Ideal lowpass Y (!) = rectangular pulse ) y(t) = sinc function Z +1 t sin(πt=2) d! e−i!t rect(!) = sinc def= −∞ 2 πt=2 ) filter out high !: convolute with sin(!ct)=(!ct) Exercise: Repeat random noise addition using sinc filter 13 / 1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages13 Page
-
File Size-