20CYS111 - DSP - Unit III
20CYS111 - DSP - Unit III
as
Frequency-Selective Filters
(Unit 3)
Filter Design Flow
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.
• In general, a linear time-invariant system modifies the input signal
spectrum X(ω) according to its frequency response H(ω) to yield an
output signal with spectrum
Y(ω) = H(ω)X(ω)
• H(ω) act as a spectral shaping function to the different frequency
components in the input signal
• Any linear time-invariant system can be considered to be a frequency-
shaping filter
• Consequently , the terms “ linear time-invariant system ” and “filter”
are synonymous and are often used interchangeably
The term filter is used to describe a linear time-invariant system that
perform spectral shaping or frequency-selective filtering
• Filtering is used in digital signal processing in a variety of ways,
removal of undesirable noise from desired signals,
spectral shaping such as equalization of communication channels,
signal detection in radar, sonar, and communications,
spectral analysis of signals
• Filters are usually classified according to their frequency-domain
characteristics as
Low pass
Highpass
Bandpass
Band stop or band -elimination filters.
Ideal filters have a constant-gain (usually taken as unity-gain) passband
characteristic and zero gain in their stopband.
The ideal magnitude response characteristics of these types of filters are
illustrated in Fig
• Ideal filters have
a constant-gain passband characteristic
zero gain in their stopband
Ideal filters have a constant-gain (usually taken as unity-gain) passband
characteristic and zero gain in their stopband.
Another characteristic of an ideal
filter is a linear phase response
Assume that a signal sequence x(n) with frequency components confined to the
frequency range is passed through a filter with frequency response, where C and α
are constants
14
Phase delay and group delay of a filter as
15
Separating the real and imaginary part and taking the ratio is given below,
16
Solving the above equation gives,
17
eg. For N =7 (odd) and N = 6 (even)
FIR filter has linear phase if its unit impulse response satisfies the condition
18
h(n) =
Generalized frequency response Expression for N odd and N even
(Symmetric impulse response)
19
Design of FIR filters using Windows
20
Filter Design by Windowing
• Simplest way of designing FIR filters
• Start with ideal frequency response
1
h ne
Hd e j
d
j n hd n
2
Hd
e j
e j n
d
n
21
• Possible way to obtain a causal FIR filter from ideal is
hd n 0 n N
hn
0 else
22
• After multiplying with the window function, we get a finite duration
sequence h(n)
23
Fourier transform of window function W(ω) (Rectangular window)
24
Fourier transform of w[n], W(ω)
25
26
The width of the main lobe is 4π/N )
• Specifically, the convolution of Hd(ω) with W(ω) has the effect of smoothing
• On the other hand, the large sidelobes of W(ω) result in some undesirable ringing effects in the FIR filter
frequency response H(ω) and also in relatively larger sidelobes in H(ω)
N=M
27
Rectangular window spectrum for N=25 samples
28
Frequency response of Low pass filter at N=25
29
Rectangular window spectrum for N=51 samples
30
Undesirable ringing effect in FIR filter frequency response – Rectangular
window, How it is overcome?
31
Hanning Window
Hanning window - time
domain
Hanning window -
frequency domain - N=25
32
Hanning window -
frequency domain – N=51
33
Hamming window
34
Hamming window: Frequency domain
35
Frequency response of LPF using Hamming window
36
Other window functions
37
Exercise
38
39
40
Other window functions
(Mathematical expressions)
41
42
• The above filter designed has to be linear phase also.
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Assignment
• Digital Differentiator
• Hilbert Transformer
• Real life applications of Signal Processing (Minimum 2 Scenarios)
63
IIR Filter Design
• 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.
• In the filter design process, we determine the coefficients of a causal
FIR or IIR filter that closely approximates the desired frequency
response specifications.
• 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.
64
• 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.
• If there is no requirement for a linear-phase characteristic, either an IIR or an
FIR filter may be employed. However, as a general rule, an IIR filter has lower
sidelobes in the stopband than an FIR filter having the same number of
parameters.
65
• Digital IIR filter design - based on converting an analog filter into a
digital filter
• Analog filter design is a mature and well developed field
• Begin the design of a digital filter in the analog domain and then
convert the design into the digital domain.
66
• An analog filter can be described by its system function.
67
• Analog linear time invariant system is stable if all its poles lie in the
left half of s plane
68
Keywords:
ROC -
Region of Convergence
Re(s) = σ
Im(s) = Ω
69
70
71
Keywords:
ROC -
Region of Convergence,
Unit Circle
72
73
74
75
Design of Digital filters from Analog filters
• For the given specifications of a digital filter,
Map the desired digital filter specifications into those for an analog
filter
Derive the analog transfer function for the analog protype
Transform the transfer function of the analog prototype into an
equivalent digital filter transfer function
Transformation methods:
• Bilinear transformation
• Impulse Invariant Transformation
76
Magnitude response of LPF: Digital filter
77
Analog Lowpass filter design
An analog filter can be described by its system function
For a stable analog filter, the poles of H(s) lie in the left half of s- plane
Two types of Analog filter design:
Butterworth filter
Chebyshev filter
78
• Butterworth filter • N is the order of the filter
• is the cut off frequency
• Maximum response at frequency = 0
• Ideal response shown in dash line
• Magnitude response approaches ideal
as N increases
• For frequency less than cut off
frequency, magnitude approximately
equal to 1
• At frequency = cut off frequency, the
curve passes 0.707 or -3dB
79
Low pass Butterworth magnitude response
80
• Magnitude squared function of Normalized Butterworth filter (Cutoff
frequency = 1 rad/sec)
81
Implications
• Poles lies in both left half and right half of s plane (H(s) & H(-s))
• If H(s) has roots in one half implies H(-s) in other half of s plane
• Obtain the roots by equating the denominator to zero
• N odd,
• the roots as shown
• N even,
• the roots as shown
82
• N =3, implies
Pole locations in the s plane To ensure stability, only left half poles is
considered.
83
• N=3;
• To ensure stability, only left half poles is considered.
• So, the transfer function of third order Butterworth filter for unity cut
off frequency 1 rad/sec is ,
• i.e.,
84
List of Butterworth polynomials
85
• How to determine the order, given the filter speciifcations
86
• Similarly, considering stopband attenuation,
After simplification,
87
• Order of filter
Where
88
• Cut off frequency
Eqn. (1)
Eqn. (2)
90
therefore, N = 4
=
93
Impulse Invariant Transformation
• IIR digital filter is designed such that unit impulse response h(n) of
digital filter is the sampled version of analog filter.
• Let H (s) is the system function (Transfer function) of analog filter.
94
Sample this analog signal at t = nT, where T is the sampling perio
95
Steps to design a filter using Impulse
Invariant method
96
Impulse Invariant
Transformation
97
Impulse Invariant Transformation
(Underlying mapping function)
• The mapping is characterized by
• Implies, and
98
Pole on jΩ axis (σ= 0)
99
Pole in the left half of s-plane (σ <0)
100
Pole in the right half of s-plane (σ >0)
101
Disadvantages of Impulse Invariant
102
S1 pole
103
Transform H(s) to H(z) To remember
104
Bi-Linear Transformation
105
106
107
108
Relation between analog and discrete frequency in Bi-linear Transformation
109
For low frequencies, relationship between analog and discrete
frequencies are linear
For high frequencies, relationship between analog and discrete
frequencies become non linear, due to this distortion is
introduced in the frequency scale of digital filter – WARPING 110
EFFECT
The warping effect can be eliminated by pre-warping the analog filter
-
111
Steps to design using Bilinear
transformation
• From the given specifications, find the prewarped frequencies
• Using the analog frequencies, find H(s) of the analog filter
• Select the sampling rate T
• Substitute,
112
Design a digital Butterworth filter with T = 1 sec
(sampling period) using Bilinear transformation
113
114
115