Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Digital Signal Processing (DSP)

Z-Transform
1- Basic Definition of the Z-Transform:
The z-transform of a function x(n) is defined as:

X ( z) =  x ( n) z
n = −
−n
The power series for the z-transform is called a Laurent series:

So we can write that X(z) = {x(n)}


There is a close relationship between the z-transform and the Fourier transform of a
discrete-time response h(n), which is defined as

H (e ) =jw
 h( n )e
n = −
− jnw
z = e i
The z-plane is a complex plane with an imaginary and
real axis referring to the complex-valued variable z.


 H ( z) =  h( n) z
n = −
−n

2- Region of Convergence:
The ROC for a given x(n) , is defined as the range of z for which the z-transform
converges.

Example- 1: Find z-transform of x ( n) = a n u ( n) for 0 < a < 1 ?

Solution: The z-transform is given by

 
X ( z) =  a u ( n) z
n = −
n −n
=  (az −1 ) n
n =0

Which converges to

1 z
X ( z) = = for
1 − az −1 z − a
az −1  1 or z  a

Next: Another ROC example


40
Digital Signal Processing (DSP)

Example- 2: Find z-transform of x (n) = -b n u (-n – 1)


Solution: The z-transform is given by
 −1 
X ( z) =  x ( n) z =
n = −
n −n
 − b n z −n
n = −
or X ( z ) = − b −n z n
n =1

  n  n
z z
X ( z ) = − b z −n n
= −   =1−   
n =1 n =1  b  n =0  b 

The ROC in this case is the range of values where


1 z
X ( z) = 1 − −1
= for zb
1− b z z − b
b −1 z  1or z  b
Example- 3: x(n) = anu(n) – bn u(-n – 1)
Solution: Using the results of Examples 1 and 2,
z z
X ( z) = −
z−a z −b
ROC1 z  a
ROC 2 z  b
ROCt = ROC1  ROC 2

-Common area exist


for bn < a & a = b (ROC rings )

and for b < a (no ROC).

The ROC for x(n) is the intersection of the circle z = be i and the circle z = aei as shown in Figure

3- Z-Transform properties:
⚫ Linearity: if x1(n) X1(z)
and x2(n) X2(z)
Then for a1 & a2 constants
a1 x1(n) + a2 x2(n) a1 X1(z) +a2 X2(z);
ROCt = ROCx1 ∩ ROCx2
41
Digital Signal Processing (DSP)

⚫ Uniqueness: if x1(n) X1(z)


and x2(n) X2(z)
if x1(n) ≠ x2(n) then X1(z) ≠ X2(z)
⚫ Time Shifting: if x(n) X(z)
Then x(n - n0) z −𝑛0 X(z);
⚫ Multiplication by an Exponential Sequence:
if x(n) X(z)
n
Then a x(n) X(z) with z → z/a;
ROC= |a|. ROCx , so if rL < ROCx <rU
|a|. rL < |a| ROCx <|a| rU
|a|. rL < ROC <|a| rU
⚫ Multiplication by ramp:
if x(n) X(z)
Then n x(n) - z {d X(z) / dz};
ROC: ROCx except for the possible addition or deletion of the origin or infinity.

⚫ Time Reversal:
if x(n) X(z)
Then x(-n) X(1/z);
ROC: 1/ROCx

4- Some Common z-Transform Pairs:

42
Digital Signal Processing (DSP)

Example- 4: Find z-transform of

𝒙(𝒏) = (𝒏 − 𝟐)𝒂𝒏−𝟐 𝐜𝐨𝐬[𝝎𝒐 (𝒏 − 𝟐)] 𝒖(𝒏 − 𝟐)


Solution
𝑿(𝒛) = 𝒁−𝟐 [ { 𝒏 𝐜𝐨𝐬[𝝎𝒐 (𝒏)] 𝒖(𝒏)}]|𝒛 𝐳/𝒂
for |𝒁| > 𝑎
𝒅
= 𝒁−𝟐 [−𝒁 {𝐜𝐨𝐬[𝝎𝒐 (𝒏)] 𝒖(𝒏)}] |𝒛 𝐳/𝒂
𝒅𝒛

𝒅
= −𝒁−𝟏 [ {𝐜𝐨𝐬[𝝎𝒐 (𝒏)] 𝒖(𝒏)}] |𝒛 𝐳/𝒂
𝒅𝒛

−𝟏 𝒅 −𝒁𝟐 𝐜𝐨𝐬 𝝎𝒐 +𝟐𝒁−𝐜𝐨𝐬 𝝎𝒐


= −𝒁 [ ( )] |𝒛 𝐳/𝒂
𝒅𝒛 (𝒁𝟐 −𝟐𝒁 𝐜𝐨𝐬 𝝎𝒐 +𝟏)

−𝟏
𝒅 −(𝒛⁄𝒂)𝟐 𝐜𝐨𝐬 𝝎𝒐 + 𝟐(𝒛⁄𝒂) − 𝐜𝐨𝐬 𝝎𝒐
= −𝒁 [ ( )]
𝒅𝒛 ((𝒛⁄𝒂)𝟐 − 𝟐(𝒛⁄𝒂) 𝐜𝐨𝐬 𝝎𝒐 + 𝟏)

ROC=?

H.W.-1:
𝒙(𝒏) = (𝒏 − 𝟐)𝒂𝒏−𝟐 𝐜𝐨𝐬[𝝎𝒐 (𝒏 − 𝟐)] 𝒖(𝒏 − 𝟏)
H.W.-2:
𝒙(𝒏) = 𝒏 𝒂𝒏−𝟑 𝐜𝐨𝐬[𝝎𝒐 (𝒏 − 𝟐. 𝟓)] 𝒖(𝒏 − 𝟐)

5- Poles and Zeros


When H(z) is a rational function, i.e., a ration of polynomials in z, then:

43
Digital Signal Processing (DSP)

▪The roots of the numerator polynomial are referred to as the zeros


of H(z), and
▪ The roots of the denominator
polynomial are referred to as the
poles of H(z).
Example- 5: For the response

Zeros

6- The Inverse Z-Transform

44
Digital Signal Processing (DSP)

• Less formal ways sufficient most of the time


– Inspection Method
– Partial Fraction Expansion
– Power Series Expansion
• Inspection Method
– Make use of known z-transform pairs such as

• Inverse Z-Transform by Partial Fraction Expansion:


• Assume that a given z-transform can be expressed as
M

b z k
−k

X (z ) = k =0
N

a z
k =0
k
−k

• Apply partial fractional expansion


M −N N s
X (z ) =
Ak Cm
 Br z −r +
r =0

k =1, k  i 1 − d k z
−1
+  (
m =1 1 − d i z
−1
)
m

• First term exist only if M > N


– Br is obtained by long division
• Second term represents all first order poles
• Third term represents an order s pole
– There will be a similar term for every high-order pole
• Each term can be inverse transformed by inspection
M −N N s
X (z ) =
Ak Cm
B z
r =0
r
−r
+ 
k =1, k  i 1 − d k z
−1
+  (
m =1 1 − d i z
−1
)
m

• Coefficients are given as


(
Ak = 1 − d k z −1 X ( z ) z = d ) k

Cm =
1  d s −m

(s − m)!(− di )s−m  dws−m
(1 − d i w )s
X w −1 
  ( )
w=di−1
Easier to understand with the following examples:
Example- 6: Find the inverse Z-Transform of

X (z ) =
Z 1 1
for ROC : a) z  1, b) Z  , c)  Z  1
3Z − 4Z + 1
2
45
3 3
Digital Signal Processing (DSP)

Solution
X (Z ) 1 1/ 3
= = = F (Z )
Z 3Z − 4Z + 1 (Z − 1 / 3)(Z − 1)
2

A B
F (Z ) = +
(Z − 1 / 3) (Z − 1)
A = lim F ( Z )(Z − 1 / 3) →=
1 1
=−
3( Z − 1) 2

B = lim F ( Z )(Z − 1) →=
1 1
=
3( Z − 1 / 3) 2
− 1/ 2 1/ 2 − (1 / 2) Z (1 / 2) Z
F (Z ) = +
(Z − 1 / 3) (Z − 1)
,
So X ( Z ) = +
(Z − 1 / 3) (Z − 1)

7-Properties of ROC of the Z-Transform


• ROC is a ring or disk centered at the origin.
• Fourier transform converges absolutely if ROC includes the unit circle.
• ROC contains no poles but is bounded by poles.
• If the sequence is finite in length, ROC is the Entire z-plane
except possibly z = 0 and z = ∞.
• If the sequence is right-sided, ROC is an outer disk.
• If the sequence is left-sided, ROC is an inner disk.
• If the sequence is double-sided, ROC is a ring.
• ROC is a connected region.

Example- 7: Find the inverse Z-Transform of

46
Digital Signal Processing (DSP)

Example- 8: find the inverse Z-Transform of

X (z ) =
1 1
ROC : z 
 1 −1  1 −1  2
1 − z 1 − z 
 4  2 
- Order of numerator is smaller than denominator (in terms of z-1)

- No higher order poles

X (z ) =
A1 A2
+
 1 −1   1 −1 
1 − z   1 − z 
 4   2 
 1   1 
A1 = 1 − z −1  X (z ) = = −1 and A2 = 1 − z −1  X (z ) =
1 1
=2
 4  1  11 −1
 2  1  1  1  −1 
z=
1 −    z=
1 −   
 24   42 
4 2

   

−1
X (z ) =
2 1
+ z
 1 −1   1 −1  2
1 − z  1 − z 
 4   2 

• ROC extends to infinity, - Indicates right sided sequences

Example- 9: Find the inverse Z-Transform of

X (z ) =
1 + 2 z −1 + z − 2
=
(
1 + z −1 )
2

z 1
1 − z 47(1 − z )
3 −1 1 − 2  1 −1 
1− z + z −1
2 2  2 
Digital Signal Processing (DSP)

