You are on page 1of 11

EE325 Digital Signal Processing Answer sheet (Tutorial 2)

Design an FIR linear phase, digital filter approximating the ideal frequency response 1, for || 6 for < || < H = 0, 6 3 1, for || 3 Determine the coefficients of a 25-tp filter based on window method with a) Rectangular window b) Hamming window

1.

Answer: =

1, 1 0

<| |<

<| |<

| |

1 3 6 6 6 3

However note that,

= 1 =

Where, =

0, 0, 1,

Taking the inverse Fourier transforms, = 1 2 = = Therefore, sin sin = = 1 2

<| |<

<| |<

| |

1 2

2 2

+ sample points,

To make the filter causal, introduce a shift of

We can use this to find the coefficients Use window function =

12 =

12

1 = 12 2 sin

= 25

of the FIR filter

12

sin

to truncate the impulse response,

a) For a rectangular window,

Therefore,

b) For Hamming window,

+ , for 0 25 12 = 0, otherwise 12 12 = 0.54 0.46 cos 12 sin 12 sin

1, for 0 25 0, otherwise

12

12

12

2.

H z can be obtained by use of the bilinear transformation. That is = 1+ 21

An ideal analog integrator is described by the system function H s = 1/s. A digital integrator with system function |

0, otherwise

0.54 0.46 cos

12

12

, for 0

25

a)

c)

b) Roughly sketch the magnitude |H j | and phase of the analog integrator. It is easily verified that the frequency response of the digital integrator is H = j 2 sin cos == j 2 2

Write the difference equation for the digital integrator relating the input x n to the output y n .

d) Compare the magnitude and phase characteristics obtained in part (b) and (c). How well does the digital integrator match the magnitude and phase characteristics of the analog integrator? e) place on the input signal sequence x n to avoid computational difficulties? The digital integrator has a pole at z=1. If you implement this filter on a digital computer, what restrictions might you

Roughly sketch |

| and

Answer: Answer: H z =H s | 1 H = =

= =

a) taking inverse Z-transform,

b) H s =

y =

1 = + 2

1+ + 2 1

1 +

Evaluating on

H = c) H H

|H | = 2

H =

, 0 2 , < 0 2 cot

1 ||

|H

= = |=

, 0 2 2 ,

cot

12 Magnitude |H(W)| 10 8 6 4 2 0 -30 -20

H(W) = 1/(j.W)
Magnitude |H(w)|

80 60 40 20 0

H(w) = -j.cot(w/2)

-10 0 10 Frequency (W) (rad/s)

20

30

-3

-2 -1 0 1 2 3 normalized digital angular frequency (w) (rad/samp)

2 Phase (rad) Phase (rad) -20 -10 0 10 Frequency (W) (rad/s) 20 30

-2 -30

-2 -3 -2 -1 0 1 2 3 normalized digital angular frequency (w) (rad/samp)

d) The digital integrator closely matches the characteristics of the analog integrator. The two e) the integrator has a pole at z=1. Evoluating the response on unit circle; z = there is a pole at =0 e =1= phase characteristics are identical

To avoid instability, the signal should not have a DC frequency component. I.e. The mean of the input signal should be zero.

3. a)

A z-plane pole-zero plot for a certain digital filter is shown in Figure 1. The filter has unity gain at dc. Determine the system function in the form H z =A 1+ 1+ 1+ 1+ + +

giving numerical values for the parameters A, , , ,

and

b) Draw block diagrams showing numerical values for path gins in the following forms: i) ii) Direct form II (canonic form) Cascade form (make each section canonic, with real coefficients)

|z|=1/2 = 1 3 + 2 2 = 1 2

3 zeros @ |z|=1 60 60 = = 1 3 2 2 1 2 = 1 2

Answer a) = 1 1 1+

To find frequency response, evaluate H(z) on the unit circle, z = =1= 1 = 3 64 1+ 1

a1=1, b1=2, b2=1, c1=- , d1=- , d2=

1+

1+

1+

1 cos 1 1+2

1+2

1+2

b) To draw in direct form II, (i) =


3 64

3 1+3 64 1
3 3 1

+3

1 1 2

1 8

(ii) Cascade form

3 1+ 64 1

1+2

1 2

1 2

1 2

2 1

4.

A digital low-pass filter is required to meet the following specifications: Pass band ripple: 1 dB pass band edge: 4 kHz Stop band attenuation 40 dB

stopband edge: 6 kHz Sample rate: 24 kHz

The filter is to be designed by performing a bilinear transformation on an analog system function. Determine what order Butterworth and Chebyshev analog designs must be used to meet the specifications in the digital implementation.

Answer

5.

Determine the system functions and the impulse responses of the systems shown in Figure 2.

Answer

1 2

= =2 =6

=6

+3

1 2

1 2

63 =

+2 1 8

+2 1+ 1 1+

1 2

+2+2 = 1 8

= 8 0.5

0.5

b)
5

-1/3

1 2

1+2 + 1

+2 1 2

1 1 2

= 3 = 5

=3 =

1 1 3

1+ 3 +

1+

1 3

= 5

h n = 5

+ 3

1 3

= 5 +

1+

+ +

3 1 1+2

1+

1 +

1 2

1+2

+ 2

1 2

You might also like