Lecture 22: Designing FIR / IIR Filters Foundations of Digital Signal Processing Outline • Designing FIR Filters with Windows • Designing FIR Filters with Frequency Selection • Designing FIR Filters with Equi-ripples • Designing IIR Filters with Discrete Differentiation • Designing IIR Filters with Impulse Invariance • Designing IIR Filters with the Bilinear Transform • Related Analog Filters Lecture 22: Design of FIR / IIR Filters Foundations of Digital Signal Processing 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Selection• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
1
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
News Homework #9
Due on Thursday
Submit via canvas
Coding Assignment #6
Due on next Monday
Submit via canvas
2
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
News Exam #2 – Great Job!
Mean: 86.3
Median: 87.5
3
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Selection• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
4
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Causality and Linear Phase Question: Consider a length-M symmetric, causal filter. What condition must be satisfied?
5
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Causality and Linear Phase Question: Consider a length-M symmetric, causal filter. What condition must be satisfied?
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Causality Question: How do we describe causal filter magnitude?
18
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Causality Question: How do we describe causal filter magnitude?
19
Often plotted in dB (decibels)
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Causality Question: How do we describe causal filter magnitude?
20
Often plotted in dB (decibels)
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Review Downsampling & Upsampling• Causality in Filters• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Selection• Designing FIR Filters with Equi-ripples
Lecture 21: Design of FIR FiltersFoundations of Digital Signal Processing
21
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Designing with Windows Question: How can I design an FIR filter from an ideal filter?
22
……
ℱ
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Designing with Windows Question: How can I design an FIR filter from an ideal filter?
23
……
ℱIdeal filterNon-causal
Infinite Response
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Designing with Windows Question: How can I design an FIR filter from an ideal filter?
Answer: Window the response!
24
……
ℱIdeal filterNon-causal
Infinite Response
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Question: How can I design an FIR filter from an ideal filter?
Answer: Window the response!
Designing with Windows
25
……
ℱIdeal filterNon-causal
Infinite Response
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Question: How can I design an FIR filter from an ideal filter?
Answer: Window the response!
Designing with Windows
26
……
ℱIdeal filterNon-causal
Infinite Response
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Different Filters
Designing with Windows
27
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Different Filters
Designing with Windows
28
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Different Filters
Designing with Windows
29
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
30
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
31
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
32
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
33
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
34
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
35
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
36
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
37
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
38
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
39
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
40
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Windowing the sinc impulse response
Designing with Windows
41
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
42
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 = �𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
43
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘= 𝑁𝑁+1 /2
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘
44
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
45
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 +𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗
2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
46
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 +𝐻𝐻 𝑘𝑘 𝑒𝑒−𝑗𝑗
2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘𝑒𝑒𝑗𝑗2𝜋𝜋𝑛𝑛
47
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁 𝐻𝐻 0 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 +𝐻𝐻 𝑘𝑘 𝑒𝑒−𝑗𝑗
2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘
48
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + 𝑒𝑒−𝑗𝑗
2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘
49
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Option 2: Work backwards with constraints
Consider the DFT:
ℎ 𝑛𝑛 =1𝑁𝑁�𝑘𝑘=0
𝑁𝑁−1
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 such that 𝐻𝐻 𝑘𝑘 = 𝐻𝐻 𝑁𝑁 − 𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛𝑘𝑘 + �
𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 𝑒𝑒𝑗𝑗2𝜋𝜋𝑁𝑁 𝑛𝑛 𝑁𝑁−𝑘𝑘
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁𝑛𝑛𝑘𝑘
50
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling An inverse DFT that forces time-symmetry
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁𝑛𝑛𝑘𝑘
51
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling An inverse DFT that forces time-symmetry
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁𝑛𝑛𝑘𝑘
Example: Consider the desired 9-sample frequency responsewith the first half defined by [1 1 0 0]
Compute the frequency sampled filter
52
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling An inverse DFT that forces time-symmetry
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁𝑛𝑛𝑘𝑘
Example: Consider the desired 9-sample frequency responsewith the first half defined by [1 1 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =12
1 + 2 cos 2𝜋𝜋/9 𝑛𝑛
53
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 9-sample frequency response
with the first half defined by [1 1 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =12
1 + 2 cos 2𝜋𝜋/9 𝑛𝑛
54
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 9-sample frequency response
with the first half defined by [1 1 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =12
1 + 2 cos 2𝜋𝜋/9 𝑛𝑛
In practice, this should be circularly shifted so that the maximum is centered.
55
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling An inverse DFT that forces time-symmetry
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 −𝑁𝑁 − 1
2𝑘𝑘
Example: Consider the desired 9-sample frequency responsewith the first half defined by [1 1 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =12
1 + 2 cos 2𝜋𝜋/9 𝑛𝑛
56
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 9-sample frequency response
with the first half defined by [1 1 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =12
1 + 2 cos 2𝜋𝜋/9 𝑛𝑛 − 8/2
57
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 17-sample frequency response
with the first half defined by [1 1 1 1 0 0 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =1
171 + 2 cos 2𝜋𝜋/19 𝑛𝑛𝑐𝑐 + 2 cos 4𝜋𝜋/19 𝑛𝑛𝑐𝑐 + 2 cos 6𝜋𝜋/19 𝑛𝑛𝑐𝑐
𝑛𝑛𝑐𝑐 = 𝑛𝑛 −162
58
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 17-sample frequency response
with the first half defined by [1 1 1 1 0 0 0 0]
Compute the frequency sampled filter
ℎ 𝑛𝑛 =1
171 + 2 cos 2𝜋𝜋/19 𝑛𝑛𝑐𝑐 + 2 cos 4𝜋𝜋/19 𝑛𝑛𝑐𝑐 + 2 cos 6𝜋𝜋/19 𝑛𝑛𝑐𝑐
𝑛𝑛𝑐𝑐 = 𝑛𝑛 −162
59
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 41-sample frequency response
with the first 10 values defined by 1
Compute the frequency sampled filter
60
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Example: Consider the desired 401-sample frequency response
with the first 100 values defined by 1
Compute the frequency sampled filter
Note that in practice, this needs to be circularly shifted to the center
61
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Note: The definition can be slightly modified Our definition:
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 −𝑁𝑁 − 1
2𝑘𝑘
=1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 −𝑁𝑁2
+12
𝑘𝑘
=1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 +12
𝑘𝑘 − 𝜋𝜋𝑘𝑘
=1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
−1 𝑘𝑘𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 +12
𝑘𝑘
62
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Frequency Sampling Final Definition
ℎ 𝑛𝑛 =1𝑁𝑁
𝐻𝐻 0 + 2 �𝑘𝑘=1
𝑁𝑁−1 /2
−1 𝑘𝑘𝐻𝐻 𝑘𝑘 cos2𝜋𝜋𝑁𝑁
𝑛𝑛 +12
𝑘𝑘
Side note: This is very closely related to the discrete cosine transform
63
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
64
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Equi-ripplesPreviously derived:
𝑋𝑋 𝑧𝑧 = 𝑧𝑧−𝑀𝑀−12 �
𝑘𝑘=0
𝑀𝑀/2−1
𝑎𝑎𝑘𝑘 𝑧𝑧𝑀𝑀−12 −𝑘𝑘 + 𝑧𝑧−
𝑀𝑀−12 −𝑘𝑘
𝑋𝑋 𝜔𝜔 = 𝑒𝑒−𝑗𝑗𝜔𝜔𝑀𝑀−12 �
𝑘𝑘=0
𝑀𝑀/2−1
𝑎𝑎𝑘𝑘 𝑒𝑒𝑗𝑗𝜔𝜔𝑀𝑀−12 −𝑘𝑘 + 𝑗𝑗𝜔𝜔−𝑗𝑗𝜔𝜔 𝑀𝑀−1
2 −𝑘𝑘
= 2𝑒𝑒−𝑗𝑗𝜔𝜔𝑀𝑀−12 �
𝑘𝑘=0
𝑀𝑀/2−1
𝑎𝑎𝑘𝑘 cos 𝜔𝜔𝑀𝑀− 1
2− 𝑘𝑘
65
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Equi-ripples Equi-ripple design
𝑋𝑋 𝜔𝜔 = 2𝑒𝑒−𝑗𝑗𝜔𝜔𝑀𝑀−12 �
𝑘𝑘=0
𝑀𝑀/2−1
𝑎𝑎𝑘𝑘 cos 𝜔𝜔𝑀𝑀− 1
2− 𝑘𝑘
Goal: Find the optimal 𝑎𝑎𝑘𝑘s that satisfies passband / stopband ripple constraints.
66
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Design with Equi-ripples Equi-ripple design
min𝑎𝑎𝑘𝑘
𝑊𝑊 𝜔𝜔 𝐻𝐻𝑑𝑑 𝜔𝜔 − 2𝑒𝑒−𝑗𝑗𝜔𝜔𝑀𝑀−12 �
𝑘𝑘=0
𝑀𝑀/2−1
𝑎𝑎𝑘𝑘 cos 𝜔𝜔𝑀𝑀− 1
2− 𝑘𝑘
67
Desired frequency response
Equals:𝛿𝛿2𝛿𝛿1
for 𝜔𝜔 in pass band
1 for 𝜔𝜔 in stop band
𝛿𝛿2 = stopband ripple𝛿𝛿1 = passband ripple
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
68
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Designing IIR Filters No easy ways to design digital IIR filters
So let us start from analog filters
69
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Designing IIR Filters No easy ways to design digital IIR filters
So let us start from analog filters
Option 1: Preserve the difference equation!
70
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? In continuous-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
→ 𝑠𝑠𝑋𝑋 𝑠𝑠
In discrete-time
71
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? In continuous-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
→ 𝑠𝑠𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
= limΔ𝑇𝑇→0
𝑥𝑥 𝑡𝑡 − 𝑥𝑥 𝑡𝑡 − Δ𝑇𝑇Δ𝑇𝑇
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇
𝑇𝑇= 𝑥𝑥 𝑛𝑛 − 𝑥𝑥 𝑛𝑛 − 1
72
T=1
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? In continuous-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
→ 𝑠𝑠𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
= limΔ𝑇𝑇→0
𝑥𝑥 𝑡𝑡 − 𝑥𝑥 𝑡𝑡 − Δ𝑇𝑇Δ𝑇𝑇
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇
𝑇𝑇=
1𝑇𝑇𝑥𝑥 𝑛𝑛 − 𝑥𝑥 𝑛𝑛 − 1
73
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? In continuous-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
→ 𝑠𝑠𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
= limΔ𝑇𝑇→0
𝑥𝑥 𝑡𝑡 − 𝑥𝑥 𝑡𝑡 − Δ𝑇𝑇Δ𝑇𝑇
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇
𝑇𝑇=
1𝑇𝑇𝑥𝑥 𝑛𝑛 − 𝑥𝑥 𝑛𝑛 − 1
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
→1𝑇𝑇
1− 𝑧𝑧−1 𝑋𝑋 𝑧𝑧
74
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a second-derivative in discrete-time? In continuous-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
→ 𝑠𝑠2𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
=𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇
𝑇𝑇
75
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a second-derivative in discrete-time? In continuous-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a second-derivative in discrete-time? In continuous-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
→ 𝑠𝑠2𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
=𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
�𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 2𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇 + 𝑥𝑥 𝑛𝑛𝑇𝑇 − 2𝑇𝑇
𝑇𝑇2 →𝑥𝑥 𝑛𝑛 − 2𝑥𝑥 𝑛𝑛 − 1 + 𝑥𝑥 𝑛𝑛 − 2
𝑇𝑇2
77
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a second-derivative in discrete-time? In continuous-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
→ 𝑠𝑠2𝑋𝑋 𝑠𝑠
In discrete-time𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
=𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡
�𝑑𝑑2𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡2
𝑡𝑡=𝑛𝑛𝑇𝑇
=𝑥𝑥 𝑛𝑛𝑇𝑇 − 2𝑥𝑥 𝑛𝑛𝑇𝑇 − 𝑇𝑇 + 𝑥𝑥 𝑛𝑛𝑇𝑇 − 2𝑇𝑇
𝑇𝑇2 →𝑥𝑥 𝑛𝑛 − 2𝑥𝑥 𝑛𝑛 − 1 + 𝑥𝑥 𝑛𝑛 − 2
𝑇𝑇2
�𝑑𝑑𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡 𝑡𝑡=𝑛𝑛𝑇𝑇
→1𝑇𝑇2
1− 2𝑧𝑧−1 + 𝑧𝑧−2 𝑋𝑋 𝑧𝑧 =1𝑇𝑇2
1− 𝑧𝑧−1 2𝑋𝑋 𝑧𝑧
78
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? Translate continuous-time to discrete-time
𝑑𝑑𝑘𝑘𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡𝑘𝑘
→ 𝑠𝑠𝑘𝑘𝑋𝑋 𝑠𝑠
�𝑑𝑑𝑘𝑘𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡𝑘𝑘
𝑡𝑡=𝑛𝑛𝑇𝑇
→1𝑇𝑇
1− 𝑧𝑧−1 𝑘𝑘𝑋𝑋 𝑧𝑧
79
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? Translate continuous-time to discrete-time
𝑑𝑑𝑘𝑘𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡𝑘𝑘
→ 𝑠𝑠𝑘𝑘𝑋𝑋 𝑠𝑠
�𝑑𝑑𝑘𝑘𝑥𝑥 𝑡𝑡𝑑𝑑𝑡𝑡𝑘𝑘
𝑡𝑡=𝑛𝑛𝑇𝑇
→1𝑇𝑇
1− 𝑧𝑧−1 𝑘𝑘𝑋𝑋 𝑧𝑧
𝑠𝑠 →1𝑇𝑇
1− 𝑧𝑧−1
80
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Example: 𝑠𝑠 → 1
𝑇𝑇1− 𝑧𝑧−1
Use the derivative conversion to transform the following biquadfilter into the discrete-time domain.
𝐻𝐻 𝑠𝑠 =1
𝑠𝑠 + 0.1 2 + 9
81
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Example: 𝑠𝑠 → 1
𝑇𝑇1− 𝑧𝑧−1
Use the derivative conversion to transform the following bi-quad filter into the discrete-time domain.
𝐻𝐻 𝑠𝑠 =1
𝑠𝑠 + 0.1 2 + 9
𝐻𝐻 𝑧𝑧 =1
1𝑇𝑇 1− 𝑧𝑧−1 + 0.1
2+ 9
=𝑇𝑇2
𝑇𝑇2 1𝑇𝑇 1− 𝑧𝑧−1 + 0.1
2+ 9
=𝑇𝑇2
1− 𝑧𝑧−1 + 0.1𝑇𝑇 2 + 9𝑇𝑇2=
𝑇𝑇2
1 + 0.1𝑇𝑇 − 𝑧𝑧−1 2 + 9𝑇𝑇2
82
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Example: 𝑠𝑠 → 1
𝑇𝑇1− 𝑧𝑧−1
Use the derivative conversion to transform the following bi-quad filter into the discrete-time domain.
𝐻𝐻 𝑠𝑠 =1
𝑠𝑠 + 0.1 2 + 9
𝐻𝐻 𝑧𝑧 =𝑇𝑇2
1 + 0.1𝑇𝑇 − 𝑧𝑧−1 2 + 9𝑇𝑇2
1 + 0.1𝑇𝑇 − 𝑧𝑧−1 2 + 9𝑇𝑇2 = 0
1 + 0.1𝑇𝑇 − 𝑧𝑧−1 2 = −9𝑇𝑇2
1 + 0.1𝑇𝑇 − 𝑧𝑧−1 = ±3𝑇𝑇𝑗𝑗
𝑧𝑧−1 = 1 + 0.1𝑇𝑇 ∓ 3𝑇𝑇𝑗𝑗 𝑧𝑧 =1
1 + 0.1∓ 3𝑗𝑗 𝑇𝑇83
Finding poles
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Example: 𝑠𝑠 → 1
𝑇𝑇1− 𝑧𝑧−1
Use the derivative conversion to transform the following bi-quad filter into the discrete-time domain.
𝑧𝑧 =1
1 + 0.1 + 3𝑗𝑗 𝑇𝑇
84
Poles
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Example: 𝑠𝑠 → 1
𝑇𝑇1− 𝑧𝑧−1
𝑧𝑧 =1
1 + 0.1 + 3𝑗𝑗 𝑇𝑇
85
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design from Derivatives Question: What is a derivative in discrete-time? Translate continuous-time to discrete-time
𝑠𝑠 →1𝑇𝑇
1− 𝑧𝑧−1
Pros: Relatively simple
Cons: Very limiting
Stable continuous-time poles can only be mapped to low frequencies
86
1
Stable IIR analog filters map here
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
87
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Designing IIR Filters No easy ways to design digital IIR filters
So let us start from analog filters
Option 2: Preserve the impulse response!
88
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Question: How else can I represent my transfer function?
𝐻𝐻 𝑠𝑠 = �𝑘𝑘=1
𝐾𝐾1
𝑠𝑠 − 𝑝𝑝𝑘𝑘
89
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Question: How else can I represent my transfer function?
𝐻𝐻 𝑠𝑠 = �𝑘𝑘=1
𝐾𝐾1
𝑠𝑠 − 𝑝𝑝𝑘𝑘= �
𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
90
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Question: How else can I represent my transfer function?
𝐻𝐻 𝑠𝑠 = �𝑘𝑘=1
𝐾𝐾1
𝑠𝑠 − 𝑝𝑝𝑘𝑘= �
𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
ℎ 𝑡𝑡 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
91
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Question: How else can I represent my transfer function?
𝐻𝐻 𝑠𝑠 = �𝑘𝑘=1
𝐾𝐾1
𝑠𝑠 − 𝑝𝑝𝑘𝑘= �
𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
ℎ 𝑡𝑡 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
ℎ 𝑛𝑛𝑇𝑇 = ℎ 𝑛𝑛 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑛𝑛𝑇𝑇 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘 𝑒𝑒𝑝𝑝𝑘𝑘𝑇𝑇 𝑛𝑛
92
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Impulse Invariance Question: How else can I represent my transfer function?
𝐻𝐻 𝑠𝑠 = �𝑘𝑘=1
𝐾𝐾1
𝑠𝑠 − 𝑝𝑝𝑘𝑘= �
𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
ℎ 𝑡𝑡 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑡𝑡
ℎ 𝑛𝑛𝑇𝑇 = ℎ 𝑛𝑛 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘𝑒𝑒𝑝𝑝𝑘𝑘𝑛𝑛𝑇𝑇 = �𝑘𝑘=1
𝐾𝐾
𝑐𝑐𝑘𝑘 𝑒𝑒𝑝𝑝𝑘𝑘𝑇𝑇 𝑛𝑛
𝐻𝐻 𝑧𝑧 = �𝑘𝑘=1
𝐾𝐾𝑐𝑐𝑘𝑘
1− 𝑒𝑒𝑝𝑝𝑘𝑘𝑇𝑇𝑧𝑧−1
93
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
99
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform Designing IIR Filters No easy ways to design digital IIR filters
So let us start from analog filters
Option 3: Preserve the definition of z!
100
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform Question: How are z and s related? From continuous-time to discrete-time𝑠𝑠 = 𝑗𝑗Ω𝑒𝑒𝑠𝑠𝑡𝑡 = 𝑒𝑒𝑠𝑠𝑛𝑛𝑇𝑇 = 𝑧𝑧𝑛𝑛
𝑧𝑧 = 𝑒𝑒𝑠𝑠𝑇𝑇
Building an approximation (𝑒𝑒𝑥𝑥 ≈ 1 + 𝑥𝑥)
𝑧𝑧 =𝑒𝑒𝑠𝑠𝑇𝑇2
𝑒𝑒−𝑠𝑠𝑇𝑇2≈
1 + 𝑠𝑠𝑇𝑇/21− 𝑠𝑠𝑇𝑇/2
101
Taylor Series Expansion / Approximation
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform Question: How are z and s related? From continuous-time to discrete-time𝑠𝑠 = 𝑗𝑗Ω𝑒𝑒𝑠𝑠𝑡𝑡 = 𝑒𝑒𝑠𝑠𝑛𝑛𝑇𝑇 = 𝑧𝑧𝑛𝑛
𝑧𝑧 = 𝑒𝑒𝑠𝑠𝑇𝑇 𝑠𝑠 =1𝑇𝑇
ln 𝑧𝑧
Building an approximation
𝑠𝑠 ≈2𝑇𝑇𝑧𝑧 − 1𝑧𝑧 + 1
102
BilinearExpansion / Approximation
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform The Bilinear Transform
Continuous-time to discrete-time
𝑠𝑠 →2𝑇𝑇
1− 𝑧𝑧−1
1 + 𝑧𝑧−1
Discrete-time to continuous-time
𝑧𝑧 →1 + 𝑠𝑠𝑇𝑇/21− 𝑠𝑠𝑇𝑇/2
103
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform
Example: 𝑠𝑠 → 2𝑇𝑇1−𝑧𝑧−1
1+𝑧𝑧−1, 𝑧𝑧 → 1+𝑠𝑠𝑇𝑇/2
1−𝑠𝑠𝑇𝑇/2
Use the bilinear transform to transform the following biquad filter into the discrete-time domain.
𝐻𝐻 𝑠𝑠 =1
𝑠𝑠 + 0.1 2 + 9
104
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform
Example: 𝑠𝑠 → 2𝑇𝑇1−𝑧𝑧−1
1+𝑧𝑧−1, 𝑧𝑧 → 1+𝑠𝑠𝑇𝑇/2
1−𝑠𝑠𝑇𝑇/2
Use the bilinear transform to transform the following biquad filter into the discrete-time domain.
𝐻𝐻 𝑠𝑠 =1
𝑠𝑠 + 0.1 2 + 9
𝐻𝐻 𝑧𝑧 =1
2𝑇𝑇
1− 𝑧𝑧−11 + 𝑧𝑧−1 + 0.1
2+ 9
=1 + 𝑧𝑧−1 2
2𝑇𝑇 1− 𝑧𝑧−1 + 0.1
2+ 9 1 + 𝑧𝑧−1 2
105
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
IIR Filter Design by Bilinear Transform
Example: 𝑠𝑠 → 2𝑇𝑇1−𝑧𝑧−1
1+𝑧𝑧−1, 𝑧𝑧 → 1+𝑠𝑠𝑇𝑇/2
1−𝑠𝑠𝑇𝑇/2
𝐻𝐻 𝑧𝑧 =1 + 𝑧𝑧−1 2
2𝑇𝑇 1− 𝑧𝑧−1 + 0.1
2+ 9 1 + 𝑧𝑧−1 2
106
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing
Outline• Designing FIR Filters with Windows• Designing FIR Filters with Frequency Sampling• Designing FIR Filters with Equi-ripples• Designing IIR Filters with Discrete Differentiation• Designing IIR Filters with Impulse Invariance• Designing IIR Filters with the Bilinear Transform• Related Analog Filters
Lecture 22: Design of FIR / IIR FiltersFoundations of Digital Signal Processing
107
Lecture 22: Designing FIR / IIR FiltersFoundations of Digital Signal Processing