• Long division to obtain Bo


2
1 − 2 3 −1 −2
+ −1
+
z − z +1 z 2 z 1
2 2
z − 2 − 3 z −1 + 2
5 z −1 − 1

− 1 + 5 z −1 or X (z ) = 2 + A1 A2
X (z ) = 2 + + −1

( ) 1 − z −1 1 − z
 1 −1  −1
1
1 − z  1 − z 2
 2 
 1 
A1 = 1 − z −1  X ( z ) = −9 ( )
A2 = 1 − z −1 X (z )
z =1
=8
 2  z=
1
2

X (z ) = 2 −
9 8
+ z 1
1 −1 1 − z −1
1− z
2
• ROC extends to infinity, Indicates right-sides sequence

8- Relationships between System Representations:

Relationships between difference equation, system function, impulse


response, and frequency response for stable causal systems represented
by linear, constant coefficient difference equation.

Example- 10: Using Z-Transform, find the solution (for 𝒏 ≥ 𝟎) to the following
linear constant coefficient difference equation:

48
Digital Signal Processing (DSP)

3 1 1 𝑛
𝑦(𝑛) − 𝑦(𝑛 − 1) + 𝑦(𝑛 − 2) = ( )
2 2 4
With initial conditions 𝑦(−1) = 4 and 𝑦(−2) = 10.

Solution: Taking the Z-transform of both sides gives

3 1 𝑧
𝑌(𝑍 ) − {𝑦(−1) + 𝑍 −1 𝑌(𝑍 )} + {𝑦(−2) + 𝑍 −1 𝑦(−1) + 𝑍 −2 𝑌(𝑍 )} =
2 2 1
𝑧−
4
Substituting in the initial conditions and rearranging gives

3 1 𝑧
𝑌(𝑍 ) = [1 − 𝑍 −1 + 𝑍 −2 ] = + 1 − 2𝑍 −1
2 2 1
𝑧−
4
3 1
And dividing by [1 − 2 𝑍 −1 + 2 𝑍 −2]

9 1
2 (2𝑍 2 − 𝑍 + )
𝑌(𝑍 ) = 2 2
1 1
(𝑍 − ) (𝑍 − ) (𝑧 − 1)
4 2
By partial fraction expansion, we can write
1 2
𝑧 𝑧 𝑧
𝑌(𝑍 ) = 3 + + 3
1 1 𝑧−1
𝑍− 𝑍−
4 2
Taking the inverse z-transform, the difference equation is
1 1 𝑛 1 𝑛 2
𝑦(𝑛) = [ ( ) + ( ) + ] 𝑢(𝑛)
3 4 2 3
H.W: Try to solve it in time domain and compare the results.

(𝒁+𝟏)
Example- 11: Given that 𝑯(𝒁) = Represents a causal system, find a
(𝒁𝟐 −𝟐𝒁+𝟑)
difference equation realization and the frequency response of the system.

Solution: Since the system is causal, first write H(z) in terms of negative power of z

𝑌(𝑧) (𝑍 + 1 ) 𝑍 −1 + 𝑍 −2
𝐻 (𝑍 ) = = =
𝑋(𝑧) (𝑍 2 − 2𝑍 + 3) 1 − 2𝑍 −1 + 3𝑍 −2

Now Cross Multiply:

49
Digital Signal Processing (DSP)

𝑌(𝑧)(1 − 2𝑍 −1 + 3𝑍 −2 ) = 𝑋(𝑧)(𝑍 −1 + 𝑍 −2 )

Taking the inverse transform yields the following difference equation:

𝑦(𝑛) − 2𝑦(𝑛 − 1) + 3𝑦(𝑛 − 2) = 𝑥 (𝑛 − 1) + 𝑥(𝑛 − 2)

The frequency response can be obtained by letting 𝑍 = 𝑒 𝑗𝜔 becomes

