6: window filter design - imperial college london · 6: window filter design 6: ... •matlab...
TRANSCRIPT
![Page 1: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/1.jpg)
6: Window Filter Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11
![Page 2: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/2.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
![Page 3: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/3.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn
![Page 4: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/4.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
![Page 5: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/5.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
![Page 6: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/6.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
-2 0 20
0.5
1
2ω0
ω
![Page 7: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/7.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
⇔ h[n] = sinω0nπn
-2 0 20
0.5
1
2ω0
ω
0
2π/ω0
![Page 8: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/8.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
⇔ h[n] = sinω0nπn
-2 0 20
0.5
1
2ω0
ω
0
2π/ω0
Note: Width in ω is 2ω0, width in n is 2πω0
![Page 9: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/9.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
⇔ h[n] = sinω0nπn
-2 0 20
0.5
1
2ω0
ω
0
2π/ω0
Note: Width in ω is 2ω0, width in n is 2πω0
: product is 4π always
![Page 10: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/10.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
⇔ h[n] = sinω0nπn
-2 0 20
0.5
1
2ω0
ω
0
2π/ω0
Note: Width in ω is 2ω0, width in n is 2πω0
: product is 4π alwaysSadly h[n] is infinite and non-causal.
![Page 11: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/11.jpg)
Inverse DTFT
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 2 / 11
For any BIBO stable filter, H(ejω) is the DTFT of h[n]
H(ejω) =∑∞
−∞ h[n]e−jωn ⇔ h[n] = 12π
∫ π
−πH(ejω)ejωndω
If we know H(ejω) exactly, the IDTFT gives the ideal h[n]
Example: Ideal Lowpass filter
H(ejω) =
{
1 |ω| ≤ ω0
0 |ω| > ω0
⇔ h[n] = sinω0nπn
-2 0 20
0.5
1
2ω0
ω
0
2π/ω0
Note: Width in ω is 2ω0, width in n is 2πω0
: product is 4π alwaysSadly h[n] is infinite and non-causal. Solution: multiply h[n] by a window
![Page 12: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/12.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite
0
2π/ω0
![Page 13: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/13.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
0
h1[n]
M=14
![Page 14: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/14.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
ω
![Page 15: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/15.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
ω
![Page 16: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/16.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
Minimum E is when h1[n] = h[n].
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
ω
![Page 17: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/17.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
Minimum E is when h1[n] = h[n].
Proof: From Parseval: E =∑
M
2
−M
2
|h[n]− h1[n]|2+∑
|n|>M
2
|h[n]|2
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
ω
![Page 18: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/18.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
Minimum E is when h1[n] = h[n].
Proof: From Parseval: E =∑
M
2
−M
2
|h[n]− h1[n]|2+∑
|n|>M
2
|h[n]|2
However: 9% overshoot at a discontinuity even for large n.
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
ω
![Page 19: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/19.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
Minimum E is when h1[n] = h[n].
Proof: From Parseval: E =∑
M
2
−M
2
|h[n]− h1[n]|2+∑
|n|>M
2
|h[n]|2
However: 9% overshoot at a discontinuity even for large n.
0
h1[n]
M=14
0 1 2 30
0.5
1
M=14
M=28
ω
![Page 20: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/20.jpg)
Rectangular window
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 3 / 11
Truncate to ±M2 to make finite; h1[n] is now of length M + 1
MSE Optimality:Define mean square error (MSE) in frequency domain
E = 12π
∫ π
−π
∣
∣H(ejω)−H1(ejω)
∣
∣
2dω
= 12π
∫ π
−π
∣
∣
∣H(ejω)−
∑
M
2
−M
2
h1[n]e−jωn
∣
∣
∣
2
dω
Minimum E is when h1[n] = h[n].
Proof: From Parseval: E =∑
M
2
−M
2
|h[n]− h1[n]|2+∑
|n|>M
2
|h[n]|2
However: 9% overshoot at a discontinuity even for large n.
h2[n]
M=14
00 1 2 3
0
0.5
1
M=14
M=28
ω
Normal to delay by M2 to make causal. Multiplies H(ejω) by e−j M
2ω .
![Page 21: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/21.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
![Page 22: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/22.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
![Page 23: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/23.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn
![Page 24: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/24.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
![Page 25: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/25.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω)
![Page 26: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/26.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω)
![Page 27: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/27.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
![Page 28: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/28.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
![Page 29: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/29.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
![Page 30: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/30.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω
-2 0 2
0
0.5
1 M=14
ω
![Page 31: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/31.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
![Page 32: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/32.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
Provided that 4πM+1 ≪ 2ω0 ⇔ M + 1 ≫ 2π
ω0
:
![Page 33: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/33.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
Provided that 4πM+1 ≪ 2ω0 ⇔ M + 1 ≫ 2π
ω0
:
Passband ripple: ∆ω ≈ 4πM+1
![Page 34: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/34.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
Provided that 4πM+1 ≪ 2ω0 ⇔ M + 1 ≫ 2π
ω0
:
Passband ripple: ∆ω ≈ 4πM+1 , stopband 2π
M+1
![Page 35: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/35.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
Provided that 4πM+1 ≪ 2ω0 ⇔ M + 1 ≫ 2π
ω0
:
Passband ripple: ∆ω ≈ 4πM+1 , stopband 2π
M+1
Transition pk-to-pk: ∆ω ≈ 4πM+1
![Page 36: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/36.jpg)
Dirichlet Kernel +
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 4 / 11
Truncation ⇔ Multiply h[n] by a rectangular window, w[n] = δ−M
2≤n≤M
2
⇔ Circular Convolution HM+1(ejω) = 1
2πH(ejω)⊛W (ejω)
W (ejω) =∑
M
2
−M
2
e−jωn (i)= 1 + 2
∑0.5M1 cos (nω)
(ii)= sin 0.5(M+1)ω
sin 0.5ω
Proof: (i) e−jω(−n) + e−jω(+n) = 2 cos (nω) (ii) Sum geom. progression
Effect: convolve ideal freq response with Dirichlet kernel (aliassed sinc)
-2 0 2
0
0.5
1
ω-2 0 2
0
0.5
1
4π/(M+1)
ω-2 0 2
0
0.5
1
ω
-2 0 2
0
0.5
1 M=14
ω
Provided that 4πM+1 ≪ 2ω0 ⇔ M + 1 ≫ 2π
ω0
:
Passband ripple: ∆ω ≈ 4πM+1 , stopband 2π
M+1
Transition pk-to-pk: ∆ω ≈ 4πM+1
Transition Gradient: d|H|dω
∣
∣
∣
ω=ω0
≈ M+12π
![Page 37: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/37.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
![Page 38: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/38.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω
![Page 39: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/39.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
![Page 40: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/40.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
![Page 41: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/41.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
![Page 42: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/42.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
![Page 43: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/43.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
(b) transition bandwidth, ∆ω = width of the main lobetransition amplitude, ∆H = integral of main lobe÷2π
![Page 44: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/44.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
(b) transition bandwidth, ∆ω = width of the main lobetransition amplitude, ∆H = integral of main lobe÷2π
rectangular window: ∆ω = 4πM+1 , ∆H ≈ 1.18
![Page 45: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/45.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
(b) transition bandwidth, ∆ω = width of the main lobetransition amplitude, ∆H = integral of main lobe÷2π
rectangular window: ∆ω = 4πM+1 , ∆H ≈ 1.18
(c) stopband gain is an integral over oscillating sidelobes of W (ejω)
![Page 46: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/46.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
(b) transition bandwidth, ∆ω = width of the main lobetransition amplitude, ∆H = integral of main lobe÷2π
rectangular window: ∆ω = 4πM+1 , ∆H ≈ 1.18
(c) stopband gain is an integral over oscillating sidelobes of W (ejω)rect window:
∣
∣minH(ejω)∣
∣ = 0.09 ≪∣
∣minW (ejω)∣
∣ = M+11.5π
![Page 47: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/47.jpg)
Window relationships
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 5 / 11
When you multiply an impulse response by a window M + 1 longHM+1(e
jω) = 12πH(ejω)⊛W (ejω)
-2 0 20
0.5
1
ω-2 0 2
0
10
20
ω
M=20
-2 0 2
0
0.5
1
ω
1
(a) passband gain ≈ w[0]; peak≈ w[0]2 + 0.5
2π
∫
mainlobeW (ejω)dω
rectangular window: passband gain = 1; peak gain = 1.09
(b) transition bandwidth, ∆ω = width of the main lobetransition amplitude, ∆H = integral of main lobe÷2π
rectangular window: ∆ω = 4πM+1 , ∆H ≈ 1.18
(c) stopband gain is an integral over oscillating sidelobes of W (ejω)rect window:
∣
∣minH(ejω)∣
∣ = 0.09 ≪∣
∣minW (ejω)∣
∣ = M+11.5π
(d) features narrower than the main lobe will be broadened andattenuated
![Page 48: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/48.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
![Page 49: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/49.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
![Page 50: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/50.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
![Page 51: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/51.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
![Page 52: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/52.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
![Page 53: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/53.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1best peak sidelobe
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
![Page 54: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/54.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1best peak sidelobe
Blackman-Harris 3-term:0.42 + 0.5c1 + 0.08c2
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
0 1 2 3
-50
0
-70 dB
18.87/(M+1)
ω
![Page 55: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/55.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1best peak sidelobe
Blackman-Harris 3-term:0.42 + 0.5c1 + 0.08c2
best peak sidelobe
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
0 1 2 3
-50
0
-70 dB
18.87/(M+1)
ω
![Page 56: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/56.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1best peak sidelobe
Blackman-Harris 3-term:0.42 + 0.5c1 + 0.08c2
best peak sidelobe
Kaiser:I0
(
β
√
1−( 2n
M )2)
I0(β)
β controls width v sidelobes
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
0 1 2 3
-50
0
-70 dB
18.87/(M+1)
ω
0 1 2 3
-50
0
-40 dB
13.25/(M+1)
β = 5.3
ω
0 1 2 3
-50
0
-70 dB
21.27/(M+1)
β = 9.5
ω
![Page 57: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/57.jpg)
Common Windows
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 6 / 11
Rectangular: w[n] ≡ 1don’t use
Hanning: 0.5 + 0.5c1ck = cos 2πkn
M+1rapid sidelobe decay
Hamming: 0.54 + 0.46c1best peak sidelobe
Blackman-Harris 3-term:0.42 + 0.5c1 + 0.08c2
best peak sidelobe
Kaiser:I0
(
β
√
1−( 2n
M )2)
I0(β)
β controls width v sidelobesGood compromise:
Width v sidelobe v decay
0 1 2 3
-50
0 -13 dB6.27/(M+1)
ω
0 1 2 3
-50
0
-31 dB12.56/(M+1)
ω
0 1 2 3
-50
0
-40 dB
12.56/(M+1)
ω
0 1 2 3
-50
0
-70 dB
18.87/(M+1)
ω
0 1 2 3
-50
0
-40 dB
13.25/(M+1)
β = 5.3
ω
0 1 2 3
-50
0
-70 dB
21.27/(M+1)
β = 9.5
ω
![Page 58: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/58.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
![Page 59: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/59.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
![Page 60: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/60.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
![Page 61: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/61.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
![Page 62: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/62.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
![Page 63: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/63.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
![Page 64: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/64.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
![Page 65: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/65.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB
![Page 66: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/66.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB
δ = 100.1
20 − 1 = 0.0116, ǫ = 10−35
20 = 0.0178
![Page 67: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/67.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB
δ = 100.1
20 − 1 = 0.0116, ǫ = 10−35
20 = 0.0178
M ≈−5.6−4.3 log
10(2×10−4)1.047−0.943 = 10.25
0.105 = 98
![Page 68: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/68.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB
δ = 100.1
20 − 1 = 0.0116, ǫ = 10−35
20 = 0.0178
M ≈−5.6−4.3 log
10(2×10−4)1.047−0.943 = 10.25
0.105 = 98 or 35−82.2∆ω
= 117
![Page 69: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/69.jpg)
Order Estimation
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 7 / 11
Several formulae estimate the required order of a filter, M .
E.g. for lowpass filter
Estimated order is
M ≈ −5.6−4.3 log10
(δǫ)ω2−ω1
≈ −8−20 log10
ǫ
2.2∆ω
Required M increases as either thetransition width, ω2 − ω1, or the gaintolerances δ and ǫ get smaller.Only approximate.
Example:Transition band: f1 = 1.8 kHz, f2 = 2.0 kHz, fs = 12 kHz,.
ω1 = 2πf1fs
= 0.943, ω2 = 2πf2fs
= 1.047
Ripple: 20 log10 (1 + δ) = 0.1 dB, 20 log10 ǫ = −35 dB
δ = 100.1
20 − 1 = 0.0116, ǫ = 10−35
20 = 0.0178
M ≈−5.6−4.3 log
10(2×10−4)1.047−0.943 = 10.25
0.105 = 98 or 35−82.2∆ω
= 117
![Page 70: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/70.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1
0 1 2 30
0.5
1
ω
![Page 71: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/71.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1
0 1 2 30
0.5
1
ω
![Page 72: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/72.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
0 1 2 30
0.5
1
ω
![Page 73: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/73.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB0 1 2 3
0
0.5
1
ω
![Page 74: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/74.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB 0 1 2 3
0
0.5
1
ω
![Page 75: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/75.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
0 1 2 30
0.5
1
ω
![Page 76: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/76.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filters
0 1 2 30
0.5
1
ω
![Page 77: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/77.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filtersh[n] = sinω2n
πn− sinω1n
πn
0 1 2 30
0.5
1
ω
![Page 78: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/78.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filtersh[n] = sinω2n
πn− sinω1n
πn
Kaiser Window: β = 2.5
0 1 2 30
0.5
1
ω
![Page 79: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/79.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filtersh[n] = sinω2n
πn− sinω1n
πn
Kaiser Window: β = 2.5
0
M=92
0 1 2 30
0.5
1
ω
![Page 80: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/80.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filtersh[n] = sinω2n
πn− sinω1n
πn
Kaiser Window: β = 2.5
0
M=92
0 1 2 30
0.5
1
ω
0 1 2 30
0.5
1 M=92β = 2.5
ω
![Page 81: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/81.jpg)
Example Design
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 8 / 11
Specifications:Bandpass: ω1 = 0.5, ω2 = 1Transition bandwidth: ∆ω = 0.1Ripple: δ = ǫ = 0.02
20 log10 ǫ = −34 dB20 log10 (1 + δ) = 0.17 dB
Order:M ≈ −5.6−4.3 log
10(δǫ)
ω2−ω1
= 92
Ideal Impulse Response:Difference of two lowpass filtersh[n] = sinω2n
πn− sinω1n
πn
Kaiser Window: β = 2.5
0
M=92
0 1 2 30
0.5
1
ω
0 1 2 30
0.5
1 M=92β = 2.5
ω
0 1 2 3-60
-40
-20
0 M=92β = 2.5
ω
![Page 82: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/82.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω)
![Page 83: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/83.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω)
-2 0 20
0.5
1 M+1=93
ω
![Page 84: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/84.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
-2 0 20
0.5
1 M+1=93
ω
![Page 85: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/85.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 86: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/86.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
Advantage:exact match at sample points
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 87: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/87.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
Advantage:exact match at sample points
Disadvantage:poor intermediate approximation if spectrum is varying rapidly
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 88: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/88.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
Advantage:exact match at sample points
Disadvantage:poor intermediate approximation if spectrum is varying rapidly
Solutions:(1) make the filter transitions smooth over ∆ω width
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 89: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/89.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
Advantage:exact match at sample points
Disadvantage:poor intermediate approximation if spectrum is varying rapidly
Solutions:(1) make the filter transitions smooth over ∆ω width(2) oversample and do least squares fit (can’t use IDFT)
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 90: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/90.jpg)
Frequency sampling
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 9 / 11
Take M + 1 uniform samples of H(ejω); take IDFT to obtain h[n]
Advantage:exact match at sample points
Disadvantage:poor intermediate approximation if spectrum is varying rapidly
Solutions:(1) make the filter transitions smooth over ∆ω width(2) oversample and do least squares fit (can’t use IDFT)(3) use non-uniform points with more near transition (can’t use IDFT)
-2 0 20
0.5
1 M+1=93
ω0 1 2 3
0
0.5
1 M+1=93
ω
![Page 91: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/91.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
![Page 92: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/92.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
![Page 93: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/93.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
![Page 94: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/94.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window
![Page 95: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/95.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea
![Page 96: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/96.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea◦ Hamming, Blackman-Harris are good
![Page 97: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/97.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea◦ Hamming, Blackman-Harris are good◦ Kaiser good with β trading off main lobe width v. sidelobes
![Page 98: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/98.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea◦ Hamming, Blackman-Harris are good◦ Kaiser good with β trading off main lobe width v. sidelobes
• Uncertainty principle: cannot be concentrated in both time andfrequency
![Page 99: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/99.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea◦ Hamming, Blackman-Harris are good◦ Kaiser good with β trading off main lobe width v. sidelobes
• Uncertainty principle: cannot be concentrated in both time andfrequency
• Frequency sampling: IDFT of uniform frequency samples: not so great
![Page 100: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/100.jpg)
Summary
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 10 / 11
• Make an FIR filter by windowing the IDTFT of the ideal response
◦ Ideal lowpass has h[n] = sinω0nπn
◦ Add/subtract lowpass filters to make any piecewise constantresponse
• Ideal filter response is ⊛ with the DTFT of the window◦ Rectangular window (W (z) =Dirichlet kernel) has −13 dB
sidelobes and is always a bad idea◦ Hamming, Blackman-Harris are good◦ Kaiser good with β trading off main lobe width v. sidelobes
• Uncertainty principle: cannot be concentrated in both time andfrequency
• Frequency sampling: IDFT of uniform frequency samples: not so great
For further details see Mitra: 7, 10.
![Page 101: 6: Window Filter Design - Imperial College London · 6: Window Filter Design 6: ... •MATLAB routines DSP and Digital Filters (2017-10159) Windows: 6 – 1 / 11. Inverse DTFT 6:](https://reader031.vdocuments.net/reader031/viewer/2022022602/5b56ae8a7f8b9a18618d068d/html5/thumbnails/101.jpg)
MATLAB routines
6: Window Filter Design
• Inverse DTFT
• Rectangular window
• Dirichlet Kernel +
• Window relationships
• Common Windows
• Order Estimation
• Example Design
• Frequency sampling
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10159) Windows: 6 – 11 / 11
diric(x,n) Dirichlet kernel: sin 0.5nxsin 0.5x
hanninghamming
kaiser
Window functions(Note ’periodic’ option)
kaiserord Estimate required filter order and β