384 CHAPTER 9 • z-TRANSFORMS AND APPLICATIONS
- EXAMPLE 9.23
(a) The filter y(n] = x [n] + x[n - 2] is designed to zero out cosGn) and
sin(~n).
(b) The moving average filter y [n] = !(x(n] + x[n- 1] +x[n-2] +x[n-3])
is designed to zero out cos(mr), cos(In), and sin(~n).
Solution
(a) Use the conjugate pair of zeros elf and e -~· and calculate
(
z -e't) (z -e=f') 1
z z =z2(z- i)(z+i)
1
= 2 (1 + z^2 ) = 1 +oz-^1 +z-^2.
z
The transfer function has the form H(z) = bp±b^1 •- 1 '+baz-•, and we
see that bo = 1, bi = 0 , and bz = 1. The desired filter is
y[n] = box[n] +bi x(n - l] + bzx(n - 2] = x(n] + x(n - 2].
(b) For this part we introduce the additional zero ei" and calculate
( z -
2
elf) (z-;=¥) (z-;-i") = :
3
(z- i)(z+i)(z+l)
1 1
= 23 (z^2 +l)(z+l) = 23 (z^3 + z^2 +z+l)
= 1 + z-^1 + z-^2 + z-^3.
The transfer function has the form H (z) - bo±biz- •+b,z-^2 +baz- • and
- 1 '
we see that bo = b 1 = bz = b3 = 1. Hence, a filter for zeroing out
cos(mr), cosGn), and sin( In) has the form
y[n] = box(n] + b 1 x[n - 1] + b 2 x[n - 2] + bsx[n - 3],
or
y{n] = x[n] + x [n - 1] + x[n -2) + x[n - 3].
If we multiply terms on the right-hand side by! , we get the moving
average filter.
1
y(n) = 4(x[nJ + x[n - l ] + x(n - 2] + x[n - 3]),
and this filter will zero out the same frequencies.