𝑗𝜔 )
(𝑍 + 1) 𝑍=𝑒 𝑗𝜔 𝑒 𝑗𝜔 + 1
𝐻(𝑒 = 2 |→ = 2𝑗𝜔
(𝑍 − 2𝑍 + 3) 𝑒 − 2𝑒 𝑗𝜔 + 3

𝑒 𝑗𝜔 = cos 𝜔 + 𝑗 sin 𝜔

(1 + cos 𝜔) + 𝑗 sin 𝜔
𝐻(𝑒 𝑗𝜔 ) =
cos 2𝜔 − 2 cos 𝜔 + 3 + 𝑗(sin 2𝜔 −sin 𝜔)

𝐻(𝑒 𝑗𝜔 ) = |𝐻(𝑒 𝑗𝜔 )| . ⌊∅(𝑒𝑗𝜔 )

𝑗𝜔
√(1 + cos 𝜔)2 + (sin 𝜔)2
|𝐻(𝑒 )| =
√(3 + cos2 𝜔 − 2 cos 𝜔)2 + (sin2 𝜔 + sin 𝜔)2

sin 𝜔 sin 2𝜔 + 2 sin 𝜔


∅(𝑒 𝑗𝜔 ) = tan−1 − tan−1
1 + cos 𝜔 3 + cos 2𝜔 − 2 cos 𝜔

DIGITAL FILTER DESIGN

50
Digital Signal Processing (DSP)

Methods Of System Representation:

1-Difference equation realization:


N M

 aˆ k y(n − k ) =  bˆk x(n − k )


k =0 k =0
General form D.E.

2-Transfer function:
M

Y (z )
b z k
−k

H (z ) = = k =0

X (z ) N

a
k =0
k z −k

If ao=1 & other ak's=0, then the filter is FIR, otherwise it is IIR.

3-The impulse response:

h(n) = { H(z)}

Digital Filter Specifications


1-Frequency Response
a-attenuation in pass band and stop band
b-cutoff frequency and roll off frequencies.

2- The magnitude and/or the phase (delay) response are specified for
the design of a digital filter for most applications.
• In some situations, the unit sample response or the step response may
be specified.
• In most practical applications, the problem of interest is the
development of a realizable approximation to a given magnitude
response specification
3- Phase response can be corrected by cascading the filter with an all-
pass section!!!

51
Digital Signal Processing (DSP)

For example, the magnitude response H (e j ) of a digital lowpass


filter may be given as indicated below

• As a result, filter specifications are given only for the frequency range 0≤ ω ≤ π
To SIMULATE an analog filter, a discrete-time filter H(z) is used in the
analog – to digital – H(z) – digital – to – analog structure shown in Fig. 2.

H(z)
Discrete time filter

xn yn

Equivalent analog filter

Fig. 2 Simulation of an analog filter

IIR FILTER DESIGN:


Several different techniques for designing H(z).
1- Numerical Methods.
2- Biliner Transformation Method .
3- Impulse-Invariant Method.

52
Digital Signal Processing (DSP)

1- THE DESIGN BY USING NUMERICAL SOLUTIONS OF


DIFFERNTIAL EQUATIONS:

Simulates a continuous-time linear filter specified by the following


differential equation:
𝑵 𝑴
𝒅𝒌 𝒚𝒂 (𝒕) 𝒅𝒌 𝒙𝒂 (𝒕)
∑ 𝑪𝒌 = ∑ 𝒅 𝒌
𝒅𝒕𝒌 𝒅𝒕𝒌
𝒌=𝟎 𝒌=𝟎
This filter has input xa(t) and output ya(t) and can be characterized
by its system function Ha(s) by taking the Laplace transform

∑𝑴𝒌=𝟎 𝒅𝒌 𝑺
𝒌
𝑯𝒂 (𝒔) = 𝑵
∑𝒌=𝟎 𝑪𝑲 𝑺𝒌
Suppose that we approximate the derivatives by backward differences.
The first backward difference 𝛁 (𝟏) [. ] is defined by

[𝒚(𝒏) − 𝒚(𝒏 − 𝟏)]


𝛁 (𝟏) [𝒚(𝒏)] =
𝑻
Higher-order backward difference are found by

𝛁 (𝒌) [𝒚(𝒏)] = 𝛁 (𝟏) [𝛁 (𝒌−𝟏) {𝒚(𝒏)}]

Using the kth-order differences as approximations to the derivatives in


Eq.(4-4) we have
𝑵 𝑴

∑ 𝑪𝒌 𝛁(𝒌) [𝒚𝒂 (𝒏𝑻)] = ∑ 𝒅𝒌 𝛁(𝒌) [𝒙𝒂 (𝒏𝑻)]


𝒌=𝟎 𝒌=𝟎
The above equation represents a numerical approach for obtaining
𝒚𝒂 (𝒏𝑻), the sampled version of 𝒚𝒂 (𝒕). The Z-transform of the first and
kth-order difference are given below:
[𝒚(𝒏)−𝒚(𝒏−𝟏)]
{𝛁(𝟏) [𝒚(𝒏)]} = { } = 𝒀(𝒛)(𝟏 − 𝒛−𝟏 )/𝑻
𝑻
{𝛁(𝒌) [𝒚(𝒏)]} = 𝒀(𝒛)(𝟏 − 𝒛−𝟏 )𝒌 /𝑻
The Z-transform of both sides

𝑵 𝒌 𝑴 𝒌
𝟏 − 𝒛−𝟏 𝟏 − 𝒛−𝟏
∑ 𝑪𝒌 [ ] 𝒀(𝒛) = ∑ 𝒅𝒌 [ ] 𝑿(𝒛)
𝒌=𝟎
𝑻 𝒌=𝟎
𝑻

The transfer function is easily seen to be:

53
Digital Signal Processing (DSP)

𝟏 − 𝒛−𝟏 𝒌
𝒀(𝒛) ∑ 𝒅𝒌 [ 𝑻 ]
𝑴
𝒌=𝟎
𝑯(𝒛) = =
𝑿(𝒛) 𝟏 − 𝒛−𝟏 𝒌
∑𝒌=𝟎 𝑪𝒌 [
𝑵
𝑻 ]
Comparing with the Equation of 𝑯𝒂 (𝒔), we see that H(z) can
be obtaind by replacing S by (𝟏 − 𝒛−𝟏 )/𝑻 , that is
𝟏 − 𝒛−𝟏 𝟏
𝒔= , 𝐨𝐫 𝒛=
𝑻 𝟏 − 𝒔𝑻
As the frequency response for the analog system is obtained
by letting s = j Ω , it is of interest to look at the image in the z-
plane of the j Ω axis of the s-plane which is

𝟏 𝟏 Ω𝑻
𝒛= = + 𝒋 = 𝒙 + 𝒋𝒚
𝟏 − 𝒋Ω𝑻 𝟏 + Ω𝟐 𝑻𝟐 𝟏 + Ω𝟐 𝑻𝟐

In the above figure, the image of the jΩ axis of the s-plane in the z-plane
𝟏
for the mapping 𝒛 = 𝟏−𝒔𝑻 is shown
It is easy to see that x (the real part of z) and y (the imaginary part of z)
are related by
𝒙𝟐 + 𝒚𝟐 = 𝒙
Completing the square in the above equation gives the following equation:

(𝒙 − 𝟏/𝟐)𝟐 + 𝒚𝟐 = 𝟏/𝟒
Thus, the image in the z-plane of the jΩ axis of the S-plane is a circle of
radius 1/2 , as shown in the figure.

54
Digital Signal Processing (DSP)

The frequency response of the digital filter is obtained by evaluating


H(z) on the unit circle, 𝐳 = 𝐞𝒋𝝎 . The shape of the equivalent frequency
response of the H(z) would not be similar to that of 𝑯𝒂 (𝐬). To preserve
the shape of the frequency response, we like to have the
transformation from analog filter to digital filter take the jΩ axis of
the s-plane into the unit circle in z-plane.

s − plane z − plane

j axis u.c

Example -1: An analog filter with system function


𝟏
𝑯𝒂 (𝒔) = (𝒔+𝟏)(𝒔+𝟐) ,
a- Find the H(z) using numerical method
b- Plot the frequency response for fs = 5 bps?
Solution:
𝟏 𝟏
𝑯𝒂 (𝒔) = =
(𝒔 + 𝟏)(𝒔 + 𝟐) 𝒔𝟐 + 𝟑𝒔 + 𝟐
By numerical method

𝟏−𝒛−𝟏 𝟏
a- Since, 𝒔 = Then 𝑯(𝒛) = 𝟐
𝑻 𝟏−𝒛−𝟏 𝟏−𝒛−𝟏
[ ] +𝟑[ ]+𝟐
𝑻 𝑻
𝑻𝟐
Or 𝑯(𝒛) =
𝟏−𝟐𝒛−𝟏 +𝒛−𝟐 −𝟑𝑻𝒛−𝟏 +𝟐𝑻𝟐
b- fs = 5 bps, 𝑻𝟐 = 𝟎. 𝟎𝟎𝟒

𝒋𝝎
𝑻𝟐
𝑯(𝒆 ) = 𝑯(𝒛) → =
𝒛=𝒆𝒋𝝎 𝟏 − 𝟐𝒆−𝒋𝝎 + 𝒆−𝟐𝒋𝝎 − 𝟑𝑻𝒆−𝒋𝝎 + 𝟐𝑻𝟐

𝑯(𝒆𝒋𝝎 ) = |𝑯(𝒆𝒋𝝎 )| ⌊𝑯(𝒆𝒋𝝎 )

55
Digital Signal Processing (DSP)

H.W.: Suppose we are given the following differential equation:


𝑵 𝑴
𝒅𝒌 𝒚𝒂 (𝒕) 𝒅𝒌 𝒙𝒂 (𝒕)
∑ 𝑪𝒌 = ∑ 𝒅𝒌
𝒅𝒕𝒌 𝒅𝒕𝒌
𝒌=𝟎 𝒌=𝟎
(𝟏)
The first forward difference ∆ [𝒙(𝒏)] is defined by
[𝒙(𝒏 + 𝟏) − 𝒙(𝒏)]
∆(𝟏) [𝒙(𝒏)] =
𝑻
th
and the n forward difference is obtained by successive first forward
differences.
(a)- Find the mapping from the s-plane to the z-plane necessary to obtain
the digital transfer function directly from the analog transfer function.
(b)- Using such transformation, find the z-plane image of s = jΩ as Ω goes
from −∞ 𝐭𝐨 ∞ .
Solution:
(a)- The z-transform of the first forward difference is given by

[𝒙(𝒏+𝟏)−𝒙(𝒏)] [𝐳𝑿(𝒛)−𝑿(𝒛)] (𝒛−𝟏)


[∆(𝟏) [𝒙(𝒏)]] = { }= { }= 𝑿(𝒛)
𝑻 𝑻 𝑻

The z-transform of the kth - order forward difference is


𝒌
𝒛−𝟏
[∆(𝒌) [𝒙(𝒏)]] = ( 𝑻
) 𝑿(𝒛)

Using the kth - order forward differences as approximations to the derivatives in the
given differential equation, we have

𝑵 𝑴
(𝒌)
[𝒚𝒂 (𝒏𝑻)] = ∑ 𝒅𝑲 𝛁 𝒌 [𝒙𝒂 (𝒏𝑻)]
( )
∑ 𝑪𝑲 𝛁
𝒌=𝟎 𝒌=𝟎
The z-transform of both sides

𝒛−𝟏 𝒌 𝒛−𝟏 𝒌
𝑵 𝑴

∑ 𝑪𝒌 𝛁 [ ] 𝒀(𝒛) = ∑ 𝒅𝒌
(𝒌)
𝛁 (𝒌)
[ ] 𝑿(𝒛)
𝒌=𝟎
𝑻 𝒌=𝟎
𝑻
The transfer function is easily seen to be
(𝒌) 𝒛 − 𝟏 𝒌
𝒀(𝒛) ∑𝒌=𝟎 𝒅𝒌 𝛁 [ 𝑻 ]
𝑴

𝑯(𝒛) = =
𝑿(𝒛) ∑𝑵 𝑪 𝛁(𝒌) [𝒛 − 𝟏]𝒌
𝒌=𝟎 𝒌 𝑻
Using Laplace transform on the given differential equation, we can write
∑𝑴
𝒌=𝟎 𝒅𝑲 𝑺
𝒌
𝑯𝒂 (𝒔) = 𝑵
∑𝒌=𝟎 𝑪𝑲 𝑺𝒌

56
Digital Signal Processing (DSP)

Comparing the above to equations we see that the mapping from the
s-plane to z-plane is
𝒛−𝟏
𝒔= , 𝐨𝐫 𝒛 = 𝟏 + 𝒔𝑻
𝑻

(b)- for s = jΩ as Ω goes from −∞ 𝒕𝒐 ∞ .


𝒛−𝟏
𝒔= , 𝒛 = 𝟏 + 𝒔𝑻 and for s = jΩ, we get 𝐳 = 𝟏 + 𝒋Ω𝐓
𝑻
The locus of points in the z-plane as Ω varies is shown below

2- IIR FILTER DESIGN BY BILINEAR TRANSFORMATION

Design Concept:- Using a first-order differential equation

𝒂𝟏 𝒚,𝒂 (𝒕) + 𝒂𝟎 𝒚𝒂 (𝒕) = 𝒃𝟎 x(t) …………….(1)

The transfer function Ha(s) can be written as


𝒃𝟎
𝑯𝒂 (𝐬) = … … … … … . . (𝟐)
𝒂𝟏 𝒔 + 𝒂 𝟎
The fundamental theorem of integral calculus allows us to write
𝒕

𝒚𝒂 (𝒕) = ∫ 𝒚′𝒂 (𝒕) 𝒅𝒕 + 𝒚𝒂 (𝒕𝟎 ) … … … … … . . (𝟑)


𝒕𝟎
Since Eq.(3) holds for any t with any t0 , we let t = nT and t0 = (n-1)T
to get
𝒏𝑻
𝒚𝒂 (𝒏𝑻) = ∫(𝒏−𝟏)𝑻 𝒚𝒂, (𝒕) 𝒅𝒕 + 𝒚𝒂 [(𝒏 − 𝟏)𝑻] … … … . . (𝟒)

Using the trapezoidal rule

57
Digital Signal Processing (DSP)

To approximate the integral and by assuming equality, a recursive


relationship for determining 𝒚𝒂 (𝒏𝑻) can be found from Eq. (4) as follows:
𝑻
𝒚𝒂 (𝒏𝑻) = 𝒚𝒂 [(𝒏 − 𝟏)𝑻] + ( ) {𝒚,𝒂 (𝒏𝑻) + 𝒚𝒂, [(𝒏 − 𝟏)𝑻]} … . . (𝟓)
𝟐
From Eq. (2)
𝒂𝟎 𝒃𝟎
𝒚𝒂, (𝒕) = − 𝒚𝒂 (𝒕) + 𝒙(𝒕) … … … … … (𝟔)
𝒂𝟏 𝒂𝟏
Now the differential equation evaluated in t = nT:

𝒂𝟎 𝒃𝟎
𝒚𝒂, (𝒏𝑻) = − 𝒚𝒂 (𝒏𝑻) + 𝒙(𝒏𝑻) … … … … … … (𝟕)
𝒂𝟏 𝒂𝟏
&
𝒂𝟎 𝒃𝟎
𝒚𝒂, ((𝒏 − 𝟏)𝑻) = − 𝒚𝒂 ((𝒏 − 𝟏)𝑻) + 𝒙((𝒏 − 𝟏)𝑻) … . . (𝟖)
𝒂𝟏 𝒂𝟏
Substitute (7) & (8) into (5) to obtain a difference equation for the
equivalent discrete-time system. Then
𝑻 𝒂𝟎 𝒃𝟎 𝒂𝟎
𝒚𝒂 (𝒏𝑻) = ( ) {− 𝒚𝒂 (𝒏𝑻) + 𝒙(𝒏𝑻) − 𝒚 ((𝒏 − 𝟏)𝑻)
𝟐 𝒂𝟏 𝒂𝟏 𝒂𝟏 𝒂
𝒃𝟎
+ 𝒙((𝒏 − 𝟏)𝑻)} + 𝒚𝒂 [(𝒏 − 𝟏)𝑻]
𝒂𝟏
The previous expression can be expressed in the following form
𝑻𝒂𝟎 𝑻𝒂𝟎
(𝟏 + ) 𝒚𝒂 (𝒏𝑻) − (𝟏 − ) 𝒚𝒂 ((𝒏 − 𝟏)𝑻)
𝟐𝒂𝟏 𝟐𝒂𝟏
𝑻𝒃𝟎
= {𝒙(𝒏𝑻) + 𝒙((𝒏 − 𝟏)𝑻)}
𝟐𝒂𝟏
The z-transform of the previous equation is
𝑻𝒂𝟎 𝑻𝒂𝟎 −𝟏 𝑻𝒃𝟎
(𝟏 + ) 𝒀(𝒛) − (𝟏 − )𝒛 𝒀(𝒛) = {𝑿(𝒛) + 𝒛−𝟏 𝑿(𝒛)}
𝟐𝒂𝟏 𝟐𝒂𝟏 𝟐𝒂𝟏
Transfer function of the equivalent digital filter is
𝑻𝒃𝟎
Y ( z) ( 𝟏+𝒛−𝟏 )
𝟐𝒂𝟏
H ( z) = 𝐨𝐫 𝑯(𝒛) = 𝑻𝒂 𝑻𝒂
X ( z) (𝟏+ 𝟎 )−(𝟏− 𝟎 )𝒛−𝟏
𝟐𝒂𝟏 𝟐𝒂𝟏

𝑻𝒃𝟎 𝑻𝒃𝟎
( 𝟏 + 𝒛−𝟏 ) ( 𝟏 + 𝒛−𝟏 )
𝟐𝒂𝟏 𝟐𝒂𝟏
𝑯(𝒛) = 𝐨𝐫 𝑯(𝒛) =
𝑻𝒂𝟎 𝑻𝒂𝟎 𝑻𝒂
(𝟏 + 𝟐𝒂 ) − (𝟏 − 𝟐𝒂 ) 𝒛 −𝟏 (𝟏 − 𝒛−𝟏 ) + 𝟎 (𝟏 + 𝒛−𝟏 )
𝟏 𝟏 𝟐𝒂𝟏

58
Digital Signal Processing (DSP)

𝑻𝒃𝟎
𝟐𝒂𝟏 𝒃𝟎
𝑯(𝒛) = 𝐓𝐡𝐮𝐬 𝑯(𝒛) =
(𝟏 − 𝒛−𝟏 ) 𝑻𝒂𝟎 𝟐(𝟏 − 𝒛−𝟏 )
+ 𝒂𝟏 + 𝒂𝟎
( 𝟏 + 𝒛−𝟏 ) 𝟐𝒂𝟏 𝑻( 𝟏 + 𝒛−𝟏 )

Comparing Ha(s) of Eq. (2) and H(z) it can be seen that H(z) can be
obtained from Ha(s) by using the following mapping relation:
𝒔𝑻
𝟐 (𝟏−𝒛−𝟏 ) 𝟏+
𝟐
𝒔 = 𝑻 ( 𝟏+𝒛−𝟏) or 𝒛= 𝒔𝑻 …….(18)
𝟏−
𝟐
This is the bilinear transformation. The image of the jΩ axis from the s-plane
in the z-plane is shown in the Figure below. The bilinear transformation
given in Eq.(18) has the following properties:
(1)- The entire jΩ axis of the s-plane goes into the unit circle of the z-plane.
(2)- The left half side of the s-plane is transformed inside the uint circle of
the z-plane.

The image in the z-plane of the jΩ axis of the s-plane for the mapping
𝒔𝑻
𝟏+
𝟐
𝒛= 𝒔𝑻
𝟏−
𝟐
Therefore a stable analog filter would be transformed into a stable
digital filter. While the frequency responses of analog filter and digital
filter have the same amplitudes. There is a nonlinear relationship
between corresponding digital and analog frequencies.
𝒋Ω𝑻
𝟏+
𝟐
If s = jΩ, then 𝒛 = 𝒋Ω𝑻
𝟏−
𝟐

59
Digital Signal Processing (DSP)

𝒋𝝎 𝒋𝝎 𝒋𝝎
− −
𝟐 (𝒆 𝟐 − 𝒆 𝟐 ) 𝝎
𝝎
𝟐𝟏−𝒆 −𝒋𝝎
𝟐𝒆 𝟐 𝒋𝟐 𝐬𝐢𝐧 𝟐 𝟐 𝝎
𝒊𝒇𝒛 = 𝒆 , 𝒔 = = = = 𝒋 𝐭𝐚𝐧 = 𝒋Ω,
𝑻 𝟏 + 𝒆−𝒋𝝎 𝑻 𝒋𝝎 𝒋𝝎 𝒋𝝎 𝑻 𝟐 𝐜𝐨𝐬 𝝎 𝑻 𝟐
𝒆− 𝟐 (𝒆 𝟐 + 𝒆− 𝟐 ) 𝟐

𝟐 𝝎 Ω𝑻
Ω= 𝐭𝐚𝐧 ( ) 𝐨𝐫 𝝎 = 𝟐 𝐭𝐚𝐧−𝟏 ( )
𝑻 𝟐 𝟐

◼ Nonlinear mapping introduces a distortion in the frequency


axis called frequency warping seethe following Figure:

The digital frequency will have a critical frequency 𝛚𝐜 given by


𝛚𝐜 = 𝟐 𝐭𝐚𝐧−𝟏 (Ω𝐜 𝐓/𝟐). The equivalent critical frequency becomes
𝟐
Ω𝐜 𝐞𝐪 = 𝐭𝐚𝐧−𝟏 (Ω𝐜 𝐓/𝟐)
𝐓
WHICH WILL GIVE Ω𝒄 ONLY IF
(Ω𝒄 𝑻/𝟐) is small that 𝐭𝐚𝐧−𝟏 (Ω𝒄 𝑻/𝟐) is approximately equal to (Ω𝒄 𝑻/𝟐)

This warping of the critical frequency will be compensated for in the


design procedure using the bilinear transformation by prewarping.

60
Digital Signal Processing (DSP)

* IIR Filter Design Procedure

1 Given specification in digital domain TABLE 3-2

2 Convert it into analog filter specification TABLE 3.1

3
4 Design analog filter (Butterworth, Cheby
 
shov, elliptic):H(s)
 2

Apply
3 bilinear
 transform2 
1
to=get
2 H(z)
tan
ω out
T 2
of H(s) 
1
K1 1
| H (e j ) |
K2
4
K1 H ( z ) = H (s) 1 1− z −1
s= 
T 1+ z −1
K2
1

1  2 

61
Digital Signal Processing (DSP)

Example (LP Butterworth Filter)

Design and realize a digital low-pass filter using the bilinear


transformation method to satisfy the following characteristics:
(a) Monotonic stopband and passband(Butterworth Filter).
(b) -3.01dB cutoff frequency of 0.5𝝅 rad.
(c) Magnitude down at least 15 dB at 0.75 𝝅 rad.

Solution:-
The design procedure is that of using the bilinear
transformation on an analog prototype and consists of the
following steps:
Step1. Prewarp the critical digital frequencies
𝝎𝟏 = 𝟎. 𝟓 𝝅 𝒂𝒏𝒅 𝝎𝟐 = 𝟎. 𝟕𝟓 𝝅 using T=1 sec to get

𝟐 𝝎𝟏 𝟎. 𝟓 𝝅
Ω′𝟏 = 𝐭𝐚𝐧 = 𝟐 𝐭𝐚𝐧 = 𝟐. 𝟎𝟎
𝑻 𝟐 𝟐

62
Digital Signal Processing (DSP)

𝟐 𝝎𝟐 𝟎.𝟕𝟓 𝝅
Ω′𝟐 = 𝐭𝐚𝐧 = 𝟐 𝐭𝐚𝐧 = 𝟒. 𝟖𝟐𝟖2
𝑻 𝟐 𝟐

Step2. Design an analog low-pass filter with critical


frequencies Ω′𝟏 and Ω′𝟐 that satisfy

𝟐 ≥ 𝟐𝟎𝒍𝒐𝒈 |𝑯𝒂 (𝒋Ω′𝟏 )| ≥ −𝟑. 𝟎𝟏 𝒅𝑩 = 𝑲𝟏

𝟐𝟎𝒍𝒐𝒈 |𝑯𝒂 (𝒋Ω′𝟐 )| ≥ −𝟏𝟓 𝒅𝑩 = 𝑲𝟐


A Butterwirth filter is used to satisfy the monotonic
property and has an order 𝒏 and critical frequency Ω𝒄
Determined by the following equations :

𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎−𝒌𝟏/𝟏𝟎 − 𝟏)/(𝟏𝟎−𝒌𝟐/𝟏𝟎 − 𝟏)]


