You are on page 1of 22

Infinite Impulse Response

(IIR) filter

Dr. Muhammad Younis 2023-2024


IIR DSP-PhD 23-24

FIR vs IIR Filters 1


 The main difference between FIR and IIR filters can
be summarized in three points:
1- FIR filter generates present output of a dynamic system using
samples of present and past input values only, which means it
does not have a feedback, while IIR filter generates output
depending on samples of present and past inputs along with
past output values to generate present output, thus IIR have a
feedback loop.
IIR DSP-PhD 23-24

FIR vs IIR Filters 2


 The main difference between FIR and IIR filters can
be summarized in three points:
2- since FIR filter doesn’t have feedback its transfer function
contains only zeros (nominator) which make the filter critical
stable or less stable to any change in input like noise, while IIR
filter have zeros and poles (nominator & denominator) in its
transfer function since it has feedback loop, which make it more
stable to any change in input (noise).
3- Due to absence of feedback loop in FIR filter, its
implementation in system is easer and required less processing
power compared to IIR filter with feedback which requires more
processing power.
IIR DSP-PhD 23-24

3
Stability in S-domain compared to Z-domain
➢ The system conceded to be stable in s-domain if the poles are
mapped in the left half of s-plane, while in z-domain the
system conceded to be stable if poles are located inside the
unity circle (casual).
➢ The system conceded to be marginally stable in s-domain if the
poles are located on the imaginary axis of s-plane, while in z-
domain the system conceded to be marginally stable if poles
are located on the rim of unity circle (semi-casual).
➢ The system conceded to be unstable in s-domain if the poles
are mapped in the right half of s-plane, while in z-domain the
system conceded to be unstable if poles are located outside
the unity circle (anti-casual).
IIR DSP-PhD 23-24

4
Stability in S-domain compared to Z-domain
The figure explain stability relation between s-domain and z-
domain

S-plane Z-plane
IIR DSP-PhD 23-24

Infinite Impulse Response (IIR) 5


 Impulse response is infinite and work on causal
𝒇𝒐𝒓 𝟎 ≤ 𝒏 ≤ ∞
 Response are rational
𝑴 −𝒊𝝎𝒌
𝑩(𝒘) −𝒊𝝎𝑵
σ 𝒃
𝒌=𝟎 𝒌 𝒆
𝑯 𝒘 = =𝒆 𝒐
𝑨(𝒘) σ𝑵 𝒂
𝒌=𝟎 𝒌 𝒆 −𝒊𝝎𝒌

 Transfer function is Z transform ad IIR can be stable


and unstable (depend on unity circle)
𝒀(𝒁) 𝒃𝟎 + 𝒃𝟏 𝒁−𝟏 + 𝒃𝟐 𝒁−𝟐 + ⋯ + 𝒃𝑴 𝒁−𝑴
𝑯 𝒁 = =
𝑿(𝒁) 𝒂𝟎 + 𝒂𝟏 𝒁−𝟏 + 𝒂𝟐 𝒁−𝟐 + ⋯ + 𝒂𝑵 𝒁−𝑵
 IIR can be done with less N degree vs FIR
IIR DSP-PhD 23-24

IIR Design 6
 Bilinear Transformation Method

𝟏 + 𝒔𝑻ൗ𝟐
𝒛=
𝟏 − 𝒔𝑻ൗ𝟐

𝟐𝒛−𝟏
𝒔=
𝑻𝒛+ 𝟏
IIR DSP-PhD 23-24

IIR Design 7
 IIR filter design depends on analog lowpass filter prototype
method.
 This method converts analog LPF with a certain frequency,
called lowpass prototype into practical analog LPF, HPF, BPF
and BSF.
For Low and High Pass Filters:
𝟐 𝝎𝒅 𝑇 𝝎𝒂 analog frequency
𝝎𝒂 = tan 𝝎𝒅 digital frequency
𝑻 2
For Pass and Stop Band Filters:
𝟐 𝝎𝒍 𝑇 𝟐 𝝎𝒉 𝑇
𝝎𝒂𝒍 = tan ; 𝝎𝒂𝒉 = tan
𝑻 2 𝑻 2
Center frequency 𝝎𝟎 = 𝝎𝒂𝒍 𝝎𝒂𝒉
Bandwidth 𝑾 = 𝝎𝒂𝒉 − 𝝎𝒂𝒍
IIR DSP-PhD 23-24

IIR Design 8
 To Convert from Lowpass prototype into desired analog type
