Professional Documents
Culture Documents
Design of Digital Filters
Design of Digital Filters
Contents:
General considerations
o Causality and its Implications
o Characteristics of Practical Frequency-Selective Filters
Design of fir filters
o Symmetric and Antisymmetric Filters
o Design of Linear-Phase FIR Filters using Windows
o Design of Linear-Phase FIR Filters by the Frequency-Sampling Method
o Design of Optimum Equiripple Linear-Phase FIR Filters
o Design of FIR Differentiators
o Design of Hilbert Transformers
o Comparison of Design Methods for Linear-Phase FIR Filters
2
Contents:
Design of IIR filters from analog filters
o IIR Filter Design by Approximation of Derivatives
o IIR Filter Design by Impulse Invariance
o IIR Filter Design by the Bilinear Transformation
o Characteristics of Commonly Used Analog Filters
o Some Examples of Digital Filter Designs Based on the Bilinear
Transformation
Frequency transformations
o Frequency Transformations in the Analog Domain
o Frequency Transformations in the Digital Domain
3
Introduction :
o With the background that we have developed in the
preceding chapters, we are now in a position to treat the
subject of digital filter design.
o We shall describe several methods for designing FIR and
IIR digital filters.
o In the design of frequency-selective filters, the desired filter
characteristics are specified in the frequency domain in
terms of the desired magnitude and phase response of the
filter.
4
Introduction :
o In the filter design process, we determine the coefficients
of a causal FIR or IIR filter that closely approximates
the desired frequency response specifications.
o The issue of which type of filter to design, FIR or IIR,
depends on the NATURE OF THE PROBLEM and on
the SPECIFICATIONS OF THE DESIRED
FREQUENCY RESPONSE.
o In practice, FIR filters are employed in filtering problems
where there is a requirement for a linear-phase
characteristic within the passband of the filter. 5
Introduction :
o If there is no requirement for a linear-phase characteristic,
either an IIR or an FIR filter may be employed.
o However, as a general rule, an IIR filter has lower side-
lobes in the stopband than an FIR filter having the same
number of parameters.
o For this reason, if some phase distortion is either tolerable or
unimportant, an IIR filter is preferable, primarily because
its implementation involves fewer parameters, requires less
memory and has lower computational complexity.
6
Introduction :
oIn conjunction with our discussion of digital filter
design, we describe frequency transformations in
both the analog and digital domains for transforming a
lowpass prototype filter into:
Another lowpass,
Bandpass,
Bandstop, or
Highpass filter.
7
Introduction :
oToday, FIR and IIR digital filter design is greatly
facilitated by the availability of numerous computer
software programs.
oIn describing the various digital filter design methods
in this chapter, our primary objective is to give the
reader the background necessary to select the
filter that best matches the application
and satisfies the design requirements.
8
§10.1 General Considerations
9
General Considerations :
12
Causality & Its Implications :
13
Causality & Its Implications :
𝜋
ℎ(𝑛) with 𝜔𝑐 =
4
14
RECALL :
15
Causality & Its Implications :
Ideal BPF Vs
Practical BPF
17
Causality & Its Implications :
18
Causality & Its Implications :
19
Causality & Its Implications :
20
Causality & Its Implications :
fun = @(x) (x.^2).^(-1/3);
plot([-2:0.01:2],fun([-2:0.01:2]));
grid;
fun(0)
q = integral(fun,-1,1)
21
Causality & Its Implications :
One important conclusion we draw from the Paley-Wiener theorem is
that:
24
Causality & Its Implications :
25
Causality & Its Implications :
EXAMPLE:
Consider a causal signal: ℎ 𝑛 = [ 𝟏 2 3 4 5]
Its reflected version is ℎ −𝑛 = [5 4 3 2 𝟏]
Hence, ℎ𝑒 𝑛 = [2.5 2 1. 5 1 𝟏 1 1.5 2 2.5], and
ℎ𝑜 𝑛 = [−2.5 − 2 − 1. 5 − 1 𝟎 1 1.5 2 2.5],
In contrast to non-causal sequence (which require both even and odd parts),
this causal 𝒉[𝒏] can be uniquely defined BY ITS EVEN PARTS ONLY as:
𝒉 𝒏 = 𝟐𝒉𝒆 𝒏 𝒖 𝒏 − 𝒉𝒆 𝟎 𝜹 𝒏 = 2 2 3 4 5 − 1 0 0 0 0 = [1 2 3 4 5]
Alternatively, we can define ℎ 𝑛 from ℎ𝑜 𝑛 if we also know ℎ 0 because 𝒉𝒐 𝟎 = 𝟎
always.
27
Recall :
28
EX. 10.1.1
29
Causality & Its Implications :
30
Causality & Its Implications :
31
Causality & Its Implications :
1 1
ℎ 𝑛 = 𝑎𝑛 𝑢 𝑛 𝐻 𝑧 = 𝐻 𝜔 =
1−𝑎𝑧 −1 1−𝑎𝑒 −𝑗𝜔
Hence
1 1
𝐻 𝜔 = −𝑗𝜔
=
1 − 𝑎𝑒 1 − 𝑎{cos 𝜔 − 𝑗𝑠𝑖𝑛 𝜔 }
1 1 − 𝑎 cos 𝜔 − 𝑗𝑎𝑠𝑖𝑛 𝜔
= ×
{1 − 𝑎 cos 𝜔 } + 𝑗𝑎𝑠𝑖𝑛 𝜔 1 − 𝑎 cos 𝜔 − 𝑗𝑎𝑠𝑖𝑛 𝜔
1 − 𝑎 cos 𝜔 − 𝑗𝑎𝑠𝑖𝑛 𝜔 1 − 𝑎 cos 𝜔 − 𝑗𝑎𝑠𝑖𝑛 𝜔
= 2 2 2
=
1 − 𝑎 cos 𝜔 + a sin (𝜔) 1 + 𝑎2 − 2𝑎 cos 𝜔
1 − 𝑎 cos 𝜔 𝑎𝑠𝑖𝑛 𝜔
= 2
−𝑗
1 + 𝑎 − 2𝑎 cos 𝜔 1 + 𝑎2 − 2𝑎 cos 𝜔
1−𝑎 cos 𝜔 𝑎𝑠𝑖𝑛 𝜔
𝐻𝑅 𝜔 = ; and 𝐻𝐼 𝜔 = −
1+𝑎2 −2𝑎 cos 𝜔 1+𝑎2 −2𝑎 cos 𝜔
32
Causality & Its Implications :
33
Causality & Its Implications :
34
Causality & Its Implications :
35
Causality & Its Implications :
37
Causality & Its Implications :
38
Recall :
39
§10.1.2 Characteristics of
Practical Frequency-Selective Filters
40
Characteristics of Practical Frequency-Selective Filters :
41
Characteristics of Practical Frequency-Selective Filters :
42
Tolerance Diagram
and
Filter Specifications
43
Characteristics of Practical Frequency-Selective Filters :
Transition BW: Δ𝜔 = 𝜔𝑠 − 𝜔𝑝
Filter BW: Δ𝜔 = 𝜔𝑝 − 0 = 𝜔𝑝
44
Characteristics of Practical Frequency-Selective Filters :
45
Characteristics of Practical Frequency-Selective Filters :
46
Characteristics of Practical Frequency-Selective Filters :
47
Characteristics of Practical Frequency-Selective Filters :
49
Characteristics of Practical Frequency-Selective Filters :
By re-arranging the definitions of 𝐴𝑝 and 𝐴𝑠 , we get the
following Relative to Absolute Conversion formulas:
𝐴𝑝 /20
10 −1
𝛿𝑝 = 𝐴𝑝 /20
10 +1
and
1 + 𝛿𝑝
𝛿𝑠 = 𝐴 /20
10 𝑠
50
Characteristics of Practical Frequency-Selective Filters :
51
Characteristics of Practical Frequency-Selective Filters :
deltap = 0.0288
deltas = 0.0103
52
Characteristics of Practical Frequency-Selective Filters :
55
§10.2 Design of FIR Filters
56
Design of FIR Filters :
57
§10.2.1 Symmetric and
Anti-Symmetric FIR Filters
58
Symmetric and Anti-Symmetric FIR : 𝑀 = Length of FIR Filter
= Length of its [𝑛]
59
Symmetric and Anti-Symmetric FIR :
𝑀−1
Center of Symmetry is at 𝑛 = 2
𝑀−1
𝑛=
2
is integer for M=Odd (middle
sample) i.e., for Type I and Type III
𝑀−1
𝑛=
2
is integer+0.5 for M=Even
(middle of two center samples) i.e., for
Type II and Type IV
𝑀−1
𝑀 =9 =4
2
𝑀−1
𝑀 =8 = 3.5
2
61
Symmetric and Anti-Symmetric FIR :
62
Symmetric and Anti-Symmetric FIR :
middle sample 63
Symmetric and Anti-Symmetric FIR :
64
Symmetric and Anti-Symmetric FIR :
65
Symmetric and Anti-Symmetric FIR :
Example:
ℎ 𝑛 = 3, 2, 0, −2, −3 ;
𝐻 𝑧 = 3𝑧 −0 + 2𝑧 −1 + 0𝑧 −2 − 2𝑧 −3 − 3𝑧 −4
𝐻 𝑧 −1 = 3𝑧 +0 + 2𝑧 +1 + 0𝑧 +2 − 2𝑧 +3 − 3𝑧 +4
𝒛−𝟒 × 𝑯 𝒛−𝟏 = 3𝑧 −4 + 2𝑧 −3 + 0𝑧 −2 − 2𝑧 −1 − 3𝑧 +0 = −𝑯(𝒛)
h = [3 2 0 -2 -3];
ans = ans =
% Type-III LP FIR Filter
1.0000 + 0.0000i 1.0000 + 0.0000i
b1 = h;
-0.3333 + 0.9428i -0.3333 + 0.9428i
b2 = -fliplr(b1);
-0.3333 - 0.9428i -0.3333 - 0.9428i
roots(b1)
-1.0000 + 0.0000i -1.0000 + 0.0000i 66
roots(b2)
Symmetric and Anti-Symmetric FIR :
67
Symmetric and Anti-Symmetric FIR :
68
Symmetric and Anti-Symmetric FIR :
69
Symmetric and Anti-Symmetric FIR :
70
Symmetric and Anti-Symmetric FIR :
71
Symmetric and Anti-Symmetric FIR :
72
Symmetric and Anti-Symmetric FIR :
73
Symmetric and Anti-Symmetric FIR :
74
Symmetric and Anti-Symmetric FIR :
𝑀+1
TYPE-I LP FIR FILTER 𝑀 = Odd & ℎ[𝑛] Symmetric coefficients
2
𝑀
TYPE-II LP FIR FILTER 𝑀 = Even & ℎ[𝑛] Symmetric coefficients
2
𝑀−1
TYPE-III LP FIR FILTER 𝑀 = Odd & ℎ[𝑛] Anti-symmetric coefficients
2
𝑀
TYPE-IV LP FIR FILTER 𝑀 = Even & ℎ[𝑛] Anti-symmetric coefficients
2 75
Symmetric and Anti-Symmetric FIR :
76
Symmetric and Anti-Symmetric FIR :
77
Symmetric and Anti-Symmetric FIR :
78
Symmetric and Anti-Symmetric FIR :
79
IIR Vs FIR Vs L-P FIR
80
Symmetric and Anti-Symmetric FIR :
81
Symmetric and Anti-Symmetric FIR :
84
DISCLAIMER
85
These power point slides are NOT
SUBSTITUTE of reading TEXT
BOOK(S).
You’re ALWAYS DIRECTED to
CAREFULLY READ the relevant
book chapter and SOLVE ALL
Examples and End Problems.
86
REFERENCES :
[1] [Proakis-2007] DSP 4th Ed
87