𝒏=⌈ ⌉
𝟐𝒍𝒐𝒈𝟏𝟎 (Ω𝟏 /Ω𝟐 )

𝟏/𝟐𝒏
Ω𝒄 = Ω𝟏 /(𝟏𝟎−𝒌𝟏/𝟏𝟎 − 𝟏)

We get
𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎𝟑.𝟎𝟏/𝟏𝟎 − 𝟏)/(𝟏𝟎𝟏𝟓/𝟏𝟎 − 𝟏)]
𝒏=⌈ ⌉ = 𝟏, 𝟗𝟒𝟏𝟐 = 𝟐
𝟐
𝟐𝒍𝒐𝒈𝟏𝟎 (
𝟒. 𝟖𝟐𝟖𝟐)

𝟏/𝟒
Ω𝒄 = 𝟐/(𝟏𝟎𝟑,𝟎𝟏/𝟏𝟎 − 𝟏) = 𝟐
Therefore the required prewarped analog filter using the
Butterworth Table 3.1 and low-pass to low pass
transformation from table 3.2 is

𝟏 𝟏
𝑯𝒂 (𝒔) = | =
𝒔𝟐 + √𝟐𝒔 + 𝟏 𝒔→𝒔/𝟐 (𝒔/𝟐)𝟐 + √𝟐(𝒔/𝟐) + 𝟏
𝟒
𝒔𝟐 + 𝟐√𝟐𝒔 + 𝟒

