Вы находитесь на странице: 1из 6

1. Show that the squared magnitude response of a Butterworth filter is flat (slope = 0) at = 0.

Answer:

1 2 N 1 + 2 N H a ( j ) = = 2N 1 + ( / c ) c
2

d H a ( j ) d
At = 0 ,

2N = 1 + 2 N c
2

2 N 1 2N 2N c

d H a ( j ) d

=0

2. Complete the table below: Filter Characteristic in passband (monotone or equiripple?) Butterworth Type I Chebyshev Type II Chebyshev Elliptic Answer: Filter

Characteristic Contains zeros Contains poles in stopband (yes or no?) (yes or no?) (monotone or equiripple?)

Butterworth Type I Chebyshev Type II Chebyshev Elliptic

Characteristic in passband (monotone or equiripple?) Monotone Equiripple Monotone Equiripple

Characteristic in stopband (monotone or equiripple?) Monotone Monotone Equiripple Equiripple

Contains zeros Contains poles (yes or no?) (yes or no?)

No No Yes Yes

Yes Yes Yes Yes

3. Calculate the order of the Butterworth, Chebyshev and elliptic filters that are necessary to meet the below specifications based on impulse invariance transformation at Ts = 0.001. Passband region: p = 0.1 and p = 0.1 Stopband region: s = 0.5 and s = 0.001

Compiled by AH Tan, November 2012

Answer:

Note that the relationship between and can be inferred from the sampling. We know that h[n] = Ts ha (nTs ) . The time scale of the analog impulse response (in seconds) is stretched in the digital domain (because the dimension of time is now in samples). For example, a time of 0.001s is mapped to n = 1 if Ts = 0.001s. (You can also look at slide 33 to get a better idea observe the scaling on the horizontal axis.) Since frequency is the reciprocal of time, a similar stretching effect is seen when converting from the digital frequency to the analog frequency. Based on the equation for sampling, the scaling factor is again Ts. 4. Design a digital Butterworth filter that satisfies the following constraint using bilinear transformation. Assume a sampling interval of Ts = 1s.

0.9 H (e jw ) 1
H (e jw ) 0.2

0 /2

3 / 4

Answer: p = 0.1, s = 0.2, p = / 2, s = 3 / 4

p = 2 tan k=

= 2 , s = 2 tan

3 = 4.828 8

2 = 0.4142 , d = 4.828

(0.9)2 1 = 0.09886 (0.2) 2 1

Compiled by AH Tan, November 2012

log 0.09886 = 2.625 log 0.4142 N =3 N 2 0 . 9 2 1

1 / 2 ( 3 )

c 4.828 0.2 2 1

1 / 2 ( 3 )

2.5467 c 2.8427 Choose c = 2.5467 (can also choose other values within this range)
H a ' ( s) = 1 s + 2s + 2s + 1
3 2

H a (s) =

1 s s s + 2 + 2 +1 2.5467 2.5467 2.5467


3 2

16.52 s + 5.09 s + 12.97 s + 16.52


3 2

H ( z ) = H a ( s) H ( z) =

s=

2 ( z 1) Ts ( z + 1)

0.2332(1 + z 1 ) 3 1 + 0.4394 z 1 + 0.3845 z 2 + 0.0416 z 3

5. Digital filters can be designed directly in MATLAB using the functions butter, cheby1, cheby2 and ellip. These functions pre-warp and compute the poles and zeros of the appropriate analog filter. They then use the bilinear transform to map these to the z-plane. Order estimation functions buttord, cheb1ord, cheb2ord and ellipord calculate the minimum order of a digital or analog filter required to meet a set of filter design specifications. Design a digital Butterworth filter directly using MATLAB. Plot the magnitude response. The specifications are p = 0.4 , s = 0.6 , p = 0.1 and s = 0.1 . Repeat for Type I Chebyshev, Type II Chebyshev and elliptic filters. Compare the order of filter required to meet the specifications. Answer: Wp = 0.4; Ws = 0.6; dp = 0.1; ds = 0.1; Rp = -20*log10(1-dp); Rs = -20*log10(ds); [n,Wn] = buttord(Wp,Ws,Rp,Rs) [b,a] = butter(n,Wn) [H,w]=freqz(b,a); plot(w/pi,20*log10(abs(H)),'linewidth',2) grid axis([0 1 -100 10]) title('Frequency Response') ylabel('Magnitude (dB)')
Compiled by AH Tan, November 2012

xlabel('Frequency (pi rad/s)')


Frequency Response 10 0 -10 -20 Magnitude (dB) -30 -40 -50 -60 -70 -80 -90 -100 0 0.1 0.2 0.3 0.4 0.5 0.6 Frequency (pi rad/s) 0.7 0.8 0.9 1

For Type I Chebyshev, only two lines of the above codes need to be changed as follows: [n,Wn] = cheb1ord(Wp,Ws,Rp,Rs); [b,a] = cheby1(n,Rp,Wn);
Frequency Response 10 0 -10 -20 Magnitude (dB) -30 -40 -50 -60 -70 -80 -90 -100 0 0.1 0.2 0.3 0.4 0.5 0.6 Frequency (pi rad/s) 0.7 0.8 0.9 1

Try to change the codes yourself for Type II Chebyshev and elliptic filters. The magnitude response of Type II Chebyshev filter is given below.

Compiled by AH Tan, November 2012

Frequency Response 10 0 -10 -20 Magnitude (dB) -30 -40 -50 -60 -70 -80 -90 -100 0 0.1 0.2 0.3 0.4 0.5 0.6 Frequency (pi rad/s) 0.7 0.8 0.9 1

The magnitude response of elliptic filter is given below.


Frequency Response 10 0 -10 -20 Magnitude (dB) -30 -40 -50 -60 -70 -80 -90 -100 0 0.1 0.2 0.3 0.4 0.5 0.6 Frequency (pi rad/s) 0.7 0.8 0.9 1

Order of filters: Butterworth 5, Type I Chebyshev 3, Type II Chebyshev 3, elliptic 3. 6. A discrete-time filter with system function H(z) is designed by transforming a continuoustime filter with system function Hc(s). It is desired that H (e j ) = H c ( j ) = 0
= 0

Could this condition hold for a filter designed by impulse invariance? If so, what condition(s) would Hc(j) have to satisfy?

Compiled by AH Tan, November 2012

Answer: We have H (e j ) =

H
k =

2k j + T Ts s

(Note that the term at the RHS is written as in slide 41 of your notes to clearly indicate that the RHS is in the analog domain. To be strictly precise, it should be written as despite the RHS being in the analog domain, because it is the same frequency that is being considered on both sides of the equation.) We desire

H (e j )
Hence
H (e j )
=0

= 0

= H c ( j ) = 0

H
k =

2k j + = H c ( j ) = 0 T Ts s =0
c

H
k = k 0

2k j T =0 s

7. A discrete-time filter with system function H(z) is designed by transforming a continuoustime filter with system function Hc(s). It is desired that H (e j ) = H c ( j ) = 0
= 0

Could this condition hold for a filter designed by bilinear transformation? If so, what condition(s) would Hc(j) have to satisfy? Answer: Since = 2 tan 1 (Ts / 2 ) , the bilinear transformation maps = 0 to = 0. The condition will hold for any choice of Hc(j).

Compiled by AH Tan, November 2012

Вам также может понравиться