From low pass To low pass Filter:
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔
𝒔=𝝎
𝒂
From low pass To high pass Filter:
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝝎
𝒔= 𝒔𝒂
From low pass To band pass Filter:
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔𝟐 +𝝎𝟎 𝟐
𝒔=
𝒔𝑾
From low pass To band stop Filter:
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔𝑾
𝒔= 𝟐
𝒔 +𝝎𝟎 𝟐
 Finally, Applying Bilinear Transformation to convert to a digital
form. 𝑯(𝒁) = 𝑯(𝒔)ቚ 𝟐𝒛−𝟏
𝒔=
𝑻𝒛+𝟏
IIR DSP-PhD 23-24

IIR Design 9
From low pass To low pass Filter:

From low pass To high pass Filter:


IIR DSP-PhD 23-24

IIR Design 10
From low pass To band pass Filter:

From low pass To band stop Filter:


IIR DSP-PhD 23-24

Example: The normalized lowpass filter


𝟏 11
With a cutoff frequency of 1 rad/sec is given by 𝒑𝑯 𝒔 =
𝒔+𝟏
Use the given 𝑯𝒑 𝒔 and the BLT to design a corresponding
digital IIR lowpass filter with a cutoff frequency of 15 Hz and a
sampling rate of 90Hz.
Solution:
𝒓𝒂𝒅
The digital frequency 𝝎𝒅 = 𝟐𝝅𝒇 = 𝟐𝝅 × 𝟏𝟓 = 𝟑𝟎𝝅
𝒔𝒆𝒄
𝟏 𝟏
𝑻 = ൗ𝒇 = ൗ
𝒔 𝟗𝟎 𝒔𝒆𝒄
The design procedure:
➢ First calculate the analog frequency as
𝟐 𝝎𝒅 𝑇 𝟐 𝟑𝟎 ൗ𝝅 𝟗𝟎 𝒓𝒂𝒅
𝝎𝒂 = tan = tan = 𝟏𝟎𝟑. 𝟗𝟐
𝑻 2 𝟏ൗ 2 𝒔𝒆𝒄
𝟗𝟎
IIR DSP-PhD 23-24

➢ To low pass filter 12


𝟏 𝝎𝒂
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔 = 𝒔 =
𝒔=𝝎 + 𝟏 𝒔 + 𝝎𝒂
𝒂
𝝎𝒂
This yield an analog filter
𝟏𝟎𝟑. 𝟗𝟐
𝑯(𝒔) =
𝒔 + 𝟏𝟎𝟑. 𝟗𝟐
𝟐 𝒛−𝟏
➢ Apply BLT, 𝒔 = yield
𝑻 𝒛+𝟏

𝟏𝟎𝟑. 𝟗𝟐 𝟏𝟎𝟑. 𝟗𝟐/𝟏𝟖𝟎


𝑯(𝒔) = =
𝒛−𝟏 𝒛−𝟏
𝟏𝟖𝟎 × 𝒛 + 𝟏 + 𝟏𝟎𝟑. 𝟗𝟐
𝒛 + 𝟏 + 𝟏𝟎𝟑. 𝟗𝟐/𝟏𝟖𝟎
𝟎. 𝟓𝟕𝟕𝟑
=
𝒛−𝟏
+ 𝟎. 𝟓𝟕𝟕𝟑
𝒛+𝟏
IIR DSP-PhD 23-24

13
𝟎. 𝟓𝟕𝟕𝟑
=
𝒛−𝟏
𝒛 + 𝟏 + 𝟎. 𝟓𝟕𝟕𝟑

𝟎. 𝟓𝟕𝟕𝟑(𝒛 + 𝟏)
=
𝒛−𝟏
𝒛 + 𝟏 + 𝟎. 𝟓𝟕𝟕𝟑 (𝒛 + 𝟏)

𝟎. 𝟓𝟕𝟕𝟑𝒛 + 𝟎. 𝟓𝟕𝟕𝟑
=
𝒛 − 𝟏 + 𝟎. 𝟓𝟕𝟕𝟑(𝒛 + 𝟏)

𝟎. 𝟓𝟕𝟕𝟑𝒛 + 𝟎. 𝟓𝟕𝟕𝟑
=
𝟏. 𝟓𝟕𝟕𝟑𝒛 − 𝟎. 𝟒𝟐𝟐𝟕
IIR DSP-PhD 23-24

Example: Design a first-order high-pass filter 14