Step3. Applying the bilinear transformation method(T=1) to


satisfy the given digital requirements:
𝑯(𝒛) = 𝑯𝒂 (𝒔)| 𝟐(𝟏−𝒛−𝟏)
𝒔→[ ]
(𝟏+𝒛−𝟏 )

63
Digital Signal Processing (DSP)

𝟒
𝑯(𝒛) = 𝟐
𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 )
[ ] + 𝟐 √𝟐 [ ]+𝟒
(𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 )

𝟏 + 𝟐𝒛−𝟏 + 𝒛−𝟐
𝑯(𝒛) =
𝟑. 𝟒𝟏 + 𝟎. 𝟓𝟖𝟔𝒛−𝟐

This digital filter can be realized by specification of a


difference equation obtained from the transfer function
H(z) given by

𝒀(𝒛) 𝟏 + 𝟐𝒛−𝟏 + 𝒛−𝟐


𝑯(𝒛) = =
𝑿(𝒛) 𝟑. 𝟒𝟏 + 𝟎. 𝟓𝟖𝟔𝒛−𝟐
Cross multiplying gives:

𝒀(𝒛)[𝟑. 𝟒𝟏 + 𝟎. 𝟓𝟖𝟔𝒛−𝟐 ] = 𝑿(𝒛)[𝟏 + 𝟐𝒛−𝟏 + 𝒛−𝟐 ]

And taking the inverse Z-transform we find

[𝟑. 𝟒𝟏𝒚(𝒏) + 𝟎. 𝟓𝟖𝟔𝒚(𝒏 − 𝟐)] = [𝒙(𝒏) + 𝟐𝒙(𝒏 − 𝟏) + 𝒙(𝒏 − 𝟐)]

By rearranging and scaling. y(n) can be realized by the


following difference equation:

𝒚(𝒏) = 𝟎. 𝟐𝟗𝟑[𝒙(𝒏) + 𝟐𝒙(𝒏 − 𝟏) + 𝒙(𝒏 − 𝟐)] − 𝟎. 𝟏𝟕𝟐𝒚(𝒏 − 𝟐)

x(n) y(n)

2
z-1
z-1
z-1

-0.172
z-1

64
Digital Signal Processing (DSP)

Example (BP Butterworth Filter)

Design a digital band-pass filter representing an analog one with


the following specifications:
(a) Stop band attenuation of at least 20dB at warpped
frequencies of 20Hz and 45kHz.
(b) -3 dB lower and upper cutoff bilinear warpped frequencies
of 50Hz and 20kHz.
(c) a monotonic frequencies.

Solution:-
The desired frequency response is shown on the right

From table (3.2) we see


𝒓𝒂𝒅
Ω𝟏 = 𝟐𝝅(𝟐𝟎) = 𝟏𝟐𝟓. 𝟔𝟔
𝒔𝒆𝒄
𝒓𝒂𝒅
Ω𝒍 = 𝟐𝝅(𝟓𝟎) = 𝟑𝟏𝟒. 𝟏𝟓𝟗
𝒔𝒆𝒄
𝒓𝒂𝒅
Ω𝒖 = 𝟐𝝅(𝟐𝟎𝟎𝟎𝟎) = 𝟏𝟐𝟓𝟔𝟔𝟑
𝒔𝒆𝒄
𝒓𝒂𝒅
Ω𝟐 = 𝟐𝝅(𝟒𝟓𝟎𝟎𝟎) = 𝟐𝟖𝟐𝟕𝟒𝟑
𝒔𝒆𝒄

𝒌𝟏 = −𝟑𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
The Backward equation then gives the Ω𝒓 for a normalized
Low pass prototype.

Ω𝒓 = 𝒎𝒊𝒏[(|𝑨|), (|𝑩|) ]

From table (3.2) USING ( Ω𝟏 , Ω𝟐 , Ω𝒍 𝒂𝒏𝒅 Ω𝒖 )we see

65
Digital Signal Processing (DSP)

(−Ω𝟐
𝟏 + Ω𝒍 Ω𝒖 ) (−Ω𝟐
𝟐 − Ω𝒍 Ω 𝒖 )
𝑨=[ 𝑩=[
Ω𝟏 ( Ω 𝒖 − Ω𝒍 ] Ω𝟐 ( Ω𝒖 − Ω𝒍 ]

A=2.5053, B=2.2545
The most critical value Ω𝒓 is the minimum of the two, that
is, Ω𝒓 = 𝒎𝒊𝒏[(|𝑨|), (|𝑩|) ]=2.2545

The low-pass Butterworth filter of order 𝒏 can then be


easily calculated from the following equations :

𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎−𝒌𝟏/𝟏𝟎 − 𝟏)/(𝟏𝟎−𝒌𝟐/𝟏𝟎 − 𝟏)]


𝒏=⌈ ⌉
𝟐𝒍𝒐𝒈𝟏𝟎 (𝟏/Ω𝒓 )

We get
𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎𝟑./𝟏𝟎 − 𝟏)/(𝟏𝟎𝟐𝟎/𝟏𝟎 − 𝟏)]
𝒏=⌈ ⌉ = ⌈𝟐. 𝟖𝟐𝟗⌉ = 𝟑
𝟏
𝟐𝒍𝒐𝒈𝟏𝟎 ( )
𝟐. 𝟐𝟓𝟒𝟓

from the Butterworth Table 3.1b and n=3 we have the low-
pass prototype as
𝟏
𝑯𝑳𝑷 = 𝟑 𝟐
𝒔 + 𝟐𝒔 + 𝟐𝒔 + 𝟏

The required analog-to-analog transformation (table 3.2) is


determined from Ω𝒍 𝒂𝒏𝒅 Ω𝒖 as

(𝒔𝟐 + Ω𝒖 Ω𝒍 ) 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕
𝒔→[ ]=
𝒔( Ω𝒖 − Ω𝒍 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 )

𝑯𝑩𝑷 (𝒔) then is finlly seen to be

𝑯𝑩𝑷 (𝒔)
𝟏
= 𝟑 𝟐 𝟏
𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕
[ ] + 𝟐 [ ] + 𝟐 [ ] +𝟏
𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 )

𝑯𝑩𝑷 (𝒔)
𝟏. 𝟗 × 𝟏𝟎𝟏𝟓 𝒔𝟑
=
𝒔𝟔 + 𝟐. 𝟓 × 𝟏𝟎𝟓 𝒔𝟓 + 𝟑. 𝟏𝟓 × 𝟏𝟎𝟏𝟎 𝒔𝟒 + 𝟏. 𝟗𝟗 × 𝟏𝟎𝟏𝟓 𝒔𝟑 + 𝟏. 𝟐𝟓 × 𝟏𝟎𝟏𝟖 𝒔𝟐 + 𝟑. 𝟗 × 𝟏𝟎𝟐𝟎 𝒔 + 𝟔. 𝟏𝟓 × 𝟏𝟎𝟐𝟐

66
Digital Signal Processing (DSP)

Applying the bilinear transformation method(T=1) to satisfy


the given digital requirements:
𝑯(𝒛) = 𝑯𝑩𝑷 (𝒔)| 𝟐(𝟏−𝒛−𝟏)
𝒔→[ ]
(𝟏+𝒛−𝟏 )

𝟑
𝟐(𝟏 − 𝒛−𝟏)]
𝟏. 𝟗 × 𝟏𝟎𝟏𝟓 [
(𝟏 + 𝒛−𝟏 )
𝑯(𝒛) = 𝟔 𝟓 𝟒 𝟑
−𝟏
𝟐 (𝟏 − 𝒛 ) −𝟏
𝟐 (𝟏 − 𝒛 ) 𝟐 (𝟏 − 𝒛−𝟏) 𝟐 (𝟏 − 𝒛−𝟏)
[ ] + 𝟐. 𝟓 × 𝟏𝟎𝟓 [ ] + 𝟑. 𝟏𝟓 × 𝟏𝟎𝟏𝟎 [ ] + 𝟏. 𝟗𝟗 × 𝟏𝟎𝟏𝟓 [ ]
(𝟏 + 𝒛 −𝟏 ) (𝟏 + 𝒛 −𝟏 ) (𝟏 + 𝒛 −𝟏 ) −𝟏
(𝟏 + 𝒛 )
𝟐

+𝟏. 𝟐𝟓 × 𝟏𝟎𝟏𝟖
𝟐(𝟏−𝒛−𝟏) + 𝟑. 𝟗 × 𝟏𝟎 𝟐(𝟏−𝒛−𝟏) + 𝟔. 𝟏𝟓 × 𝟏𝟎
𝟐𝟎 𝟐𝟐
−𝟏 −𝟏
[ (𝟏+𝒛 )] [ (𝟏+𝒛 )]

Example (HP Butterworth Filter)

Design a digital filter representing an analog one with the


following specifications:
(a) Pass all signals of bilinear warpped frequencies greater
than 200rad/sec with no more than 2dB of attenuation.
(b) Stop band attenuation of greater than -20 dB at warpped d
frequencies less than 100rad/sec.
(c) a maximally flat IIR response.

Solution:-
The desired frequency response is shown on the right

From table (3.2) we see


𝒓𝒂𝒅 𝒓𝒂𝒅
Ω𝒖 = 𝟐𝟎𝟎 , Ω′𝒓 = 𝟏𝟎𝟎
𝒔𝒆𝒄 𝒔𝒆𝒄

𝒌𝟏 = −𝟐𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
The Backward equation then gives the Ω𝒓 for a normalized
Low pass prototype.

Ω𝒓 = Ω𝒖 /Ω′𝒓 =200/100=2

67
Digital Signal Processing (DSP)

The low-pass Butterworth filter now has the following


specifications
Ω𝟏 = 𝟏 , 𝒌𝟏 = −𝟐𝒅𝑩

Ω𝟐 = Ω𝒓 = 𝟐 , 𝒌𝟐 = −𝟐𝟎𝒅𝑩

The order of the filter is determined as follows

𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎−𝒌𝟏/𝟏𝟎 − 𝟏)/(𝟏𝟎−𝒌𝟐/𝟏𝟎 − 𝟏)]


