Professional Documents
Culture Documents
j
A digital filter, H ( e ) , with infinite impulse response (IIR), can be
6-1
h[ n] = Td hc ( nTd )
H (e
)=
2 k
H
j
+
j
c T
Td
k =
d
The picture below illustrates the design procedure. We first specify the
digital filter as shown in the first diagram. Then we map the digital
6-2
H ( e j )
1
1 1
2
H c ( j )
1
1 1
2
p
Td
s
Td
Td
Ak
k =1 s s k
H c (s ) =
This implies
N Ak e s t
hc (t ) = k =1
0
t 0
t <0,
h[ n] = Td hc (nTd )
N
= Td Ak e sk nTd u [n ]
k =1
= AkTd ( e sk Td ) u[n ]
N
k =1
and
H ( z) =
h[ n] z
n =
= AkTd ( esk Td ) z n
N
n = 0 k =1
N
k =1
n =0
= AkTd ( z 1esk Td )
AkTd
1 sk Td
k =1 1 z e
6-4
pk = e sk Td
= e k Td e jk Td
in the z-plane. If all the sk s
k < 0, k = 1,2,..., N , then all the pk s are within the unit-circle in the zplane (i.e. pk < 1 ). This means that a stable analog filter always yields a
z e sTd
in general.
Example: Design a digital low pass IIR filter with the following
specificiations:
0.89125 H ( e j ) 1,
0 0.2
H ( e j ) 0.17783,
0.3
6-5
Solution
- with Td = 1 , this means = , and H c ( j) = H ( e j ) . Consequently, the
specifications of the analog prototype filter are
0.89125 H c ( j ) 1,
0 0.2
Hc ( j ) 0.17783,
0.3
Notice that we did not specify an upperlimit for the stopband frequency.
H c ( j ) =
1+
( )
2N
6-6
- The 3-dB frequency and the filter order N are solutions of the two
simultaneous equations:
0.2
1+
2N
1
=
.89125
0.3
1+
2N
1
=
.17783
- The next step is to find the poles of the Butterworth filter. Note that
H c ( s) H c( s) =
1 + js c
2N
has 2N poles whose locations in the s-plane are depicted in the diagram
below.
6-7
k = 1,2,...,2N
Half of these poles are the poles of the Butterworth filter. Specifically
we choose those rk s on the left-half s-plane to be the poles of H c ( s) .
Consequently the poles of H c ( s) are
0.182 0.679 j
0.497 0.497 j
0.679 0.182 j
The poles of the corresponding digital filter are
0.649 0.524 j
0.535 0.290 j
0.499 0.092 j
- The transfer function of the Butterworth filter is
6
H c ( s) =
k =1
s
1 s
6c
6
( s s )
k
k =1
0.12093
( s 2 + 0.3640s + 0.4945 )( s 2 + 0.9945s + 0.4945 )( s 2 + 1.3585 s + 0.4945 )
6
Ak
k =1 s sk
6-8
Td = 1 )
Ak
1 sk
k =1 1 z e
H ( z) =
0.2871 0.4466 z 1
2.1428 + 1.1455 z 1
=
+
1 1.2971z 1 + 0.6949z 2 1 1.0691z 1 + 0.3699 z 2
1.8557 0.6303 z 1
+
1 0.9972 z 1 + 0.2570 z 2
6-9
- If Matlab is used to design the above prototype analog filter, first set
Wp=0.2 = 0.62832
Ws=0.3 = 0.94248
Rp=20log10 (0.89125) = 1
Rs=20log10(0.17783) = 15
[N,Wn]=buttord(Wp,Ws,Rp,Rs,'s')
Matlab with return the filter order in N and its 3db frequency c in the
variable Wn. The results I got is N=6, Wp=0.70866. The latter result is
slightly different from c = 0.7032 .
[Z,P,K]=butter(N,Wn,'s')
where the array Z contains the zeros, the array P contains all the poles,
and the variable K is the gain. The poles I obtained for this example are
-6.8451e-001 +1.8341e-001i
-6.8451e-001 -1.8341e-001i
-5.0109e-001 +5.0109e-001i
-5.0109e-001 -5.0109e-001i
-1.8341e-001 +6.8451e-001i
-1.8341e-001 -6.8451e-001i
6-10
1
1 + 2VN2
( ),
VN ( x ) = cos N cos1 x
VN +1 ( x) = 2xVN ( x ) VN 1 ( x)
- It is observed that when x is between 0 and unity, VN ( x) varies between
0 and unity. However, when x is greater than 1, cos 1 x is imaginary
and so VN ( x) behaves like a hyperbolic cosine and consequently
increases monotonically for x greater than unity. Consequently, the
magnitude response of a Chebyshev filter looks like the following
(correction: replace 1 by 1/ 1 + 2 )
6-11
1
, or
1+ 2
= 0.50885 .
N = 3, H c(0.3 ) = 0.04551
2
N = 4, H c (0.3 ) = 0.00694
2
- The poles of the Chebyshev filter lie on an ellipse in the s-plane with
minor axis a c and major axis b c , where
a=
1 1/ N
1/ N ) = 0.3646 ,
(
2
b=
1 1/ N
+ 1/ N ) = 1.0644 ,
(
2
and
= 1 + 1 + 2 = 4.1702 .
The equation of this ellipse is given by
2
2
+ 2 2 =1
2 2
a c b c
6-12
It should be emphasized that only poles on the left-half plane are used in
the transfer function of the filter.
6-13
- Once all the 4 poles, s1 , s2 , s3 , s4 , are found, the transfer function of the
Chebyshev filter can be written as (please verify)
4
H c (s) =
1
1+ 2
k =1
(s s )
k
(s
0.038286
2
)(
k =1
The magnitude and phase of this transfer function are shown below
6-14
[N,Wn]=cheb1ord(Wp,Ws,Rp,Rs,'s')
Finally complete the filter design by issuing the command
[Z,P,K]=cheby1(N,-Rp,Wn,s)
The zeros of the filter will be returned in the array Z, the poles stored in
P, and the gain stored in K. What I found for the poles were
-2.1166e-001 +2.5593e-001i
-2.1166e-001 -2.5593e-001i
-8.7673e-002 +6.1788e-001i
-8.7673e-002 -6.1788e-001I
and the gain was K=0.038286. There are no zeros. These results agree
with those obtained through analysis.
0.08327 + 0.0239 z 1
0.08327 0.0246 z 1
H ( z) =
+
1 1.5658 z 1 + 0.6549 z 2 1 1.4934 z 1 + 0.8392 z 2
- It is interesting to point out the Chebyshev filter has a lower order than
the Butterworth filter in the last example.
6-15
Let H c (s ) be the transfer function of the protype analog filter. The transfer
function H ( z ) of the digital filter is obtained by substituting
2 1 z 1
s=
Td 1 + z 1
into the expression of H c (s ) . In other word
2 1 z 1
H ( z) = H c
1
T
1
+
z
d
6-16
(1+ z ) sT
1
= 2 (1 z 1 ) , or
sTd + z 1 sTd = 2 2 z 1 , or
( 2 + sTd ) z 1 = 2 sTd ,
z=
or
2 + sTd
, or
2 sTd
1 + sT2d
=
1 sT2d
1+ ) + j
(
z=
(1 ) j
(1 + ) + ( ) exp { j arctan ( ) (1 + )}
=
(1 ) + ( ) exp{ j arctan ( ) (1 )}
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
Td
2
= z exp { j }
where
z =
(
) ( )
(1 ) + ( )
1 + T2d
Td
2
Td
2
Td
2
and
6-17
( ) ( 1+ ) + arctan ( ) (1 )
= arctan
Td
2
Td
2
Td
2
Td
2
Observations:
1. When < 0 , z < 1 . So left-plane poles of H c (s ) will be mapped into
poles within the unit circle in the z-plane. In other word, a stable
prototype analog filter will lead to a stable digital filter.
2. When = 0 , z = 1 . In other word, z lies on the unit circle and can be
written as
z = e j (when =0)
where
T
= 2arctan d
2
represents the digital frequency. Alternatively, we can express the
analaog frequency in terms of the digital frequency as
2
tan
Td
2
These results indicate that the entire left-half s-plane is mapped into a
disc of radius 1 in the z-plane.
6-18
Example: Design a digital low pass filter with the following specifications
0.89125 H ( e j ) 1,
0 0.2
H ( e j ) 0.17783,
0.3
Solution:
For simplicity, set Td = 1 . So = 2tan ( / 2) . This means the digital
passband and stopband frequencies,
6-19
p = 0.2 ,
s = 0.3
0 0.64984
1.0191
N=6
Wn=0.76627 c
To complete the design of the protoype Butterworth filter, we next issue the
Matlab command [Z,P,K]=butter(N,Wn,s). The zeros of H c ( s ) will then
be returned in the array Z, the poles in the array P, and the filter gain (same
N
as c ) in the variable K. It was found that there are no zeros, the poles are
6-20
-7.4016e-001 +1.9832e-001i
-7.4016e-001 -1.9832e-001i
-5.4183e-001 +5.4183e-001i
-5.4183e-001 -5.4183e-001i
-1.9832e-001 +7.4016e-001i
-1.9832e-001 -7.4016e-001I
and the gain is 0.20243. Denoting the poles as s1 , s2 ,..., s6 , the transfer
function of the Butterworth filter is
H c (s ) =
=
6
k =1
(s sk )
0.20243
( s + 0.39665s + 0.58716 )( s + 1.0837s + 0.58716 )( s 2 + 1.4803s + 0.58716)
2
This result is very close to that in Example 7.3 of the Text. Compared to
the result obtained under the impulse invariant method, we observe a
noticeable difference in H c ( s) .
Finally, the last step in the design exercise is to map the above transfer
function into a digital filter using Bilinear transformation, i.e.
1 z 1
H (z ) = H c 2
1
1+ z
This can be done by using the Matlab command
[Zd,Pd,Kd]=bilinear(Z,P,K,1)
where Z, P, and K are same as before, 1 corresponds to the sampling
frequency 1/ Td , Zd is an array containing the zeros of H ( z ) , Pd is the array
6-21
H ( z ) = Kd
(1 p z )
6
k =1
6
k =1
(1 1.2686 z
0.00073798 1 + z 1
1
)(
(1 0.90433 z
1
1
+ 0.21550z 2
The result is once again close to that in Example 7-3 of the text.
6-22
The impulse invariant method will not be suitable for the highpass and
bandstop filters because of heavy aliasing.
6-23
The tranfer function of the digital prototype low pass filter is denoted by
H lp ( p ) where p plays the same role as z , the conventional z -transform
variable.
The transfer function of the desired frequency selective filter is denoted by
H (z) .
We want to find a relationship between p and z, denoted by
( )
p 1 = G z 1
such that
H ( z ) = H lp ( p )
( )
p 1 = G z 1
6-24
3. The unit circle in the p-plane is mapped into the unit circle in the zplane. So if and are the frequency variables in the p-plane and the
z-plane, then
e j = G e j
Consequently
G ( e j ) = 1
and
= R G e j .
The most general form of the function G ( z 1 ) that satisfies all the above
requirements is:
z 1 k
p = G ( z ) =
;
1
k =1 1 k z
1
k < 1
z 1
p =
1 z 1
1
e j
=
1 e j
6-25
or
e
e j +
=
1 + e j
e j + )(1 + e j )
(
=
(1 + e j )(1 + e j )
=
or
2
2 + (1 + ) cos
sin ( p p ) / 2
sin ( p + p ) / 2
Transformations from LP to LP, HP, BP, and BS filters are shown below:
6-27
(a) low pass, (b) high pass, (c) bandpass, (d) bandstop.
6-28
0.001836(1 + p 1 )4
H lp ( p) =
(1 1.5548 p 1 + 0.6493 p 2 )(1 1.4996 p 1 + 0.8482 p 2 )
satisfies
0.89125 H ( e j ) 1,
0 0.2
H ( e j ) 0.17783,
0.3
Determine the corresponding high pass filter that satisfies the requirements
0.89125 H ( e j ) 1;
0.6
Solution:
The passband frequency of the high pass filter is p = 0.6 and the
passband frequency of the digital prototype filter is p = 0.2 . So according
to the design formula,
(
=
cos (
cos
p + p
2
p p
2
) = 0.38197
)
This means
z 1 + z 1 + 0.38197
p =
=
1 + z 1 1 0.38197 z 1
1
Consequently,
6-29
H ( z ) = H lp ( p )
=
)(
p 1 = z 1 + 0.38197 / 1 0.38197 z1
(1 1.0416z
0.02426 (1 z 1 )
It should be pointed out that in actual design, the stopband frequency of the
digital prototype filter will be determined by the stopband frequency of the
high pass (or desired) filter. We assume in this example that the stop band
frequency of the high pass filter is mapped into s = 0.3 based on
= 0.38197.
B (z )
,
A (z )
A( z ) = 1 ak z k
k =1
and
M
B( z ) = bk z k ,
k=0
then
M
H ( z) =
b z
k =0
N
1 ak z k
k =1
This means in the time domain, the input x [ n] and the output y[ n] of the
filter satisfies
N
y[n ] ak y [n k ] =
k =1
b x[ n k ] ,
k =0
6-31
6-32
(1 f z ) (1 g
M1
H (z ) = C
M2
k =1
N1
k =1
N2
k =1
k =1
z 1 )(1 g*k z 1 )
(1 ck z 1 ) (1 d k z 1 )(1 d*k z 1 )
where C is a constant, the f k s are the real zeros of the transfer function,
the g k s are the complex zeros (which always exist in conjugate pairs), the
ck s are the real poles, and the d k s are the complex poles (which always
exist in conjugate pairs).
(1 g z )(1 g
1
*
k
z 1 ) and
(1 d z )(1 d z )
1
* 1
k
are 2nd
6-33
b0 k + b1k z 1 + b2 k z 2
H (z) =
1
2
k =1 1 + a1k z + a2 k z
Ns
Ns
= H k ( z),
k =1
where
b0 k + b1k z 1 + b2 k z 2
H k ( z) =
1 + a1k z 1 + a 2k z 2
and
N s = K + N2 .
This expression for the transfer function enables us to visualize the IIR
filter as the serial concatentation of N s subsystems. Subsequently it leads
to the Cascade implementation structure; see for example the case of
N s = 3 below.
Exercise: Draw the Cascade form of the high pass filter in Section 6-3.
6-34
With the Cascade form implementation, the locations of the poles and zeros
will not change dramatically when the aij s and the bij s are quantized (as
in fixed point implementation). This is in contrast to the Direct form
implementation where the poles and zeros can change substantially because
of quantization. This issue will be discussed in details in Chapter 7 of the
lecture notes.
e0k + e1k z 1
H ( z) =
1
a2k z 2
k =1 1 a1k z
Ns
Ns
= Gk ( s),
k =1
where
e0 k + e1k z 1
Gk (s ) =
1 a1k z 1 a2 k z 2
and all the polynomial coefficients are real.
The transfer function suggests that the IIR filter can be viewed as a large
system comprising of N s parallel subsystems. The input to all the
subsystems is x[n ] and the output of the IIR filter, y[ n] , is the sum of the
yk [ n] s , the individual outputs of the subsystems.
The figure below shows this parallel form of the IIR filter.
6-35
The parallel form offers robustness against quantization error for the poles.
The zeros, however, will be affected by the shifting of the poles in the
individual subsystems.
6-36