(Chebyshev type) with a cut-off frequency 3 KHz and 1 dB ripple
On the pass-band using a sampling frequency of 8000 Hz.
Solution:
𝒓𝒂𝒅
The digital frequency 𝝎𝒅 = 𝟐𝝅𝒇 = 𝟐𝝅 × 𝟑𝟎𝟎𝟎 = 𝟔𝟎𝟎𝟎𝝅
𝒔𝒆𝒄
𝑻 = 𝟏ൗ𝒇 = 𝟏ൗ
𝒔 𝟖𝟎𝟎𝟎 𝒔𝒆𝒄
The design procedure:
➢ First calculate the analog frequency as
𝟐 𝝎𝒅 𝑇
𝝅
𝟔𝟎𝟎𝟎 ൗ
𝟖𝟎𝟎𝟎
𝝎𝒂 = tan = 𝟏𝟔𝟎𝟎𝟎 tan
𝑻 2 2
𝟒 𝒓𝒂𝒅
= 𝟑. 𝟖𝟔𝟐𝟕 × 𝟏𝟎 𝒔𝒆𝒄
IIR DSP-PhD 23-24

➢ The first-order Low Pass Chebyshev filter 15


𝟏. 𝟗𝟔𝟐𝟓
𝑯𝒑 (𝒔) =
𝒔 + 𝟏. 𝟗𝟔𝟐𝟓
➢ To hIGH pass filter
𝟏. 𝟗𝟔𝟐𝟓 𝟏. 𝟗𝟔𝟐𝟓𝒔
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝝎𝒂= 𝝎𝒂 = 𝟒 + 𝟏. 𝟗𝟔𝟐𝟓𝒔
𝟑. 𝟖𝟔𝟐𝟕 × 𝟏𝟎
𝒔 + 𝟏. 𝟗𝟔𝟐𝟓
𝒔= 𝒔

𝒔
𝑯(𝒔) =
𝒔 + 𝟏. 𝟗𝟔𝟖𝟑 × 𝟏𝟎𝟒
𝟐 𝒛−𝟏
➢ Apply BLT, 𝒔 = 𝑻 𝒛+𝟏 yield

𝒛−𝟏
𝟏𝟔𝟎𝟎𝟎 𝒛 + 𝟏 𝟎. 𝟒𝟒𝟖𝟒 − 𝟎. 𝟒𝟒𝟖𝟒𝒁−𝟏
𝑯(𝒁) = =
𝒛−𝟏 𝟒 𝟏 + 𝟎. 𝟏𝟎𝟑𝟐𝒁−𝟏
𝟏𝟔𝟎𝟎𝟎 𝒛 + 𝟏 + 𝟏. 𝟗𝟔𝟖𝟑 × 𝟏𝟎
IIR DSP-PhD 23-24

Example: Design a second-order digital 16


Band-pass Butterworth filter with the following specifications:
• upper cutoff frequency of 2.6 KHz • lower cutoff frequency
of 2.4 KHz • sampling frequency of 8000 Hz.
Solution:
The digital frequency

𝝎𝒍 = 𝟐𝝅𝒇𝒍 = 𝟐𝝅 × 𝟐𝟒𝟎𝟎

= 𝟒𝟖𝟎𝟎𝝅
𝝎𝒉 = 𝟐𝝅𝒇𝒉 = 𝟐𝝅 × 𝟐𝟔𝟎𝟎

= 𝟓𝟐𝟎𝟎𝝅

𝑻 = 𝟏ൗ𝒇 = 𝟏ൗ𝟖𝟎𝟎𝟎 𝒔𝒆𝒄


𝒔
IIR DSP-PhD 23-24

The design procedure:


17
➢ First calculate the analog frequency as

𝟐 𝝎𝒍 𝑇 𝟒𝟖𝟎𝟎𝜋ൗ
𝝎𝒂𝒍 = tan = 𝟏𝟔𝟎𝟎𝟎 tan 𝟖𝟎𝟎𝟎
𝑻 2 2
= 𝟐. 𝟐𝟎𝟐𝟐 × 𝟏𝟎𝟒
𝟐 𝝎𝒉 𝑇 𝟓𝟐𝟎𝟎𝜋ൗ
𝝎𝒂𝒉 = tan = 𝟏𝟔𝟎𝟎𝟎 tan 𝟖𝟎𝟎𝟎
𝑻 2 2
= 𝟐. 𝟔𝟏𝟏𝟎 × 𝟏𝟎𝟒

𝑾 = 𝝎𝒂𝒉 − 𝝎𝒂𝒍 = 𝟐𝟔𝟏𝟏𝟎 − 𝟐𝟐𝟎𝟐𝟐 = 𝟒𝟎𝟖𝟖

𝝎𝟎 = 𝝎𝒂𝒍 𝝎𝒂𝒉 → 𝝎𝟎 𝟐 = 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖


IIR DSP-PhD 23-24

➢ The first-order Low Pass filter