𝒏=⌈ ⌉
𝟐𝒍𝒐𝒈𝟏𝟎 (Ω𝟏 /Ω𝟐 )

We get
𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎𝟒/𝟏𝟎 − 𝟏)/(𝟏𝟎𝟐𝟎/𝟏𝟎 − 𝟏)]
𝒏=⌈ ⌉ = ⌈𝟑. 𝟕⌉ = 𝟒
𝟏
𝟐𝒍𝒐𝒈𝟏𝟎 ( )
𝟐
Ω𝟏 𝟏
Ω𝒄 = 𝟏 = 𝟏 = 𝟏. 𝟎𝟔𝟗
𝒌𝟏 𝟐𝒏 𝟐 𝟖
(𝟏𝟎−𝟏𝟎 − 𝟏) (𝟏𝟎𝟏𝟎 − 𝟏)

from the Butterworth Table 3.1b and n=4 we have the


NORMALIZED low-pass filter as
𝟏
𝑯𝟒 = 𝟐
(𝒔 + 𝟎. 𝟕𝟔𝟓𝒔 + 𝟏) (𝒔𝟐 + 𝟏. 𝟖𝟓𝒔 + 𝟏)

The low-pass filter prototype

𝑯𝑳𝑷 (𝒔) = 𝑯𝟒 (𝒔)⌉𝒔→[ 𝒔 ]


Ω𝒄

𝑯𝑳𝑷 (𝒔)
𝟏
= 𝒔 𝒔 𝒔 𝒔
((𝟏. 𝟎𝟔𝟗)𝟐 + 𝟎. 𝟕𝟔𝟓(𝟏. 𝟎𝟔𝟗) + 𝟏) ((𝟏. 𝟎𝟔𝟗)𝟐 + 𝟏. 𝟖𝟓(𝟏. 𝟎𝟔𝟗) + 𝟏)

68
Digital Signal Processing (DSP)

To get desired HPF apply LP TO HP( analog-to-analog


transformation (table 3.2))

𝑯𝑩𝑷 (𝒔) = 𝑯𝑳𝑷 (𝒔)⌉ Ω


𝒔→[ 𝒖 ]=𝟐𝟎𝟎/𝒔
𝒔

𝑯𝑯𝑷 (𝒔) then is finlly seen to be

𝟏
𝑯𝑩𝑷 (𝒔) =
𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕
(( 𝒔 )𝟐 + 𝟎. 𝟕𝟔𝟓( 𝒔 ) + 𝟏) (( 𝒔 )𝟐 + 𝟏. 𝟖𝟓( 𝒔 ) + 𝟏)
Applying the bilinear transformation method(T=1) to satisfy
the given digital requirements:
𝑯(𝒛) = 𝑯𝑩𝑷 (𝒔)| 𝟐(𝟏−𝒛−𝟏)
𝒔→[ ]
(𝟏+𝒛−𝟏 )

𝑯(𝒛)
𝟏
=
𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕
(( )𝟐 + 𝟎. 𝟕𝟔𝟓( ) + 𝟏) (( )𝟐 + 𝟏. 𝟖𝟓( ) + 𝟏)
𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 )
[ ] [ ] [ ] [ ]
(𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 )

69
Digital Signal Processing (DSP)

Example ( Chebyshev LPF)


Design a Chebyshev LPF representing an analog one with the
following specifications:
(a) Acceptable band pass ripples of 2dB.
(b) Cut off frequency of 40 rad/sec.
(c) Stop band attenuation of 20 dB or more at 52 rad/sec.
Solution:-
The desired frequency response is shown on the right

even
odd

1
1
K1 =
1+ ε 2

K2

1 2

The general approach is to first change the requirements to


those of a low-pass unit bandwidth PROTOTYPE, design such
a LPF , and then apply a LP to LP Transformation to that
PROTOTYPE.
From table (3.2) we see
𝒓𝒂𝒅 𝒓𝒂𝒅
Ω𝒖 = 𝟓𝟐 , Ω′𝒓 = 𝟒𝟎
𝒔𝒆𝒄 𝒔𝒆𝒄
𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
√𝟏 +∈𝟐

70
Digital Signal Processing (DSP)

The Backward equation then gives the Ω𝒓 for a normalized


Low pass prototype.

Ω𝒓 = Ω𝒖 /Ω′𝒓 =52/40=1.3 rad. /sec

The low-pass filter now has the following specifications


𝟏
Ω𝟏 = 𝟏 , 𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩
√𝟏 +∈𝟐
𝟏
Ω𝟐 = Ω𝒓 = 𝟏. 𝟑 , 𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩
𝑨

The low-pass Chebyshev filter of order 𝒏 can then be


easily calculated from the following equations :

𝒍𝒐𝒈𝟏𝟎 [(𝒈+√𝒈𝟐 −𝟏)] 𝑨𝟐 −𝟏 𝟏


𝒏=⌈ ⌉ where 𝒈 = √ , 𝑨 = |𝑯(𝒋Ω|
∈𝟐
𝒍𝒐𝒈𝟏𝟎 (Ω𝒓 +√Ω𝒓 𝟐 +𝟏)

𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩, ∈𝟐 = 𝟎. 𝟓𝟖𝟒𝟖𝟗
√𝟏 +∈𝟐

𝟏
𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩, 𝑨 = 𝟏𝟎
𝑨

𝑨𝟐 − 𝟏
𝒈= √ = 𝟏𝟑
∈𝟐

𝒍𝒐𝒈𝟏𝟎 [(𝒈 + √𝒈𝟐 − 𝟏)] 𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟑 + √𝟏𝟑𝟐 − 𝟏)]


𝒏= =⌈ ⌉=𝟓
𝟐 𝒍𝒐𝒈𝟏𝟎 (𝟏. 𝟑 + √𝟏. 𝟑𝟐 + 𝟏)
𝒍𝒐𝒈𝟏𝟎 (Ω𝒓 + √Ω𝒓 + 𝟏)

71
Digital Signal Processing (DSP)

Using the 2dB ripple part of Table 3.4

