DSP CH-10a (Basics)
DSP CH-10a (Basics)
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. [cf.
Eq. (3.3.8) and (33.9)]
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
Recall – Frequency Response :
𝐷𝑇𝐹𝑇
ℎ 𝑛 𝐻 𝜔 =𝐻 𝑧 ቚ 𝑗𝜔
𝑧=𝑒
10
Recall – Frequency Response :
𝐻 𝜔 =𝐻 𝑧 ቚ
𝑧=𝑒 𝑗𝜔
11
Recall – Frequency Response :
𝐻 𝜔 =𝐻 𝑧 ቚ
𝑧=𝑒 𝑗𝜔
12
Recall – Frequency Response : 𝐷𝑇𝐹𝑇
RECALL: 𝑋(𝜔) is periodic with period 2𝜋. ℎ(𝑛) 𝐻(𝜔)
clearvars; close all; clc;
LW = 'LineWidth'; FS = 'FontSize';
%
b = [0.2]; a = [1 -0.8];
% H(z) = 1 / (1-0.8z^-1)
% ==> h(n) = 0.8^n
om = -pi:1e-2:pi;
H = freqz(b,a,om);
subplot(211);
plot(om,abs(H),LW,2); grid;
title('Magnitude Response',FS,20);
subplot(212);
plot(om,angle(H),LW,2); grid;
title('Phase Response',FS,20);
13
Recall – Frequency Response :
14
Ideal Filters : All ideal filters shown here are Non-Causal
and hence CANNOT be realized in practice.
20
§10.1.1 Causality and Its Implications
21
Causality & Its Implications :
22
Causality & Its Implications : (wc/pi) * sinc(wc*n/pi);
𝜋
ℎ(𝑛) with 𝜔𝑐 =
4
23
RECALL :
24
RECALL :
25
Causality & Its Implications :
Ideal BPF Vs
Practical BPF
27
Paley-Wiener Theorem
28
Causality & Its Implications :
29
Causality & Its Implications :
30
Causality & Its Implications :
One important conclusion we draw from the Paley-Wiener theorem is
that:
The magnitude response |𝑯 𝒆𝒋𝝎 | of a stable
and causal system CANNOT BE ZERO OVER ANY FINITE BAND OF
FREQUENCIES (can ONLY be zero at some frequencies) because, in
this case, the integral becomes infinite.
Hence, any stable ideal frequency-selective filter must be
non-causal.
31
Causality & Its Implications :
Another important conclusion that we draw
from the Paley-Wiener theorem is :
𝒋𝝎
Given the magnitude response |𝑯 𝒆 |
of a causal and stable system, we
CANNOT ASSIGN its phase response
arbitrarily.
32
Causality & Its Implications – SUMMARY :
To summarize, CAUSALITY has very important IMPLICATIONS
in the design of frequency selective filters. These are:
1) Frequency response 𝑯(𝝎) cannot be zero, except at a finite set
of points in frequency;
2) Magnitude response |𝑯 𝝎 | cannot be constant in any finite
range of frequencies and the transition from passband to
stopband cannot be infinitely sharp [this is a consequence of the Gibbs
phenomenon, which results from the truncation of ℎ(𝑛) to achieve causality]; and
3) Real and imaginary parts of 𝑯(𝝎) are INTERDEPENDENT
and are related by the discrete Hilbert transform. As a consequence,
the magnitude |𝐻 𝜔 | and phase Θ(𝜔) of 𝐻(𝜔) cannot be chosen arbitrarily.
33
Causality & Its Implications :
34
Causality & Its Implications :
35
Causality & Its Implications :
Filter design problem:
Properly selecting the coefficients
{𝑎𝑘 } and {𝑎𝑘 } to approximate the Example: 𝑀 = 𝑁 = 3;
𝑏𝑘 = [1, 1.655, 1.655, 1]
ideal filters. 𝑎𝑘 = [1, −1.57, 1.264, −0.4]
36
Causality & Its Implications :
37
Causality & Its Implications :
FIR Filter
𝑀−1
𝐻 𝜔 =𝐻 𝑧 ቚ = 𝑏𝑘 𝑒 −𝑗𝜔𝑘
𝑧=𝑒 𝑗𝜔
𝑘=0
IIR Filter
𝑦 𝑛 = ??? 38
Causality & Its Implications :
FIR Filter design problem:
Properly selecting the coefficients {𝒃𝒌 } to approximate the ideal
filters.
For FIR filters, 𝑏𝑘 = ℎ(𝑘) = Impulse response of the designed filter.
IIR Filter design problem:
Properly selecting the coefficients {𝒃𝒌 } and {𝒂𝒌 } to approximate the
ideal filters.
Plugging {𝑏𝑘 } and {𝑎𝑘 } into Eq. (10.1.15) yields 𝐻(𝜔), the Frequency
Response.
From 𝐻(𝜔), we can compute, ℎ(𝑛) = Impulse response of the
designed filter. 39
§10.1.2 Characteristics of
Practical Frequency-Selective Filters
40
DISCLAIMER
41
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.
42
REFERENCES :
[1] [Proakis-2007] DSP 4th Ed
43