𝟏 18
𝑯𝒑 (𝒔) =
𝒔+𝟏
➢ To Band pass filter
𝒔𝑾
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔𝟐 +𝝎𝟎 𝟐 = 𝒔𝟐 + 𝝎 𝟐 + 𝒔𝑾
𝒔= 𝟎
𝒔𝑾
𝟒𝟎𝟖𝟖𝒔
𝑯(𝒔) = 𝟐
𝒔 + 𝟒𝟎𝟖𝟖𝒔 + 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝟐 𝒛−𝟏
➢ Apply BLT, 𝒔 = yield
𝑻 𝒛+𝟏
𝒛−𝟏
𝟒𝟎𝟖𝟖 × 𝟏𝟔𝟎𝟎𝟎 ×
𝑯(𝒁) = 𝒛+𝟏
𝒛−𝟏 𝟐 𝒛−𝟏
(𝟏𝟔𝟎𝟎𝟎 × ) +𝟒𝟎𝟖𝟖 × 𝟏𝟔𝟎𝟎𝟎 × + 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝒛+𝟏 𝒛+𝟏
𝟎. 𝟎𝟕𝟑𝟎 − 𝟎. 𝟎𝟕𝟑𝟎𝒁−𝟐
𝑯(𝒁) =
𝟏 + 𝟎. 𝟕𝟏𝟏𝟕𝒁−𝟏 + 𝟎. 𝟖𝟓𝟒𝟏𝒁−𝟐
IIR DSP-PhD 23-24

Example: Design a second-order digital 19


Band-stop Butterworth filter with the following specifications:
• upper cutoff frequency of 2.6 KHz • lower cutoff frequency
of 2.4 KHz • sampling frequency of 8000 Hz.
Solution:
The digital frequency

𝝎𝒍 = 𝟐𝝅𝒇𝒍 = 𝟐𝝅 × 𝟐𝟒𝟎𝟎

= 𝟒𝟖𝟎𝟎𝝅
𝝎𝒉 = 𝟐𝝅𝒇𝒉 = 𝟐𝝅 × 𝟐𝟔𝟎𝟎

= 𝟓𝟐𝟎𝟎𝝅

𝑻 = 𝟏ൗ𝒇 = 𝟏ൗ𝟖𝟎𝟎𝟎 𝒔𝒆𝒄


𝒔
IIR DSP-PhD 23-24

The design procedure:


20
➢ First calculate the analog frequency as

𝟐 𝝎𝒍 𝑇 𝟒𝟖𝟎𝟎𝜋ൗ
𝝎𝒂𝒍 = tan = 𝟏𝟔𝟎𝟎𝟎 tan 𝟖𝟎𝟎𝟎
𝑻 2 2
= 𝟐. 𝟐𝟎𝟐𝟐 × 𝟏𝟎𝟒
𝟐 𝝎𝒉 𝑇 𝟓𝟐𝟎𝟎𝜋ൗ
𝝎𝒂𝒉 = tan = 𝟏𝟔𝟎𝟎𝟎 tan 𝟖𝟎𝟎𝟎
𝑻 2 2
= 𝟐. 𝟔𝟏𝟏𝟎 × 𝟏𝟎𝟒

𝑾 = 𝝎𝒂𝒉 − 𝝎𝒂𝒍 = 𝟐𝟔𝟏𝟏𝟎 − 𝟐𝟐𝟎𝟐𝟐 = 𝟒𝟎𝟖𝟖

𝝎𝟎 = 𝝎𝒂𝒍 𝝎𝒂𝒉 → 𝝎𝟎 𝟐 = 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖


IIR DSP-PhD 23-24

➢ The first-order Low Pass filter


𝟏 21
𝑯𝒑 (𝒔) =
𝒔+𝟏
➢ To Band Stop filter
𝒔𝟐 + 𝝎𝟎 𝟐
𝑯(𝒔) = 𝑯𝒑 (𝒔)ቚ 𝒔𝑾 = 𝒔𝑾 + 𝒔𝟐 + 𝝎 𝟐
𝒔= 𝟐 𝟐 𝟎
𝒔 +𝝎𝟎

𝒔𝟐 + 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝑯(𝒔) = 𝟐
𝒔 + 𝟒𝟎𝟖𝟖𝒔 + 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝟐 𝒛−𝟏
➢ Apply BLT, 𝒔 = yield
𝑻 𝒛+𝟏 𝒛−𝟏 𝟐
(𝟏𝟔𝟎𝟎𝟎 × ) +𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝒛+𝟏
𝑯(𝒁) =
𝒛−𝟏 𝟐 𝒛−𝟏
(𝟏𝟔𝟎𝟎𝟎 × ) +𝟒𝟎𝟖𝟖 × 𝟏𝟔𝟎𝟎𝟎 × + 𝟓. 𝟕𝟒𝟗𝟗 × 𝟏𝟎𝟖
𝒛+𝟏 𝒛+𝟏

You might also like