8. digital-filtersx - essie-uf

Download Report

Transcript 8. digital-filtersx - essie-uf

DIGITAL FILTERS
yn 
M
h
k x nk
k M

M
h
nk x k
,
n  0, 1,  , N  1
k M
h = time invariant weights (IMPULSE RESPONSE FUNCTION)
2M + 1 = # of weights
N = # of data points
Impulse Response :
Box Car filter
1
hk 
2M  1
Running Mean
Moving Average

2M
k 0
hk  1
M = 48
M = 49
M = 50
yn 
M
 h x
k
k 0
nk
 x n  k ,
n  0, 1,  , N  1
c  sin(  k / M ) sin(  kc / N ) 
hk 


N   k / M
 kc / N 
Impulse Response:
Normalized SINC
function windowed by
the Lanczos window
M is the filter length (# of
weights or filter coefficients)
N is the sampling
frequency = 2π/Δt
c is the cut-off frequency =
2π/Tc
repeat
wrap
High-pass filtered : Original – Low-Pass
Fourier Transform of yn
yn 
M
h
k x nk
Y   
k M
M

y n e  i  n t
nM

M

hk e  i  k t
k M
M

x nk e
 i   n  k  t
nM
 H   X  
Convolution in time domain corresponds to multiplication in frequency domain
M
H     hk e  i k t 
k  M
Y  
X  
Frequency Response or Transfer Function or Admittance Function
H
Low-pass:
1 @   c
H    
 0 @ c  
1
Pass
Band
0
Stop
Band
c
N

High-pass:
H
0 @
H    
1 @
  c
c  
1
Pass
Band
Stop
Band
0
c
N

1 @ c1    c 2
0 otherwise

Band-pass: H    
H
1
Stop
Band
0
Pass
Band
c1
Stop
Band
c2
N

Band-pass filtered
1) High-pass to cut-off the upper bound period (e.g. 18 hrs)
2) Low-pass to cut-off the lower bound period (e.g. 4 hrs)
Gibbs’ Phenomenon
H   
M
h e
 i  k t
k
k M
H( )
Frequency Response or Transfer Function
(for Running Mean)
M>M>M
 / N

c
hk 
N
 sin(  k / M ) sin(  kc / N ) 



k
/
M

k

/

c
N


sin(  k / M )
Lanczos
k / M
0.54  .46 cos(  k / M ) Hamming
()
Lynch (1997, Month. Wea. Rev., 125, 655)
Butterworth Filter
H   
2
q=4
1
1   c 2q
q = 10
q=1
http://cnx.org/content/m10127/latest/
Exercises
http://www.falstad.com/dfilter/