SDA13 Filters
SDA13 Filters
SDA13 Filters
2024
Filters & Windows
Izhar Bar-Gad
Room: 408 Phone: 7141 Email: [email protected]
Introduction
Fourier Transform
Sampling Theory
Systems
Filters
Windows
Spectral Analysis
1
3
Filters
|X(ω)|
Original frequency domain
ω
|X(ω)|
Ideal Filtering
Since Y(ω)=X(ω)∙H(ω)
H(ω) X(ω)
|H(ω)| |X(ω)|
∙
ω ω
Y(ω)
|Y(ω)|
6
Ideals problem : F(rect)=sinc
sin(𝑥)
The classical “unnormalized” definition 𝑠𝑖𝑛𝑐 𝑥 =
𝑥
sin(𝜋𝑥)
Signal analysis “normalized” definition 𝑠𝑖𝑛𝑐 𝑥 =
𝜋𝑥
sinc problem
3
9
Filter Design - Amplitude
10
11
Filter families
4
12
Number of poles
13
14
Filter example I
Original extracellular signal
0.01
0.005
Voltage (mV)
-0.005
-0.01
5 -0.015
0 100 200 300 400 500
Time (ms)
600 700 800 900 1000
15
Filter example II
Following notch filter (~1800Hz)
0.01
0.005
Voltage (mV)
-0.005
-0.01
-0.015
0 100 200 300 400 500 600 700 800 900 1000
Time (ms)
16
0
Voltage (mV)
-5
-10
0 100 200 300 400 500 600 700 800 900 1000
Time (ms)
17
H(ω) 50
Magnitude (dB)
0
-50
-100
-150
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
5000
Phase (degrees)
0
-5000
-10000
-15000
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
matlab: freqz
19
Phase distortion
Extracellular recording
20
Phase distortion
Linear vs. Non-linear phase
7
21
Filters
Avoiding sampling problems
X(ω)
cut
X[k]
22
Online filtering –
Live streaming (usually analog) data
Delay limit
Limited computational resources
Offline filtering –
Sampled, stored, digital data
No time limit
Less limited computational resources
23
Analog Filters
8
24
Filters in Neuroscience
25
2D Fourier transform
Continuous 2D transform
Discrete 2D transform
(http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/Image_Processing.html)
26
2D Fourier transform
9
27
Spatial filtering
28
Spatial filtering
Ideal Butterworth
filter filter
l Low pass
High pass
29
Introduction
Fourier Transform
Sampling Theory
Systems
Filters
Windows
Spectral Analysis
10
30
sinc: time & frequency duality
31
Finite sinc
32
2 2
signal sin( t ) sin(10 * t)
1000 1000
2
1 . 5
0 . 5
- 0 . 5
- 1
- 1 . 5
- 2
0 5 0 0 1 0 0 0 1 5 0 0 2 0 0 0 2 5 0 0 3 0 0 0 3 5 0 0 4 0 0 0 4 5 0 0 5 0 0 0
1 0 0
5 0
- 5 0
11 - 1
- 1
0
5
0
0
0 5 0 0 1 0 0 0 1 5 0 0 2 0 0 0 2 5 0 0 3 0 0 0 3 5 0 0 4 0 0 0 4 5 0 0 5 0 0 0
33
Windows
34
frequency time
Triangular window
W[n]=
-M ≤ n ≤ M
Hanning window
Hamming window
35
Leakage windows I
12
36
Leakage windows II
37
38
DFT Frequencies
Discrete 2k
j n 2
Range : 0-2, e N
k
N
Periodic
But…
What about frequencies in between?
13
39
DFT Leakage
Remedy
Windowing Techniques
40
14