𝒃𝟎
𝒌𝒏 𝟏 𝒇𝒐𝒓 𝒏 𝒆𝒗𝒆𝒏
𝑯𝒏 (𝒔) = , 𝒌𝒏 = {(𝟏 +∈𝟐 )𝟐
𝑽𝒏 (𝒔)
𝒃𝟎 𝒇𝒐𝒓 𝒏 𝒐𝒅𝒅

𝑽𝒏 (𝒔) = 𝒔𝒏 + 𝒃𝒏−𝟏 𝒔𝒏−𝟏 + ⋯ + 𝒃𝟏 𝒔𝟏 + 𝒃𝟎


for n=5, and the fact that since n is odd, we have the desired
Chebyshev unit bandwidth low-pass filter as

𝒃𝟎
𝑯𝟓 (𝒔) =
𝒔𝟓 + 𝒃𝟒 𝒔𝟒 + 𝒃𝟑 𝒔𝟑 +𝒃𝟐 𝒔𝟐 +𝒃𝟏 𝒔𝟏 + 𝒃𝟎

𝑯𝑳𝑷 (𝒔)= 𝑯𝟓 (𝒔)⌋𝒔→𝒔/𝟒𝟎


𝒃𝟎
=
(𝒔/𝟒𝟎)𝟓 + 𝒃𝟒 (𝒔/𝟒𝟎)𝟒 + 𝒃𝟑 (𝒔/𝟒𝟎)𝟑 +𝒃𝟐 (𝒔/𝟒𝟎)𝟐 +𝒃𝟏 (𝒔/𝟒𝟎)𝟏 + 𝒃𝟎

𝑯𝑳𝑷 (𝒛)= 𝑯𝒍𝒑 (𝒔)⌋ 𝟏−𝒛


𝒔→𝟐( )
𝟏+𝒛

(H.W)
Design a digital filter having a 1-dB cut off frequency at 75 Hz
and greater than 20-dB attenuation for > 50 𝐻𝑧 . Find H(z) that
will satisfy the above prewarpped specifications for :
(a) Butterworth .
(b) Chebyshev approximations.

72
Digital Signal Processing (DSP)

73
Digital Signal Processing (DSP)

3.IIR Filter Design by Impulse Invariant Method

𝑰𝒏𝒗.𝑳𝒂𝒑𝒍𝒂𝒄𝒆 𝒕→𝒏𝑻 𝒁−𝑻𝒓𝒂𝒏𝒔𝒇𝒐𝒓𝒎


𝑯(𝒔) ↔ 𝒉(𝒕) ↔ 𝒉(𝒏) ↔ 𝑯(𝒛)

Example
Find the H(z) corresponding to the impulse invariant design a
sample rate of 1/T samples/sec. for an analog filter Ha(s) specified
as follows:

𝑨
𝑯𝒂 (𝒔) =
(𝒔 + 𝜶)
Solution:
The analog system's impulse invariant response is obtained
by taking the inverse Laplace transform of Ha(s) to give ha(t) as
𝒉𝒂 (𝒕) = 𝑨𝒆−𝜶𝒕 𝒖(𝒕)

The corresponding h(n) is then given by


𝒉(𝒏) = 𝑨𝒆−𝜶𝒏𝑻 𝒖(𝒏𝑻) = 𝑨(𝒆−𝜶𝑻 )𝒏 𝒖(𝒏)

And therefore the discrete-time filter has the following Z-


transform

𝑨𝒛
𝑯(𝒛) = 𝒁[𝒉(𝒏)] = 𝒁[𝑨(𝒆−𝜶𝑻 )𝒏 𝒖(𝒏)] =
𝒛 − 𝒆−𝜶𝑻

74
Digital Signal Processing (DSP)

FIR Filter Design


In the previous sections, digital filters were designed to give
a desired frequency response magnitude without regard to the
phase response. In many cases a linear phase characteristic
is required throughout the pass-band of the filter to preserve
the shape of a given signal within the pass-band.
Assume a filter with frequency response
𝒋𝒘 )
𝑯(𝒆𝒋𝒘 ) = |𝑯(𝒆𝒋𝒘 )| 𝒆𝒋𝝋(𝒆

𝝋(𝒆𝒋𝒘 ) = 𝜶𝒘 → 𝒍𝒊𝒏𝒆𝒓 𝒑𝒉𝒂𝒔𝒆 (−𝜶)

Why linear phase filter ?

The linear phase filter did not alter the shape of


original signal, simply translated it by an amount 𝜶 .
If the phase response had not been liner , the output
signal would have been a distorted version .

In Fig.4.11 the responses of two different filters to the


same input( a sum of two sinusoidal signals) is
presented. The filters have the same magnitude
frequency response but differ in their phases as one
has linear and the other a quadratic phase. For the
filter with liner phase, the sinusoidal components each
go through a steady state phase change, but in such a
way that the output signal is just a delayed version of
75
Digital Signal Processing (DSP)

the input while the quadratic phase filter causes phase


shifts in the two sinusoidal signals resulting in an
output that is a distorted version of the input signal.
It can be shown that a casual IIR filter cannot
produce a linear phase characteristic and that only
special forms of casual FIR filters can give linear
phase. This result is clarified in the following theorem.

Theorem : If h(n) represents the impulse response of


a discrete-time system, a necessary and sufficient
condition for linear phase is that h(n) have finite
duration N, and that it by symmetric about its
midpoint.

76
Digital Signal Processing (DSP)

THE DESIGN Concept:-


77
Digital Signal Processing (DSP)

For a casual FIR filter whose impulse response


begins at zero ends at (N-1) , h(n) must satisfy the
following:
h(0)=h(N-1) &
h(n)=h(N-1-n) ……for n=0,1,2,……,N-1
for this condition the general shapes of h(n) that give liner phase.

𝑯(𝒆𝒋𝒘 ) = ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏


−∞

𝑵−𝟏

𝑯(𝒆𝒋𝒘 ) = ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏


𝟎
for N an even number. The summation can be broken into
two parts as follows:

(𝑵/𝟐)−𝟏 𝑵−𝟏
𝒋𝒘 ) −𝒋𝒘𝒏
𝑯(𝒆 = ∑ 𝒉(𝒏) 𝒆 + ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏
𝒏=𝟎 𝒏=𝑵/𝟐

Letting m=N-1-n ( n=N-1-m) in the second sum gives

𝑵−𝟏 𝟎

∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏 = ∑ 𝒉(𝑵 − 𝟏 − 𝒎) 𝒆−𝒋𝒘(𝑵−𝟏−𝒎)


𝒏=𝑵/𝟐 𝑵
𝒎= −𝟏
𝟐
But 𝒉(𝑵 − 𝟏 − 𝒎) = 𝒉(𝒎), and the summation can be
reversed to give
𝑵 𝑵
( )−𝟏 ( )−𝟏
𝟐 𝟐

𝑯(𝒆𝒋𝒘 ) = ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏 + ∑ 𝒉(𝒎) 𝒆−𝒋𝒘(𝑵−𝟏−𝒎)


𝒏=𝟎 𝒎=𝟎

Combining yields

78
Digital Signal Processing (DSP)

𝑵 𝑵
( )−𝟏 ( )−𝟏
𝟐 𝟐

𝑯(𝒆𝒋𝒘 ) = ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏 + ∑ 𝒉(𝒏) 𝒆−𝒋𝒘(𝑵−𝟏−𝒏)


𝒏=𝟎 𝒏=𝟎

𝑵
( )−𝟏
𝟐
𝒋𝒘 )
[𝒆−𝒋𝒘𝒏 + 𝒆−𝒋𝒘(𝑵−𝟏−𝒏) ]
𝑯(𝒆 = ∑ 𝟐𝒉(𝒏)
𝟐
𝒏=𝟎

𝑵
( )−𝟏 𝑵−𝟏 𝑵−𝟏
𝟐
[𝒆−𝒋𝒘(𝒏− 𝟐
)
+ 𝒆−𝒋𝒘(𝒏−𝟐
)
]
𝑯(𝒆𝒋𝒘 ) = 𝒆−𝒋𝒘((𝑵−𝟏)/𝟐) ∑ 𝟐𝒉(𝒏)
𝟐
𝒏=𝟎

By factoring we are able to separate 𝑯(𝒆𝒋𝒘 ) into two part as


follows:

𝑵
( )−𝟏
𝟐

𝑯(𝒆𝒋𝒘 ) = 𝒆−𝒋𝒘((𝑵−𝟏)/𝟐) ∑ 𝟐𝒉(𝒏) 𝐜𝐨𝐬{𝒘[𝒏 − (𝑵 − 𝟏)/𝟐]} … . 𝑵 𝒆𝒗𝒆𝒏


𝒏=𝟎

Linear phase Magnitude

𝑵−𝟏
𝝋(𝒆𝒋𝒘 ) = −𝒘 ( ) → 𝑵 𝒆𝒗𝒆𝒏
𝟐

There for, if the sum remains positive, 𝑯(𝒆𝒋𝒘) has a


𝑵−𝟏
linear phase with slope − ( 𝟐 ) , for N an odd number ,
a similar derivation leads to
(𝑵−𝟑)?𝟐
𝒋𝒘 −𝒋𝒘((𝑵−𝟏)/𝟐)
𝑵−𝟏
𝑯(𝒆 ) = 𝒆 {𝒉 ( ) + ∑ 𝟐𝒉(𝒏) 𝐜𝐨𝐬{𝒘[𝒏 − (𝑵 − 𝟏)/𝟐]} }
𝟐
𝒏=𝟎

DESIGN of FIR filters using windows:

79
Digital Signal Processing (DSP)

The easiest way to obtain an FIR filter is to simply truncate


the impulse response of an IIR filter . If 𝒉𝒅 (𝒏) represents the
impulse response of a desired IIR filter, then an FIR filter with
impulse response h(n) can be obtained as follows:

𝒉𝒅 (𝒏) 𝑵𝟏 ≤ 𝒏 ≤ 𝑵𝟐
𝒉(𝒏) = {
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆

In general, 𝒉(𝒏) can be thought of as being formed by the


product of 𝒉𝒅 (𝒏) and a " Window function" 𝒘(𝒏) , as
follows:

𝒉(𝒏) = 𝒉𝒅 (𝒏) 𝒘(𝒏)

The frequency response of the resulting filter is the


convolution of

𝑯(𝒆𝒋𝒘 ) = 𝑯𝒅 (𝒆𝒋𝒘 ) ∗ 𝑾(𝒆𝒋𝒘 )

For example, if 𝑯𝒅 (𝒆𝒋𝒘 ) represents an ideal low-pass


filter with cutoff frequency 𝝎𝒐 and 𝒘(𝒏) is a
rectangular window positional about the origin, the
𝑯(𝒆𝒋𝒘 ) is shown blow

DESIGN PROCEDURE:-

80
Digital Signal Processing (DSP)

An ideal low-pass filter with linear phase of slope – 𝜶


and cutoff 𝝎𝒄 can be characterized in the frequency
domain by

𝒆𝒋𝝎∝ |𝝎| ≤ 𝝎𝒄
𝑯𝒅 (𝒆𝒋𝝎 ) = {
𝟎, |𝝎𝒄 | < |𝝎| < 𝜋

Taking the inverse Fourier transform

𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉𝒅 (𝒏) =
𝝅 (𝒏 − 𝜶 )

A casual FIR filter with impulse response 𝒉(𝒏) can be


obtained by multiplying 𝒉𝒅 (𝒏) by a window
beginning at the origin and ending at N-1 as follows:

𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉(𝒏) = 𝒘(𝒏)
𝝅 (𝒏 − 𝜶 )

For h(n) to be a linear phase filter, 𝜶 must be selected


so that the resulting h(n) is symmetric .
𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
As is symmetric about n= 𝜶 and the window
𝝅(𝒏−𝜶)
symmetric about n=(N-1)/2 , a linear phase filter
results if the product is symmetric . This requires that
𝜶 = (𝑵 − 𝟏)/𝟐

Some of the most commonly used windows are the


rectangular, Bartlett, Hanning, Hamming, Blackman, and
Kaiser windows. These are defined mathematically as follows:

81
Digital Signal Processing (DSP)

Rectangular: 𝒘𝑹 (𝒏) = { 𝟏 𝟎≤𝒏≤𝑵−𝟏


𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆

𝟐𝒏
𝑵−𝟏
, 𝟎 ≤ 𝒏 ≤ (𝑵 − 𝟏)/𝟐
Bartlett: 𝒘𝑩 (𝒏) = {𝟐−𝟐𝒏 , (𝑵 − 𝟏)/𝟐 ≤ 𝒏 ≤ (𝑵 − 𝟏)
𝑵−𝟏
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆
𝟐𝝅𝒏
{𝟏−𝒄𝒐𝒔[ ]}
Hanning : 𝒘𝑯𝒂𝒏 (𝒏) = {
𝑵−𝟏
, 𝟎≤𝒏≤ 𝑵−𝟏
𝟐
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆

Hamming: 𝒘𝑯𝒂𝒎 (𝒏) =


𝟐𝝅𝒏
𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [ ] 𝟎≤𝒏≤ 𝑵−𝟏
{ 𝑵−𝟏
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆

Blackman: 𝒘𝑩𝒍 (𝒏) =


𝟐𝝅𝒏 𝟒𝝅𝒏
𝟎. 𝟒𝟐 − 𝟎. 𝟓𝒄𝒐𝒔 [𝑵−𝟏] + 𝟎. 𝟎𝟖𝒄𝒐𝒔 [𝑵−𝟏] , 𝟎≤𝒏≤𝑵−𝟏
{
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆

𝟏
𝑵−𝟏 𝟐 𝑵−𝟏 𝟐 𝟐
𝑰𝒐 {𝒘𝒂 [( ) −(𝒏− ) ] }
𝟐 𝟐
Kaiser: 𝒘𝑲 (𝒏) = { 𝑵−𝟏 𝟎≤𝒏≤𝑵−𝟏
𝑰𝒐 [𝒘𝒂 ( )]
𝟐
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆

Where 𝑰𝒐 (𝑥) is the modified zero order Bessel function of the first kind given by

2𝜋
𝑰𝒐 (𝑥) = ∫ exp (𝑥 cos 𝜃) 𝑑𝜃/(2𝜋)
0

Plots of the windows and their Fourier transform magnitudes (in decibels) are
shown in Fig 4.14 for N=51.

82
Digital Signal Processing (DSP)

Design table for FIR low-pass filter design

83
Digital Signal Processing (DSP)

Window type Transition width Minimum stop- K


band attenuation
Rectangular 𝟒𝝅/𝑵 -21dB 2
Bartlett 𝟖𝝅/𝑵 -25dB 4
Hanning 𝟖𝝅/𝑵 -44dB 4
Hamming 𝟖𝝅/𝑵 -53dB 4
Blackman 𝟏𝟐𝝅/𝑵 -74dB 6
Kaiser Variable

This table although a crude approximation may be used to design a FIR LPF from
(k1, k2, w1,w2 ) , the following example describe this technique :

Example :- Design a low-pass digital filter to be used in an { A/D- H(z)- D/A}


structure that will have a -3dB cutoff of 𝟑𝟎𝝅 rad./sec and an attenuation of 50dB
at 𝟒𝟓𝝅 rad./sec. The filter is required to have linear phase and the system will
use a sampling rate of 100 samples/sec.

Solution:-
The digital specifications obtained are as follows:

𝝎𝟏 = Ω𝟏 𝑻 = 𝟑𝟎𝝅 (𝟎. 𝟎𝟏) = 𝟎. 𝟑 𝝅 𝒓𝒂𝒅, 𝒌𝟏 = −𝟑𝒅𝑩

𝝎𝟐 = Ω𝟐 𝑻 = 𝟒𝟓𝝅 (𝟎. 𝟎𝟏) = 𝟎. 𝟒𝟓 𝝅 𝒓𝒂𝒅, 𝒌𝟐 = −𝟓𝟎𝒅𝑩

Step 1- To obtain a stop-band attenuation of – 50dB or more,( from the above


table ) a Hamming, Blackman, or Kaiser window could be used. The Hamming
window is chosen (k=4)
Step 2- The approximate number of points needed to satisfy the transition band
requirement can be found for

𝑵 ≥ 𝒌 × 𝟐𝝅(𝝎𝟐 − 𝝎𝟏 ) = 𝒌 × 𝟐𝝅(𝟎. 𝟒𝟓𝝅 − 𝟎. 𝟑𝟎𝝅) = 𝟓𝟑. 𝟑


To obtain an integer delay the next odd number (N=55) is selected.

Step 3- select the liner phase of slope ∝ and cutoff

𝝎𝒄 = 𝝎𝟏 = 𝟎. 𝟑𝝅 𝒓𝒂𝒅

𝑵−𝟏
∝= = 𝟐𝟕
𝟐
Thus giving a trial impulse response for a window as

𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉(𝒏) = 𝒘(𝒏)
𝝅(𝒏 − 𝜶)
𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [𝑵−𝟏] 𝟎 ≤ 𝒏 ≤ 𝑵 − 𝟏
𝟐𝝅𝒏
For Hamming window 𝒘(𝒏) = 𝒘𝑯𝒂𝒎 =
𝑵−𝟏
𝒔𝒊𝒏 [𝝎𝒄 (𝒏 −𝟐
)] 𝟐𝝅𝒏
𝒉(𝒏) = {𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [ ]}
𝑵−𝟏
𝝅 (𝒏 − 𝟐 ) 𝑵 −𝟏

𝒔𝒊𝒏[𝟎. 𝟑𝝅(𝒏 − 𝟐𝟕)] 𝟐𝝅𝒏


𝒉(𝒏) = {𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [ ]} 𝟎 ≤ 𝒏 ≤ 𝟓𝟒
𝝅(𝒏 − 𝟐𝟕) 𝟓𝟒
Example ( Chebyshev HPF)
84
Digital Signal Processing (DSP)

Design a Chebyshev digital filter representing an analog one


with the following specifications:
(a) Pass all signals of bilinear warpped frequencies greater
than 200rad/sec with no more than 2dB of attenuation.
(b) Stop band attenuation of greater than -20 dB at warpped d
frequencies less than 100rad/sec.

Solution:-

The general approach is to first change the requirements to


those of a High-pass unit bandwidth PROTOTYPE, design
such a LPF , and then apply a LP to HP Transformation to that
PROTOTYPE.
From table (3.2) we see

𝒓𝒂𝒅 𝒓𝒂𝒅
Ω𝒖 = 𝟐𝟎𝟎 , Ω′𝒓 = 𝟏𝟎𝟎
𝒔𝒆𝒄 𝒔𝒆𝒄
𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
√𝟏 +∈𝟐

The Backward equation then gives the Ω𝒓 for a normalized


Low pass prototype.

Ω𝒓 = Ω𝒖 /Ω′𝒓 =200/100=2 rad. /sec

The low-pass filter now has the following specifications


𝟏
Ω𝟏 = 𝟏 , 𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩
√𝟏 +∈𝟐
𝟏
Ω𝟐 = Ω𝒓 = 𝟐 , 𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩
𝑨

The Chebyshev filter of order 𝒏 can then be easily


calculated from the following equations :

85
Digital Signal Processing (DSP)

𝒍𝒐𝒈𝟏𝟎 [(𝒈+√𝒈𝟐 −𝟏)] 𝑨𝟐 −𝟏 𝟏


𝒏=⌈ ⌉ where 𝒈 = √ , 𝑨 = |𝑯(𝒋Ω|
∈𝟐
𝒍𝒐𝒈𝟏𝟎 (Ω𝒓 +√Ω𝒓 𝟐 +𝟏)

𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩, ∈𝟐 = 𝟎. 𝟓𝟖𝟒𝟖𝟗
√𝟏 +∈𝟐
𝟏
𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩, 𝑨 = 𝟏𝟎
𝑨

𝑨𝟐 − 𝟏
𝒈= √ = 𝟏𝟑
∈𝟐

𝒍𝒐𝒈𝟏𝟎 [(𝒈 + √𝒈𝟐 − 𝟏)] 𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟑 + √𝟏𝟑𝟐 − 𝟏)]


𝒏= =⌈ ⌉ = 𝟐. 𝟒𝟕 = 𝟑
𝟐
𝒍𝒐𝒈𝟏𝟎 (Ω𝒓 + √Ω𝒓 + 𝟏) 𝒍𝒐𝒈𝟏𝟎 (𝟐 + √𝟐𝟐 + 𝟏)

Using the 2dB ripple part of Table 3.4

𝒃𝟎
𝒌𝒏 𝟏 𝒇𝒐𝒓 𝒏 𝒆𝒗𝒆𝒏
𝑯𝒏 (𝒔) = , 𝒌𝒏 = {(𝟏 +∈𝟐 )𝟐
𝑽𝒏 (𝒔)
𝒃𝟎 𝒇𝒐𝒓 𝒏 𝒐𝒅𝒅

𝑽𝒏 (𝒔) = 𝒔𝒏 + 𝒃𝒏−𝟏 𝒔𝒏−𝟏 + ⋯ + 𝒃𝟏 𝒔𝟏 + 𝒃𝟎


for n=3, and the fact that since n is odd, we have the desired
Chebyshev unit bandwidth low-pass filter as

𝒃𝟎
𝑯𝟑 (𝒔) =
𝒔𝟑 + 𝒃 𝟐 𝒔𝟐 + 𝒃 𝟏 𝒔 + 𝒃 𝟎

𝑯𝑯𝑷 (𝒔)= 𝑯𝟑 (𝒔)⌋𝒔→ Ω𝒖 /𝒔 = 𝑯𝟑 (𝒔)⌋𝒔→𝟐𝟎𝟎/𝒔

𝑯𝑯𝑷 (𝒛)= 𝑯𝑯𝒑 (𝒔)⌋ 𝟏−𝒛


𝒔→𝟐( )
𝟏+𝒛

86
Digital Signal Processing (DSP)

87

You might also like