Understanding IIR Filters in DSP
Understanding IIR Filters in DSP
IIR Filters
7.1 Introduction
The specification of a digital filter will be desired frequency response, Hd(ejw ). The desired impulse
response, hd(n) of the digital filter can be obtained by taking inverse Fourier transform of Hd(ejw ). Now, the
hd(n) will be an infinite duration discrete time signal defined for all values of n in the range –¥ to +¥ . The
filters designed by considering all the infinite samples of impulse response are called IIR (Infinite Impulse
Response) filters.
In digital domain, the processing of infinite samples of impulse response is practically not possible.
Hence direct design of IIR filter is not possible. Therefore, the IIR filters are designed via analog filters.
In design of IIR filter, the specification of an IIR filter is transformed to specification of an analog filter
and an analog filter with transfer function, H(s) is designed to satisfy the specification. Then the analog filter
is transformed to digital filter with transfer function, H(z).
We know that the analog filter with transfer function H(s) is stable if all its poles lie in the left half of the
s-plane. Consequently, if the conversion technique is to be effective, it should possess the following desirable
properties.
1. The imaginary axis in the s-plane should map into the unit circle in the z-plane. Thus there will
be a direct relationship between the two frequency variables in the two domains.
2. The left-half of the s-plane should map into the interior of the unit circle in the z-plane. Thus a
stable analog filter will be converted to a stable digital filter.
The analog filter is designed by approximating the ideal frequency response using an error function.
A number of solutions to the approximation problem of analog filter design are well developed. The popular
among them are Butterworth and Chebyshev approximation. The popular transformation techniques used for
transforming analog filter transfer function H(s) to digital filter transfer function H(z) are bilinear and impulse
invariant transformation. The digital transfer function H(z) can be realized in a software that runs on a digital
hardware (or it can be implemented in firmware).
The frequency response H(ejw ) of the digital filter can be obtained by letting z = ejw in the transfer
function H(z) of the filter.
Chapter 7 - IIR Filters 7. 2
The designed transfer function of the filter should represent a stable and causal system. For stability
and causality of analog filter, the analog transfer function should satisfy the following requirements.
1. The H(s) should be a rational function of "s" and the coefficients of "s" should be real.
2. The poles should lie on the left half of s-plane.
3. The number of zeros should be less than or equal to number of poles.
For stability and causality of digital filter, the digital transfer function should satisfy the following
requirements.
1. The H(z) should be a rational function of "z" and the coefficients of "z" should be real.
2. The poles should lie inside the unit circle in z-plane.
3. The number of zeros should be less than or equal to number of poles.
Advantages of Digital Filters
1. The values of resistors,capacitors and inductors used in the analog filters changes with
temperature. Since digital filters do not have these components, they have high thermal
stability.
2. In digital filters the precision of the filter depends on the length (or size) of the registers used to
store the filter coefficients. Hence by increasing the register bit-length (in hardware) the
performance characteristics of the filter like accuracy, dynamic range, stability and frequency
response tolerance, can be enhanced.
3. The digital filters are programmable. Hence the filter coefficients can be changed at any time to
implement adaptive features.
4. A single filter can be used to process multiple signals by using the techniques of multiplexing.
Disadvantages of Digital Filters
1. The bandwidth of the discrete signal is limited by the sampling frequency. The bandwidth of
real discrete signal is half the sampling frequency.
2. The performance of the digital filter depends on the hardware (i.e., depends on the bit length of
the registers in the hardware) used to implement the filter.
Important Features of IIR Filters
1. The physically realizable IIR filters do not have linear phase.
2. The IIR filter specifications include the desired characteristics for the magnitude response
only.
Table 7.1 : Comparison of Digital and Analog Filters
As
δs
0 Ωp Ωc Ωs Ω
0 Ωc Ω
P as sband T ransition S topband
P as sband S topband band
F ig a : N orm alized m ag n itud e respo n se o f id ea l F ig e : N orm alized m ag n itud e respo n se o f p ra ctica l
a na log lo w pa ss filter. a na log lo w pa ss filter.
|H d (j Ω)|
|H (j Ω)|
1 1
δp
Ap
1
= 0.707
2
δs
As
0 Ωc Ω 0 Ωs Ωc Ωp Ω
S topband P as sband S topband T ransition P as sband
band
F ig b : N orm alized m ag n itud e respo n se o f id eal F ig f : N orm alized m ag n itud e respo n se o f p ra ctical
a na log h ig hp ass filter. a na log h ig hp ass filter.
|H (j Ω)|
1
|H d (j Ω)| δp
Ap
1 1
= 0.707
2
As
δs
0 Ω
0 Ωc2
Ω
Ωc1 P as sband
|H (j Ω)|
1
|H d (j Ω)| δp
Ap
1 1
= 0.707
2
As
δs
0 Ω
0 Ωc2
Ω
Ωc1
S topband
As
δs
ωp ωc ωs ω
0 ωc
ω 0
δs
As
ω ωs ωc ωp ω
0 ωc 0
As
δs
0
ω
ωc1 ωc2
ω
0 P as sband
jω
|H ( e )|
1
jω
|H d ( e )| δp
Ap
1 1
= 0.707
2
As
δs
0
ω
0 ωc1 ωc2
ω
S topband
Therefore the impulse response h(n) can be obtained from equation (7.2) by replacing t by nT.
N
∴ h( n) = h( t )
t = nT
= h( nT) = ∑ A i e− p nT u( nT)
i
i=1
.....(7.3)
= A1 e− p1nT u( nT) + A 2 e− p 2 nT u( nT) + ..... + A N e − p N nT u( nT)
1 1 .....(7.5)
(
is transformed to )
→ − p i T −1
s + pi 1 − e z
zi = e(σ i + jΩ i )T
= e σ i T e jΩ i T
We know that "z i" is a complex number. Hence "z i" can be expressed in polar coordinates as, zi = |zi| Ð z i.
∴ |z i | ∠z i = eσ i T e jΩ i T ..... (7.10)
jΩ
3 π/T
jv
LHP RHP U nit circ le
j1
π/T
σ −1 1
u
−π/T
−j1
−3 π/T
F ig 7 .4 a : s-p la n e. F ig 7 .4 b : z-p la n e.
F ig 7 .4 : M a p p in g o f s-p la n e in to z-p la n e in im p u lse in v a ria n t tra n sfo rm a tio n .
The stability of a filter (or system) is related to the location of the poles. For a stable analog filter the
poles should lie on the left half of the s-plane. Since the left half of s-plane maps inside the unit circle in
z-plane we can say that, for a stable digital filter the poles should lie inside the unit circle in z-plane.
7.3.2 Relation Between Analog and Digital Frequency in Impulse Invariant Transformation
Let, W = Analog frequency in rad/second.
w = Digital frequency in rad/sample.
Let, z = rejw be a point on z-plane,
and s = s + jW be the corresponding point in s-plane.
Then by impulse invariant transformation,
z = esT ..... (7.14)
7. 9 Digital Signal Processing
Put, z = r ejw and s = s + jW in equation (7.14).
∴ r e jω = e( σ + jΩ ) T
..... (7.15)
r e jω = eσT e jΩT
On equating the phase on either side of equation (7.15) we get,
ω
Digital frequency, w = W T or Ana log frequency, Ω = ..... (7.16)
T
When impulse invariant transformation is employed the equation (7.16) can be used to compute
the digital frequency for a given analog frequency and vice versa.
The mapping of analog to digital frequency is not one-to-one. Since w is unique over the range
(-p to +p), the mapping w = W T implies that the interval -p/T £ W £ +p/T maps into the corresponding
values of -p £ w £ +p. In general the interval (2k-1) p/T £ W £ (2k + 1) p/T (where k is an integer) maps into
the corresponding values of -p £ w £ +p. Thus the mapping from the analog frequency W to the digital
frequency w is many-to-one. This reflects the effects of aliasing due to sampling.
7.3.3 Useful Impulse Invariant Transformation
The following transformations are given without proof. The equation (7.17) can be used when the
analog real poles has a multiplicity of m. The equations (7.18) and (7.19) can be used when the analog poles
are complex conjugate.
1 ( −1) m − 1 d m − 1 1 .....(7.17)
→ m−1 − p i T −1
(s + pi ) m ( m − 1)! dpi 1 − e z
Example 7.1
2
For the analog transfer function, H(s) = 2
, determine H(z) using impulse invariant
s + 3s + 2
transformation if (a) T = 1 second and (b) T = 0.1 second.
2 2
B= × (s + 2) = = −2
(s + 1) (s + 2) s = −2 −2 +1
Chapter 7 - IIR Filters 7. 10
2 −2
∴ H(s) = +
s+1 s+2
By impulse invariant transformation we know that,
Ai Ai
→
s + pi (is transformed to )
1 − e − piT z −1
2 −2
∴ H(z) = + where p1 = 1 and p2 = 2
1 − e − p1T z−1 1 − e− p 2T z−1
2 −2
H(z) = −1
+
1− e T
z 1 − e2T z−1
(a) When T = 1 second
2 −2
H(z) = +
1 − e−1 z −1 1 − e−2 z−1
2 −2 2(1 − 0.1353z−1) − 2(1 − 0.3679z−1)
H(z) = −1
+ −1
=
1 − 0.3679z 1 − 0.1353z (1 − 0.3679z−1) (1 − 0.1353z−1)
2 − 1.6374z−1 − 2 + 18096
. z−1 0.1722 z−1
= −1 −1 −2
=
1 − 0.8187 z − 0.9048z + 0.7408 z .
1 − 17235 z−1 + 0.7408 z−2
Alternatively,
0.1722 z−1 0.1722 z−1
H(z) = −1 −2
= −2 2
1 − 1. 7235 z + 0.7408 z z (z − 1. 7235 z + 0.7408)
0.1722z
=
z2 − 1. 7235 z + 0.7408
Alternatively,
0.1722 z 0.0172 z
HN (z) = T × H(z) = 0.1 × =
z2 − 1. 7235 z + 0.7408 z2 − 1. 7235 z + 0.7408
7. 11 Digital Signal Processing
Example 7.2
Convert the analog filter with system transfer function,
(s + 0.1)
H(s) =
(s + 0.1)2 + 9
into a digital IIR filter by means of the impulse invariant method.
Solution
Method - I
s + 0.1 s + 0.1
Given that, H(s) = =
(s + 0.1)2 + 9 (s + 0.1)2 + 32
Using transformation of equation (7.18) we can write,
H(z) =
c
1 − e−0.1T cos 3T z−1 h =
c
1 − e−0.1 cos 3 z−1 h
Put, T = 1
1 − 2e −0.1T
ccos 3Th z −1
+e −2 × 0.1T
z −2
1 − 2e ccos 3h z
−0.1 −1
+ e−0.2 z−2
1 + 0.8958 z −1
=
.
1 + 17916 z−1 + 0.8187 z−2
Alternatively,
1 + 0.8958 z −1 1 + 0.8958 z −1 z2 + 0.8958 z
H(z) = −1 −2
= −2 2
= 2
1 + 1. 7916 z + 0. 8187 z z (z + 1. 7916 z + 0. 8187) z + 1. 7916 z + 0. 8187
b g ∗
A∗ = 0.5 = 0.5
0.5 0.5
∴ H(s) = +
s + 0.1 − j3 s + 0.1 + j3
By impulse invariant transformation we know that,
Ai Ai
→ and let, T = 1
s + pi (is transformed to
1 − e−piT z−1
0.5 0.5 0.5 0.5
∴ H(z) = + = +
1 − e−(0.1 − j3)T z−1 1 − e−(0.1 + j3)T z−1 1 − e−0.1 e j3 z−1 1 − e−0.1 e− j3 z−1
Example 7.3
Using impulse invariant transformation convert the following analog filter transfer function to digital
filter transfer function by taking sampling time, T = 0.5 second.
2.8s 2 + 4.8s + 2.9
H(s) =
(s + 3) (s 2 + s + 0.85)
Solution
Method - I
2 − 2.8844 z−1 + 1.213 z−2 + 0.8 − 0.1785 z−1 − 0.5769 z−1 + 0.1287z−2
=
1 − 1.4422 z−1 + 0.6065 z −2 − 0.2231z−1 + 0.3218 z−2 − 0.1353 z−3
2 .8 − 3.6398 z−1 + 13417
. z−2
=
1 − 1.6653 z + 0.9283 z − 0.1353 z−3
−1 −2
Alternatively,
2 .8 − 3.6398 z −1 + 13417
. z −2 z −3 (2 .8 z3 − 3.6398 z2 + 13417
. z)
H(z) = −1 −2 −3
= −3 3
1 − 1.6653 z + 0.9283 z − 0.1353 z z (z − 1.6653 z 2 + 0.9283 z − 0.1353)
2 .8 z3 − 3.6398 z 2 + 13417
. z
=
z3 − 1.6653 z2 + 0.9283 z − 0.1353
Alternatively,
2 .8z3 − 3.6398 z 2 + 13417
. z . z3 − 18199
14 . z2 + 0.6709 z
HN (z) = T × H(z) = 0.5 × 3 2
= 3 2
z − 1.6653 z + 0.9283 z − 0.1353 z − 1.6653 z + 0.9283 z − 0.1353
2
2 .8(−0.5 + j0.7746) + 4.8(−0.5 + j0.7746) + 2 .9
=
(−0.5 + j0.7746 + 3) (−0.5 + j0.7746 + 0.5 + j0.7746)
2 .8( −0.5 + j0.7746)2 + 0.5 + j3.7181
= = 0.4
(2.5 + j0.7746) ( j1.5492)
B∗ = (0.4)∗ = 0.4
2 0.4 0.4
∴ H(s) = + +
s + 3 s + 0.5 − j0.7746 s + 0.5 + j0.7746
1 1 1
= 2× + 0.4 × + 0.4 ×
s +3 s + (0.5 − j0.7746) s + (0.5 + j0.7746)
1 1 1 Using
H(z) = 2 × + 0.4 × + 0.4 ×
1− e −3T
z −1
1− e − ( 0.5 − j0.7746 )T
z −1
1− e − ( 0.5 + j0.7746 )T −1
z equation (7.17).
2 0.4 0.4
= + + Put, T = 0.5
1 − e−3 × 0.5 z−1 1 − e−( 0.5 − j0.7746) × 0.5 z −1 1 − e −( 0.5+ j0.7746) × 0.5z −1
2 0.4 0.4
= + +
1 − e−1.5 z−1 1 − e−0.25 e j0.3873 z −1 1 − e−0.25 e − j0.3873z−1
=
2
+
d i d
0.4 1 − e−0.25 e− j0.3873z−1 + 0.4 1 − e−0.25 e j0.3873z−1 i
1 − 0.2231 z−1 d id
1 − e−0.25 e j0.3873 z −1 1 − e −0.25 e − j0.3873 z −1 i
2 0.4 − 0.4 e −0.25 e − j0.3873z −1 + 0.4 − 0.4 e −0.25 e j0.3873z −1
= −1
+
1 − 0.2231 z 1 − e −0.25 e − j0.3873 z −1 − e−0.25 e j0.3873 z −1 + e −0.5 z −2
=
2
+
e
0.8 − 0.4 e−0.25 ej0.3873 + e − j0.3873 z−1 j
−1
1 − 0.2231z e
1 − e−0.25 e j0.3873 + e − j0.3873 z−1 + e−0.5 z−2 j
=
2
+
0.8 − 0.4 e −0.25
2 cos 0.3873 z−1 c h
c
1 − 0.2231z −1 1 − e−0.25 2 cos 0.3873 z−1 + e −0.5 z−2 h
2 0.8 − 0.5769 z−1
= +
1 − 0.2231z −1 1 − 1.4422 z−1 + 0.6065 z−2
=
e j e
2 1 − 1.4422 z−1 + 0.6065 z −2 + 0.8 − 0.5769 z −1 1 − 0.2231z−1 je j
e1 − 0.2231z je1 − 1.4422 z
−1 −1
+ 0.6065 z −2
j
7. 15 Digital Signal Processing
2 − 2.8844 z−1 + 1213
. z−2 + 0.8 − 0.1785 z−1 − 0.5769 z−1 + 0.1287 z−2
∴ H(z) =
1 − 1.4422 z −1 + 0.6065 z−2 − 0.2231z −1 + 0.3218 z−2 − 0.1353 z −3
Alternatively,
=
e
z−3 2.8 z3 − 3.6398 z2 + 1.3417 z j
z −3
ez
3
− 16653
. 2
z + 0.9283 z − 0.1353 j
2 .8 z3 − 3.6398 z2 + 1.3417 z
=
z − 1.6653 z2 + 0.9283 z − 0.1353
3
dy( t ) .....(7.20)
Let , = x( t )
dt
On integrating both sides of equation (7.20) we get,
nT nT The trapezoidal rule when integration is
z dy( t )
dt
dt =
z x( t ) dt approximated by two trapezoids is,
b
( n − 1) T
y( t )
nT
( n − 1) T
=
nT
z x(t) dt
z
a
f(x) dx =
b−a
2
f ( a ) + f ( b)
( n −1) T
( n − 1) T
nT
b
y( nT) − y ( n − 1) T = g z
( n − 1) T
x(t) dt
.....(7.21)
The integral on the right side of equation (7.21) can be approximated by the trapezoidal rule, so that,
.....(7.22)
y( nT) − y[( n − 1) T] = ejT
2
b
x( nT) + x ( n − 1)T g
For discrete time system, the equation (7.22) can be written as,
y( n) − y( n − 1) =
T
x( n) + x( n − 1) .....(7.23)
2
Chapter 7 - IIR Filters 7. 16
On taking Z-transform of equation (7.23) we get,
T
Y ( z ) − z −1 Y ( z ) = 2
X(z) + z−1 X(z)
T
1 − z−1 Y(z) = 2
1 + z −1 X(z)
2(1 − z−1 )
Y(z) = X(z) .....(7.24)
T(1 + z −1 )
On taking Laplace transform of equation (7.20) we get,
s Y(s) = X(s) .....(7.25)
On comparing equations (7.24) and (7.25) we can say that,
2 1 − z −1
s Y( s) ( → Y(z) .....(7.26)
is transformed to) T
1 + z −1
by bilinear transformation, where T is the sampling time period.
2 1− z −1
Hence in the s-domain transfer function, if "s" is substituted by the term the resulting
T
1 + z −1
transfer function will be z-domain transfer function.
7.4.1 Relation Between Analog and Digital Filter Poles in Bilinear Transformation
The mapping of s-domain function to z-domain function by bilinear transformation is a one to one
mapping, that is, for every point in z-plane, there is exactly one corresponding point in s-plane and
vice versa. The transformation is accomplished when,
2 1 − z −1
s= .....(7.27)
T
1 + z −1
The equation (7.27) can be rearranged as shown below to express "z" in terms of "s".
2 1 − z −1 T 1 − z −1 T z −1 ( z − 1)
s= ⇒ s= ⇒ s=
T
1 + z −1 2
1 + z −1 2
z −1 ( z + 1)
Tz −1 .....(7.28)
∴ 2
s=
z +1
On cross multiplying equation (7.28) we get,
T T T T T
2
s(z + 1) = z −1 ⇒ 2
s z + 2 s = z −1 ⇒ 2
s z − z = −1 − 2 s
e T
∴ – z 1– 2s = − 1 + j e T
2
s j
T
1 + 2
s
∴ z= T .....(7.29)
1 − 2
s
In equation (7.29), the variable "s" represent a point on s-plane and "z" is the corresponding point in
z-plane.
Let, si = si + jW i.
On substituting, si = si + jW i in equation (7.29) we get,
T T T
1 + 2 ( σ i + jΩi ) 1 + 2 σ i + j 2 Ωi .....(7.30)
zi = T
= T T
1− 2
(σi + jΩi ) 1− σ
2 i
− j 2 Ωi
7. 17 Digital Signal Processing
The magnitude of equation (7.30) is given by,
1
LM e1 + σ j + e Ω j OP
T
2 i
2 T
2 i
2 2
..... (7.31)
= M
MN e1 − σ j + e Ω j PPQ
zi 2 2
T T
i − i
2 2
jΩ jv
U n it c ircle j1
LHP RHP
σ −1 1 u
−j1
Fe jω − jω I
2 1 − e 2 − jω
GH 2 e 2 − e − jω JK
∴ jΩ = = e jθ e− jθ = 1
T 1 + e − jω
T Fe jω − jω I
GH 2 e 2 + e − jω JK
Chapter 7 - IIR Filters 7. 18
− jω Fe jω − jω I e jθ − e − jθ
2
e 2
GH 2 −e 2
JK ω
2 2 j sin 2
sinθ =
2j
jΩ = =
T − jω Fe jω − jω I T 2 cos ω
e 2
GH 2 +e 2
JK 2 cosθ =
e jθ + e − jθ
2
ω
2 sin 2 2 ω
∴Ω = = tan
T cos ω T 2 .....(7.33)
2
2 ω
∴ Analog frequency, Ω = tan
T 2
The equation (7.33) relates the analog frequency, W and digital frequency, w.
From equation (7.33) we get,
ΩT ω ω ΩT
= tan ⇒ = tan −1
2 2 2 2
ΩT .....(7.34)
∴ Digital frequency, ω = 2 tan −1
2
The equation (7.34) can be used to estimate the digital frequency w for a given analog
frequency, W . The equation (7.33) is used to calculate the analog frequency for a given digital frequency.
From the above analysis it is evident that the analog frequency W and digital frequency w has a nonlinear
relationship, because the entire negative imaginary axis in the s-plane (from W = –¥ to 0) is mapped into the
lower half of unit circle in z-plane (from w = –p to 0) and the entire positive imaginary axis in the
s-plane (from W = 0 to +¥ ) is mapped into the upper half of unit circle in z-plane (from w = 0 to +p). This
nonlinear mapping introduces a distortion in the frequency axis, which is called frequency warping.
ω = ΩT (Impulse invariant)
π −1
ω = 2tan ΩT/2
(Bilinear transformation)
2 Warping
0 1 2 3 4 5 6 7 8 9 10
ΩT
F ig 7 .6 : C o rresp on d e nce b etw een a n alo g a n d d igital freq u en c ies
resu ltin g fro m th e b ilin ea r tra nsfo rm a tio n .
The effect of warping on the magnitude response can be explained by considering an analog filter
with a number of passbands as shown in fig 7.7. The corresponding digital filter will have same number of
passbands, but with disproportionate bandwidth, as shown in fig 7.7.
7. 19 Digital Signal Processing
In designing digital filter using bilinear transformation the effect of warping on amplitude response
can be eliminated by prewarping the analog filter. In this method, the specified digital frequencies are
converted to analog equivalent using equation (7.33). This analog frequencies are called prewarp frequencies.
Using the prewarp frequencies, the analog filter transfer function is designed and then it is transformed to
digital filter transfer function.
The effect of warping on the phase response can be explained by considering an analog filter with
linear phase response as shown in fig 7.8. The phase response of corresponding digital filter will be nonlinear.
From the above discussions it can be stated that the bilinear transformation preserves the magnitude
response of an analog filter only if the specification requires piecewise constant magnitude, but the phase
response of the analog filter is not preserved. Therefore the bilinear transformation can be used only to
design digital filters with prescribed magnitude response with piecewise constant values. A linear phase
analog filter cannot be transformed to a linear phase digital filter using bilinear transformation.
jω
|H (e )| Ω ∠H (e jω) Ω
Ω Ω
|H (j Ω)| ∠H (j Ω)
F ig 7.7 : T he w a rp ing effect o n m ag n itu d e resp o n se. F ig 7.8 : T he w a rp ing effect o n p h a se respo n se .
Example 7.4
2
For the analog transfer function, H(s) = , determine H(z) using bilinear transformation if
s 2 + 3s + 2
(a) T = 1 second and (b) T = 0.1 second.
Solution
2
Given that, H(s) =
s 2 + 3s + 2
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2
∴ H(z) =
F2 1− z −1 2 I F2 I
1 − z−1
GH T 1 + z−1 JK +3 GH T JK
1 + z−1
+2
2
=
−1 2
4 e1 − z j +
6 e1 − z j + 2
−1
T2 −1 2 T e1 + z j
−1
e1 + z j
Chapter 7 - IIR Filters 7. 20
2
∴ H(z) = 2 2
d
4 1 − z −1 i d id
+ 6T 1 − z−1 1 + z −1 + 2T 2 1 + z −1 i d i
2
d
T 2 1 + z−1 i
2
=
d
2T 2 1 + z −1 i (a + b) (a b) = a2 b2
2 2
d
4 1 − z −1 i d
+ 6T 1 − z −2 + 2T 2 1 + z−1 i d i
(a) T = 1 second
2
∴ H(z) =
d i 2 1 + z −1
−1 2 −1 2
4d1 − z i + 6d1 − z i + 2 d1 + z i −2
2d1 + 2z + z i −1 −2
(a + b)2 = a 2 + 2ab + b2
=
4 d1 − 2z + z i + 6d1 − z i + 2 d1 + 2z
−1 −2 −2 −1
+z −2
i (a − b)2 = a 2 − 2ab + b2
H(z) =
2 × 0.12 1 + z−1 d i
2 2
d
4 1 − z −1 i d
+ 6 × 0.1 1 − z −2 + 2 × 0.12 1 + z −1 i d i
=
d
0 .02 1 + 2z−1 + z−2 i
d
4 1 − 2z −1
+z −2
i + 0.6d1 − z i + 0.02 d1 + 2z −2 −1
+ z −2 i
0.02 + 0.04z−1 + 0.02z−2
=
4.62 − 7.96 z−1 + 3.42 z−2
0.02 0.04 −1 0.02 −2
+ z + z 0.0043 + 0.0087 z −1 + 0.0043 z −2
= 4.62 4.62 4.62 =
7.96 −1 3.42 −2 1 − 17229
. z−1 + 0.7403 z−2
1− z + z
4.62 4.62
Alternatively,
2s
Given that, H(s) =
s 2 + 0.2s + 1
2 1 − z −1
Put , s = in H(s) to get H(z).
T 1 + z −1
F2 1 − z −1 I 4 (1 − z−1)
2 GH T 1+ z −1 JK 1 + z −1
∴ H(z) = = Put, T = 1
F2 1 − z −1 I 2
F2 1 − z−1 I −1 2
4 (1 − z )
−1 2 +
0.4 (1 − z−1)
+1
GH T 1 + z −1 JK + 0.2GH T 1 + z−1 JK
+1 (1 + z ) 1 + z −1
4(1 − z−1)
(1 + z−1) 4(1 − z−1)(1 + z −1)
= −1 2 −1 −1 −1 2
=
4(1 − z ) + 0.4(1 − z ) (1+ z ) + (1 + z ) 4(1 − z ) + 0.4(1 − z−1) (1+ z −1) + (1 + z−1)2
−1 2
−1 2
(1 + z )
4(1 − z −2 )
= −1
(a + b) (a b) = a2 b2
4(1 − 2z + z ) + 0.4(1 − z−2 ) + (1 + 2z−1 + z−2 )
−2
(a + b)2 = a 2 + 2ab + b2
4 4 −1 (a − b)2 = a 2 − 2ab + b2
− z
4 − 4z−2 5.4 5.4
= =
5.4 − 6z−1 + 4.6z−2 6 −1 4.6 −2
1− z + z
5.4 5.4
0 .7407 − 0. 7407 z−1
=
1 − 1.111z−1 + 0.8519 z−2
Alternatively,
0 .7407 z2 − 0. 7407 z
=
z2 − 1.111z + 0.8519
Example 7.6
s3
Obtain H(z) from H(s) when T =1 second, and H(s) =
(s + 1) (s 2 + s + 1)
Solution
s3
Given that, H(s) =
(s + 1) (s 2 + s + 1)
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
Chapter 7 - IIR Filters 7. 22
F2 1 − z−1 I 3
GH T 1+ z−1 JK
∴ H(z) =
F2 1 − z −1 I LF 2
+ 1J MG
1 − z−1 I 2
2 1 − z−1 OP
GH T 1 + z −1 K MNH T 1 + z−1 JK +
T 1 + z−1
+1
PQ
8(1 − z−1)3
(1 + z−1)3
=
LM 2(1 − z −1
)
+1
OP LM 4(1 − z−1)2 2(1 − z−1)
+ +1
OP Put, T = 1
MN 1 + z−1
PQ MN (1 + z−1)2 1 + z −1 PQ
8(1 − z −1)3
(1 + z−1)3
=
LM 2(1 − z ) + (1 + z
−1 −1
) OP LM 4(1 − z−1)2 + 2(1 − z−1) (1 + z −1) + (1 + z−1)2 OP
MN (1 + z ) −1
PQ MN (1 + z−1)2 PQ
8(1 − z −1)3
=
2(1 − z ) + (1 + z ) 4(1 − z −1)2 + 2(1 − z−1) (1+ z −1) + (1 + z−1)2
−1 −1
8(1 − z−1)(1 − 2z −1 + z −2 )
=
−1 −1
2 − 2z + 1+ z 4(1 − 2z −1 + z −2 ) + 2(1 − z −2 ) + (1 + 2z −1 + z −2 )
8(1 − 2z−1 + z −2 − z −1 + 2z −2 − z −3 )
=
3 − z −1 7 − 6z−1 + 3z −2
Alternatively,
0.381 − 11429
. z−1 + 1.1429 z−2 − 0.381z −3
H(z) =
1 − 11905
. z + 0.7143 z−2 − 0.1429 z −3
−1
z −3 0.381z3 − 11429
. z2 + 11429
. z − 0.381
=
z−3 z3 − 11905
. z2 + 0.7143 z − 0.1429
0.381z3 − 11429
. z2 + 11429
. z − 0.381
= 3 2
z − 11905
. z + 0.7143 z − 0.1429
7. 23 Digital Signal Processing
Example 7.7
Convert the analog filter with system function H(s) into digital filter using bilinear transformation.
s + 0.3
H(s) = ; Take T = 0.5
(s + 0.3)2 + 16
Solution
2 1 − z −1
Put, s = in H(s) to get H(z).
T 1 + z −1
2 1 − z −1 2(1 − z −1)
−1 +
0.3 + 0.3
T 1+ z T(1+ z −1)
∴ H(z) = =
F2 1 − z−1 I 2
F 2 1 − z−1 I −1
4(1 − z ) 2
+
1.2(1 − z −1)
+ 16.09
GH T 1 + z−1 JK GH
+ 0.6
T 1 + z−1 JK
+ 16.09 2 −
T (1+ z )1 2
T(1+ z−1)
Alternatively,
A s = 0.2
δs
A s , dB = −14dB
0 ωp ωs ω
F ig 7.9a : G a in vs ω. F ig 7.9b .
F ig 7.9 : M a gn itu d e resp o n se o f d ig ita l IIR lo w p a ss filter.
7. 25 Digital Signal Processing
Case ii : Attenuation at passband and stopband edge frequency
Alternatively, the specification of the filter can be attenuation at passband and stopband edge
frequencies. The attenuation in normal value is inverse of the gain in normal value. The attenuation is usually
expressed in decibels (dB). Since the gain at edge frequencies are less than 1, the attenuation in normal values
will be greater than1, and the dB-attenuation is positive.
1 1
Let , α p = = jω
= Attenuation at passband edge frequency
Ap H (e )
ω =ω p
1 1
αs = = = Attenuation at stopband edge frequency
A s H ( e jω )
ω =ω s
LM 1 OP LM 1 OP
α p,dB = 20 log M P = 20 log M PP = dB- Attenuation at passband edge frequency
MN A p PQ M H ( e jω )
N ω =ω p
Q
LM 1 OP LM 1 OP
α s,dB = 20 log M P = 20 log M jω PP = dB- Attenuation at stopband edge frequency
MN A PQ MN H(e )
s
ω =ω s Q
The attenuation in normal values can be conveted to dB-attenuation or vice-versa as shown below.
a p,dB = 20 log a p Þ a p = 10(ap,dB/20)
a s,dB = 20 log a s Þ a s = 10(as,dB/20)
The attenuation can be converted to gain or vice versa using the following equations.
1 1
Ap = αp =
αp Ap
1 1
As = αs =
αs As
A p ,dB = −α p,dB α p ,dB = − A p ,dB
A s,dB = −α s,dB α s,dB = − A s,dB
Example
Let, a p,dB = +1.9382dB » +2dB
a s,dB = +13.9794dB » +14dB
The dB-attenuation can be converted to normal values as shown below.
a p = 10(ap,dB /20) = 10(1.9382/20) = 1.25
a s = 10(as,dB /20) = 10(13.9794/20) = 5
The attenuation can be converted to gain as shown below.
1 1
Ap = = = 0.8
α p 1.25
1 1
As = = = 0. 2
αs 5
The gain in normal values can be converted to dB-gain as shown below.
Ap,dB = 20 log Ap = 20 log 0.8 = –1.9382 dB
As,dB = 20 log As = 20 log 0.2 = –13.9794 dB
Note : The dB-gain and dB-attenuation are numerically same, but dB-gain is negative and dB-attenuation
is positive.
Chapter 7 - IIR Filters 7. 26
The attenuation response and log-attenuation response of a digital IIR lowpass filter are shown in
fig 7.10.
1
α=
H ( e jω )
αs , dB = 14dB
αs = 5
αp = 1.2 5
δp , d B
αp , d B = 2dB
0 ωp ωs ω 0 ωp ωs ω
F ig 7.10a : A tte n u atio n v s ω. F ig 7.10b : d B -atte n ua tio n v s ω.
F ig 7 .1 0 : A tten u a tio n resp o n se o f d ig ita l IIR lo w p a ss filte r.
Case iii : Ripple at passband and stopband edge frequency
Sometimes, the specifications are given in terms of ripple or tolerance in the passband and stopband.
The ripple can be in normal values or in decibels (dB).
Let, dp = Passband ripple.
ds = Stopband ripple.
dp, dB = 20 log dp = Passband ripple in dB.
ds,dB = 20 log ds = Stopband ripple in dB.
The dB-ripples can be converted to normal values as shown below.
dp = 1 – 10(–dp,dB/20)
ds = 10(–ds,dB/20)
The ripples in normal values can be converted to gain or attenuation as shown below.
1 1
Ap = 1 − δp αp = =
Ap 1 − δp
1 1
As = δs αs = =
As δs
The ripples in dB can be converted to dB-gain or dB-attenuation as shown below. Usually, the ripples
are specified as positive dB.
A p ,dB = −δ p ,dB α p ,dB = δ p ,dB
A s,dB = −δ s,dB α s,dB = δ s,dB
The ripples in dB can be converted to gain or attenuation in normal values as shown below.
( − δ p ,dB / 20 ) ( δ p ,dB / 20)
A p = 10 α p = 10
( − δ s,dB / 20) ( δ s,dB / 20 )
A s = 10 α s = 10
7. 27 Digital Signal Processing
Example
Let, dp,dB = +1.9382 dB » +2 dB
ds,dB = +13.9794 dB » +14 dB
The dB-ripples can be converted to ripples in normal values as shown below.
dp = 1–10(-dp,dB /20) = 1–10(–1.9382/20) = 0.2
ds = 10(-ds,dB /20) = 10(–13.9794/20) = 0.2
The dB ripples can be converted to dB-gain and dB-attenuation as shown below.
Ap,dB = –dp,dB = – 1.9382 dB » –2 dB
As,dB = –ds,dB = – 13.9794 dB » –14 dB
a p,dB = dp,dB = + 1.9382 dB » +2 dB
a s,dB = ds,dB = + 13.9794 dB » +14 dB
The dB-ripples can be converted to gain and attenuation in normal values.
Ap = 10(-dp,dB /20) = 10(–1.9382/20) = 0.8
As = 10(-ds,dB /20) = 10(–13.9794/20) = 0.2
a p = 10(dp,dB /20) = 10(1.9382/20) = 1.25
Since, |H(jW )|2 = H(jW ) H*(jW ) = H(jW ) H(–jW ), the equation (7.35) can be written as shown below.
1 ..... (7.36)
H ( j Ω ) H ( − jΩ ) = 2N
1+ e j
Ω
Ωc
We know that the frequency response H(jW ) of an analog filter is obtained by letting s = jW in the
analog transfer function H(jW ). Hence substituting W by s/j in equation (7.36) gives the system transfer
function.
Chapter 7 - IIR Filters 7. 28
1 1 ..... (7.37)
∴ H (s) H(– s) = =
F s jI
1+ G J
2N
F s I
1+ G
2
N
HΩ K c H j Ω JK
2 2
c
In equation (7.37), when s/W c is replaced by sn (i.e., letting W c = 1 rad/sec) the transfer function is
called normalized transfer function.
1
∴ H (sn ) H(– sn ) = ..... (7.38)
1 + ( – s2n ) N
The transfer function of equation (7.38) will have 2N poles which are given by the roots of the
denominator polynomial. It can be shown that the poles of the transfer function symmetrically lies on a unit
circle in s-plane with angular spacing of p/N. (Refer example 7.8 to example 7.13).
Properties of Butterworth Filters
1. The Butterworth filters are all pole designs. (i.e., the zeros of the filters exist at infinity).
For integer k,
Now, sn will have 2N values which are given by 2N roots of unity. These
e j2pk = cos2pk + jsin2pk
2N roots can be evaluated by taking 1 as ej2pk, where k is an iteger.
= 1 + j0 = 1
1 1 πk
j
∴ sn = 12 N = e j2 πk e j 2N =e N
Therefore, when N is odd, the 2N poles of Butterworth filter are given by the equation,
πk
j
sn = e N ; for k = 1, 2, 3, ..... 2N ......(7.40)
7. 29 Digital Signal Processing
case ii : When N is even
When N is even, (–1)N = 1
Hence the equation (7.39) can be written as,
1
1 + s2N
n =0 ⇒ s2N
n = −1 ⇒ sn = ( −1)
2N
Now, sn will have 2N values which are given by 2N roots of –1. These 2N roots can be evaluated by
taking –1 as ej(2k –1)p, where k is an iteger. For integer k,
1 1 ( 2 k −1) π
e j(2k – 1)p = cos(2k – 1)p + jsin(2k – 1)p
j
e
∴ sn = ( −1) 2 N = e j( 2 k − 1) π j 2N =e 2N
= –1 + j0 = –1
Therefore, when N is even the 2N poles of Butterworth filter are given by,
( 2 k −1) π
j
∴ sn = e 2N ; for k = 1, 2, 3, ..... 2N ......(7.41)
jΩ s-plane
Example 7.8
Unit circle
Determine the poles of lowpass Butterworth filter for
N = 1. Sketch the location of poles on s-plane and hence
determine the normalized transfer function of lowpass filter.
Solution p1 p2
X X σ
jπk −1 1
When N = 1, from equation (7.40), sn = e ; for k = 1, 2
jΩ
Example 7.9 s -plane
U nit circ le
Solution X
p 1∗
X
p ∗2 −j0.707
When N = 2, from equation (7.41),
j
( 2k − 1) π F ig 1 : L o c atio n o f p oles o n s-p lan e ,
sn = e 4 ; for k = 1, 2, 3, 4 w h en N = 2.
( 2− 1) π π
j
4
j
4
π π
When k = 1 ; sn = e =e = 1∠π / 4 = cos + j sin = 0. 707 + j0. 707 = p1
4 4
Chapter 7 - IIR Filters 7. 30
( 4 −1) π 3π
j
4
j
4
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 4 = cos + j sin = −0. 707 + j0. 707 = p2
4 4
(6 −1) π 5π
j j 5π 5π
When k = 3 ; sn = e 4 =e 4 = 1∠5π / 4 = cos + j sin = −0. 707 − j0. 707 = p∗2
4 4
( 8 −1) π 7π
j j 7π 7π
When k = 4 ; sn = e 4 =e 4 = 1∠7π / 4 = cos + j sin = 0. 707 − j0. 707 = p1∗
4 4
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p2 and p2*.
1
∴ Normalized transfer function, H(sn ) =
(sn − p 2 ) (sn − p∗2 )
1
∴ H(sn ) =
(sn + 0.707 − j0.707) (sn + 0.707 + j0.707)
1 (a + b) (a b) = a2 b2
=
(sn + 0.707)2 − (j0.707)2
1
=
(sn + 0.707)2 + 0.7072
1 1
= =
sn2 + 2 × 0.707 sn + 0.707 2 + 0.7072 sn2 + 1414
. sn + 1
−j0.866 X
Solution
X
p ∗2 p 1∗
sn = p3 = 1 Þ sn p 3 = 0 Þ (sn + 1) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p3 ) (sn − p2 ) (sn − p∗2 )
1
∴ H(sn ) =
(sn + 1) (sn + 0.5 − j0.866) (sn + 0.5 + j0.866)
1
= (a + b) (a b) = a2 b2
(sn + 1) ((sn + 0.5)2 − (j0.866)2 )
1 1
= =
(sn + 1) ((sn + 0.5)2 + 0.8662 ) (sn + 1) (sn2 + 2 × 0.5 sn + 0.52 + 0.8662 )
1
=
(sn + 1) (sn2 + s + 1)
Example 7.11 p3
jΩ s -plane
p2
U nit circ le
X
p ∗4 X
X
p ∗1
Solution
X
X
p ∗3 p ∗2
When N = 4, from equation (7.41),
F ig 1 : L o c atio n o f p oles o n s-p lan e ,
( 2k − 1) π w h en N = 4.
j
sn = e 8 ; for k = 1, 2, 3, 4, 5, 6, 7, 8
( 2− 1) π π
j
8
j
8
π π
When k = 1 ; sn = e =e = 1∠π / 8 = cos + j sin = 0.924 + j0. 383 = p1
8 8
( 4 − 1) π 3π
j
8
j
8
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 8 = cos + j sin = 0.383 + j0. 924 = p2
8 8
(6 −1) π 5π
j
8
j
8
5π 5π
When k = 3 ; sn = e =e = 1∠5π / 8 = cos + j sin = −0.383 + j0. 924 = p3
8 8
Chapter 7 - IIR Filters 7. 32
( 8 −1) π 7π
j
8
j
8
7π 7π
When k = 4 ; sn = e =e = 1∠7π / 8 = cos + j sin = −0.924 + j0. 383 = p4
8 8
(10 − 1) π 9π
j j 9π 9π
When k = 5 ; sn = e 8 =e 8 = 1∠9π / 8 = cos + j sin = −0.924 − j0. 383 = p∗4
8 8
(12−1)π 11π
j j 11π 11π
When k = 6 ; sn = e 8 =e 8 = 1∠11π / 8 = cos + j sin = −0.383 − j0. 924 = p3∗
8 8
(14 −1) π 13π
j j 13π 13π
When k = 7 ; sn = e 8 =e 8 = 1∠13π / 8 = cos + j sin = 0.383 − j0. 924 = p∗2
8 8
(16 − 1) π 15π
j j 15π 15π
When k = 8 ; sn = e 8 =e 8 = 1∠15π / 8 = cos + j sin = 0.924 − j0. 383 = p1∗
8 8
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p3, p3*, p4 and p4*.
\ sn = p3 = 0.383 + j0.924 Þ sn p3 = 0 Þ (sn + 0.383 j0.924) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p3 ) (sn − p3∗ ) (sn − p 4 ) (sn − p∗4 )
1
∴ H(sn ) =
(sn + 0.383 − j0.924) (sn + 0.383 + j0.924) (sn + 0.924 + j0.383) (sn + 0.924 + j0.383)
1
=
d
(sn + 0.383)2 − (j0.924)2 (sn + 0.924)2 − (j0.383)2 id i (a + b) (a b) = a2 b2
1
=
d(s n id
+ 0.383)2 + 0.9242 (sn + 0.924)2 + 0.3832 i
1
=
(sn2 + 2 × 0.383 sn + 0.3832 + 0.9242 ) (sn2 + 2 × 0.924 sn + 0.9242 + 0.3832 )
1
=
(sn2 + 0.766 sn + 1) (sn2 + 1848
. sn + 1)
Example 7.12 p3
jΩ s -plane
p2
U nit circ le
X
X
p ∗4 X p 1∗
X
X
p ∗3 p ∗2
F ig 1 : L o c atio n o f p oles o n s-p lan e ,
w h en N = 5.
7. 33 Digital Signal Processing
Solution πk
j
When N = 5, from equation (7.40), sn = e 5 ; for k = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
π ×1
j π π
When k = 1 ; sn = e 5 = 1∠π / 5 = cos + j sin = 0.809 + j0. 588 = p1
5 5
π×2
j
5
2π 2π
When k = 2 ; sn = e = 1∠2π / 5 = cos + j sin = 0.309 + j0. 951 = p2
5 5
π ×3
j
5
3π 3π
When k = 3 ; sn = e = 1∠3π / 5 = cos + j sin = −0.309 + j0. 951 = p3
5 5
π×4
j
5
4π 4π
When k = 4 ; sn = e = 1∠4π / 5 = cos + j sin = −0.809 + j0. 587 = p4
5 5
π×5
j
5
5π 5π
When k = 5 ; sn = e = 1∠5π / 5 = cos + j sin = −1 + j0 = p5
5 5
π ×6
j 6π 6π
When k = 6 ; sn = e 5 = 1∠6π / 5 = cos + j sin = −0.809 − j0. 587 = p∗4
5 5
π ×7
j 7π 7π
When k = 7 ; sn = e 5 = 1∠7π / 5 = cos + j sin = −0.309 − j0. 951 = p∗3
5 5
π×8
j 8π 8π
When k = 8 ; sn = e 5 = 1∠8π / 5 = cos + j sin = 0.309 − j0. 951 = p∗2
5 5
π×9
j 9π 9π
When k = 9 ; sn = e 5 = 1∠9π / 5 = cos + j sin = 0.809 − j0. 588 = p1∗
5 5
π ×10
j
5
10π 10π
When k = 10 ; sn = e = 1∠10π / 5 = cos + j sin = 1 + j0 = p6
5 5
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p3, p3*, p4, p4* and p5.
\ sn = p3 = 0.309 + j0.951 Þ sn p3 = 0 Þ (sn + 0.309 j0.951) = 0
sn = p5 = 1 Þ sn p5 = 0 Þ (sn + 1) = 0
1
∴ Normalized transfer function, H(sn ) =
(sn − p5 ) (sn − p3 ) (sn − p3∗ ) (sn − p4 ) (sn − p∗4 )
1
∴ H(sn ) =
(sn + 1) (s + 0.309 − j0.951) (sn + 0.309 + j0.951) (sn + 0.809 − j0.587) (sn + 0.809 + j0.587)
1
= (a + b) (a b) = a2 b2
(sn + 1) ((sn + 0.309)2 − (j0.951)2 ) ((sn + 0.809)2 − (j0.587)2 )
1
=
(sn + 1) ((sn + 0.309)2 + 0.9512 ) ((sn + 0.809)2 + 0.5872 )
1
=
(sn + 1) (sn2 + 2 × 0.309 sn + 0.3092 + 0.9512 ) (sn2 + 2 × 0.809 sn + 0.8092 + 0.5872 )
1
=
(sn + 1) (sn2 + 0.618 sn + 1) (sn2 + 1.618 sn + 1)
Chapter 7 - IIR Filters 7. 34
jΩ
Example 7.13 s -plane
p4
p3
Determine the poles of lowpass Butterworth filter
X
U nit circ le
X
for N = 6. Sketch the location of poles on s-plane and p5 p2
X
X
hence determine the normalized transfer function of
lowpass filter.
p6 3 π/1 2
X X p1
π/12
σ
X X p 1∗
p ∗6
X
p ∗5 p ∗2
Solution
X
X
When N = 6, from equation (7.41), p ∗4 p ∗3
j
( 2k −1)π F ig 1 : L o c atio n o f p oles o n s-p lan e ,
sn = e 12 ; for k = 1, 2, 3, ...... 12 w h en N = 6.
( 2−1) π π
j
12
j
12
π π
When k = 1 ; sn = e =e = 1∠π / 12 = cos + j sin = 0.966 + j0. 259 = p1
12 12
( 4 −1) π 3π
j
12
j
12
3π 3π
When k = 2 ; sn = e =e = 1∠3π / 12 = cos + j sin = 0.707 + j0. 707 = p2
12 12
(6 −1) π 5π
j
12
j
12
5π 5π
When k = 3 ; sn = e =e = 1∠5π / 12 = cos + j sin = 0.259 + j0. 966 = p3
12 12
(8 −1) π 7π
j
12
j
12
7π 7π
When k = 4 ; sn = e =e = 1∠7π / 12 = cos + j sin = −0.259 + j0. 966 = p4
12 12
(10 −1) π 9π
j
12
j
12
9π 9π
When k = 5 ; sn = e =e = 1∠9π / 12 = cos + j sin = −0.707 + j0. 707 = p5
12 12
(12−1) π 11π
j
12
j
12
11π 11π
When k = 6 ; sn = e =e = 1∠11π / 12 = cos + j sin = −0.966 + j0. 259 = p6
12 12
(14 −1) π 13π
j j 13π 13π
When k = 7 ; sn = e 12 =e 12 = 1∠13π / 12 = cos + j sin = −0.966 − j0. 259 = p∗6
12 12
(16 −1) π 15π
j j 15π 15π
When k = 8 ; sn = e 12 =e 12 = 1∠15π / 12 = cos + j sin = −0.707 − j0. 707 = p∗5
12 12
(18 −1) π 17 π
j j 17π 17π
When k = 9 ; sn = e 12 =e 12 = 1∠17π / 12 = cos + j sin = −0.259 − j0. 966 = p∗4
12 12
( 20 −1)π 19π
j j 19π 19π
When k = 10 ; sn = e 12 =e 12 = 1∠19π / 12 = cos + j sin = 0.259 − j0. 966 = p∗3
12 12
( 22− 1) π 21π
j j 21π 21π
When k = 11 ; sn = e 12 =e 12 = 1∠21π / 12 = cos + j sin = 0.707 − j0. 707 = p∗2
12 12
( 24 − 1) π 23π
j j 23π 23π
When k = 12 ; sn = e 12 =e 12 = 1∠23π / 12 = cos + j sin = 0.966 − j0. 259 = p1∗
12 12
The transfer function is formed using the poles lying on left half of s-plane. The poles lying on left half
of s-plane are p4, p4*, p5, p5*, p6 and p6*.
1
∴ Normalized transfer function, H(sn ) =
(sn − p4 ) (sn − p∗4 ) (sn − p5 ) (sn − p∗5 ) (sn − p6 ) (sn − p∗6 )
1
∴ H(sn ) =
(sn + 0.259 − j0.966) (sn + 0.259 + j0.966) (sn + 0.707 − j0.707) (sn + 0. 707 + j0.707)
(sn + 0.966 − j0.259) (sn + 0.966 + j0.259)
1
=
d(s n + 0.259)2 − ( j0.966)2 i d(s
n + 0.707)2 − (j0.707)2 i d(s n + 0.966)2 − (j0.259)2 i
1
=
d i d
(sn + 0.259)2 + 0.9662 + (sn + 0.707)2 + 0.7072 i d(sn + 0.966)2 + 0.2592 i
1
∴ H(sn ) =
(sn2 + 2 × 0.259 sn + 0.2592 + 0.9662 ) (sn2 + 2 × 0.707 sn + 0.7072 + 0.7072 )
(sn2 + 2 × 0.966 sn + 0.9662 + 0.2592 )
1
=
(sn2 + 0.518 sn + 1) (sn2 + 1.414 sn + 1) (sn2 + 1.932 sn + 1)
When N is odd,
N−1
2
1 1 .....(7.43)
H(sn ) =
sn + 1 ∏ s2n + b k sn + 1
k=1
1
1 sn + 1
1
2 s2n + 1414
. sn + 1
1
3 (sn + 1) (s2n + sn + 1)
1
4 (s2n + 0.765sn + 1) (s2n + 1848
. sn + 1)
1
5 (sn + 1) ( s2n + 0.618 sn + 1) (s2n + 1618
. sn + 1)
1
6 (s2n + 1932
. sn + 1) (s2n + 1414
. sn + 1) (s2n + 0.518 sn + 1)
N = 10
N=2
N=4
ΩC Ω
³ F ig 7 .11 : M a g n itu d e resp o n se o f b u tterw o rth
lo w p a ss filter fo r va rio u s va lu es o f N .
7.6.5 Order of the Lowpass Butterworth Filter
In Butterworth filters the frequency response of the filter depends on the order, N. Hence the order N
has to be estimated to satisfy the given specifications.
Usually the specifications of the filter are given in terms of gain at a passband and stopband frequency.
Let, Ap = Gain or Magnitude at a passband frequency W p.
As = Gain or Magnitude at a stopband frequency W s.
Calculate a parameter N1 using equation (7.47) and correct it to nearest integer. Choose N such that N ³ N1.
log
LM e1/A 2s − 1
j OP
N1 = 1
MN e
1/A 2p − 1
j PQ ..... (7.47)
2
log
FG IJ
Ωs
H K
Ωp
Sometimes, the specifications of the filter are given in terms of dB-attenuation at a passband and
stopband frequency.
Let, a p, dB = dB-attenuation at a passband frequency W p.
a s, dB = dB-attenuation at a stopband frequency W s.
Calculate a parameter N1 using equation (7.48) and correct it to nearest integer. Choose N such that N ³ N1.
LMF 0.1α s,dB I
1
2
OP
10 −1
log MG J PP
MNH 10 0.1α p ,dB
− 1K
Q ..... (7.48)
N1 = Ωs
log Ωp
The equation (7.49) is preferable to equation (7.50), because the cutoff frequency W c calculated using
equation (7.49) ensures smallest amplitude distortion (or ripple) in the passband.
For bilinear transformation,
2 ωp 2 ω
Ωp = tan ; Ωs = tan s
T 2 T 2
For impulse invariant transformation,
ωp ωs
Ωp = ; Ωs =
T T
where T is the sampling time.
Case ii : When the specifications are a p,dB, a s,dB, w p, w s
Ωs
Cutoff frequency, Ωc = 1
0.1α s,dB .....(7.51)
e
10 −1 j 2N
Alternatively ,
Ωp
Cutoff frequency, Ωc = 1
0.1α p ,dB .....(7.52)
e
10 −1 j 2N
log
LM e1/ A 2s − 1
j OP
N1 = 1
MN e
1/ A 2p − 1
j PQ .....(7.57)
2 F I
log G J Ωs
H K Ωp
Choose N such that, N ³ N1. Usually N is chosen as nearest integer just greater than N1.
3. Determine the normalized transfer function, H(sn) of the analog lowpass filter.
When N is even,
N
2
1 .....(7.58)
H ( sn ) = ∏ s2n + b k sn + 1
k=1
When N is odd,
N−1
2
1 1
H(sn ) =
sn + 1 ∏ s2n + b k sn + 1
.....(7.59)
k=1
Ωs .....(7.61)
Cutoff frequency, Ωc = 1
1/ A 2s − 1 2 N
e j
5. Determine the unnormalized analog transfer function H(s) of the lowpass filter.
H ( s) = H (sn ) s s
n=
Ωc
When the order N is even, H(s) is obtained by letting sn ® s/W c in equation (7.58).
N N
2
1 2
Ωc2
∴ H (s) = ∏ s2n + b k sn + 1
= ∏= s2 + b k Ωcs + Ωc2 .....(7.62)
k=1 k 1
s
sn =
Ωc
When the order N is odd, H(s) is obtained by letting sn ® s/W c in equation (7.59).
N−1 N−1
1 2
1 Ωc 2
Ωc2
∴ H(s) =
sn + 1 ∏ s2n + b k sn + 1
=
s + Ωc ∏= s2 + b k Ωcs + Ωc2 .....(7.63)
k=1 k 1
s
sn =
Ωc
6. Determine the transfer function of digital filter, H(z). Using the chosen transformation in step-1,
transform H(s) to H(z). When impulse invariant transformation is employed, if T < 1, then multiply
H(z) by T to normalize the magnitude.
7. Realize the digital filter transfer function H(z) by a suitable structure.
8. Verify the design by sketching the frequency response H(ejw ).
H (e jω ) = H ( z)
z = e jω
Note : The basic filter design is lowpass filter design. The highpass, bandpass or bandstop filters are
obtained from lowpass filter design by frequency transformation.
where Î is attenuation constant and CN(W /W c) is the Chebyshev polynomial of the first kind of degree N.
1
L1 O 2
The attenuation constant, ∈ = M − 1P ..... (7.65)
MN A 2
p PQ
where, Ap is the gain or magnitude at passband edge frequency W p
For small values of N the Chebyshev polynomial is given by,
R|cos( N cos x)−1
; for |x| ≤ 1
C N ( x) = S|cosh( N cosh x) −1 ..... (7.66)
T ; for |x| > 1
For large values of N the Chebyshev polynomial is given by the recurrence relation,
CN(x) = 2xCN – 1(x) – CN – 2 (x) ..... (7.67)
with initial values C0(x) = 1 and C1(x) = x
The transfer function of the analog system can be obtained from equation (7.64) by substituting
W by s/j.
1
∴ H ( s) H (– s) =
1 + ∈2 C 2N
FG s j IJ ..... (7.68)
HΩ K c
1. The magnitude |H( jW )| oscillates between 1 and 1 1+ ∈2 within the passband and so the filter
is called equiripple in the passband.
5. With large values of N, the transition from passband to stopband becomes more sharp and
approaches ideal characteristics.
Chapter 7 - IIR Filters 7. 42
7.7.1 Transfer Function of Analog Chebyshev Lowpass Filter
For a stable and causal filter the poles should lie on the left half of s-plane. Hence the desired filter
transfer function is obtained by selecting N number of left half poles. When N is even all the poles are complex
and exist as conjugate pair. When N is odd, one of the pole is real and all other poles are complex and exist as
conjugate pair. Therefore the transfer function of Chebyshev filters will be a product of second-order factors.
Normalized Chebyshev Lowpass Filter Transfer Function
Let, N be the order of the filter.
Let, H(sn) be the normalized Chebyshev lowpass filter transfer function.
When N is even,
N
2
Bk
H ( sn ) = ∏ s2n + b k sn + c k
..... (7.70)
k=1
When N is odd,
N−1
2
B0 Bk
H ( sn ) =
s + c0 ∏ s2n + b k sn + c k
......(7.71)
k=1
where, b k = 2 y N sin e ( 2 k − 1) π
2N
j ..... (7.72)
c k = y 2N + cos2 e ( 2 k − 1)π
2N
j ..... (7.73)
c0 = yN ..... (7.74)
R 1 1 U|
1 |LMF OP L OP −
1 N 1 N
S 1 IK 2 1
− MFH
1 IK 2 1
V|
2 |MH
yN = + 1 + + 1 +
∈2 ∈ PQ MN ∈2 ∈ PQ ..... (7.75)
|TN |W
For even values of N the parameter Bk are evaluated using the equation (7.76)
1
H ( sn ) s = 1
n = 0 ..... (7.76)
(1 + ∈2 ) 2
For odd values of N the parameter Bk are evaluated using the equation (7.77)
H ( sn ) s = 1 ..... (7.77)
n = 0
While evaluating Bk using equation (7.76) or (7.77), it is normal practice to take, B0 = B1 = B2 = ..... = Bk.
Unnormalized Chebyshev Lowpass Filter Transfer Function
The unnormalized transfer function is obtained by replacing sn by s/W c in the normalized transfer
function, where W c is the cutoff frequency of the lowpass filter.
Let, N be the order of the filter.
7. 43 Digital Signal Processing
Let, H(s) be the normalized Chebyshev lowpass filter transfer function.
When N is even, H(s) is obtained by letting sn ® s/W c in equation (7.70).
N N
2 2
Bk Bk Ω2c
∴ H (s) = ∏ s2 + b k sn + c k
= ∏ s + b k Ωc s + c k Ω2c
2
k=1 n k=1 ..... (7.78)
s
sn =
Ωc
LMF e j I
1
1/ A 2s − 1 2
OP
cosh −1
MMGH e J
1/ A p j − 1 K
2 PP
N1 = N Q .....(7.80)
cosh −1
FG IJ
Ωs
H K
Ωp
Sometimes, the specifications of the filter are given in terms of dB-attenuation at a passband and
stopband frequency.
Let, ap,dB = dB-attenuation at a passband frequency, W p.
Let, a s,dB = dB-attenuation at a stopband frequency, W s.
Calculate a parameter N1 using equation (7.81) and correct it to nearest integer. Choose N such
that N ³ N1.
LMF 0.1α s,dB I
1
2
OP
−1
cosh −1
MMGH 1010 0.1α p ,dB J
− 1K
PP
N1 = N Q
cosh −1
FΩ I .....(7.81)
GH Ω JK
s
p
Chapter 7 - IIR Filters 7. 44
7.7.3 Cutoff Frequency of Analog Lowpass Chebyshev Filter
The IIR filters are designed to satisfy a prescribed gain or attenuation at a passband and stopband
frequency. But practically the cutoff frequency, W c is used to decide the useful frequency range of the filter.
Therefore, in Chebyshev filter design the passband and stopband specifications are used to estimate the
order, N of the filter and Nth order normalized Chebyshev lowpass filter is designed. Then the normalized
lowpass filter is unnormalized using the cutoff frequency.
In Chebyshev filters the passband edge frequency, W p is considered as cutoff frequency, W c and this
cutoff is not equal to 3 dB cutoff frequency, W 3dB.
The 3 dB cutoff frequency of Chebyshev filter is given by, Ω3dB = Ωc cosh e 1
N
cosh −1 ∈1 j ..... (7.82)
7.7.4 Frequency Response of Analog Chebyshev Lowpass Filter
The frequency response of Chebyshev |H (j Ω)|
N =5
filter depends on the order N as shown in fig 1.0
7.12. It can be observed that the approximated
magnitude response approaches the ideal 1
N =4
N =5
Ωc Ω
F ig 7 .1 2 : M a g n itu d e resp o n se o f C h eb y sh e v typ e -1
lo w p a ss filter fo r va rio u s va lu e o f N .
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig a : C h eb yshev type-1 , w h en N is odd. F ig b : C h eb yshev type-1 , w h en N is even.
|H (j Ω)| |H (j Ω)|
1 1
1 1
Ap = Ap =
2 2
1+ε 1+ε
As As
Ωp Ωs Ω Ωp Ωs Ω
F ig c : C h eb yshev type-2 , w h en N is odd. F ig d : C h eb yshev type-2 , w h en N is even.
F ig 7 .1 3 : M a g n itu d e respo n se o f a n a lo g C h e b ysh ev filters.
7. 45 Digital Signal Processing
7.7.5 Design Procedure for Lowpass Digital Chebyshev IIR Filter
Let, w p = Passband edge digital frequency in rad/sample.
w s = Stopband edge digital frequency in rad/sample.
1
T= = Sampling time in seconds.
Fs
where, Fs = sampling frequency in Hz.
Ap = Gain at a passband frequency w p.
As = Gain at a stopband frequency w s.
Note-1: If passband dB-attenuation, a p,dB and stopband dB-attenuation, a s,dB are specified, then convert
them to Ap and As as shown below.
Ap = 10(ap,dB/20) ap,dB and a s,dB are positive dB
As = 10(as,dB/20)
Bd d n a b s s a p t eshnt i sdeemii ft ie2:
mc oeSp s s t t a - Bd d n a b s s a p f o d a e , n o i t aun e
ap,dB. Remember that ap,dB equal to dp,dB. (refer section 7.5).
3: If T is not specified then take T = 1 second.
1. Choose either bilinear or impulse invariant transformation, and determine the specifications of
equivalent analog filter. The gain or attenuation of analog filter is same as digital filter. The band edge
frequencies are calculated using the following equations.
Let, Wp = Passband edge analog frequency corresponding to w p.
Ws = Stopband edge analog frequency corresponding to w s.
For bilinear transformation,
Note : If either T or Fs is not
2 ωp .....(7.83)
Ωp = tan specified then take T= 1 sec.
T 2
1
2 ω .....(7.84) If Fs is specified, then T =
Ωs = tan s Fs
T 2
For impulse invariant transformation,
ωp .....(7.85)
Ωp =
T
ω .....(7.86)
Ωs = s
T
2. Decide the order N of the filter. In order to estimate the order N, calculate a parameter N1 using the
following equation. Choose N such that N ³ N1. Usually N is chosen as nearest integer just greater than N1.
LMF e j I
1
1/ A 2s − 1 2
OP
cosh −1
MMGH e J
1/ A p j − 1 K
2 PP
N1 = N Q .....(7.87)
cosh −1
FG IJ
Ωs
H K
Ωp
Chapter 7 - IIR Filters 7. 46
3. Determine the normalized transfer function H(sn), of the filter.
When the order N is even,
N
2
Bk
H ( sn ) = ∏ 2
k = 1 sn + b k sn + c k
.....(7.88)
When the order N is odd,
N−1
2
B0 Bk
H ( s) =
s + c0 ∏ s2 + bk s + ck
.....(7.89)
k=1
where, b k = 2 y N sin e ( 2 k − 1) π
2N
j .....(7.90)
c k = y 2N + cos2 e ( 2 k − 1)π
2N
j .....(7.91)
c0 = yN .....(7.92)
R|L 1 OP
1
N LMF 1 OP −
1
N
U|
yN =
1
2
S|MMFH 1
∈2
+1 IK 2
+
1
∈ PQ –
MNH
1
∈2
+1 IK 2
+
1
∈ PQ V| .....(7.93)
|TN |W
1
∈ = FH 1/ A 2p IK −1 2 .....(7.94)
H ( s) = H ( sn ) s s
n=
Ωc
5. Determine the transfer function of digital filter, H(z). Using the chosen transformation,
in step-1transform H(s) to H(z). When impulse invariant transformation is employed, if T < 1, then
multiply H(z) by T to normalize the magnitude.
H ( e jω ) = H ( z ) z = e jω
Note : The highpass, bandpass and bandstop filters are obtained from lowpass filter design by frequency
transformation.
The highpass or bandpass or bandstop filters are designed by designing a lowpass filter and then
using frequency transformation, the transfer function of the desired filter is obtained. The frequency
transformation can be carried in s-domain (analog) or in z-domain (digital).
Ω0
where, Ω0 = Ωp Ωs and Q =
Ωs − Ωp
To design a filter, first design a normalized lowpass filter from the given specifications, and determine
the analog normalized transfer function (either Butterworth or Chebyshev transfer function) of the lowpass
filter. Then choose the transformation from the table 7.2 and determine the analog transfer function of the
desired filter.
Chapter 7 - IIR Filters 7. 48
Table 7.2 : Summary of Transformation for Analog Filter
Ωc
Highpass sn →
s
Q (s2 + Ω02 )
Bandpass sn →
Ω0s
Ω 0s
Bandstop sn →
Q (s2 + Ω02 )
From the analog transfer function H(s) the digital transfer function H(z) is obtained by either bilinear
transformation or impulse invariant transformation.
7.8.2 Digital Frequency Transformation
Table 7.3 : Summary of Transformation for Digital Filter
sin
FG ω ′ + ω IJ
c c
−1
z − α α =
H 2 K
Lowpass z −1 → F ω ′ − ω IJ
1 − αz −1 sinG c c
H 2 K
cos
FG ω ′ + ω IJ
c c
z −1 →
z −1 + α α =
H 2 K
Highpass F ω ′ − ω IJ
1 + αz −1 cosG c c
H 2 K
cosG
F ω + ω IJ
s p
α =
H 2 K = cos ω
z −2 −
2 αk − 1
k + 1
z +
k − 1
k + 1 cosG
F ω − ω IJ
s p
0
Bandpass
z −1
→ −
k − 1 −2 2 αk − 1 H 2 K
z − z + 1
k + 1 k + 1
k = cosG
F ω − ω I tan ω
s p
H 2 JK 2
c
cosG
F ω + ω IJ
s p
2αk −1 k − 1 α =
H 2 K = cos ω
−1
z −2 −
k + 1
z +
k + 1 cosG
F ω − ω IJ
s p
0
Bandstop
z →
k − 1 −2 2αk −1 H 2 K
z − z + 1
k + 1 k + 1
k = cosG
F ω − ω I tan ω ′
s p
H 2 JK 2
c
7. 49 Digital Signal Processing
Using digital frequency transformation the following filters can be designed from the lowpass digital
filter with cutoff frequency, w c' .
1. Lowpass filter with cutoff frequency, w c.
2. Highpass filter with cutoff frequency w c.
3. Bandpass filter with center frequency w 0 and lower and upper cutoff frequency w 1 and w 2.
4. Bandstop filter with center frequency w 0 and lower and upper cutoff frequency w 1 and w 2.
To design a filter, first design a lowpass digital filter from the given specifications, (either Butterworth
or Chebyshev) and determine H(z). Then choose the transformation from table 7.3 and determine the digital
transfer function of the desired filter.
Example 7.14
The normalized transfer function of an analog filter is given by,
1
H(sn ) =
sn2 + 1.4142sn + 1
Convert the analog filter to a digital filter with a cutoff frequency of 0.4p, using bilinear transformation.
Solution
To preserve the magnitude response the prewarping of analog filter has to be performed. For this
the analog cutoff frequency is determined using bilinear transformation and the analog transfer function is
unnormalized using this analog cutoff frequency. Then the analog transfer function is converted to digital
filter transfer function using bilinear transformation.
Given that, digital cutoff frequency, w c = 0.4p rad/sample. Let T = 1 second.
In Bilinear transformation,
2 0.4π 0.4π
Analog cutoff frequency, Ωc = tan = 2 tan = 1.4531 rad / second
T 2 2
Normalized analog transfer function,
1
H(sn ) =
sn2 + 1.4142sn + 1
∴ Unnormalized U|
analog filter
|V H(s) = 1
|| FsI 2
F s I +1
transfer function W GH Ω JK
c
+1.4142 GH Ω JK
c
Ω 2c
=
s 2 +14142
. Ω cs + Ω 2c
1.45312
=
s + (1.4142 × 1.4531)s + 1.45312
2
2.1115
= 2
s + 2 .055s + 2 .1115
2 1 z 1
The H(z) is obtained by substituting, s = in H(s)
T 1+ z 1
Chapter 7 - IIR Filters 7. 50
2.1115
∴ H(z) =
4(1 − z−1)2 + 4.11(1 − z−1) (1+ z −1) + 2.1115(1+ z −1)2
(1 + z−1)2
2.1115(1 + z −1)2
= −1
4(1 − 2z + z ) + 4.11( 1 − z−2 ) + 2.1115(1+ 2z−1 + z−2 )
−2
Alternatively,
0.2066 + 0.4131z −1 + 0.2066z −2
H(z) =
1 − 0.3695z −1 + 0.1958 z −2
z −2 (0.2066 z2 + 0.4131z + 0.2066) 0.2066 z2 + 0.4131z + 0.2066
= −2 2
=
z (z − 0.3695z + 0.1958) z 2 − 0.3695z + 0.1958
Example 7.15
Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 0.1second, to
satisfy the following specifications.
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 4.436 dB
Stopband attenuation ³ 20 dB
Passband edge frequency = 0.35p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p, dB / 20 j = 10b −4.436 / 20g = 0.6
A s = 10
e − α s ,dB / 20j = 10b −20 / 20g = 0.1
7. 51 Digital Signal Processing
Solution
Specifications of digital IIR lowpass filter
2
ωp
Passband edge analog frequency, Ωp = T
tan
2
Using equation (7.53).
2 0.35π
= tan = 12.256 rad / second
0.1 2
2ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.7π
= tan
0.1 2
= 39.2522 rad / second
Order of the filter
LM FH 1/ A 2 IK − 1O LM e 1/ 0.12 j − 1OP
log
MN FH
s
2 I − 1P
P log
N1 =
1 1/ Ap K Q=1 MN e 1/ 0.6 2 j − 1PQ
Using equation (7.57).
2 Ω
log s 2 log 39.2522
Ωp 12.256
log
99 LM OP
=
1 1. 7778 N
= 17267
. Q
2 log 39.2522
12 .256
Let, order, N = 2.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
Chapter 7 - IIR Filters 7. 52
N 2
Here, N = 2, ∴ k= 2
=
2
=1
1
b g
∴ H sn =
sn2 + b1 sn + 1
Calculate sin q using
When k = 1 ; bk = b1 = 2 sin LM b g OP = 1.4142
2−1 π
calculator in radian mode.
N Q2× 2
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n = Ω
Ωc c
1 1
∴ H(s) = = 2
s2 s s + 1.4142 Ω cs + Ω 2c
+ 1.4142 +1
Ω 2c Ωc Ω 2c
Ω 2c 12.44392
= = 2
s + 1.4142 Ω cs + Ω c s + 1.4142 × 12.4439 s + 12.44392
2 2
154.8506
=
s 2 + 17.5982 s + 154.8506
154.8506
H(z) = H(s) =
s 2 + 17.5982 s + 154.8506
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
154.8506
=
F 2 1− z I −1 2 F 2 1 − z I + 154.8506
−1
GH T 1 + z JK −1 + 17.5982 GH T 1 + z JK −1
154.8506
=
−1 2
e j
4 1− z
+
e
35.1964 1 − z−1 j + 154.8506
−1 2
T e1 + z j
2
e
T 1+ z j
−1
154.8506
=
−1 2 2
e
4 1− z j e je j
+ 35.1964 T 1 − z−1 1 + z −1 + 154.8506 T 2 1 + z−1 e j
2
e
T 2 1 + z −1 j
7. 53 Digital Signal Processing
Alternatively,
=
d
z−2 0.1708 z2 + 0.3415 z + 0.1708 i = 0.1708 z 2
+ 0.3415 z + 0.1708
z −2
dz 2
− 0.5407 z + 0.2237 i 2
z − 0.5407 z + 0.2237
X (z ) 0 .1708 X ( z ) Y (z )
0.17 08 + +
−1 −1
z z
−1 −1
z z
−2
z −2 X (z) 0.1708 z X ( z) −0 .2237 z −2 Y (z ) −2
z Y (z)
0.17 08 −0.2237
−1
z
0 .5407 z −1W ( z ) 0.3415 z −1W ( z)
z −1W ( z )
+ 0.54 07 0.34 15 +
−1
z
−0.2237 z −2 W ( z ) 0 .1708 z −2 W ( z )
z −2 W ( z)
−0.2237 0.17 08
=
c h
0.1708 + 0.3415 cos ω − j sin ω + 0.1708 cos 2ω − j sin 2ω c h e− jθ = cos θ − j sin θ
c h
1 − 0.5407 cos ω − j sin ω + 0.2237 cos 2ω − j sin 2ω c h
c0.1708 + 0.3415 cos ω + 0.1708 cos 2ωh + j c−0.3415 sin ω − 0.1708 sin 2ωh
=
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
H de i c0.1708 + 0.3415 cos ω + 0.1708 cos 2ω h + j c −0.3415 sin ω − 0.1708 sin 2ω h
N
jω
Let , Hde i =
jω
=
H de iD
jω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
where, HN(ejw ) = (0.1708 + 0.3415cosw + 0.1708 cos2w) + j( 0.3415sinw - 0.1708sin2w)
HD(ejw ) = (1 0.5407cosw + 0.2237cos2w) + j(0.5407sinw - 0.2237sin2w)
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707
0.7 ωc = 2 tan −1 GH Ω2 T JK
c
0.6
= 2 tan −1
FG 12.4439 × 0.1 IJ
0.5 H 2 K
1.1132
0.4 = 1.1132 = × π
π
0.2
0.1
ω
0 π 2π 4π
3π 5 π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc = 0.35 π ( π/2 ) ( π)
Ap = 10
e −δ p,dB / 20 j = 10b −4.436 / 20g = 0.6
As = 10
e − α s ,dB / 20j = 10b −20 / 20g = 0.1
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.7p rad/sample
Stopband edge digital frequency, w s = 0.35p rad/sample
Gain in normal value at passband edge, Ap = 0.6
Gain in normal value at stopband edge, As = 0.1
Sampling time, T = 0.1second
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the
given specifications of IIR highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of
lowpass and stopband edge of highpass as passband edge of lowpass. The gain of passband and stopband
remain same.
\ Passband edge digital frequency, w p = 0.35p rad/sample
\ Stopband edge digital frequency, w s = 0.7p rad/sample
Gain in normal value at passband edge, Ap = 0.6
Gain in normal value at stopband edge, As = 0.1
2 ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.7π
= tan
0.1 2
= 39.2522 rad / second
Order of the filter
LM e 1/ A 2 j − 1O LM e 1/ 0.12 j − 1O
IK − 1PP
s
log
MN FH 2
log
MN e 1/ 0.6 2
P
j − 1PQ
N1 =
1 1/ Ap
Q =
1 Using equation (7.57).
2 Ω
log s 2 log 39.2522
Ωp 12.256
log
LM 99 OP
=
1 N1. 7778 Q = 17267
.
2 log 39.2522
12.256
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N 2
Here, N = 2, ∴ k= 2
=
2
=1
1
∴ H sn =b g sn2 + b1 sn + 1
1
∴ H sn =b g sn2 + 1.4142 sn + 1
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the
transformation, sn ® Wc/s.
Chapter 7 - IIR Filters 7. 58
∴ H(s) = H sn b g Ωc
sn =
s
1
∴ H(s) = H sn b g Ω
=
sn2 + 1.4142 sn + 1 Ωc
sn = c sn =
s s
1 1 s2
= = = 2
Ω 2c Ωc Ω 2c .
+ 14142 Ω cs + s 2
s + 1.4142 Ω cs + Ω 2c
2 + 1.4142 +1 2
s s s
s2 s2
= 2 2
= 2
s + 1.4142 × 12 .4439 s + 12.4439 s + 17.5982 s + 154.8506
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s2
H(z) = H(s) = 2
s + 17.5982 s + 154.8506
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
F 2 1− z I −1 2
GH T 1 + z JK −1
=
F 2 1 − z I + 17.5982 2 F 1 − z I + 154.8506
−1 2 −1
GH T 1 + z JK −1
T GH 1 + z JK
2
T −1
−1 2
4 e1 − z j
−1 2
T e1 + z j 2
=
−1 2
4 e1 − z j 35.1964 e1 − z j −1
+ + 154.8506
−1 2 T e1 + z j −1
T e1 + z j
2
−1 2
4 e1 − z j
−1 2
T e1 + z j 2
=
−1 2 −1 2
4 e1 − z j + 35.1964 Te1 − z je1 + z j + 154.8506 T e1 + z j −1 −1 2
−1 2
T e1 + z j 2
−1 2
4 e1 − z j (a + b) (a b) = a b 2 2
= 2 2 2
−1 2 (a + b) = a + 2ab + b −1 2
4 e1 − z j + 35.1964 Te1 − z je1 + z j + 154.8506 T e1 + z j −1 −1 2
2 2 2
(a − b) = a − 2ab − b
4 e1 − 2z + z j −1 −2
= Put, T = 0.1
4 e1 − 2z + z j + 35.1964 × 0.1e1 − z j + 154.8506 × 0.1 e1 + 2z + z j
−1 −2 −2 2 −1 −2
7. 59 Digital Signal Processing
=
e
4 1 − 2z−1 + z−2 j
e
4 1 − 2z −1
+z −2
j + 3.5196 e1 − z j + 1.5485e1 + 2z
−2 −1
+ z −2 j
4 − 8z−1 + 4z−2
=
9.0681 − 4.903 z−1 + 2.0289 z−2
4 8 4
− z−1 + z−2
= 9.0681 9.0681 9.0681
4.903 −1 2.0289 −2
1− z + z
9.0681 9.0681
0.4411 − 0.8822 z−1 + 0.4411z−2
=
1 − 0.5407 z−1 + 0.2237 z −2
Alternatively,
0.4411 − 0.8822 z −1 + 0.4411z −2
H(z) =
1 − 0.5407 z −1 + 0.2237 z−2
=
d
z −2 0.4411z2 − 0.8822 z + 0.4411 i
d
z−2 z2 − 0.5407 z + 0.2237 i
0.4411z2 − 0.8822 z + 0.4411
=
z2 − 0.5407 z + 0.2237
X (z ) 0 . 4411 X (z) Y (z )
0.44 11 + +
−1 −1
z z
−1 −1
z −1X (z) −0. 8822 z X (z ) 0. 5407 z Y (z) −1
z Y (z)
−0.8822
+ + 0.54 07
−1 −1
z z
−2 −2
0. 4411 z X (z ) −0. 2237 z Y (z) −2
z −2 X (z) z Y (z)
0.44 11 −0.2237
F ig 1 : D irec t fo rm -I stru ctu re o f 2 n d o rder dig ita l IIR hig h p ass filter.
Direct form-II structure of digital IIR highpass filter
Y(z)
= 0.4411 − 0.8822 z−1 + 0.4411z −2 .....(3)
W(z)
On cross multiplying equation (2) we get,
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
−1
z
−1 −1
0 .5407 z W ( z ) −0. 8822 z W (z)
z −1W ( z )
+ 0.54 07 −0.8822
+
−1
z
−2 −2
−0.2237 z W ( z ) 0. 4411 z W (z )
z −2 W ( z)
−0.2237 0.44 11
F ig 2 : D irec t form -II stru cture of 2 n d o rder dig ita l IIR hig h pa ss filter.
=
c h
0.4411 − 0.8822 cos ω − j sin ω + 0.4411 cos 2ω − j sin 2ω c h
c c h h
1 − 0.5407 cos ω − j sin ω + 0.2237 cos 2ω − j sin 2ω
=
c h c h
0.4411 − 0.8822 cos ω + 0.4411cos 2ω + j 0.8822 sin ω − 0.4411sin 2ω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
H de i c0.4411 − 0.8822 cos ω + 0.4411cos 2ω h + j c0.8822 sin ω − 0.4411sin 2ω h
N
jω
Let , Hde i =
jω
=
H de i
D
jω
c1 − 0.5407 cos ω + 0.2237 cos 2ωh + j c0.5407 sin ω − 0.2237 sin 2ωh
where, HN(ejw ) = (0.4411 0.8822cosw + 0.4411cos2w) + j(0.8822sinw - 0.4411sin2w )
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of highpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707 Ωc T
0.7 ω c = 2 tan −1
2
0.6
= 2 tan −1
FG 12.4439 × 0 .1IJ
0.5 H 2 K
1.1132
0.4 = 1.1132 = × π
π
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc = 0.35 π ( π/2 ) ( π)
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01 dB
Stopband attenuation ³ 13.97 dB
Passband edge frequency = 0.45p rad/sample
Stopband edge frequency = 0.65p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20j = 10b −3.01/ 20g = 0. 707
As = 10
e −α s,dB / 20j = 10b −13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
2
ωp
Passband edge analog frequency, Ωp = T
tan Using equation (7.53).
2
2 0.45π
= tan
0.5 2
= 3.4163 rad / second
2 ωs
Stopband edge analog frequency, Ωs = T
tan Using equation (7.54).
2
2 0.65π
= tan
0.5 2
= 6.5274 rad / second
7. 63 Digital Signal Processing
Order of the filter
LM FH 1/ A 2
s
IK − 1O
P LM FH 1/ 0.22 IK − 1 O
P
log log
1 MN FH 1/ A 2
s
IK − 1P
Q=1 MN FH1/ 0.707 2 IK − 1P
Q Using equation (7.57).
N1 =
2 Ω 2 6.5274
log s log
Ωp 3.4163
log
24 LM OP
=
1 .
10006 N
= 2.4538 Q
2 log 6.5274
3.4163
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1 ∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
1
∴ H sn =b g (sn + 1) (sn2 + b1 sn + 1)
1
∴ H sn =b g (sn + 1) (sn2 + sn + 1)
1 1
= =
sn3 + sn2 + sn + sn2 + sn + 1 sn3 + 2 sn2 + 2 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn3 + 2 sn2 + 2 sn + 1 s s
sn = n =
Ωc Ωc
Chapter 7 - IIR Filters 7. 64
1 1
∴ H(s) = =
FG s IJ 3
F s IJ
+ 2G
2
+2
s
+1
s3 + 2 Ω c s 2 + 2 Ω 2c s + Ω3c
HΩ K c HΩ K c Ωc Ω3c
Ω3c
=
s + 2 Ωc s + 2 Ω 2c s + Ω3c
3 2
3.84333
=
s + 2 × 3.8433 s + 2 × 3.84332 s + 3.84333
3 2
56.7692
=
s3 + 7.6866 s 2 + 29.5419s + 56 .7692
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
56.7692
H(z) = H(s) =
s3 + 7.6866 s 2 + 29.5419 s + 56.7692
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
56.7692
=
F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1 − z I + 56.7692
−1
GH T 1 + z JK −1
+ 7.6866 G
H T 1 + z JK −1
+ 29.5419 GH T 1 + z JK
−1
56.7692
=
8(1 − z−1)3 + 7.6866 × 4T (1 − z−1)2 (1 + z−1) + 29.5419 × 2T 2 (1 − z−1)(1 + z−1)2
Put,
+ 56.7692 × T3 (1 + z−1)3
3 −1 3 T = 0.5
T (1 + z )
56.7692 × 0.53 (1 + z−1)3
=
8 (1 − z−1)3 + 7.6866 × 4 × 0.5 (1 − z−1)2 (1 + z−1) + 29.5419 × 2 × 0.52 (1 − z−1)(1 + z−1)2
7.0962 (1 + z−1)3 (a + b) (a b) = a2 b2
=
8 (1 − z−1)3 + 15.3732 (1 − z−1)2 (1 + z−1) (a + b)3 = a3 + 3a 2b + 3ab 2 + b3
+ 14.771(1 − z−1)(1 + z−1)2 + 7.0962 (1 + z−1)3 (a − b)3 = a3 − 3a 2b + 3ab2 − b3
7.0962 + 212886
. z−1 + 21.2886 z−2 + 7.0962z−3
= −1 −2
8 (1 − 3 z + 3z − z ) + 15.3732 (1 − z−1 − z−2 + z−3 ) + 14.771(1 + z−1 − z−2 − z−3 )
−3
7.0962 + 212886
. z−1 + 21.2886 z−2 + 7.0962z−3
=
45.2404 − 3.3136 z−1 + 15.1444 z−2 − 0.3016 z −3
7.0962 212886
. 212886
. 7.0962 −3
+ z −1 + z −2 + z
= 45 .2404 45. 2404 45. 2404 45.2404
3.3136 −1 15.1444 −2 0.3016 −3
1− z + z − z
45.2404 45.2404 45.2404
0.1569 + 0.4706 z −1 + 0.4706 z−2 + 0.1569 z−3
=
1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
7. 65 Digital Signal Processing
Alternatively,
=
d
z−3 0.1569 z3 + 0.4706 z2 + 0.4706 z + 0.1569 i
z −3
dz 3 2
− 0.0732 z + 0.3348 z − 0.0067 i
3 2
0.1569 z + 0.4706 z + 0.4706 z + 0.1569
=
z3 − 0.0732 z2 + 0.3348 z − 0.0067
0.1569X (z)
X (z) 0.15 69 + + Y (z)
−1 −1
z z
−1 −1
−1 0.4706z X (z) 0.0732z Y (z) −1
z X (z) z Y (z)
0.4706 + + 0.07 32
−1 −1
z z
−2 0.4706z −2 X (z ) −0.3348z −2 Y (z ) −2
z X (z) z Y (z )
0.47 06 + + −0.3348
−1 −1
z z
−3 0.1569z −3 X (z ) 0.0067z −3 Y (z )
z X (z ) −3
0.1569 0.00 67 z Y (z )
W (z) 0.1569W (z )
X (z ) + 0.15 69
+ Y (z )
−1
z
−1 −1
0.0732z W (z ) z W (z ) 0.4706z −1W (z )
+ 0.07 32 0.4706
+
−1
z
−0.3348 z −2 W (z) −2 0.4706z −2 W (z)
z W (z)
+ −0.3348 0.4706
+
−1
z
0.0067z −3 W (z) −3 0.1569z −3 W (z )
z W (z )
0.00 67 0.1569
=
c h c
0.1569 + 0.4706 cos ω − j sin ω + 0.4706 cos 2ω − j sin 2ω + 0.1569 cos 3ω − j sin 3ω h c h
c h c
1 − 0.0732 cos ω − j sin ω + 0.3348 cos 2ω − j sin 2ω − 0.0067 cos 3ω − j sin 3ω h c h
(0.1569 + 0.4706 cos ω + 0.4706 cos 2ω + 0.1569 cos 3ω )
+ j ( −0.4706 sin ω − 0.4706 sin 2ω − 0.1569 sin 3ω )
=
c
1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω h
c
+ j 0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω h
(0.1569 + 0.4706 cos ω + 0.4706 cos 2ω + 0.1569 cos 3ω )
Let , Hee j =
jω e j=
HN e jω + j ( −0.4706 sin ω − 0.4706 sin 2ω − 0.1569 sin 3ω )
H ee j
D
jω (1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω )
+ j (0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω )
0.9
0.8
0.707
0.7
Ωc T
0.6 ω c = 2 tan −1
2
0.5
= 2 tan −1
FG 3.8433 × 0.5 IJ
H 2 K
0.4
1.5306
= 1.5306 = × π
π
0.3
= 0.49 π rad / sam ple
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7 π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc= 0.49 π ( π/2 ) ( π)
F ig 3 : F req u ency resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR h ig hp a ss filter.
Chapter 7 - IIR Filters 7. 68
Example 7.18
Design a Butterworth digital IIR highpass filter using bilinear transformation by taking T = 0.5second, to
satisfy the following specifications.
0.707 £ |H(ejw )| £ 1.0 ; for 0.65p £ w £ p
jw
|H(e )| £ 0.2 ; for 0 £ w £ 0.45p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.65p rad/sample
Stopband edge frequency = 0.45p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p, dB / 20 j = 10b −3.01/ 20 g = 0.707
A s = 10
e − α s ,dB / 20j = 10b −13.97 / 20 g = 0.2
Solution
Specifications of digital IIR highpass filter
Passband edge digital frequency, w p = 0.65p rad/sample
Stopband edge digital frequency, w s = 0.45p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Sampling time, T = 0.5 second.
The highpass filter is designed via lowpass filter using frequency transformation technique. Hence the
given specifications of IIR highpass filter are converted to corresponding specification of IIR lowpass filter.
Specifications of digital IIR lowpass filter
The specification of lowpass filter is obtained by taking passband edge of highpass as stopband edge of
lowpass and stopband edge of highpass as passband edge of lowpass. The gain of passband and stopband
remain same.
\ Passband edge digital frequency, w p = 0.45p rad/sample
Stopband edge digital frequency, w s = 0.65p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.707 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For bilinear transformation,
2 ωp Using equation (7.53).
Passband edge analog frequency, Ωp = tan
T 2
2 0.45π
= tan = 3.4163 rad / second
0.5 2
7. 69 Digital Signal Processing
2 ωs
Stopband edge analog frequency, Ω s = T
tan Using equation (7.54).
2
2 0.65π
= tan = 6.5274 rad / second
0.5 2
Order of the filter
LM c h − 1OP
1/ A 2
s Lc 1/ 0.22 h − 1 OP
1
log
MN d i − 1PQ 1 log MMN c
2
1/ Ap 1/ 0.707 2 h − 1PQ Using equation (7.57).
N1 = =
2 Ωs 2 6.5274
log log
Ωp 3.4163
log
LM 24 OP
=
1 N1. 0006 Q = 2.4538
2 6.5274
log
3.4163
For odd N,
N− 1
2
1 1
b g
H sn =
sn + 1 ∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
b g bs + 1g ds 1+ b s + 1i
∴ H sn = 2
n n 1 n
When k = 1 ; b = b = 2 sin LM b g OP = 1
2−1 π Calculate sin q using
k
N Q 1 2× 3 calculator in radian mode.
1 1 1
∴ Hbs g = n = =
b g e + s + 1j s
s + 1 s n
2
n n
3
n + sn2 + sn + sn2 + sn + 1 sn3 + 2 sn2 + 2 sn + 1
The highpass filter with cutoff frequency, W c can be obtained from normalized lowpass filter using the
transformation, sn ® Wc/s.
∴ H(s) = H sn b g Ωc
sn =
s
1
∴ H(s) = H sn b g Ω
=
sn3 + 2sn2 + 2sn + 1 Ωc
sn = c sn =
s s
1 1
= =
FG Ω IJ
c
3
+2
FG Ω IJ c
2
+2
Ωc
+1
Ω3c + 2 Ω 2cs + 2 Ω c s 2 + s3
HsK HsK s s3
s3 s3
= = 3
s + 2 Ω cs + 2 Ωc s + Ω c s + 2 × 3.8433 s + 2 × 3.84332 s + 3.84333
3 2 2 3 2
s3
= 3 2
s + 7.6866s + 29.5419s + 56.7692
Digital IIR highpass filter transfer function, H(z)
For bilinear transformation,
s3
H(z) = H(s) = 3 2
s + 7.6866s + 29.5419s + 56.7692
2 1− z −1 2 1− z −1
s = s =
T 1+ z −1 T 1+ z −1
F 2 1− z I −1 3
GH T 1 + z JK −1
=
F 2 1− z −1 3 I + 7.6866 F 2 1 − z I + 29.5419 F 2 1 − z I + 56.7692
−1 2 −1
Put, T = 0.5
GH T 1 + z −1 JK GH T 1 + z JK GH T 1 + z JK
−1 −1
8 (1 − z−1)3
T3(1 + z−1)3 (a + b) (a b) = a2 b2
=
8 (1 − z −1)3 + 7.6866 × 4T(1 − z−1)2 (1+ z−1) (a + b)3 = a3 + 3a 2b + 3ab2 + b3
2 −1 −1 2 3 −1 3
+29.5419 × 2T (1 − z )(1 + z ) + 56.7692 × T (1 + z ) (a − b)3 = a3 − 3a 2b + 3ab2 − b3
T3(1 + z−1)3
8 (1 − z−1)3
=
8 (1 − z ) + 7.6866 × 4 × 0.5 (1 − z−1)2 (1+ z −1)
−1 3
8 (1 − z−1)3
=
8 (1 − z−1)3 + 15.3732 (1 − z−1)2 (1+ z−1) + 14.771(1 − z−1) (1+ z −1)2 + 7.0962 (1 + z−1)3
8 (1 − 3z −1 + 3z−2 − z −3 )
= −1 −2
8(1 − 3z + 3z − z ) + 15.3732 (1 − z−1)(1 − z−2 ) + 14.771(1 − z−2 )(1 + z−1)
−3
=
e
z−3 0.1768 z3 − 0.5305 z2 + 0.5305 z − 0.1768 j
z −3
ez
3 2
− 0.0732 z + 0.3348 z − 0.0067 j
3 2
0.1768 z − 0.5305 z + 0.5305 z − 0.1768
=
z3 − 0.0732 z2 + 0.3348 z − 0.0067
−1 −1
z z
−1 −1
−1 −0.5305z X (z) 0.0732z Y (z ) −1
z X (z) z Y (z)
−0.5305 + + 0.07 32
−1 −1
z z
−2 −2
−2 0.5305z X (z ) −0.3348z Y (z ) −2
z X (z) z Y (z )
0.53 05 + + −0.3348
−1 −1
z −3 z
−3
−3 −0.1768z X (z) 0.0067z Y (z ) −3
z X (z ) −0.1768 0.00 67 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 0.0732 z−1 + 0.3348 z−2 − 0.0067 z−3
Y(z)
= 0.1768 − 0.5305 z−1 + 0.5305 z−2 − 0.1768 z−3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) 0.0732z1W(z) + 0.3348z2W(z) 0.0067z3W(z) = X(z)
\ W(z) = X(z) + 0.0732z1W(z) 0.3348z2W(z) + 0.0067z3W(z) .....(4)
Chapter 7 - IIR Filters 7. 72
On cross multiplying equation (3) we get,
Y(z) = 0.1768W(z) 0.5305z1W(z) + 0.5305z2W(z) 0.1768z3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.1768W (z )
X (z ) + 0.17 68
+ Y (z )
−1
z
−1 −1 −1
0.0732z W (z ) z W (z ) −0.5305z W (z)
+ 0.07 32 −0.5305
+
−1
z
−2 −2
−0.3348z W (z ) −2 0.5305z W (z )
z W (z)
+ −0.3348 0.53 05 +
−1
z
−3
0.0067z W (z ) −3 −3
−0.1768z W (z)
z W (z )
0.00 67 −0.1768
− jω − j2ω − j3ω
0.1768 − 0.5305 e + 0.5305 e − 0.1768 e
=
1 − 0.0732 e− jω + 0.3348 e− j2ω − 0.0067 e− j3ω
=
c h c
0.1768 − 0.5305 cos ω − j sin ω + 0.5305 cos 2ω − j sin 2ω − 0.1768 cos 3ω − j sin 3ω h c h
c h c
1 − 0.0732 cos ω − j sin ω + 0.3348 cos 2ω − j sin 2ω − 0.0067 cos 3ω − j sin 3ω h c h
c0.1768 − 0.5305 cos ω + 0.5305 cos 2ω − 0.1768 cos 3ωh
+ j c0.5305 sin ω − 0.5305 sin 2ω + 0.1768 sin 3ω h
=
c1 − 0.0732 cos ω + 0.3348 cos 2ω − 0.0067 cos 3ω h
+ j c0.0732 sin ω − 0.3348 sin 2ω + 0.0067 sin 3ω h
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of highpass filter is
sketched as shown in fig 3.
Note : Verify the result with MATLAB program 7.4.
7. 73 Digital Signal Processing
Table 1: H(ejww ) and |H(ejww )| for various values of w
w HN(ejww ) HD(ejww ) H(ejww ) |H(ejww )|
0× π
16
0 + j0 1.2549 + j0 0 + j0 0
1×π
16
0.0004 j0.0013 1.232 j0.1101 0.0002 j0.0011 0.0011
2×π
16
0.0059 j0.0088 1.1665 j0.2025 0.0036 j0.0082 0.0089
3×π
16
0.0268 j0.022 1.0686 j0.2621 0.0189 j0.0252 0.0315
4× π
16
0.0733 j0.0304 0.953 j0.2783 0.0623 j0.0501 0.0799
5×π
16
0.1475 j0.0145 0.8378 j0.2471 0.1573 j0.0637 0.1697
6× π
16
0.238 + j0.0473 0.7414 + j0.1717 0.3187 + j0.100 0.3189
7× π
16
0.3186 + j0.1703 0.6801 + j0.0619 0.4872 + j0.2061 0.5290
8× π
16
0.3537 + j0.3537 0.6652 + j0.0665 0.4738 + j0.5791 0.7482
9× π
16
0.3080 + j0.5763 0.7012 + j0.1943 0.1964 + j0.8763 0.8981
10 × π
16
0.1586 + j0.7976 0.7851 + j0.3018 0.1642 + j0.9528 0.9668
11× π
16
0.0951 + j0.9657 0.906 + j0.3715 0.4640 + j0.8756 0.9910
12× π
16
0.4269 + j1.0306 1.047 + j0.3913 0.6806 + j0.7300 0.9980
13× π
16
0.7864 + j1.9583 1.1877 + j0.3566 0.8296 + j0.5578 0.9997
14 × π
16
1.1097 + j0.7415 1.3069 + j0.2709 0.9269 + j0.3752 1.0000
15× π
16
1.3342 + j0.4047 1.3867 + j0.1461 0.9820 + j0.1884 0.9999
16 × π
16
1.4146 + j0 1.4147 + j0 1.9999 + j0 0.9999
|H (e jω)|
1.0
0.9
0.8
0.707
0.7
Ωc T
0.6 ω c = 2 tan −1
2
0.5
= 2 tan −1
FG 3.8433 × 0.5 IJ
H 2 K
0.4
1.5306
= 1.5306 = × π
π
0.3
= 0.49 π rad / sam ple
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7 π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
ωc= 0.49 π ( π/2 ) ( π)
F ig 3 : F req u ency resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR h ig hp a ss filter.
Chapter 7 - IIR Filters 7. 74
Example 7.19
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking
T = 1second, to satisfy the following specifications.
0.707 £ |H(ejw )| £ 1.0 ; for 0 £ w £ 0.3p
jw
|H(e )| £ 0.2 ; for 0.75p £ w £ p
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 3.01dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.3p rad/sample
Stopband edge frequency = 0.75p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e − δp1,dB / 20j = 10b −3.01/ 20 g = 0.707
A s = 10
e −α s , dB / 20j = 10b −13.97 / 20 g = 0.2
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.3p rad/sample
Stopband edge digital frequency, w s = 0.75p rad/sample
Gain in normal value at passband edge, Ap = 0.707
Gain in normal value at stopband edge, As = 0.2
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.707 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For impulse invariant transformation,
ωp 0.3π Using equation (7.55).
Passband edge analog frequency, Ωp = = = 0.9425π rad / second
T 1
ωs 0.75π
Stopband edge analog frequency, Ω s = = = 2.3562 rad / second Using equation (7.56).
T 1
Order of the filter
LM FH1/ A 2
s
IK − 1O
P LM FH 1/ 0.22 IK − 1 O
P LM 24 OP
log log
1 MN FH 2
1/ Ap IK − 1P
Q=1 MN FH
1/ 0.707 2 IK − 1P
Q 1
log
N1. 0006 Q = 17339
N1 = = . Using equation (7.57).
2 Ω 2 0.9425 2 log 0.9425
log s log
Ωp 2.3562 2.3562
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk sn + 1
Using equation (7.58).
k =1
1
b g
∴ H sn =
sn2 + 1.4142 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H sn b g s
=
sn2 + 1.4142 sn + 1 s s
sn = n = Ω
Ωc c
1 1 Ω2c
= 2
= 2 2
= 2
s s s + 1.4142 Ω cs + Ω c s + 1.4142 Ω cs + Ω2c
+ 1.4142 +1
Ω 2c Ωc Ωc2
2
.
10645 1.1332
= 2 2
= 2
s + 1.4142 × 10645
. s + 10645
. s + 1.5054 s + 1.1332
To convert the analog transfer function to digital transfer function, the above equation can be modified
as follows.
1.1332
∴ H(s) =
s 2 + 0.7527 × 2s + 0.75272 − 0.75272 + 1.1332
1.1332 (s + a)2 = s 2 + 2as + a 2
=
bs + 0.7527g 2
+ 0.5666
2a = 15054
. ⇒ a=
1.5054
= 0.7527
1.1332 0.7527 2
= ×
0.7527 2
b
s + 0.7527 + 0.75272 g
0.7527
= 1.5055 ×
bs + 0.7527g 2
+ 0.75272
Chapter 7 - IIR Filters 7. 76
Digital IIR lowpass filter transfer function, H(z)
b
→
c
e − aT sin bT z−1 h Using equation (7.19).
bs + a g 2
+b 2 is transformed to
1− 2e − aT
ccos bTh z −1
+e −2aT
z −2
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
∴ H(z) = 1.5055 ×
e−0.7527 ×1
csin 0.7527 × 1h z −1
Put, T = 1
1 − 2 e−0.7527 ×1
(cos 0.7527 × 1) z−1 + e−2 × 0.7527 × 1 −2
z
0.3220 z −1 0.4848 z−1
= 1.5055 × −1 −2
=
1 − 0.6877 z + 0.2219 z 1 − 0.6877 z−1 + 0.2219 z −2
Alternatively,
0.4848 z −1 0.4848 z −1
H(z) = −1 −2
= −2 2
1 − 0.6877 z + 0.2219 z z (z − 0.6877 z + 0.2219)
0.4848 z
=
z2 − 0.6877 z + 0.2219
Y(z) 0.4848 z −1
Let , H(z) = =
X(z) 1 − 0.6877 z −1 + 0.2219 z −2
X (z) + Y (z)
−1 −1
z z
−1 −1 −1
z X (z ) 0.4848 z X (z) 0.6877z Y (z ) −1
z Y (z )
0.48 48
+ 0.68 77
−1
z
−2
−0.2219z Y (z ) z −2 Y (z )
−0.2219
W(z) 1
where, = .....(2)
X(z) 1 − 0.6877 z + 0.2219 z−2
−1
Y(z)
= 0.4848 z−1 .....(3)
W(z)
7. 77 Digital Signal Processing
On cross multiplying equation (2) we get,
Using equation (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z)
X (z ) + Y (z )
−1
z
−1 −1
0.6877z W (z ) −1 0.4848z W (z)
z W (z)
+ 0.68 77 0.48 48
−1
z
−2
−0.2219z W (z) −2
z W (z )
−0.2219
0.4848 z−1
e j
H e jω = H(z)
z = e jω
=
1 − 0.6877 z−1 + 0.2219 z−2 z = e jω
0.4848 e − jω
=
1 − 0.6877 e− jω + 0.2219 e− j2ω
=
c
0.4848 cos ω − j sin ω h
c h
1 − 0.6877 cos ω − j sin ω + 0.2219 cos 2ω − j sin 2ω c h
0.4848 cosω − j0.4848 sin ω
=
c1 − 0.6877 cos ω + 0.2219 cos 2ωh + j c0.6877 sin ω − 0.2219 sin 2ωh
e j
Let , H e jω =
e j=
HN ejω 0.4848 cosω − j0.4848 sin ω
e j
HD ejω c1 − 0.6877 cos ω + 0.2219 cos 2ω h + j c0.6877 sin ω − 0.2219 sin 2ω h
The frequency response H(ejw ) and hence the magnitude response |H(ejw )| are calculated for various
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
0.9
0.8
0.707
0.7
ωc = Ωc T = 1.0645 × 1
0.6
1.0645
= ×π
π
0.5
= 0.34 π rad / sam ple
0.4
0.3
0.2
0.1
ω
0 π 2π 4π 5π
3π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Ωc = 0.3 4 π ( π/2 ) ( π)
F ig 3 : F req u en c y resp o n se o f 2 n d ord e r d igital B u tterw o rth IIR low p a ss filte r.
7. 79 Digital Signal Processing
Example 7.20
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Draw direct form-I and II structure of the filter. Verify the design by sketching the frequency response.
Alternatively,
Passband ripple £ 0.9151dB
Stopband attenuation ³ 11.2133dB
Passband edge frequency = 0.35p rad/sample
Stopband edge frequency = 0.7p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e −δ p,dB / 20j = 10b −0.9151/ 20g = 0.9
As = 10
e −α s ,dB / 20j = 10b −11.2133/ 20g = 0.275
Solution
Specifications of digital IIR lowpass filter
LM FH1/ A s2 IK − 1O
P LM FH
1/ 0.2752 IK − 1O
P
1
log
MN FH IK P
2 −1
1/ A p
Q=1
log
MN FH 1/ 0.92 IK −1 PQ 1 log LMN120.2346
.2231O
PQ = 2.8518 Using equation (7.57).
N= =
2 Ωs 2 2.1991 2 2.1991
log log log
Ωp .
10996 10996
.
For odd N,
N−1
2
1 1
b g
H sn =
sn + 1
∏ sn2 + bk sn + 1
Using equation (7.59).
k =1
where, bk = 2 sin LM b g
2k −1 π OP Using equation (7.60).
N 2N Q
N − 1 3 − 1
Here, N = 3, ∴ k= 2
=
2
=1
1 1
b g
∴ H sn =
sn + 1 sn2 + b1 sn + 1
When k = 1; bk = b1 = 2 sin LM b g OP = 1
2−1 π Calculate sin q using
N Q2× 3 calculator in radian mode.
1 1
b g
∴ H sn = =
(sn + 1) (sn2 + sn + 1) sn3 + 2sn2 + 2sn + 1
H(s) = H sn b g s
sn =
Ωc
Ωs 2.1991
Ωc = 1
= 1
= 14489
. rad / sec
e1/ A 2
s j−1 2N F 1 I 6
H 0.2752
−1
K
1 Using equation (7.61).
∴ H(s) = H sn b g s
=
(sn + 1) (sn2 + sn + 1) s
sn = sn =
Ωc Ωc
1 1
=
F s + 1I F s 2
s I = Fs+Ω I Fs 2
+ s Ω c + Ω 2c I
GH Ω JK GH Ω
c
2
c
+
Ωc
+1 JK GH Ω JK GH c
c
Ω c2 JK
Ω3c 1.44893
= 2
=
( s + Ω c ) (s + s Ω c + Ω 2c ) 2
(s + 1.4489) (s + s × 14489
. + 14489
. 2
)
3.0417
= .....(1)
(s + 14489
. ) (s 2 + 1.4489 s + 2.0993)
3.0417
=
s3 + 2.8978s 2 + 4.1986s + 3.0417
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) can be simplified as follows.
3.0417
H(s) =
(s + 14489
. ) (s2 + 1.4489 s + 2.0993)
By partial fraction expansion H(s) can be expressed as
3.0417 A Bs + C
= = + .....(2)
(s + 14489
. ) (s2 + 1.4489 s + 2.0993) s + 1.4489 s 2 + 14489
. s + 2.0993
7. 81 Digital Signal Processing
On cross multiplying the equation (2) we get
3.0417 = A(s2 + 1.4489s + 2.0993) + (Bs + C) (s + 1.4489)
3.0417 = As2 + 1.4489As + 2.0993A + Bs2 + 1.4489Bs + Cs + 1.4489C .....(3)
A Bs + C
∴ H(s) = +
s + 1.4489 s 2 + 1.4489s + 2.0993 (s + a)2 = s 2 + 2as + a 2
1.4489 −1.4489s 14489
.
= 2a = 14489
. ⇒ a= = 0.7245
s + 14489
. s 2 + 14489
. s + 2.0993 2
1.4489 1.4489s
= −
s + 14489
. 2
(s + 2 × 0.7245s + 0.72452 ) + FH 2.0993 − 0.72452 IK 2
1.4489 s + 0.7245 .
12548
= .
− 14489 + 0.8366 ......(4)
.
s + 14489 (s + 0.7245)2 + 12548
. 2
(s + 0.7245)2 + 12548
. 2
Using the above transformation, the H(s) of equation (4) can be transformed to H(z) as shown below.
14489
. 1 − e −0.7245 (cos 1.2548)z −1
∴ H(z) = −1.4489 −1
− 1.4489 −0.7245
Put, T = 1.
1− e z 1 − 2e (cos 1.2548)z −1 + e −2× 0.7245z −2
X (z) + Y (z)
−1 −1
z z
−1 −1
−1
z X (z) 0.5073z X (z) 0.536z Y (z) −1
0.50 73 + + 0 .5 3 6 z Y (z)
−1 −1
z z
−2 −2
−2 0.1985z X (z ) −0 .3055z Y (z) −2
z X (z) z Y (z )
0.19 85
+ −0.3055
−1
−3
z
0.0051z Y (z ) −3
0.00 51 z Y (z )
Y(z)
= 0.5073 z−1 + 0.1985 z−2 .....(7)
W(z)
7. 83 Digital Signal Processing
On cross multiplying equation (6) we get,
W(z) 0.536z1W(z) + 0.3055z2 W(z) 0.0551 z3W(z) = X(z)
W(z) = X(z) + 0.536z1W(z) 0.3055z2 W(z) + 0.0551z3W(z) .....(8)
On cross multiplying equation (7) we get,
Y(z) = 0.5073z1W(z) + 0.1985z2W(z) .....(9)
Using equations (8) and (9), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
0.536 z −1W ( z) 0.5073 z −1W ( z )
z −1W ( z)
+ 0 .5 3 6 0.50 73 +
−1
z
−0 .3055 z −2 W ( z )
z −2 W ( z ) 0 .1985 z −2 W ( z )
+ −0.3055 0.19 85
−1
z
−3
0 .0551 z W ( z)
z −3 W ( z)
0.05 51
e j
Let , H e jω =
e j = (0.5073 cos + 0.1985 cos ω) + j(−0.5073 sin ω − 0.1985 sin 2ω)
HN ejω
H ee j
D
jω (1 − 0.536 cos ω + 0.3055 cos 2ω − 0.0551cos 3ω )
+ j(0.536 sin ω − 0.3055 sin 2ω + 0.0551sin 3ω )
values of w and listed in table 1. Using the values listed in table 1, the magnitude response of lowpass filter is
sketched as shown in fig 3.
|H (e jω)|
1.0
0.9
0.8
0.707
0.7
0.5 1.4489
= × π = 0.46 π
π
0.4
0.3
0.2
0.1
ω
0 π 2π 4π
3π 5π 6π 7π 8π 9π 10 π 11π 12 π 13 π 14 π 15 π 16 π
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Ωc = 0.46 π ( π/2 ) ( π)
F ig 3 : F req u en c y resp o nse of 3 rd ord er d ig ita l B u tterw o rth IIR lo w p a ss filte r.
7. 85 Digital Signal Processing
Example 7.21
Design a Butterworth digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Alternatively,
Passband ripple £ 1.9 dB
Stopband attenuation ³ 13.97dB
Passband edge frequency = 0.2p rad/sample
Stopband edge frequency = 0.32p rad/sample
The above specifications can be converted to Ap and As as shown below.
Ap = 10
e − δp,dB / 20j = 10b −1.9 / 20 g = 0.8
As = 10
e − α s ,dB / 20j = 10b −13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
LM FH1/ A 2 IK − 1O
P LM FH 1/ 0.22 IK − 1O
P
log
MN FH
s
1/ A p IK − 1 P
2
log
MN FH
1/ 0.8 2 IK − 1P log
LM 24 OP
N=
1 Q=1 Q= 1 N
0.5625 Q
= 3.9928 Using equation (7.57).
2 Ωs 2 .
10053 .
2 log 10053
log log
Ωp 0.6283 0.6283
For even N,
N
2
1 Using equation (7.58).
b g ∏
H sn =
sn2 + bk sn + 1
k =1
where, bk = 2 sin LM b 2k −1 π g OP
N 2N Q Using equation (7.60).
Here, N = 4, ∴ k = 1, 2
1 1
∴ H sn = b g ×
sn2 + b1 sn + 1 sn2 + b2 sn + 1
= 2 sin LM b g O = 1.8478
2× 2−1 π
When k = 2 ; bk = b2
N QP
2 ×4
1
b g
H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 2.6132 sn2 + 3.4143 sn2 + 2.6132 sn + 1
H(s) = H sn b g s
sn =
Ωc
1
∴ H(s) = H snb g =
(sn2 + 0.7654 sn + 1)(sn2 + 18478
. sn + 1)
Using equation (7.61).
sn = s sn = s
Ωc Ωc
1 1
=
Fs 2
s IF s 2
s I = Fs 2
+ 0.7654 Ω c s + Ω c2 IFs 2
.
+ 18478 Ωc s + Ω 2c I
GH Ω 2
c
+ 0.7654
Ωc
+1 JK GH Ω 2
c
+ 1.8478
Ωc
+1 JK GH Ω 2c JK GH Ωc2 JK
Ω 4c 0.67574
= 2
=
(s + 0.7654 Ω cs + Ω c )(s 2
2
.
+ 18478 Ωc s + Ω 2c ) (s + 0.7654 × 0.6757 s + 0.67572 )
2
(s 2 + 18478
. × 0.6757 s + 0.67572 )
0.2085
= ....(1)
(s + 0.5172 s + 0.4566)(s2 + 12486
2
. s + 0.4566)
0.2085
= 4
s + 12486
. s3 + 0.4566 s 2 + 0.5172 s3 + 0.6458 s 2 + 0.2362 s + 0.4566 s 2 + 0.5701s + 0.2085
0.2085
=
s 4 + 1.7658 s3 + 1559
. s 2 + 0.8063 s + 0.2085
7. 87 Digital Signal Processing
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) is simplified as follows.
−b ± b2 − 4ac −b ± b2 − 4ac
= =
2a 2a
−0.5172 ± 0.51722 − 4 × 1 × 0.4566 −1.2486 ± 12486
. 2
− 4 × 1 × 0.4566
= =
2 2
−0.5172 ± j1.2486 −1.2486 ± j0.5170
= = −0.2586 ± j0.6243 = = −0.6243 ± j0.2586
2 2
= (s − ( −0.2586 + j0.6243)) (s − ( −0.2586 − j0.6243)) = (s − ( −0.6243 + j0.2586)) (s − ( −0.6243 − j0.2586))
= (s + 0.2586 − j0.6243)(s + 0.2586 + j0.6243) = (s + 0.6243 − j0.2586)(s + 0.6243 + j0.2586)
0.2085
H(s) =
(s 2 + 0.5172 s + 0.4566)(s 2 + 1.2486 s + 0.4566)
0.2085
=
(s + 0.2586 − j0.6243) (s + 0.2586 + j0.6243)
(s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586)
A2 A∗2
+ +
(s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586)
where, A1, A1*, A2, A2* are residues
0.2085 × (s + 0.2586 − j0.6243)
A1 =
(s + 0.2586 − j0.6243)(s + 0.2586 + j0.6243) (s + 0.6243 − j0.2586) (s + 0.6243 + j0.2586) s = − 0.2586 + j0.6243
0.2085
=
(−0.2586 + j0.6243 + 0.2586 + j0.6243) ( −0.2586 + j0.6243 + 0.6243 − j0.2586)
( −0.2586 + j0.6243 + 0.6243 + j0.2586)
0.2085
= = −0.3121 + j0.1293
j12486
. (0.3657 + j0.3657) (0.3657 + j0.8829)
0.2085
=
(−0.6243 + j0.2586 + 0.2586 − j0.6243) ( −0.6243 + j0.2586 + 0.2586 + j0.6243)
(−0.6243 + j0.2586 + 0.6243 + j0.2586)
0.2085
= = 0.3121 − j0.7536
(−0.3657 − j0.3657) ( −0.3657 + j0.8829) j0.5172
Ai Ai
→ Using equation (7.17).
s + pi 1 − e − p i T z −1
Using the above transformation, the H(s) can be transformed to H(z) as shown below,
=
e j
−0.6242 + 0.3121e−0.2586 e j0.6243 + e− j0.6243 z−1 + j0.1293 e−0.2586 e j0.6243 − e− j0.6243 z−1 e j
1 − e−0.2586 (e j0.6243 + e− j0.6243 )z−1 + e−0.5172 z−2
+
e j
0.6242 − 0.3121e−0.6243 ej0.2586 + e− j0.2586 z−1 − j0.7536 e−0.6243 e j0.2586 − e− j0.2586 z−1 e j
−0.6243 j0.2586 − j0.2586 −1 −1.2486 −2
1− e (e +e )z +e z
=
− 0.6242 + 0.3121e b2 cos 0.6243g z + j0.1293 e c2 j sin 0.6243h z
−0.2586 −1 −0.2586 −1
1− e b2 cos 0.6243gz + e z
−0.2586 −1 −0.5172 −2
+
0.6242 − 0.3121e b2 cos 0.2586g z − j0.7536 e c2 j sin 0.2586h z
−0.6243 −1 −0.6243 −1
1− e b2 cos 0.2586gz + e z
−0.6243 −1 −1.2486 −2
e
− 0.6242 + 0.2744 z−1 1 − 1.0357 z−1 + 0.2869 z −2 + 0.6242 − 0.1167 z−1 j e j
e1− 1.2530 z −1
+ 0.5962 z−2 j
∴ H(z) =
e1 − 1.2530 z −1
+ 0.5962 z −2
j e1 − 1.0357 z −1
+ 0.2869 z −2
j
−0.6242 + 0.6465 z−1 − 0.1791z−2 + 0.2744 z−1 − 0.2842 z−2 + 0.0787 z−3
+ 0.6242 − 0.7821z−1 + 0.3721z−2 − 0.1167 z−1 + 0.1462 z −2 − 0.0696 z−3
=
1 − 1.0357 z−1 + 0.2869 z−2 − 12530
. z−1 + 1.2977 z−2 − 0.3595 z−3
+ 0.5962z−2 − 0.6175 z−3 + 0.171z−4
−1 −1
z z
−1
−1 0.0221z X (z ) 2.2887z −1Y (z)
z X (z) −1
0.02 21 + + 2.28 87 z Y (z)
−1 −1
z z
−2 −2
−2 0.055z X (z ) −2.1808z Y (z ) −2
z X (z) z Y (z )
0.05 5 + + −2.1808
−1
z −1
−3 −3
z
−3 0.0091z X (z) 0.977z Y (z )
z X (z) −3
0.00 91
+ 0 .9 7 7 z Y (z )
−1
−4 z
−0.171z Y (z ) −4
−0.171 z Y (z)
W(z) 1
where, = .....(3)
X(z) 1 − 2 .2887 z−1 + 2.1808 z−2 − 0.977 z−3 + 0.171z−4
Y(z)
= 0.0221z−1 + 0.055 z−2 + 0.0091z−3 .....(4)
W(z)
On cross multiplying equation (3) we get,
W(z) 2.2887z1W(z) + 2.1808z2W(z) 0.977z3W(z) + 0.171z4W(z) = X(z)
\ W(z) = X(z) + 2.2887z1W(z) 2.1808z2W(z) + 0.977z3W(z) 0.171z4W(z) .....(5)
On cross multiplying equation (4) we get,
Y(z) = 0.0221z1W(z) + 0.055z2W(z) + 0.0091z3W(z) .....(6)
Using equations (5) and (6), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
−1
2 .2887 z −1W ( z) 0.0221 z W (z )
z −1W ( z)
+ 2.28 87 0.02 21 +
−1
z
−2 .1808 z −2 W ( z) −2
0.055 z W (z )
z −2 W ( z )
+ −2.1808 0.05 5
+
−1
z
−3 −3
0 .977 z W (z ) 0.0091 z W (z )
z −3 W ( z)
+ 0 .9 7 7 0.00 91
−4 −1
−0.171 z W (z) z
−0.171 z −4 W ( z )
F 0.7795IJ
0.6243 G s + (s + a 2 )2 = s 2 + 2a 2s + a 22
+
H 0.6243K 12486
.
(s + 2 × 0.6243s + 0.6243 ) + F 0.4566 − 0.6243 I
2 2 2
2 2a 2 = 12486
. ⇒ a2 =
2
H K = 0.6243
−0.6243(s + 0.5172) 0.6243(s + 1.2486)
= +
(s + 0.2586)2 + 0.62432 (s + 0.6243)2 + 0.2586 2
−0.6243(s + 0.2586 + 0.2586) 0.6243(s + 0.6243 + 0.6243)
= +
(s + 0.2586)2 + 0.62432 (s + 0.6243)2 + 0.2586 2
(s + 0.2586) 0.6243
= 0.6243 0.2586
(s + 0.2586)2 + 0.62432 (s + 0.2586)2 + 0.62432
(s + 0.6243) 0.6243 × 0.6243 0.2586
+ 0.6243 +
(s + 0.6243)2 + 0.25862 0.2586 (s + 0.6243)2 + 0.25862
Chapter 7 - IIR Filters 7. 92
(s + 0.2586) 0.6243
∴ H(s) = 0.6243 0.2586
(s + 0.2586)2 + 0.62432 (s + 0.2586)2 + 0.62432
(s + 0.6243) 0.2586
+ 0.6243 + 15072
.
(s + 0.6243)2 + 0.2586 2 (s + 0.6243)2 + 0.2586 2
Digital IIR lowpass filter transfer function, H(z)
In impulse invariant transformation,
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
1 − e−0.6243(cos 0.2586) z −1
+ 0.6243 −0.6243
1− 2 e (cos 0.2586) z−1 + e−2 × 0.6243 z−2
=
e
+ 0.6243 − 0.1168z−1 1 − 12530
. je
z−1 + 0.5962z−2 j
e .
1 − 12530z−1 + 0.5962z −2 j e1 − 10357
. z −1
+ 0.2869z−2 j
−0.6243 + 0.6466z−1 − 0.1791z−2 + 0.2744z −1 − 0.2842z−2 + 0.0787z−3
+ 0.6243 − 0.7822z−1 + 0.3722z−2 − 0.1168z−1 + 0.1464z−2 − 0.0696z−3
=
1 − 10357
. z−1 + 0.2869z−2 − 12530
. z−1 + 12977
. z−2 − 0.3595z−3
+ 0.5962z −2 − 0.6175z−3 + 0.171z−4
Note : The H(z) obtained by both the methods are same. The small difference in the coefficients are due to
the corrections (or rounding) made in calculations.
7. 93 Digital Signal Processing
Example 7.22
Design a Butterworth digital IIR lowpass filter using bilinear transformation by taking T = 1second, to
satisfy the following specifications.
Alternatively,
Ap = 10
e− δp,dB / 20j = 10b−3.0116 / 20g = 0. 707
As = 10
e −α s ,dB / 20j = 10b−21.9382/ 20g = 0.08
Solution
Specifications of digital IIR lowpass filter
LM FH 1/ A 2 IK − 1O LM FH IK − 1 O
1/ 0.08 2
log
s
P log P
MN FH s K − 1P MN FH1/ 0.707 2 IK − 1P
1/ A 2 I
N1 =
1 Q=1 Q Using equation (7.57).
2 Ω 2 .
14531
log s log
Ωp 0.6498
log
155.25 LM OP
=
1 .
10006 N
= 3.1341 Q
.
2 log 14531
0.6498
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 4.
Normalized transfer function, H(sn) of Butterworth lowpass filter
For even N,
N
2
1
b g ∏s
H sn = 2
n + bk s n + 1
Using equation (7.58).
k =1
where, bk = 2 sin LM c 2k − 1 πh OP
N 2N
Q Using equation (7.60).
Here, N = 2, ∴ k = 1, 2
When k = 1, bk = b1 = 2 sin
LM b2 × 1 − 1gπ OP = 0.7654
MN 2 × 4 PQ Calculate sin q using
When k = 2, bk = b2 = 2 sin M
L b2 × 2 − 1gπ OP = 18478 calculator in radian mode.
MN 2 × 4 PQ .
1
b g
∴ H sn =
(sn2 + 0.7654 sn + 1) (sn2 + 18478
. sn + 1)
1
=
sn4 + 2.6132 sn3 + 3.4143 sn2 + 2.6132 sn + 1
Unnormalized transfer function, H(s) of Butterworth lowpass filter
H(s) = H sn b g s
sn =
Ωc
Ωs 14531
. Using equation (7.61).
Ωc = 1
= 1
= 0.7734 rad / second
e1/ A 2s j − 1 2N F 1 I 2× 4
H 0.08 2
−1
K
1
∴ H(s) = H sn b g =
sn4 + 2.6132 sn3 + 3.4143 sn2 + 2.6132 sn + 1 s
sn = s n =
s
Ωc Ωc
7. 95 Digital Signal Processing
1
∴ H(s) =
FG s IJ 4
F s IJ
+ 2.6132 G
3
+ 3.4143
FG s IJ 2
+ 2.6132
FG s IJ + 1
HΩ K c HΩ K c HΩ K
c HΩ K
c
1
=
s4 s3 s2 s
4 + 2.6132 3 + 3.4143 2 + 2.6132 +1
Ωc Ωc Ωc Ωc
Ω 4c
=
s + 2.6132 Ω c s + 3.4143 Ω 2c s 2 + 2.6132 Ω3c s + Ω 4c
4 3
0.77344
=
s + 2.6132 × 0.7734 s + 3.4143 × 0.77342 s 2 + 2.6132 × 0.77343 s + 0.77344
4 3
0.3578
=
s 4 + 2.021s3 + 2.0423 s 2 + 12089
. s + 0.3578
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
0.3578
H(z) = H(s) =
s 4 + 2.021s3 + 2.0423 s 2 + 12089
. s + 0.3578
1− z −1 1− z −1
s = 2 s = 2
T 1+ z −1 T 1+ z −1
0.3578
=
F 2 1− z I−1 4 F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1 − z I + 0.3578
−1
GH T 1 + z JK
−1
+ 2.021 GH T 1+ z JK −1
+ 2.0423 GH T 1 + z JK −1
+ 1.2089 GH T 1 + z JK
−1
0.3578
=
16(1 − z−1)4 + 2.021 × 8T (1 − z−1)3 (1 + z−1) + 2.0423 × 4T 2 (1 − z−1)2 (1 + z −1)2
Alternatively,
−1 −1
z z
−1 −1
−1 0.0332z X (z) 2.0892 z Y (z ) −1
z X (z) 0.0332 + + 2.08 92 z Y (z)
−1 −1
z z
−2 −2
−2 0.0498z X (z) −1.8975z Y (z ) −2
z X (z) z Y (z )
0.0498
+ + −1.8975
−1 −1
z z
−3 0.0332z −3 X (z ) −3
0.8133z Y (z )
z X (z ) −3
0.03 32 + + 0.81 33 z Y (z )
−1 −1
z −4 z
−4 0.0083z X (z ) −0.1378z −4 Y (z )
−4
z X (z ) 0.00 83 −0.1378 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 2.0892 z−1 + 18975
. z−2 − 0.8133 z−3 + 0.1378 z−4
Y(z)
= 0.0083 + 0.0332 z−1 + 0.0498 z−2 + 0.0332 z−3 + 0.0083 z −4 .....(3)
W(z)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.0083W (z )
X (z ) + 0.008 3
+ Y (z )
−1
z
−1 −1 −1
2.0892 z W (z) z W (z ) 0.0332z W (z )
+ 2.089 2 0.0332
+
−1
z
−2 −2
−1.8975z W (z ) −2 0.0498z W (z )
z W (z)
+ −1.8975 0.0498
+
−1
z
−3
0.8133z W (z ) −3 0.0332z −3 W (z )
z W (z )
+ 0.813 3 0.033 2 +
−1
z
−0.1378z −4 W (z ) −4 −4
0.0083z W (z)
z W (z)
−0.1378 0.008 3
Example 7.23
Design a Chebyshev digital IIR lowpass filter using impulse invariant transformation by taking T = 1second,
to satisfy the following specifications.
Ap = 10
e− δp,dB / 20j = 10b−0.9151/ 20g = 0.9
As = 10
e −α s ,dB / 20j = 10b−12.3958 / 20g = 0.24
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.25p rad/sample
Stopband edge digital frequency, w s = 0.5p rad/sample
Gain in normal value at passband edge, Ap = 0.9
Gain in normal value at stopband edge, As = 0.24
Sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.9
Gain is same in analog
Gain in normal value at stopband edge, As = 0.24 and digital filter.
For impulse invariant transformation,
ωp 0.25π
Passband edge analog frequency, Ωp = = = 0.7854 rad / second Using equation (7.85).
T 1
ω s 0.5π
Stopband edge analog frequency, Ωs = = = 1.5708 rad / second Using equation (7.86).
T 1
Order of the filter
1 1
LM FH1/ A s2 IK − 1O 2 LM FH1/ 0.242 IK − 1O 2
cosh−1
MN FH 2I − 1P
P cosh−1
MN FH 1/ 0.92 IK − 1 P
P Using equation (7.87).
N1 =
1/ A p K Q = Q
Ωs .
15708
cosh−1 cosh−1
Ωp 0.7854
1
cosh −1 LM16.3611OP 2
= N 0.2346 Q = 2.1077
.
15708
cosh−1
0.7854
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
7. 99 Digital Signal Processing
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N − 1
2
B0 Bk Using equation (7.89).
H(sn ) =
sn + c 0 ∏ sn2 + bk sn + ck
k = 1
N−1 3−1
Here, N = 3, ∴ k= 2
=
2
=1
B0 B1
∴ H(sn ) = × 2
sn + c0 sn + b1 sn + c1
1
e j
∈ = 1/ Ap2 − 1 2 Using equation (7.94).
e j
= 1 / 0.92 − 1 2 = 0.4843
R|L 1 1 U|
I 1O LF 1 I O
1 1 −
N N
1 |MF 1
G + 1J + P − MG
2 2
+ P
1 |V Using equation (7.93).
yN = S
2 |MH ∈
M|N K ∈PP
2 MMH ∈ + 1JK 2
∈P
PQ ||
T Q N W
1 1
L 1
1 MF I 1
OP 1
2
3 LMF 1 I
1
2 1
OP −
3
= G
2 MH 0.4843
+ 1J +
K 0.4843 PP −2 2 MMGH 0.4843 + 1JK 2
+
0.4843 P
2
MN Q N PQ
1
= [1.6335 − 0.6122] = 0.5107
2
c0 = yN = 0.5107 Using equation (7.94).
B0 B1 B0 B1
∴ H(sn ) = × 2 = ×
sn + c 0 sn + b1 sn + c1 sn + 0.5107 sn2 + 0.5107 sn + 10108
.
Chapter 7 - IIR Filters 7. 100
B0 B1
When sn = 0, H(sn ) = = 19372
. B0 B1
(0.5107) (1.0108)
1
∴ 1.9372 B0 B1 = 1 ⇒ B0 B1 = = 0. 5162
1.9372
Let, B0 = B1 ; ∴ B20 = 0.5162 ⇒ B0 = 0.5162 = 0.7185
∴ B1 = B0 = 0.7185
B0 B1 0.7185 0.7185
∴ H(sn ) = × = ×
sn + 0.5107 (sn2 + 0.5107 sn + 1.0108) (sn + 0.5107) (sn2 + 0.5107 sn + 1.0108)
0.5162
=
(sn + 0.5107) (sn2 + 0.5107 sn + 1.0108)
0.5162
=
sn3 + 10214
. sn2 + 12716
. sn + 0.5162
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H snb g s
sn =
Ωc
0.5162
∴ H(s) = H sn b g =
(sn + 0.5107)(sn2 + 0.5107 sn + 10108
. )
sn = s sn = s
Ωc Ωc
0.5162
=
FG s IF s
+ 0.5107J G
2
s I
HΩ c KH Ω 2
c
+ 0.5107
Ωc
.
+ 10108 JK
0.5162
=
F s + 0.5107 Ω I F s c
2
+ 0.5107 Ω c + 10108
. Ω 2c I
GH Ω c
JK GH Ωc2 JK
0.5162 Ω3c
= 2
(s + 0.5107 Ω c )(s + 0.5107 Ωc s + 10108
. Ω 2c )
0.5162 × 0.78543
= 2
(s + 0.5107 × 0.7854)(s + 0.5107 × 0.7854s + 10108
. × 0.78542 )
0.2501 .....(1)
=
(s + 0.4011) (s 2 + 0.4011s + 0.6235)
0.2501
=
s3 + 0.8022 s 2 + 0.7844 s + 0.2501)
7. 101 Digital Signal Processing
To convert the analog transfer function to digital transfer function using impulse invariant transformation,
the equation (1) is simplified as shown below.
0.2501 A Bs + C
H(s) = 2
= + 2 .....(2)
(s + 0.4011)(s + 0.4011s + 0.6235) s + 0.4011 s + 0.4011s + 0.6235
0.2501 = As2 + 0.4011 As + 0.6235 A + Bs2 + 0.4011 Bs+ Cs + 0.4011 C ..... (3)
A Bs + C
∴ H(s) = +
(s + 0.4011) (s 2 + 0.4011s + 0.6235)
(s + a)2 = s 2 + 2as + a 2
0.4011 0.4011s
= − 0.4011
(s + 0.4011) (s 2 + 0.4011s + 0.6235) 2a = 0.4011 ⇒ a = = 0.2006
2
0.4011 0. 4011s
= −
(s + 0.4011)
( s 2 + 2 × 0.2006s + 0.2006 2 )+ FH 0.6235 − 0.20062IK 2
0.4011 s + 0.2006
= − 0.4011
(s + 0.4011) ( s + 0.2006)2 + 0.76372
b e− aT (sin bT )z−1
→
(s + a)2 + b2 is transformed to − aT
1 − 2e (cos bT )z−1 + e−2aT z−2
Using the above transformation, the H(s) can be transformed to H(z) as shown below.
Put, T = 1
0.4011 1 − e−0.2006 (cos 0.7637)z−1
∴ H(z) = −0.4011 −1
− 0.4011 −0.2006
1− e z 1 − 2e (cos 0.7637) z−1 + e −2× 0.2006 z−2
0.0906z−1 + 0.0698z −2
=
1 − 18516
. z−1 + 14611
. z−2 − 0.4484z−3
Alternatively,
X (z) + Y (z)
−1 −1
z z
−1
−1
0.0906z X (z ) 1.8516z −1Y (z) −1
z X (z)
0.09 06 + + z Y (z)
−1 −1
z z
−2 0.0698z −2 X (z ) −1.4611z −2 Y (z ) −2
z X (z) z Y (z )
0.06 98
+ −1.4611
−1
z
0.4484z −3 Y (z ) −3
0.44 84 z Y (z )
W(z) 1
where, = .....(5)
X(z) .
1 − 18516z −1 + 14611
. z−2 − 0.4484z−2
Y(z)
= 0.0906z −1 + 0.0698z−2 .....(6)
W(z)
On cross multiplying equation (5) we get,
W(z) 1.8516z1W(z) + 1.4611z2W(z) 0.4484z3 W(z) = X(z)
\ W(z) = X(z) + 1.8516z1W(z) 1.4611z2W(z) + 0.4484z3 W(z) .....(7)
On cross multiplying equation (6) we get,
Y(z) = 0.0906z1X(z) + 0.0698z2W(z) .....(8)
Using equations (7) and (8), the direct form-II structure is drawn as shown in fig 2.
X (z) W (z) Y (z )
+
−1
z
1.8516z −1W (z ) 0.0906z −1W (z)
z −1W ( z)
+ 0.09 06
+
−1
z
−1.4611z −2 W (z)
z −2 W ( z ) 0.0698z −2 W (z )
+ −1.4611 0.06 98
−1
z
0.4484z −3 W (z )
z −3 W ( z)
0.44 84
Ap = 10
e− δp,dB / 20j = 10b−1.9 / 20g = 0.8
As = 10
e −α s ,dB / 20j = 10b−13.97 / 20g = 0.2
Solution
Specifications of digital IIR lowpass filter
Passband edge digital frequency, w p = 0.2p rad/sample
Stopband edge digital frequency, w s = 0.32p rad/sample
Gain in normal value at passband edge, Ap = 0.8
Gain in normal value at stopband edge, As = 0.2
sampling time, T = 1second
Specifications of analog IIR lowpass filter
Gain in normal value at passband edge, Ap = 0.8 Gain is same in analog
and digital filter.
Gain in normal value at stopband edge, As = 0.2
For bilinear transformation,
2 ωp
Passband edge analog frequency, Ωp = tan Using equation (7.83).
T 2
2 0.2π
= tan = 0.6498 rad / second
1 2
2 ω
Stopband edge analog frequency, Ωs = tan s
T 2 Using equation (7.84).
2 0.32π
= tan = 1.0995rad / second
1 2
Order of the filter
1 1
−1
LM FH1/ A 2
s
IK − 1O 2
P −1
LM e1/ 0.22 j − 1OP 2 Using equation (7.87).
cosh cosh
MN FH 2I − 1P
1/ Ap K Q MN e
1/ 0.8 j − 1P
2
Q cosh−1 6.5319
N1 = = = = 2.2944
−1 Ωs .
10995 cosh−1 16921
.
cosh cosh−1
Ωp 0.6498
Choose order N1 such that N ³ N1 and N is an integer.
Let, order, N = 3.
7. 105 Digital Signal Processing
Normalized transfer function, H(sn) of Chebyshev lowpass filter
For odd N,
N − 1
2 Using equation (7.89).
B0 Bk
H(sn ) =
sn + c 0 ∏ sn2 + bk sn + ck
k = 1
N− 1 3−1
Here, N = 3, ∴ k= 2
=
2
=1
B0 B1
∴ H(sn ) = × 2
sn + c 0 sn + b1 sn + c1
e
∈ = 1/ Ap2 − 1 2j Using equation (7.94).
e j
= 1 / 0.82 − 1 2 = 0.75
R|L 1 1 U|
|SMFG 1 + 1IJ + 1OP − LMF 1 I OP
1 1 −
N N
1 2 2 1 |V
yN =
2 ||MMNH ∈ K ∈PPQ
2 MMGH ∈ + 1JK
2
+
∈ PP ||
Using equation (7.93).
T N Q W
1 1
L
1 MF 1 I 1 OP
1
2
3 LMF 1 I 1
2 1
OP −
3
= G
2 MH 0.75
+ 1J +
K 0.75 PP −
MMGH 0.75 + 1JK +
PPQ
2 2
0.75
NM Q N
1
= [1.4422 − 0.6934] = 0.3744
2
c0 = yN = 0.3744 Using equation (7.94).
B0 B1 B0 B1
∴ H(sn ) = × 2 = ×
sn + c 0 sn + b1 sn + c1 sn + 0.3744 sn2 + 0.3744 sn + 0.8902
Chapter 7 - IIR Filters 7. 106
B0 B1
When sn = 0, H(sn ) = = 3B0 B1
(0.3744) (0.8902)
1
∴ 3 B0 B1 = 1 ⇒ B0 B1 = = 0.3333
3
2
Let, B0 = B1 ; ∴ B0 = 0.3333 ⇒ B0 = 0.3333 = 0.5774
∴ B1 = B0 = 0.5774
B0 B1 0.5774 0.5774
H(sn ) = × 2 = × 2
sn + 0.3744 sn + 0.3744 sn + 0.8902 sn + 0.3744 sn + 0.3744 sn + 0.8902
0.3333 0.3333
= =
(sn + 0.3744) (sn2 + 0.3744 sn + 0.8902) sn3 + 0.7488 sn2 + 1.0304 sn + 0.3333
Unnormalized transfer function, H(s) of Chebyshev lowpass filter
H(s) = H sn b g s
sn =
Ωc
0.3333
∴ H(s) = H sn b g s
=
(sn3 + 0.7488 sn2 + 1.0304 sn + 0.3333) s
sn = sn =
Ωc Ωc
0.3333
=
Fs 3
s2 s I
GH Ω 3
c
+ 0.7488 2 + 1.0304
Ωc Ωc
+ 0.3333 JK
0.3333 × Ω3c
=
s + 0.7488 Ω c s 2 + 1.0304 Ω c2 s + 0.3333 Ω3c
3
0.3333 × 0.64983
=
s3 + 0.7488 × 0.6498 s 2 + 1.0304 × 0.64982 s + 0.3333 × 0.64983
0.0914
=
s3 + 0.4865 s 2 + 0.4351s + 0.0914
Digital IIR lowpass filter transfer function, H(z)
For bilinear transformation,
0.0914
H(z) = H s bg s=
2 1− z −1
T 1+ z −1
=
s3 + 0.4865 s 2 + 0.4351s + 0.0914 s = 2 1− z −1
T 1+ z −1
0.0914
=
F 2 1− z I −1 3 F 2 1− z I −1 2 F 2 1− z I + 0.0914
−1
GH T 1 + z JK −1 + 0.4865 GH T 1 + z JK
−1 + 0.4351GH T 1 + z JK
−1
0.0914
=
8(1− z −1)3 1.946(1− z−1)2 0.8702(1− z−1)
+ + + 0.0914
T3 (1 + z−1)3 T 2(1 + z−1)2 T (1 + z−1)
7. 107 Digital Signal Processing
0.0914
∴ H(z) =
8(1− z−1)3 + 1.946 T(1− z−1)2 (1 + z−1) + 0.8702 T 2(1− z−1)(1 + z−1)2 + 0.0914 T3(1 + z−1)3
T3 (1 + z−1)
0.0914 T3 (1 + z−1)3
=
8(1− z ) + 1.946 T(1− z ) (1 + z ) + 0.8702 T 2(1− z−1)(1 + z−1)2 + 0.0914 T3 (1 + z−1)3
−1 3 −1 2 −1
Put, T = 1
0.0914 (1 + 3z−1 + 3z−2 + z−3 )
=
8(1− 3z−1 + 3z −2 − z−3 ) + 1.946 (1− 2z−1 + z −2 )(1 + z−1) + 0.8702(1− z−1)(1 + 2z−1 + z−2 )
+ 0.0914 (1 + 3z−1 + 3z−2 + z−3 )
+ 0.0914 (1 + 3z−1 + 3z −2 + z −3 )
0.0083X (z)
X (z) 0.00 83 + + Y (z)
−1 −1
z z
−1 −1
−1 0.0251z X(z ) 2.2821z Y (z ) −1
z X (z) z Y (z)
0.0251
+ + 2.28 21
−1 −1
z z
−2 −2
−2 0.0251z X(z ) −1.9589z Y (z ) −2
z X (z) z Y (z )
0.0251
+ + −1.9589
−1 −1
z −3 z
−3
−3
0.0083z X(z ) 0.6264z Y (z ) −3
z X (z) 0.00 83 0.62 64 z Y (z )
W(z) 1
where, = .....(2)
X(z) 1 − 2.2821z−1 + 19589
. z−2 − 0.6264 z−3
Y(z)
= 0.0083 + 0.0251z−1 + 0.0251z−2 + 0.0083 z−3 .....(3)
W(z)
On cross multiplying equation (2) we get,
W(z) 2.2821z1W(z) + 1.9589z2 W(z) 0.6264 z3W(z) = X(z)
W(z) = X(z) + 2.2821z1W(z) 1.9589z2 W(z) + 0.6264z3W(z) .....(4)
On cross multiplying equation (3) we get,
Y(z) = 0.0083W(z) + 0.0168z1W(z) + 0.0168z2W(z) + 0.0083z3W(z) .....(5)
Using equations (4) and (5), the direct form-II structure is drawn as shown in fig 2.
W (z) 0.0083W (z )
X (z ) + 0.00 83
+ Y (z )
−1
z
−1 −1
2.2821z W (z) z W (z ) 0.0251z W (z)
−1
+ 2.28 21 0.0251
+
−1
z
−2 −2
−1.9589z W (z ) −2 0.0251z W (z)
z W (z)
+ −1.9589 0.0251
+
−1
z
−3 −3
0.6264z W (z) −3
0.0083z W (z )
z W (z )
0.62 64 0.00 83