Digital Signal Processing(BEC-42)
Unit-3
Lecture-1
(FIR Filter Design)
Date:12/10/2020
Digital Signal Processing (BEC-42)
➢ In the FIR system, the impulse sequence is of finite duration,
i.e. it has a finite numbers of non –zero terms.
For example, the system with the impulse response
➢ Usually implemented using structures with no feedback(non
recursive structures- all poles)
➢ Suppose a system has the following difference equation with
x(n) and y(n) as input and output.
Digital Signal Processing (BEC-42)
Response of FIR filter depends upon only present and past input samples.
Digital Signal Processing (BEC-42)
Design Technique
Digital Signal Processing(BEC-42)
If h(nT) is an even sequence, then will be zero and if h(Nt) is
an odd sequence, then the will be zero.
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Design Process:
➢ Decide whether is to be set equal to zero.
➢ Expand in a Fourier series.
➢ The unit pulse response is determined from Fourier
coefficient.
Digital Signal Processing(BEC-42)
Problem: Use the Fourier series method to design a low-pass
digital filter to approximate the ideal specifications given by
𝟏 𝒇𝒐𝒓 𝒇 ≤ 𝒇𝒑
𝑯 𝒆𝒋𝝎 = ൞ 𝑭
𝟎 𝒇𝒑 < 𝒇 ≤
𝟐
Where 𝒇𝒑 is pass-band frequency and F is sampling frequency.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Frequency Sampling Method
➢ In this method, a set of samples is determined from desired
frequency response
➢ IDFT is applied to get filter coefficients
𝑯𝒅 (𝒆𝒋𝝎 ) 𝑯𝒅 (𝒌) h(𝒏)
Frequency Sampling Inverse DFT
Digital Signal Processing (BEC-42)
Design Techniques:
➢ Type-I Design ( includes sample at frequency 𝜔 =0)
➢ Type-II Design ( exclude sample at frequency 𝜔 =0)
Type-I Design
Digital Signal Processing (BEC-42)
Then apply IDFT to get filter coefficient
For real valued h(n)
Digital Signal Processing(BEC-42)
and
Digital Signal Processing(BEC-42)
Type-II Design: Sample at frequency 𝜔 =0 is omitted
Digital Signal Processing(BEC-42)
Problem: A low-pass filter has the desired response as given
below
−𝒋𝟑𝝎
𝝅
𝒆 𝟎≤𝝎≤
𝑯𝒅 𝒆𝒋𝝎 = 𝟐
𝝅
𝟎 ≤𝝎≤𝝅
𝟐
Determine the filter coefficients h(n) for M=7 using type-I
frequency sampling method.
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Problem: Design a band pass filter with the following
specifications:
Sampling frequency, F= 8kHz
Cut off frequencies, 𝑓𝑐1 = 1 𝑘𝐻𝑧 𝑎𝑛𝑑 𝑓𝑐2 = 3 𝑘𝐻𝑧
Use frequency sampling method and determine the filter
coefficient for M=7.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: Design a Finite Impulse Response low-pass filter
with a cut-off frequency of 1 kHz and sampling rate of 4kHz
with 11 samples using Fourier series.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Problem: Design an ideal filter with a frequency response
𝝅 𝝅
𝟏 − ≤𝝎≤
𝑯𝒅 𝒆𝒋𝝎 = 𝟐 𝟐
𝝅
𝟎 ≤ 𝝎 ≤𝝅
𝟐
Determine h(n) and H(z) for M=11 and plot the magnitude
response.
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Problem: Determine the filter coefficients of a linear phase
FIR filter of length M=15 which has a symmetric unit
sample response and a frequency response that satisfies the
conditions
𝟐𝝅𝒌 𝟏 𝒌 = 𝟎, 𝟏, 𝟐, 𝟑
𝑯 =ቊ
𝟏𝟓 𝟎 𝒌 = 𝟒, 𝟓, 𝟔, 𝟕
Digital Signal Processing (BEC-42)
Solution: For odd M
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: (a) Use frequency sampling method to design an
𝜋
FIR low-pass filter 𝜔𝑐 = for M=15, (b) Repeat part (a) by
4
selecting an additional sample 𝐻(𝑘) =0.5 in the transitions
band.
Digital Signal Processing (BEC-42)
Solution: For odd M
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
(b) By introducing an additional sample in the transition band, the
magnitude of frequency response is given by
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Windowing Techniques
➢ The desired frequency response of digital filter is given as
where impulse response( Fourier coefficients) of filter is given
as
➢ Impulse response is of infinite duration.
➢ Filter is non-causal and unrealizable.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Desirable characteristics of window functions:
Digital Signal Processing (BEC-42)
1
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
2
From equation 1 and 2, the linear phase response of causal filter is
given by and the non-causal impulse response
has a zero phase shift.
Digital Signal Processing(BEC-42)
Problem: A low-pass filter is to be designed with the
following desired frequency response
𝝅 𝝅
𝒆−𝒋𝟐𝝎 − ≤𝝎≤
𝑯𝒅 𝒆𝒋𝝎 = 𝟒 𝟒
𝝅
𝟎, ≤ 𝝎 ≤𝝅
𝟒
Determine the filter coefficients ℎ𝑑 (n) if the window
1, 0≤𝑛≤4
function is defined as 𝑤 𝑛 = ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Also, determine the frequency response H( 𝑒 𝑖𝜔 ) of the
designed filter.
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing (BEC-42)
Windowing Technique
➢ Hamming Window Function:
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
➢ Hanning Window Function:
Digital Signal Processing (BEC-42)
Problem: Design a filter with
−𝒋𝟑𝝎
𝝅 𝝅
𝒆 , − ≤𝝎≤
𝑯𝒅 𝒆−𝒋𝝎 = 𝟒 𝟒
𝝅
𝟎, ≤ 𝝎 ≤𝝅
𝟒
using a Hamming window with M=7.
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Problem: Design an ideal high-pass filter with a frequency
response
𝝅
𝟏, ≤ 𝝎 ≤𝝅
𝑯𝒅 𝒆𝒋𝝎 = 𝟒
𝝅
𝟎, 𝝎 ≤
𝟒
Find h(n) and H(z) for M=11 using Hanning Window.
Digital Signal Processing (BEC-42)
Solution:
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Problem: Design a high pass filter using Hamming
window with a cut-off frequency of 1.2 rad and M=9.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: Design a band-pass filter to pass frequencies in
the range 1-2 rad using Hanning window M=5.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Blackman Window Function
Digital Signal Processing (BEC-42)
Bartlett Window Function
Frequency-domain characteristics of window functions
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Magnitude Response
Digital Signal Processing (BEC-42)
Phase Response Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Frequency-domain characteristics of window functions
➢ Main lobe width is inversely proportional to M.
➢ Increase in window length decreases the transition band.
➢ Minimum stopband attenuation is independent of M and function
of window.
➢ Min stopband attenuation has the max. main lobe width.
➢ For desired transition band, length of filter must be increased for
reducing the main lobe width.
Digital Signal Processing (BEC-42)
➢ A simple approximation to these functions have been developed
by Kaiser in terms of zeroth order modified Bessel functions of the
first kind.
Kaiser window starts with realistic demands:
• Allow ripples
• Allow certain transition widths
• As a results we get number of taps and window function.
➢ The Kaiser window function is given by
➢ The side lobe level can be controlled with respect to the main lobe
peak by varying a parameter, .
➢ The width of the main lobe can be varied by adjusting the length of
the filter.
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
where α is an independent variable determined by Kaiser. The
parameter β is expressed by
The modified Bessel function of the first kind, 𝐼0 (x), can be computed
from its power series expansion given by
The actual passband ripple (𝐴𝑃 ) and minimum stopband attenuation
(𝐴𝑆 ) are given by
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: Design an FIR digital filter to approximate an ideal low-
pass filter with passband gain of unity, cut-off frequency of 850 Hz
and working at a sampling frequency of 𝑓𝑠 =5000 Hz. The length of
the impulse response should be 5. Use a rectangular window
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: Design an ideal high-pass filter with a frequency
response
𝝅
𝟏, ≤ 𝝎 ≤𝝅
𝑯𝒅 𝒆𝒋𝝎 = 𝟒
𝝅
𝟎, 𝝎 ≤
𝟒
Find h(n) and H(z) for M=11 using (a) Hanning window (b)
Hanning window and plot the magnitude response.
Digital Signal Processing (BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing(BEC-42)
Digital Signal Processing (BEC-42)
Digital Signal Processing (BEC-42)
Problem: Design a low-pass digital FIR filter using Kaiser window
satisfying the specifications given below.
Passband cut-off frequency, 𝑓𝑝 =150 Hz, stopband cut-off frequency,
𝑓𝑠 = 250 Hz, passband ripple, 𝐴𝑝 = 0.1 dB, stopband attenuation, 𝐴𝑠
= 40 dB and sampling frequency, F =1000 Hz.
Digital Signal Processing (BEC-42)