Professional Documents
Culture Documents
dsp5 9
dsp5 9
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:
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.
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
n n
z z
X ( z ) = − b z −n n
= − =1−
n =1 n =1 b n =0 b
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)
⚫ Time Reversal:
if x(n) X(z)
Then x(-n) X(1/z);
ROC: 1/ROCx
42
Digital Signal Processing (DSP)
𝒅
= −𝒁−𝟏 [ {𝐜𝐨𝐬[𝝎𝒐 (𝒏)] 𝒖(𝒏)}] |𝒛 𝐳/𝒂
𝒅𝒛
−𝟏
𝒅 −(𝒛⁄𝒂)𝟐 𝐜𝐨𝐬 𝝎𝒐 + 𝟐(𝒛⁄𝒂) − 𝐜𝐨𝐬 𝝎𝒐
= −𝒁 [ ( )]
𝒅𝒛 ((𝒛⁄𝒂)𝟐 − 𝟐(𝒛⁄𝒂) 𝐜𝐨𝐬 𝝎𝒐 + 𝟏)
ROC=?
H.W.-1:
𝒙(𝒏) = (𝒏 − 𝟐)𝒂𝒏−𝟐 𝐜𝐨𝐬[𝝎𝒐 (𝒏 − 𝟐)] 𝒖(𝒏 − 𝟏)
H.W.-2:
𝒙(𝒏) = 𝒏 𝒂𝒏−𝟑 𝐜𝐨𝐬[𝝎𝒐 (𝒏 − 𝟐. 𝟓)] 𝒖(𝒏 − 𝟐)
43
Digital Signal Processing (DSP)
Zeros
44
Digital Signal Processing (DSP)
b z k
−k
X (z ) = k =0
N
a z
k =0
k
−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)
46
Digital Signal Processing (DSP)
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)
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 11 −1
2 1 1 1 −1
z=
1 − z=
1 −
24 42
4 2
−1
X (z ) =
2 1
+ z
1 −1 1 −1 2
1 − z 1 − z
4 2
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)
− 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
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.
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
49
Digital Signal Processing (DSP)
𝑌(𝑧)(1 − 2𝑍 −1 + 3𝑍 −2 ) = 𝑋(𝑧)(𝑍 −1 + 𝑍 −2 )
𝑗𝜔 )
(𝑍 + 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
50
Digital Signal Processing (DSP)
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.
h(n) = { H(z)}
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)
• 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
xn yn
52
Digital Signal Processing (DSP)
∑𝑴𝒌=𝟎 𝒅𝒌 𝑺
𝒌
𝑯𝒂 (𝒔) = 𝑵
∑𝒌=𝟎 𝑪𝑲 𝑺𝒌
Suppose that we approximate the derivatives by backward differences.
The first backward difference 𝛁 (𝟏) [. ] is defined by
𝑵 𝒌 𝑴 𝒌
𝟏 − 𝒛−𝟏 𝟏 − 𝒛−𝟏
∑ 𝑪𝒌 [ ] 𝒀(𝒛) = ∑ 𝒅𝒌 [ ] 𝑿(𝒛)
𝒌=𝟎
𝑻 𝒌=𝟎
𝑻
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)
s − plane z − plane
j axis u.c
𝟏−𝒛−𝟏 𝟏
a- Since, 𝒔 = Then 𝑯(𝒛) = 𝟐
𝑻 𝟏−𝒛−𝟏 𝟏−𝒛−𝟏
[ ] +𝟑[ ]+𝟐
𝑻 𝑻
𝑻𝟐
Or 𝑯(𝒛) =
𝟏−𝟐𝒛−𝟏 +𝒛−𝟐 −𝟑𝑻𝒛−𝟏 +𝟐𝑻𝟐
b- fs = 5 bps, 𝑻𝟐 = 𝟎. 𝟎𝟎𝟒
𝒋𝝎
𝑻𝟐
𝑯(𝒆 ) = 𝑯(𝒛) → =
𝒛=𝒆𝒋𝝎 𝟏 − 𝟐𝒆−𝒋𝝎 + 𝒆−𝟐𝒋𝝎 − 𝟑𝑻𝒆−𝒋𝝎 + 𝟐𝑻𝟐
55
Digital Signal Processing (DSP)
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
𝒛−𝟏
𝒔= , 𝐨𝐫 𝒛 = 𝟏 + 𝒔𝑻
𝑻
57
Digital Signal Processing (DSP)
𝒂𝟎 𝒃𝟎
𝒚𝒂, (𝒏𝑻) = − 𝒚𝒂 (𝒏𝑻) + 𝒙(𝒏𝑻) … … … … … … (𝟕)
𝒂𝟏 𝒂𝟏
&
𝒂𝟎 𝒃𝟎
𝒚𝒂, ((𝒏 − 𝟏)𝑻) = − 𝒚𝒂 ((𝒏 − 𝟏)𝑻) + 𝒙((𝒏 − 𝟏)𝑻) … . . (𝟖)
𝒂𝟏 𝒂𝟏
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)
𝒋𝝎 𝒋𝝎 𝒋𝝎
− −
𝟐 (𝒆 𝟐 − 𝒆 𝟐 ) 𝝎
𝝎
𝟐𝟏−𝒆 −𝒋𝝎
𝟐𝒆 𝟐 𝒋𝟐 𝐬𝐢𝐧 𝟐 𝟐 𝝎
𝒊𝒇𝒛 = 𝒆 , 𝒔 = = = = 𝒋 𝐭𝐚𝐧 = 𝒋Ω,
𝑻 𝟏 + 𝒆−𝒋𝝎 𝑻 𝒋𝝎 𝒋𝝎 𝒋𝝎 𝑻 𝟐 𝐜𝐨𝐬 𝝎 𝑻 𝟐
𝒆− 𝟐 (𝒆 𝟐 + 𝒆− 𝟐 ) 𝟐
𝟐 𝝎 Ω𝑻
Ω= 𝐭𝐚𝐧 ( ) 𝐨𝐫 𝝎 = 𝟐 𝐭𝐚𝐧−𝟏 ( )
𝑻 𝟐 𝟐
60
Digital Signal Processing (DSP)
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)
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
𝑻 𝟐 𝟐
𝟏/𝟐𝒏
Ω𝒄 = Ω𝟏 /(𝟏𝟎−𝒌𝟏/𝟏𝟎 − 𝟏)
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
𝟏 𝟏
𝑯𝒂 (𝒔) = | =
𝒔𝟐 + √𝟐𝒔 + 𝟏 𝒔→𝒔/𝟐 (𝒔/𝟐)𝟐 + √𝟐(𝒔/𝟐) + 𝟏
𝟒
𝒔𝟐 + 𝟐√𝟐𝒔 + 𝟒
63
Digital Signal Processing (DSP)
𝟒
𝑯(𝒛) = 𝟐
𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 )
[ ] + 𝟐 √𝟐 [ ]+𝟒
(𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 )
𝟏 + 𝟐𝒛−𝟏 + 𝒛−𝟐
𝑯(𝒛) =
𝟑. 𝟒𝟏 + 𝟎. 𝟓𝟖𝟔𝒛−𝟐
x(n) y(n)
2
z-1
z-1
z-1
-0.172
z-1
64
Digital Signal Processing (DSP)
Solution:-
The desired frequency response is shown on the right
𝒌𝟏 = −𝟑𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
The Backward equation then gives the Ω𝒓 for a normalized
Low pass prototype.
Ω𝒓 = 𝒎𝒊𝒏[(|𝑨|), (|𝑩|) ]
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
We get
𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎𝟑./𝟏𝟎 − 𝟏)/(𝟏𝟎𝟐𝟎/𝟏𝟎 − 𝟏)]
𝒏=⌈ ⌉ = ⌈𝟐. 𝟖𝟐𝟗⌉ = 𝟑
𝟏
𝟐𝒍𝒐𝒈𝟏𝟎 ( )
𝟐. 𝟐𝟓𝟒𝟓
from the Butterworth Table 3.1b and n=3 we have the low-
pass prototype as
𝟏
𝑯𝑳𝑷 = 𝟑 𝟐
𝒔 + 𝟐𝒔 + 𝟐𝒔 + 𝟏
(𝒔𝟐 + Ω𝒖 Ω𝒍 ) 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕
𝒔→[ ]=
𝒔( Ω𝒖 − Ω𝒍 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 )
𝑯𝑩𝑷 (𝒔)
𝟏
= 𝟑 𝟐 𝟏
𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕 𝒔𝟐 + 𝟑. 𝟗𝟓 × 𝟏𝟎𝟕
[ ] + 𝟐 [ ] + 𝟐 [ ] +𝟏
𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 ) 𝒔(𝟏. 𝟐𝟓 × 𝟏𝟎𝟓 )
𝑯𝑩𝑷 (𝒔)
𝟏. 𝟗 × 𝟏𝟎𝟏𝟓 𝒔𝟑
=
𝒔𝟔 + 𝟐. 𝟓 × 𝟏𝟎𝟓 𝒔𝟓 + 𝟑. 𝟏𝟓 × 𝟏𝟎𝟏𝟎 𝒔𝟒 + 𝟏. 𝟗𝟗 × 𝟏𝟎𝟏𝟓 𝒔𝟑 + 𝟏. 𝟐𝟓 × 𝟏𝟎𝟏𝟖 𝒔𝟐 + 𝟑. 𝟗 × 𝟏𝟎𝟐𝟎 𝒔 + 𝟔. 𝟏𝟓 × 𝟏𝟎𝟐𝟐
66
Digital Signal Processing (DSP)
𝟑
𝟐(𝟏 − 𝒛−𝟏)]
𝟏. 𝟗 × 𝟏𝟎𝟏𝟓 [
(𝟏 + 𝒛−𝟏 )
𝑯(𝒛) = 𝟔 𝟓 𝟒 𝟑
−𝟏
𝟐 (𝟏 − 𝒛 ) −𝟏
𝟐 (𝟏 − 𝒛 ) 𝟐 (𝟏 − 𝒛−𝟏) 𝟐 (𝟏 − 𝒛−𝟏)
[ ] + 𝟐. 𝟓 × 𝟏𝟎𝟓 [ ] + 𝟑. 𝟏𝟓 × 𝟏𝟎𝟏𝟎 [ ] + 𝟏. 𝟗𝟗 × 𝟏𝟎𝟏𝟓 [ ]
(𝟏 + 𝒛 −𝟏 ) (𝟏 + 𝒛 −𝟏 ) (𝟏 + 𝒛 −𝟏 ) −𝟏
(𝟏 + 𝒛 )
𝟐
+𝟏. 𝟐𝟓 × 𝟏𝟎𝟏𝟖
𝟐(𝟏−𝒛−𝟏) + 𝟑. 𝟗 × 𝟏𝟎 𝟐(𝟏−𝒛−𝟏) + 𝟔. 𝟏𝟓 × 𝟏𝟎
𝟐𝟎 𝟐𝟐
−𝟏 −𝟏
[ (𝟏+𝒛 )] [ (𝟏+𝒛 )]
Solution:-
The desired frequency response is shown on the right
𝒌𝟏 = −𝟐𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
The Backward equation then gives the Ω𝒓 for a normalized
Low pass prototype.
Ω𝒓 = Ω𝒖 /Ω′𝒓 =200/100=2
67
Digital Signal Processing (DSP)
Ω𝟐 = Ω𝒓 = 𝟐 , 𝒌𝟐 = −𝟐𝟎𝒅𝑩
We get
𝒍𝒐𝒈𝟏𝟎 [(𝟏𝟎𝟒/𝟏𝟎 − 𝟏)/(𝟏𝟎𝟐𝟎/𝟏𝟎 − 𝟏)]
𝒏=⌈ ⌉ = ⌈𝟑. 𝟕⌉ = 𝟒
𝟏
𝟐𝒍𝒐𝒈𝟏𝟎 ( )
𝟐
Ω𝟏 𝟏
Ω𝒄 = 𝟏 = 𝟏 = 𝟏. 𝟎𝟔𝟗
𝒌𝟏 𝟐𝒏 𝟐 𝟖
(𝟏𝟎−𝟏𝟎 − 𝟏) (𝟏𝟎𝟏𝟎 − 𝟏)
𝑯𝑳𝑷 (𝒔)
𝟏
= 𝒔 𝒔 𝒔 𝒔
((𝟏. 𝟎𝟔𝟗)𝟐 + 𝟎. 𝟕𝟔𝟓(𝟏. 𝟎𝟔𝟗) + 𝟏) ((𝟏. 𝟎𝟔𝟗)𝟐 + 𝟏. 𝟖𝟓(𝟏. 𝟎𝟔𝟗) + 𝟏)
68
Digital Signal Processing (DSP)
𝟏
𝑯𝑩𝑷 (𝒔) =
𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕
(( 𝒔 )𝟐 + 𝟎. 𝟕𝟔𝟓( 𝒔 ) + 𝟏) (( 𝒔 )𝟐 + 𝟏. 𝟖𝟓( 𝒔 ) + 𝟏)
Applying the bilinear transformation method(T=1) to satisfy
the given digital requirements:
𝑯(𝒛) = 𝑯𝑩𝑷 (𝒔)| 𝟐(𝟏−𝒛−𝟏)
𝒔→[ ]
(𝟏+𝒛−𝟏 )
𝑯(𝒛)
𝟏
=
𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕 𝟏𝟖𝟕
(( )𝟐 + 𝟎. 𝟕𝟔𝟓( ) + 𝟏) (( )𝟐 + 𝟏. 𝟖𝟓( ) + 𝟏)
𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 ) 𝟐(𝟏 − 𝒛−𝟏 )
[ ] [ ] [ ] [ ]
(𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 ) (𝟏 + 𝒛−𝟏 )
69
Digital Signal Processing (DSP)
even
odd
1
1
K1 =
1+ ε 2
K2
1 2
70
Digital Signal Processing (DSP)
𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩, ∈𝟐 = 𝟎. 𝟓𝟖𝟒𝟖𝟗
√𝟏 +∈𝟐
𝟏
𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩, 𝑨 = 𝟏𝟎
𝑨
𝑨𝟐 − 𝟏
𝒈= √ = 𝟏𝟑
∈𝟐
71
Digital Signal Processing (DSP)
𝒃𝟎
𝒌𝒏 𝟏 𝒇𝒐𝒓 𝒏 𝒆𝒗𝒆𝒏
𝑯𝒏 (𝒔) = , 𝒌𝒏 = {(𝟏 +∈𝟐 )𝟐
𝑽𝒏 (𝒔)
𝒃𝟎 𝒇𝒐𝒓 𝒏 𝒐𝒅𝒅
𝒃𝟎
𝑯𝟓 (𝒔) =
𝒔𝟓 + 𝒃𝟒 𝒔𝟒 + 𝒃𝟑 𝒔𝟑 +𝒃𝟐 𝒔𝟐 +𝒃𝟏 𝒔𝟏 + 𝒃𝟎
(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)
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
𝒉𝒂 (𝒕) = 𝑨𝒆−𝜶𝒕 𝒖(𝒕)
𝑨𝒛
𝑯(𝒛) = 𝒁[𝒉(𝒏)] = 𝒁[𝑨(𝒆−𝜶𝑻 )𝒏 𝒖(𝒏)] =
𝒛 − 𝒆−𝜶𝑻
74
Digital Signal Processing (DSP)
76
Digital Signal Processing (DSP)
𝑵−𝟏
(𝑵/𝟐)−𝟏 𝑵−𝟏
𝒋𝒘 ) −𝒋𝒘𝒏
𝑯(𝒆 = ∑ 𝒉(𝒏) 𝒆 + ∑ 𝒉(𝒏) 𝒆−𝒋𝒘𝒏
𝒏=𝟎 𝒏=𝑵/𝟐
𝑵−𝟏 𝟎
Combining yields
78
Digital Signal Processing (DSP)
𝑵 𝑵
( )−𝟏 ( )−𝟏
𝟐 𝟐
𝑵
( )−𝟏
𝟐
𝒋𝒘 )
[𝒆−𝒋𝒘𝒏 + 𝒆−𝒋𝒘(𝑵−𝟏−𝒏) ]
𝑯(𝒆 = ∑ 𝟐𝒉(𝒏)
𝟐
𝒏=𝟎
𝑵
( )−𝟏 𝑵−𝟏 𝑵−𝟏
𝟐
[𝒆−𝒋𝒘(𝒏− 𝟐
)
+ 𝒆−𝒋𝒘(𝒏−𝟐
)
]
𝑯(𝒆𝒋𝒘 ) = 𝒆−𝒋𝒘((𝑵−𝟏)/𝟐) ∑ 𝟐𝒉(𝒏)
𝟐
𝒏=𝟎
𝑵
( )−𝟏
𝟐
𝑵−𝟏
𝝋(𝒆𝒋𝒘 ) = −𝒘 ( ) → 𝑵 𝒆𝒗𝒆𝒏
𝟐
79
Digital Signal Processing (DSP)
𝒉𝒅 (𝒏) 𝑵𝟏 ≤ 𝒏 ≤ 𝑵𝟐
𝒉(𝒏) = {
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
DESIGN PROCEDURE:-
80
Digital Signal Processing (DSP)
𝒆𝒋𝝎∝ |𝝎| ≤ 𝝎𝒄
𝑯𝒅 (𝒆𝒋𝝎 ) = {
𝟎, |𝝎𝒄 | < |𝝎| < 𝜋
𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉𝒅 (𝒏) =
𝝅 (𝒏 − 𝜶 )
𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉(𝒏) = 𝒘(𝒏)
𝝅 (𝒏 − 𝜶 )
81
Digital Signal Processing (DSP)
𝟐𝒏
𝑵−𝟏
, 𝟎 ≤ 𝒏 ≤ (𝑵 − 𝟏)/𝟐
Bartlett: 𝒘𝑩 (𝒏) = {𝟐−𝟐𝒏 , (𝑵 − 𝟏)/𝟐 ≤ 𝒏 ≤ (𝑵 − 𝟏)
𝑵−𝟏
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆
𝟐𝝅𝒏
{𝟏−𝒄𝒐𝒔[ ]}
Hanning : 𝒘𝑯𝒂𝒏 (𝒏) = {
𝑵−𝟏
, 𝟎≤𝒏≤ 𝑵−𝟏
𝟐
𝟎 𝒆𝒍𝒔𝒆𝒘𝒉𝒆𝒓𝒆
𝟏
𝑵−𝟏 𝟐 𝑵−𝟏 𝟐 𝟐
𝑰𝒐 {𝒘𝒂 [( ) −(𝒏− ) ] }
𝟐 𝟐
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)
83
Digital Signal Processing (DSP)
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 :
Solution:-
The digital specifications obtained are as follows:
𝝎𝒄 = 𝝎𝟏 = 𝟎. 𝟑𝝅 𝒓𝒂𝒅
𝑵−𝟏
∝= = 𝟐𝟕
𝟐
Thus giving a trial impulse response for a window as
𝒔𝒊𝒏[𝝎𝒄 (𝒏−∝)]
𝒉(𝒏) = 𝒘(𝒏)
𝝅(𝒏 − 𝜶)
𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [𝑵−𝟏] 𝟎 ≤ 𝒏 ≤ 𝑵 − 𝟏
𝟐𝝅𝒏
For Hamming window 𝒘(𝒏) = 𝒘𝑯𝒂𝒎 =
𝑵−𝟏
𝒔𝒊𝒏 [𝝎𝒄 (𝒏 −𝟐
)] 𝟐𝝅𝒏
𝒉(𝒏) = {𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 [ ]}
𝑵−𝟏
𝝅 (𝒏 − 𝟐 ) 𝑵 −𝟏
Solution:-
𝒓𝒂𝒅 𝒓𝒂𝒅
Ω𝒖 = 𝟐𝟎𝟎 , Ω′𝒓 = 𝟏𝟎𝟎
𝒔𝒆𝒄 𝒔𝒆𝒄
𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩 𝒌𝟐 = −𝟐𝟎𝒅𝑩,
√𝟏 +∈𝟐
85
Digital Signal Processing (DSP)
𝟏
𝒌𝟏 = 𝟐𝟎𝒍𝒐𝒈 = −𝟐𝒅𝑩, ∈𝟐 = 𝟎. 𝟓𝟖𝟒𝟖𝟗
√𝟏 +∈𝟐
𝟏
𝒌𝟐 = 𝟐𝟎𝒍𝒐𝒈 ( ) = −𝟐𝟎𝒅𝑩, 𝑨 = 𝟏𝟎
𝑨
𝑨𝟐 − 𝟏
𝒈= √ = 𝟏𝟑
∈𝟐
𝒃𝟎
𝒌𝒏 𝟏 𝒇𝒐𝒓 𝒏 𝒆𝒗𝒆𝒏
𝑯𝒏 (𝒔) = , 𝒌𝒏 = {(𝟏 +∈𝟐 )𝟐
𝑽𝒏 (𝒔)
𝒃𝟎 𝒇𝒐𝒓 𝒏 𝒐𝒅𝒅
𝒃𝟎
𝑯𝟑 (𝒔) =
𝒔𝟑 + 𝒃 𝟐 𝒔𝟐 + 𝒃 𝟏 𝒔 + 𝒃 𝟎
86
Digital Signal Processing (DSP)
87