elec3104 digital signal processing tutorial questions workbook · elec3104 digital signal...

60
ELEC3104 Digital Signal Processing Tutorial Questions Workbook Tutorial Questions Chapter 1: Signals and Systems Chapter 2: Digital Signal Processing Fundamentals Chapter 3: Discrete-Time Systems Chapter 4: Introduction to z-Transform Chapter 5: Introduction to Digital Filters Chapter 6: Discrete Time Fourier Transform Chapter 7: Analogue Filter Design Chapter 8: Digital Filter Design Chapter 9: Multirate Digital Signal Processing Note: You should do all your tutorial questions in advance of attending the tutorial classes. The tutorial questions workbook comprises worked solutions for some questions. There are other questions, where solutions have been omitted on purpose – this has been done to further encourage you to try and do the questions yourself. Answers for these questions will not be posted on the web, but will be discussed during the tutorial class. In addition, during the tutorial, 1-2 new questions that are not in your notes will be provided by the tutor, for you to try in class. These questions and solutions will not be available on the web also, so it is worthwhile for you to attend your tutorials to gain maximum benefit from this course. Session 1 2012

Upload: voanh

Post on 26-Jul-2018

299 views

Category:

Documents


17 download

TRANSCRIPT

ELEC3104 Digital Signal Processing

Tutorial Questions Workbook

Tutorial Questions Chapter 1: Signals and Systems Chapter 2: Digital Signal Processing Fundamentals Chapter 3: Discrete-Time Systems Chapter 4: Introduction to z-Transform Chapter 5: Introduction to Digital Filters Chapter 6: Discrete Time Fourier Transform Chapter 7: Analogue Filter Design Chapter 8: Digital Filter Design Chapter 9: Multirate Digital Signal Processing

Note: You should do all your tutorial questions in advance of attending the tutorial classes. The tutorial questions workbook comprises worked solutions for some questions. There are other questions, where solutions have been omitted on purpose – this has been done to further encourage you to try and do the questions yourself. Answers for these questions will not be posted on the web, but will be discussed during the tutorial class. In addition, during the tutorial, 1-2 new questions that are not in your notes will be provided by the tutor, for you to try in class. These questions and solutions will not be available on the web also, so it is worthwhile for you to attend your tutorials to gain maximum benefit from this course.

Session 1 2012

Workbook Solutions Chapter 1

1

Workbook Solutions Chapter 1

Workbook Solutions Chapter 1

2

Q1.A discrete – time signal x[n] is defined by

Using u[n], describe x[n] as the superposition of two step functions.

)10n(u)n(u)n(x !

Q2.Sketch the following:

a) x(t) = u(t-3) – u(t-5)

"#

"$% &&

!otherwise

n

nx

0

901

)(

x(n)

u(n)

1

u(n-10)

n 0 1 2 3 4 5 6 7 8 9 10

#$% &&

!otherwise

nnx

0

901][

3 5

u(t-3)

u(t-5)

t

1

3 5 t

1

x(t)

Workbook Solutions Chapter 1

3

b) y[n] = u[n+3] – u[n-10]

c) x(t) = e2t

u(-t)

u(t+3)

u(t-10)

n

1

-3

1

10

n -3 10

y(n)

9

……….......

e2t

u(-t)

1

t

e2t

x(t)

1

t

Workbook Solutions Chapter 1

4

d) y[n] = u[-n]

e) x[n] = '[n] + 2'[n-1] -'[n-3]

f) h[n] = 2'[n+1] + 2'[n-1]

2

-1 1 n

h(n)

2

1 2

1

2

-1

n

3

1

y(n) u(-n)

n

………..

Workbook Solutions Chapter 1

5

g) h[n] = u[n], p[n] = h[-n]; q[n] = h[-1-n], r[n] = h[1-n]

)n(u)n(h !

)n(h)n(p !

))n1((h)n(q ( !

))1n((h)n(r !

1

h(n)

n

1

p(n)

n

1

h(n+1)

n -1

1

h(-(n+1))

n -1

1

h(n-1)

1

r(n)

n 1 1

Workbook Solutions Chapter 1

6

h) x[n] = )n, )<1

P[n} = )n u[n], q[n] = )n

u[-n]

n)n(x )!

)n(u)n(p

n)!

)n(u)n(q

n !)

x(n)

n

1

n

)n u(-n)

n

)n(un)

u(n)

q(n)

n

)n(un )

Workbook Solutions Chapter 1

7

i) x(t) = e-3t

[u(t) – u(t-2)]

2

1

u(t)

u(t-2)

t

2

1

u(t)- u(t-2)

t

2

t3e

[u(t)-u(t-2)]

t

1

x(t)

Workbook Solutions Chapter 1

8

Q3.a) Consider a discrete-time sequence

Determine the fundamental period of x[n]. Ans: 16 samples

* (Digital frequency) = +/8

samples

kN

16

8

2

2

!

!

!

++*+

b)

i) Consider the sinusoidal signal

x(t) = 10 sin(,t) ,=2+fa

fa -analogue frequency and t- time,

fs -sampling frequency

Write an equation for the discrete time signal x[n]. Ans: x[n]=10sin(n )

- .tf

ttx

a+,2sin10

)sin(10)(

!

! fa=Analogue frequency.

nTt ! fs=1/T

//0

1223

4! n

f

fnx

s

a+2sin10)(

)sin(10)( *nnx !

Where

s

a

f

f+* 2!

ii) If fa = 200 Hz and fs = 8000 Hz, determine the fundamental period of x[n].

kf

fN

a

s!

56

789

: (!58

cos][++

nnx

The fundamental period

k =1

CL

AS

S N

OT

ES

Workbook Solutions Chapter 2

1

Workbook Solutions Chapter 2

Workbook Solutions Chapter 2

2

Q1) For a linear 16 bit A/D converter with an input signal range of ±4V, what is the

minimum quantisation error?

△ ! = 8 2" × 6

2

Q2) A sampled signal that varies between -2V and 2V is quantised using B bits.

What value of B will ensure that the quantisation noise power is less than 25 × 10#$? Ans: 8 bits

Δ(&')*+,-.*/) = 427

9:; = 25 × 10#$ = Δ;12 (>'' +'?-,&' /*-'))

∴ Δ; = 12 × 25 × 10#$ 16

2;7 = 3 × 10#B

2;7 = 16 × 10B3

2C = ln 16 × 10B3ln 2

C = 7.88

Number of bits = 8

Workbook Solutions Chapter 2

3

Q3) A sinusoidal signal with peak-to-peak amplitude of 5V is sampled at 50kHz

with uniform quantisation. Find the minimum number of bits for the analogue

to digital converter to achieve a SQNR of at least 92dB. State any assumptions

made.

6.02C + 1.76 ≥ 92

Q4) Show that the signal to quantisation noise ratio (SQNR) of a linear B-bit

analogue-to-digital converter is given by

>IJ! = 6.02C + 4.77 − 20 log L AσOPQR

where the input range of the A/D converter is ±A and the rms value of the input

signal is ����. Determine the SQNR if B is 16 bits and the input is

a) A sine wave

b) A signal with an rms value of !

10"#$ ��%

�&%

a)

'()* = 6.02 × 16 + 4.77 − 20"#$ --

√23

b)

'()* = 6.02 × 16 + 4.77 − 20"#$ -- × 5

Workbook Solutions Chapter 2

4

Q5) Show that the input signal x(t) to quantisation noise ratio of a linear A/D

converter is given by

'()* = 10 log 8� + 10.8 + 20 log : − 20 log *

where 8� is the signal power ;8� = <> ∑ @%[A]>B<

CDE F; : is the number of

quantisation levels and * is the dynamic range of the input signal. Using the

above equation, show that for a B-bit quantiser, '()* = 6.02H + 1.76 (JH) if

@(L) = - cos(2MNL)

'()* = 10"#$ 8��&%

CL

AS

S N

OT

ES

Workbook Solutions Chapter 3 1

Workbook Solutions Chapter 3

Workbook Solutions Chapter 3 2

Q1) Draw the block diagrams of the following system in both Direct form I and

Direct Form II. ! ! ! ! ! !142

715.0

""#

$""#

nwnwny

nxnwnw

(Note: x[n] is the input and y[n] is the output)

)1n(w4)n(w2)n(y

)n(x7)1n(w5.0)n(w

""#

$""#

input

output

T T

+ + y(n)

2x(n)

7w(n)

-4 -0.5

y(n) x(n) 7

-0.5

T

+

2

-4

T

+

Direct Form II

Direct Form I

Workbook Solutions Chapter 3 3

Q2) Consider the cascade of the following two systems S1 and S2 as depicted

below:

System 1: ! ! !nxnpnp $"# 121

System 2: ! ! !npnyny %& $"# 1

The difference equation relating x[n] of y[n] is:

! ! ! !2181

43 """$# nynynxny

Determine & and %. Ans: &=1/4 and %=1

)()1()( np ny!ny $"# ----(1) )()1(2

1)( nxnpnp $"# ----(2)

)1(2

)2(2

)1(2

1

)1()2()1(

"$"#"

"$"#"

np

ny!

ny

np ny!ny

(1)-(3)

! "#)1(

2)()2(

2)1()1(

2

1)( ""$"""#"" np

np ny

!ny!nyny

)()2(2

)1()2

1()( nx ny

!ny!ny $"""$#' ----(4)

( ) )n(x)2n(y8

1)1n(y

4

3ny $"""# -----(5)

(4) & (5) are identical

4

1

4

3

2

1#*#+

,

-./

0$' && 1#

System 1 System 2

p[n]x[n] y[n]

---(3)

1nn "1

)(nx%2 from ( 2)

System

1

System

2x(n) p(n) y(n)

Workbook Solutions Chapter 3 4

Q3) For the block diagram realisation given below, develop the relation between y[n]

and x[n].

a)

)1n(ap)n(x)n(p "$# ---(1)

)1n(cp)n(bp)n(y "$# ---(2)

From (1)

)1n(ap)n(p)n(x ""# ---(3)

From (2) & 1nn "1

)2n(acp)1n(abp)1n(ay

)2n(cp)1n(bp)1n(y

"$"#"

"$"#"

Combining (2)&(4)

! "# ! "#)]2n(ap)1n(p[c)]1n(ap)n(p[b)1n(ay)n(y "$"$""#""

)1n(cx)n(bx)1n(ay)n(y "$#""

+

+

T

p[n]x[n]

y[n]

c

b

a

----(4)

From (3)

a

p(n-1)

x(n) +

y(n)

T

+

b

c

p(n)

Workbook Solutions Chapter 3 5

b)

)()()(

)3()()(

)2()1()(

nq np!ny

nxnxnp

nxnxnq

$#

"$#

"$"#

3 4 3 4&% )3()()2()1()( "$$"$"# nxnxnxnxny

T

+

T

+

T+

&

q[n]

%

p[n]

x[n]

y[n]

+

&

x(n)

+p(n)

T

T+

T

q(n)

%

y(n)

)3()2()1()()( "$"$"$#' nxnxnxnxny &%%&

Workbook Solutions Chapter 3 6

Q4) Draw a system implementation for each of the following difference equations:

a) ! ! ! ! !533412 "$#"""$ nxnxnynyny

)3n(y2)1n(y2

1)5n(x

2

3)n(x

2

1)n(y

)5n(x3)n(x)3n(y4)1n(y)n(y2

"""""$#

"$#"""$

b) ! ! !Nnxnxny ""#

y(n)

x(n-1)

-1/2

+x(n)

T

+

T

x(n-5)

T

T

T3/2

1/2

-2

y(n) x(n)

T

+

T-1

x(n-N)

Workbook Solutions Chapter 3 7

c) ! ! ! ! ! !2121 21210 """""$"$# nybnybnxanxanxany

d) ! ! !1""# nxnxny

e) ! ! !1"$# nxnxny

a0

y(n) x(n)

T

+

T

T

+

T

a1

x(n-1) -b1

-b2a2

y(n) x(n)

T

+ High Pass filter

-1

x(n-1)

y(n) x(n)

T

+

Low-pass filter

Workbook Solutions Chapter 3 8

f) ! ! ! !22132 "$""# nxnxnxny

g) ! ! ! !11 101 "$$"# nxanxanybny

Q5) A difference equation for a particular filter is given by

! ! ! ! ! !66.041.038.021.01.0 "$"$"$""# nxnxnxnxnxny

Find the impulse response of the above filter.

h(0)=0.1; h(1)=0; h(2)=-0.1; h(3)=0.8;

h(4)=0.1; h(5)=0; h(6)=0.6;

0)n(h # for 7n 5

+

T

a0

a1

x[n]+

Tb1

y[n]

Workbook Solutions Chapter 3 9

Q6)

a) Show that the convolution of the two infinite duration sequences

! ! ! !nubnqnuanp nn ## and

for all n, where u[n] is the unit step function and a 6 b, is given by

!ba

bany

nn

""

#$$ 11

)()();()( nubnqnuanp nn ##

78

"8#

" "#9#k

)kn(k)kn(ub)k(ua)n(q)n(p)n(y

7#

#

"#nk

0k

knkba

7#

+,

-./

0#

n

0k

k

n

b

ab

::;

<

==>

?+,

-./

0$$+

,

-./

0$+

,

-./

0$#

n2

n

b

a.......

b

a

b

a1b

b

a1

b

a1

b

1n

n

"

+,

-./

0"

#

$

( )( ) ( )

b

bab

abb

n

nnn

1

11

$

$$

""

#

ba

ba

ab

ab

b

b1n1n1n1n

1n

1n

""

#""

#$$$$

$

$

21 k 50

2

1 when n-k50

i.e k@n

Workbook Solutions Chapter 3 10

b) Consider an input x[n] and a unit impulse response h[n] given by

! ! ! !2and22

12

$#"+,

-./

0#"

nunhnunx

n

Determine the output y[n]=x[n]* h[n].

Ans: ! !nuny

n

::;

<

==>

?+,

-./

0"#$1

2

112

)2n(u2

1)n(x

2n

"+,

-./

0#

"

h(n)= u(n+2)

78

8#

"

$""+,

-./

0#9#k

2k

)2kn(u)2k(u2

1)n(h)n(x)n(y

7$

#

"

+,

-./

0#

2n

2k

2k

2

1

n

+,

-./

0$$+

,

-./

0$+

,

-./

0$#

2

1....

2

1

2

11

2

0n2

112

2

11

2

11

)n(y

1n

1n

5::;

<

==>

?+,

-./

0"#

+,

-./

0"

+,

-./

0"

#$

$

)n(u2

112)n(y

1n

::;

<

==>

?+,

-./

0"#'

$

2

1 when n-k+250

i.e k@n+21 if k-250

Workbook Solutions Chapter 3 11

c) Compute the convolution y[n] = x[n]* h[n]

where ! ( ) ! ! !1and131 "#""# "

nunhnunxn

Ans: ! ( )AB

ACD

5

E#

0

0

21

23

n

nny

n

);1(3

1)( ""+

,

-./

0#"

nunx

n

h(n) = u(n-1)

78

"8#

"

""$"+,

-./

0#k

k

knukuny )1())1((3

1)(

If n < 0 then the limits: -8 to n -1

If n 5 0 then the limits: -8 to -1

if –(k+1) 5 0

k+1 @ 0

k @ -1

if n–k-1 5 0

'k @ n-1

1

k@ n-1 k=-1

Workbook Solutions Chapter 3 12

Let n 5 0

2

1

3

11

1

3

1

...3

1

3

1

3

1

3

1

3

1)(

21

1

1

#:::

;

<

===

>

?

"#

$+,

-./

0$+,

-./

0$#

+,

-./

0#+,

-./

0# 778

#

"

"8#

" k

kk

k

ny

Let n < 0

::;

<

==>

?$+

,

-./

0$+,

-./

0$+,

-./

0+,

-./

0#

$+,

-./

0$+,

-./

0$+,

-./

0#

+,

-./

0#+,

-./

0#

$$$"

""""""

8

""#

"

"8#

"

77

...3

1

3

1

3

1

3

1

...3

1

3

1

3

1

3

1

3

1)(

321

)3()2()1(

)1(

1

n

nnn

nk

kn

k

k

ny

02

3

2

3

3

13

3

11

1

3

1

3

1

...3

1

3

11

3

1

3

1)(

21

E#F+,

-./

0#"

F+,

-./

0+,

-./

0#

::;

<

==>

?$+

,

-./

0$+,

-./

0$+,

-./

0+,

-./

0#

"

"

n

ny

nn

n

n

Ans: 0

2

3

02

1)(

E#

5#

n

nny

n

0,2

1)( ! nny

Workbook Solutions Chapter 3 13

Q7)

a) Consider the system described by the difference equation

" # " # " #nbxnayny $%! 1

Determine ‘b’ in terms of ‘a’ so that " #&'

%'!

!n

nh 1 Ans:b=1-a

y(n) = a y(n-1) + bx(n)

Let x(n) = ((n)

n=0 y(0) = ay(-1) + bx(0) = b

n=1 y(1) = ay(0) + bx(1) = ab

n=2 y(2) = ay(1) + 0 = a2b

...

n=n-1 y(n-1) = ay(n-2) = an-1

b

) h(n) = anb n 0

h(n) = anbu(n)

" # )(11

1...1

)(

32

00

givena

baaab

banhn

n

n

!%

!$$$$!

!&&'

!

'

!

) b = 1-a

Workbook Solutions Chapter 3 14

b) Consider the interconnection of LTD system:

Express the overall impulse response in terms of

h1[n], h2[n], h3[n] and h4[n].

p(n) = x(n) * h1(n)

y(n) = (x(n) * h1(n)) * h2(n) – (x1(n) * h1(n))*(h3(n)*h4(n))

= x1(n) * h1(n) * [h2(n) – h3(n) * h4(n)]

) h(n) = h1(n) * [h2(n) – h3(n) * h4(n)]

c) The discrete system " # " # " # 0,1- $! nnxnnyny is at rest

[ie. y[-1]=0]. Check if the system is BIBO stable.

y(n) = ny(n-1) + x(n)

Let x(n) = u(n) n 0 (step input)

n=0 y(0) = 0 + x(0) = 1

n=1 y(1) = y(0) + x(1) = 2

n=2 y(2) = 2 * 2 + 1 = 5 (increasing ) not stable)

for a bounded input, the output is not bounded.

h1[n]

h2[n]

h3[n] h4[n]

+x[n]

y[n]

Workbook Solutions Chapter 3 15

Q8) For each of the following systems, determine whether or not the system is (i)

linear and (ii) time-invariant

a) + ,][cos][ nxny ! Ans: Non-linear; Time invariant

])[cos(])[cos(])[][cos(

]}[][{

])[cos(]}[{][

2121

21

nxbnxanbxnax

nbxnaxH

nxnxHny

$-$!

$

!!

Hence, non-linear

][])[cos(]}[{ knyknxknxH %!%!%

Hence, time invariant

b) " # " # + ,nnxny .2.0cos.! Ans: Linear; Time variant

+ ,

][][

)2.0cos(][)2.0cos(][

)2.0cos(][][

]}[][{

)2.0cos(][]}[{][

21

21

21

21

nbynay

nnbxnnax

nnbxnax

nbxnaxH

nnxnxHny

$!

$!

$!

$

!!

..

.

.

Hence, linear ][)2.0cos(][]}[{ knynknxknxH %-%!% .

Hence, time variant

c) " # " # " #1-nxnxny %! Ans: Linear; Time invariant

+ , + ,+ , + ,

][][

]1[][]1[][

]1[]1[][][

]}[][{

]1[][]}[{][

21

2211

2121

21

nbynay

nxnxbnxnxa

nbxnaxnbxnax

nbxnaxH

nxnxnxHny

$!

%%%%%!

%%%%%!

$

%%!!

Hence, linear ][]1[][]}[{ knyknxknxknxH %!%%%%!%

Hence, time invariant

d) ][][ nxny ! Ans: Non-linear; Time invariant

][][

][][][][

][][

]}[][{

][]}[{][

21

1121

21

21

nbynay

nxanaxnbxnax

nbxnax

nbxnaxH

nxnxHny

$-

-$!

$!

$

!!

Hence, non-linear

][][]}[{ knyknxknxH %!%!%

Hence, time invariant

Workbook Solutions Chapter 3 16

e) " # " # " #1$$! nnxnxny Ans: Non-linear; Time variant

][][

])1[][(])1[][(

])1[]1[(])[][(

]}[][{

]1[][]}[{][

21

2111

2121

21

nbynay

nnxnxbnnxnxa

nbxnaxnnbxnax

nbxnaxH

nnxnxnxHny

$!

$$$$$!

$$$$$!

$

$$!!

Hence, linear

]}[{][

]1[)(][][

]1[][]}[{

knxHkny

knxknknxkny

knnxknxknxH

%-%

$%%$%!%

$%$%!%

Hence, time variant

f) " # " #&$

%'!

!1n

k

kxny Ans: Linear; Time invariant

" #

" #

" # " #

][][

][

]}[][{

}{][

21

1

2

1

1

2

1

1

21

1

nbynay

kxbkxa

kbxkax

nbxnaxH

kxxHny

n

k

n

k

n

k

n

k

$!

$!

$!

$

!!

&&

&

&

$

%'!

$

%'!

$

%'!

$

%'!

Hence, linear

" #&$

%'!

%!%1

]}[{n

k

mkxmnxH

Substitute p=k-m

" # ][]}[{1)(

mnypxmnxHmn

p

%!!% &$%

%'!

Hence, time invariant

g) Show that y[n] = x[-n] is not a time-invariant system.

][]}[{

)]([][

][

]}[{

][]}[{][

knyknxH

knxkny

knx

knxH

nxnxHny

%-%

%%!%

%%!

%

%!!

Hence, the system is not time-invariant.

Workbook Solutions Chapter 3 17

Q9)

a) Let x[n] = {1 4 0 2} and h[n] = {1 2 1}. Find their convolution (Both

sequences start at n=0).

Ans:{1, 6, 9, 6, 4, 2}

b) Let x[n] = {0.5 0.5 0.5} and h[n] = {3 2 1}. Find their convolution

(Both sequences start at n=0).

Ans:{1.5, 2.5, 3, 1.5, 0.5}

Workbook Solutions Chapter 3 18

c) Let x[n] = (0.8)nu(n) and h[n] = (0.4)

nu(n-1). Find their convolution.

Ans: [(0.8)n - (0.4)

n]u(n-1)

CL

AS

S N

OT

ES

Workbook Solutions Chapter 4 1

Workbook Solutions Chapter 4

Workbook Solutions Chapter 4 2

Q1) Find the inverse of each of the following z-transforms:

a)11

3

11

3

2

11

1)(

!

"#

$%&

' (

zz

zX,

2

1)z

Ans: * + * + * +nununx

nn

"#

$%&

'!"#

$%&

'(3

13

2

1 0,n

)(3

13)(

2

1

3

11

13

2

11

1)(

3

11

3

2

11

1)(

1

1

1

1

11

nunu

z

Z

z

Znx

zz

zX

nn

"#

$%&

'!"#

$%&

'(-.

-/

0

-1

-2

3

!

--.

--/

0

--1

--2

3

"#$

%&'

(

!

"#$

%&'

(

b)21 231

1)(

!!(

zzzX 2)z

Ans: * + * + * +nununx nn )1()2(2 ( 0,n

111121 211)21)(1(

1

231

1)(

!!

!(

!!(

!!(

z

B

z

A

zzzzzX

)()1()()2(2

)()2(2)()1)(1(21

12

1

1)1()(

1

1

1

1

nunu

nunuz

Zz

Znx

nn

nn

(

! (./0

123!

!./0

123!

(

c))1)(1(

1)(

21 (

zzzX 1)z

Ans: * + 4 5 * +nunnxn

)]1(211[4

1!!! ( 0,n

211111

21

)1)(1(

1

)1)(1)(1(

1

)1)(1(

1)(

!(

! (

(

zzzzz

zzzX

Workbook Solutions Chapter 4 3

211121 )1(11)1)(1(

1

!

!!

( z

C

z

B

z

A

zz

1 = A(1- 2z -1

+ z -2

) + B(1- z -1

) 6 (1+ z -1

) + C(1 + z -1

)

1 = A – 2Az-1

+ Az-2

+ B – Bz-2

+ C + Cz-1

BA

AC

BA

AC

CBA

(

(

-.

-/

0

(

(

(!!2

0

02

1

7 A = 1/4, B = 1/4, C = 1/2

* + )()1(21)1(4

1

)()1)(1(2

1)()1(

4

1)()1(

4

1)(

)1(

1

2

1

1

1

4

1

1

1

4

1)(

1

2111

nun

nunnununx

zzzzX

n

nnn

!!! (

!!! (

""#

$%%&

'

!"#

$%&

'

!"#

$%&

'!

(

!

Note the following property: !" # $ %&'()*+

'*

c)2

1

1

2

11

4

11

)(

"#

$%&

'

!(

z

z

zX 2

1)z

Ans: * + * + * +nunnunx

nn 11

2

1)1(3

2

1!!

"#

$%&

'!!"#

$%&

' ( , 0,n

21

1

)2

11(

4

11

)(

!(

z

z

zX

21121

1

)2

11(

2

11)

2

11(

4

11

!

(

!

z

B

z

A

z

z

Workbook Solutions Chapter 4 4

11

11

24

11

)1()2

11(

4

11

!(!

! (!

zA

BAz

BzAz

2

3,

2

1

4

1

2;1

(7 (

( (!

BA

ABA

)(2

1)1(3)(

2

11

)(2

1)1(3)(

2

1

2

1)(

2

11

2

1

3

2

11

1

2

1

)2

11(

2

3

)2

11(

2

1

)(

11

1

2

11211

nunnu

nunnunx

zzzz

zX

nn

nn

!!

!

"#

$%&

'!!"#

$%&

' (

"#

$%&

'!8!"#

$%&

' (

99999

:

;

<<<<<

=

>

"#

$%&

'

!

9999

:

;

<<<<

=

>

(

!

(

d)4 54 52

2

15.0)(

(

zz

zzX

Ans: * + * + )1()1(5.02 1 !( nunx nn , 0n ,

4 54 5 4 5 4 5 4 54 5 4 54 5 4 5

4 54 54 5 4 5 4 5

4 54 54 5 4 5 4 5

4 54 5

1

05.0:)3(2)2(

)3(05.05.0

)2(05.12

)1(1

15.0

5.05.05.12

15.0

5.05.05.112

15.0

5.015.01

115.015.0)(

2

2

2

22

2

2

22

2

(

( 6!

( !

(!

(!

!!! !!(

!! !! (

! ! (

!

!

(

(

A

B

CBA

CBA

BA

zz

CBACBAzBAz

zz

zCzzBzzA

zz

zCzzBzA

z

C

z

B

z

A

zz

zzX

From (2)

Workbook Solutions Chapter 4 5

* + )1()1(5.02

)1()1(2)1()5.0(][

)1(

2

)5.01(

)1(

2

)5.0(

1)(

2

05.01

1

11

21

2

1

1

2

!(

! (

!

(

!

(

(

(

nu

nununx

z

z

z

z

zzzX

C

C

nn

nn

Q2)

Show that the following systems are equivalent.

a) * + * + * + * + * +202.013.012.0 ! ! ( nxnxnxnyny

b) * + * + * +11.0 ( nxnxny

y(n) = 0.2 y(n-1) + x(n) –0.3 x(n-1) + 0.02 x(n-2)

Y(z) = 0.2 Y(z)z-1

+ X(z) –0.3 X(z)z-1

+ 0.02 X(z) z-2

1

1

11

1

21

1.01

2.01

)2.01)(12.01(

2.01

02.03.01

)(

)(

(

(

! (

z

z

zz

z

zz

zX

zY

(b) y(n) = x(n) – 0.1 x(n-1)

11.01)(

)( ( zzX

zY

7 (a) & (b) are equivalent system

Workbook Solutions Chapter 4 6

Q3) Determine and sketch the approximate magnitude response for the following

filter:

11

1)(

(

az

azH 0<a<1

?? ??jj ae

aH

ae

aH

aaz

azH

(

(

@@

(

1

1)(

1

1)(

101

1)(

*

1

s

ez

f

fT

zHH j

AB?

? ?

2

)()(

((

((

22

2

22*

cos21

1

cos21

)1(|)(|

)1)(1(

)1(|)(|)()(

aa

a

aa

aH

aeae

aHHH

jj

!

(

!

(

((8

???

??? ??

when ? = 0, |H(?)|=1

Complex Conjugate

H(?) = a+jb, H*(?) = a –jb

H(?).H*(?) = a

2 + b

2 = |H(?)|

2

|H(?)|

1

a

a

!

1

1

0

-A A?

ffs/2-fs/2

???

cos2

(! jj ee

Workbook Solutions Chapter 4 7

Q4)

a) Consider the system.

)2.01)(5.01)(1(

221)(

111

321

!

(zzz

zzzzH , ROC: 1|z|5.0 @@

i) Sketch the pole-zero pattern. Is this system stable?

ii) Determine the impulse response of the system.

Ans: )(5

114

2

15)(10][ nunnh

nn

-.

-/0

-1

-23

"#

$%&

' "#

$%&

'!( C

b) Determine the impulse response of the following causal system.

* + * + * + * +nxnynyny ! ( 208.016.0

Ans: )(5

22

5

11)( nunh

nn

99:

;

<<=

>"#

$%&

'!"#

$%&

' (

)5

11)(

2

11(

1

)2.01)(5.01)(1(

)1)(1(

)2.01)(5.01)(1(

221)(

11

21

111

121

111

321

! (

! (

! (

zz

zz

zzz

zzz

zzz

zzzzH

a)

i)5

1,

2

1,

2

31212,1 ((

D( pp

jz

Stable system poles are inside the unit circle

Re(z)

lm(z)

|z|=1

p2 p1

2

3

2

1j!

2

3

2

1j

Workbook Solutions Chapter 4 8

ii)

11

1111

21

5

11

14

2

11

510

5

11

2

11

10

)5

11)(

2

11(

1)(

!

!(

9999

:

;

<<<<

=

>

!

!(

! (

zz

z

B

z

A

zz

zzzH

)(5

114

2

15)(10)( nunnh

nn

-.

-/0

-1

-23

"#

$%&

' "#

$%&

'!( C

b)

y(n) = 0.6 y(n-1) – 0.08 y(n-2) + x(n)

21 08.06.01

)()(

! (

zz

zXzY

Impulse response: x(n) = C(n)

X(z) = 1

)5

21)(

5

11(

1

08.06.01

1

)(

)()(

11

21

(

! ((7

zz

zzzX

zYzH

)(5

22

5

11)(,

5

21

2

5

11

1)(

11

nunh

zz

zH

nn

99:

;

<<=

>"#

$%&

'!"#

$%&

' (

!

(

Workbook Solutions Chapter 4 9

Q5) Consider the causal system defined by the pole-zero patterns shown below:

a) Determine the system function and the impulse response of the system

given that ,)&+-*./ 0 1.

b) Is the system stable?

Sketch a possible implementation of the system and determine the

corresponding difference equations.

a)

77.2

)5.1(6

cos)5.1(21

8.1

18.01

cos211

1)(

)8.01(

cos21

)8.0(

))(()(

2

2

1

221

(!

(7

(!

! 8E((

!

! (

!

(

A

?

???

k

rrk

zzH

z

zrzrk

zz

rezrezkzH

jj

zero

zero

?

?

r

-0.8 Re(z)

Im(z) r = 1.5

? = A/6

Re(z)

lm(z)

|z|=1

-0.8

r = 1.5

? = A/6

?-?

r

r

Workbook Solutions Chapter 4 10

b) The poles are inside the unit circle so the system is

stable

c)

1

21

8.01

25.235.1177.2)(

!!

(z

zzzH

-0.8

2.77 y(n) + +

z-1

z-1

x(n)

35.1

CL

AS

S N

OT

ES

Workbook Solutions Chapter 5 1

Workbook Solutions Chapter 5

Workbook Solutions Chapter 5 2

Q1)

a) Show that both digital filters given below have the same magnitude

response:

i) ! !"#$

#$m

mi

i inxcny

ii) ! !"#$

##$m

mi

i imnxcny

y[n] = output; x[n] = input; ci = coefficients

""

"

#$

#

#$

#

#$

$$%$

#$

m

mi

i

i

m

mi

i

i

m

mi

i

zczHzX

zYzzXczY

inxcny

)()(

)()()(

)()(

1

1

)(,)(

)()(

)()(

22

$

$$$

##$

#

#$

#

#$

##

#$

""

"

mjm

mi

ij

i

m

mi

im

i

m

mi

i

eecHzzczX

zYzH

imnxcny

&&&

b) Compute the 3dB bandwidth of the following filters

10,1

1

2

1)(;

1

1)(

1

1

211 ''#

(#$

#

#$

#

#

#a

az

zazH

az

azH

Which filter has a smaller 3dB bandwidth?

Ans:.2

1

2cos

2

14cos

12

2

1

2

1

21

filter

a

a

a

aa

nd

cc

c

c

%')

*+

,-.

/(

$

*+

,-.

/ ##$

#

#

&&

&

&

"#$

#$m

mi

ij

iecH && )(1

)|H1(&)| = |H2(&)|

Workbook Solutions Chapter 5 3

%$

#(#

$(#

#$

##

$##

$

$

##

2

1)(

cos21

)1(

sin)cos1(

)1(|)(|

1

1)(,

1

1)(

2

1

2

2

222

22

1

111

1c

H

aa

a

aa

aH

ae

aH

az

azH

j

&&

&

&

&&&&

&

1

1

21

1

2

1)(

#

#

(

(#$

az

zazH

and &

&

&j

j

ae

eaH

#

#

(

(#$

1

1

2

1)(2

&&

&&&&

&cos21

cos22

2

1

sin)cos1(

sin)cos1(

2

1)(

2

2

222

2222

2aa

a

aa

aH

#(

(01

234

5 #$

(#

((01

234

5 #$

2

2

2 cos21

)cos1(2

4

)1(

2

1

2

1)(

2

22

2

c

c

aa

aH

c &

&&

&& #(

(#$%$

$

cos&c2 > cos &c1 % &c2 < &c1

a

aac

2

14cos

2

1

##$&

21

2cos

2 a

ac (

$&

Workbook Solutions Chapter 5 4

c) Find the magnitude response for the system function H(z) and comment

on your result

2

2

3

31)(

z

zzH

(

($

Draw the canonic realization of the system H(z).

Ans: |H(&)| = 1 allpass filter

1)2cos(610

)2cos(610

)2(sin)2cos3(

)2sin3()2cos31()(

3

31)(

3

31)(

22

222

2

2

2

2

$((

$((

(($

(

($%

(

($

&&

&&&&

&

& &

&

H

e

eH

z

zzH

j

j

2

2

31

3)(

#

#

(

($

z

zzH

Q2)

a) Determine the magnitude and phase response of the multipath channel

y[n] = x[n] + x[n-M]. At what frequencies H(&) = 0?

y(n) = x(n) + x(n-M)

Y(z) = X(z) + X(z) z-M

H(&) = 1+e-j&M

= (1+cosM&) - jsinM&

678

9:;

(#

$

($(($

#

&&

&<

&&&&

M

M

MMMH

cos1

sintan)(

)cos(22)(sin)cos1()(

1

22

+

z-1

z-1

+y(n)

-3

3x(n)

Canonic

realisation

Workbook Solutions Chapter 5 5

b) Determine and sketch the magnitude and phase response of the system

shown below.

32

33

222

111

)2

(cos2

1

)1)(1)(1(8

1)(

)1)(1)(1(8

1)(

&

&

&&&&

&&&

jjj

j

jjj

eeee

eeeH

zzzzH

###

###

###

$**+

,

--.

/001

2334

5($

((($

((($

2

3)(,

2cos|)(| 3 &

&<&

& #$$H

= > 10 $H

|H(&)|

If M =1

2

-

For M=1

! "

! " 21cos22

cossin2tan

cos1

sintan

2

2

221

1

#

##

#$

#

##

%&''(

)**+

,

%-

%&

&'(

)*+

,-

%&

%

%

$(#)

/2

-

- /2

#

|H(#)| = 0 when

cos(M#) = -1

M# = ie. # = /M

z-1

+ z-1

+ z-1

+x[n]

y[n]

z-1

+z

-1

+ z-1

+x[n]

8

1

y[n]

Workbook Solutions Chapter 5 6

c) Assuming that the digital filter G(z) is to be realized using the cascade

structure, draw a suitable block diagram and develop the difference

equation(s).

)3

1)(

3

1(6

)1()(

3

jzjzz

zzG

-%

-&

)3

11(

)1)(1)(1(

6

1

)3

1(6

)1(

)3

1)(

3

1(6

)1()(

2

111

2

3

3

%

%%%

-

---&

-

-&

-%

-&

z

zzz

zz

z

jzjzz

zzG

+

z!1

+

z!1

+

z!1

+

z!1

x(n)

1

3

1%

p(n) q(n)

1 1

y(n)1/6

)1()()(

)1()()(

)2(3

1)1(

6

1)(

6

1)(

%-&

%-&

%%%-&

nqnqny

npnpnq

npnxnxnp

|H(#)|

# -

1

-

-

$(#)

#

3

2

Workbook Solutions Chapter 5 7

d) Determine the frequency response H(#) of the ladder filter shown below:

##

#

#2

2

1)(:Ans

jj

j

abebe

abeH %%

%

%-&

p(n) = ax(n - 1) + ay(n - 1) - y(n)

y(n) = bp(n - 1)

y(n) = b{ax(n - 2) + ay(n - 2) - y(n - 1)}

##

#

#2

2

21

2

1)(

1)(

)(jj

j

abebe

abeH

abzbz

abz

zX

zY%%

%

%%

%

%-&.

%-&

e) Determine the frequency response H(#) of the lattice filter

###2)1(1

1)(:

jj aeeabHAns %% ---

&

+

z-1

+

z-1

-1b

a

Y(z) X(z)

+

z-1

+

z-1

X(z)

a

b

-1

Y(z)

p(n)

+

+ T

a

-a

+

+ T

b

-b

x[n] y[n]

Workbook Solutions Chapter 5 8

y(n) = w(n) – by(n-1) - (1)

v(n) = y(n-1) + by(n) - (2)

w(n)= x(n) – av(n-1) - (3)

y(n) = x(n) –av(n-1) – by(n-1)

= x(n) – a [y(n-2) + by(n-1)] – by(n-1)

y(n) = x(n) – ay(n-2) – aby(n-1) –by(n-1)

y(n) = x(n) – b(a+1)y(n-1) – ay(n-2)

###

2

21

)1(1

1)(

)1(1

1

)(

)(

jj aeeabH

azzabzX

zY

%%

%%

---&

---&

f) Show that the filter structure shown below has a linear phase characteristic

equation given by: $(#) = -2#.

+

+ z-1

+

+

w(n) x(n)

a

-a -b

b

y(n)

v(n)z

-1

z-1

z-1

1

z-1

1

z-1

1 1

+

y[n]

x[n]

1

Workbook Solutions Chapter 5 9

y(n) = x(n) + x(n-1) + x(n-2) + x(n-3) + x(n-4)

H(z) = 1 + z-1

+ z-2

+ z-3

+ z-4

2sin

2sin

][

1

1)(

1

1)(

2

1

22

22

2

2

1

#

#

#

#

##

##

#

#

#

#

'(

)*+

,

&

/0

123

4%

%&

%%

&.%%

&

%%

%

%

%

%

%

%

%

%

N

e

ee

ee

e

e

e

eH

z

zzH

Nj

jj

Nj

Nj

j

Nj

j

NjN

##$

#

#

# #

2)(

2sin

2

5sin

)(5 2

%&

&.& % jeHN

g) Determine the transfer function of the system shown below. Check the

stability of the system when r = 0.8 and ! "#

$.

Ans:

221

0

1

0

cos21

sin)(

%%

%

-%&

zrzr

zrzH

##

,

filterstableb

b_

1312.1

64.0

1

2

567

%&

&

P(z) = X(z) – r sin#0 Y(z) z-1

- (1)

Q(z) = P(z) + rcos#0 R(z) and R(z) = Q(z) z-1

+ + z-1

+

z-1

r cos#0

- r sin#0

y[n]

r cos#0

x[n]

+ + z-1

+

z-1

Y(z)X(z) P(z)

-rsin#0

rsin#0R(z)

rcos#0rcos#0

Q(z)

r sin#0

Workbook Solutions Chapter 5 10

8Q(z) = P(z) + rcos#0 Q(z)z-1

-(2)

From (1) & (2)

Q(z){1-rcos#0z-1

} = X(z) – r sin#0Y(z) z-1

)(cos1

sin

cos1

)()(

1

0

1

0

1

0

zYzr

zr

zr

zXzQ

%

%

% %%

%&

##

# - (3)

From the block diagram:

Y(z) = r cos#0 z-1

Y(z) + r sin#0z-1

Q(z) -(4)

From (4) & (3)

1

0

1

0

1

0

2221

0

1

0

1

0

1

0

1

0

1

0

cos1

)(sin)(

cos1

sincos1

)(cos1

sin

cos1

)(sin)(cos)(

%

%

%

%%

%

%

%%%

%&/

0

123

4

%-%

/0

123

4

%%

%-&

zr

zXzrzY

zr

zrzr

zYzr

zr

zr

zXzrzYzrzY

##

##

#

##

###

b2 = r2 = (0.8)

2 = 0.64

1.128.02

18.02

4cos8.021 %&%&99%&99%&

b

Q3)

a) Consider the following causal IIR transfer function:

)5.0)(3(

942)(

2

23

--%

-%&

zzz

zzzH

Is H(z) a stable function? If it is not stable, find a stable transfer function G(z)

such that |G(#)| = |H(#)|. Is there any transfer function having the same

magnitude response as H(z)?

Ans: unstable, : ;filterAllpass

z

zzA A HzG

zAzHzzz

zzzG

3

31)(|,)(||)(||)(|

)()()5.0)(31(

942)(

2

23

%

%&&

&--%

-%&

21

0

1

0

cos21

sin)(

rzr

zrzH

-%&8

%

%

##

b1

b2

1

-1

1 2-2

Inside the stability

triangle

Stable system

-1

Workbook Solutions Chapter 5 11

)5.0)(3(

942)(

2

23

--%

-%&

zzz

zzzH

Since H (z) has a pole at z = 3, the given transfer function is

unstable. To construct a stable transfer function having the same

magnitude response consider another transfer function

)()()5.0)(31(

942)(

2

23

zAzHzzz

zzzG &

--%

-%&

where z

zzA

31

3)(

%%

&is an allpass transfer function

8|G(#)| = |H(#)| |A(#)| . |G(#)| = |H(#)|

b) Analyse the digital structure given below and determine its transfer

function

)(

)()(

zX

zYzH &

i) Is this a canonic structure?

ii) What should be the value of the multiplier coefficient K so that H(z)

has a unity gain at # = 0?

iii) What should be the value of the multiplier coefficient K so that H(z)

has a unity gain at # = ?

iv) Is there a difference between these two values of K? If not, why not?

Ans: 21

21

1)(

%%

%%

-%

-%&

zz

zzKzH

<==<

(i) 4 delays . noncanonic

(ii)& (iii)

<==<-%-%

&1

1K

=1

(iv) no (all pass filter)

+ z-1

+

z-1

z-1

+

+

-1

<

z-1

=

Y(z) X(z)

K

-1

Workbook Solutions Chapter 5 12

W1(z) = KX(z)+z-1

W3(z); W2(z) = (z-1

-=)W1(z)

W1(z) = KX(z) + z-1

(= - <z-1

)W1(z)

8Y = [z-1

(z-1

- =) + <]W1(z)

567

>?@

-%-%

&& %%

%%

21

21

1)(

)()(

zz

zzK

zX

zYzH

<==<

(i) since the structure employs 4 unit delays to implement a second-order transfer

function, it is noncanonic.

(ii) & (iii)

2

2

2

21

2121

11)()(

K

zz

zz

zz

zzKzHzH

&

''(

)**+

,

-%

--''(

)**+

,

-%

-%&

%%

%%%

<==<

<==<

8 |H(#)|2 = H(#)H

*(#) = K

2

|H(#)| = K for all values of #8 |H(#)| = 1 if K = 1

(iv) H(z) is an allpass transfer function with a constant magnitude at all values of A.

Q4)

a) A first-order digital filter is described by

1

1

1

1)(

%

%

%

-&

az

bzkzH

, 0 < a, b < 1 assume 2

1&& ba

i) Determine k, so that the maximum value of |H(#)| is equal to 1.

ii) Compute the 3-dB bandwidth of the filter H(z).

W3(z)

+ z-1

+

z-1

z-1

+

+

-1

<

z-1

=

Y(z)X(z)K

W1(z)

-1

W2(z)

Workbook Solutions Chapter 5 13

Ans: '(

)*+

,&

&-%

&

%

44

35cos

3

1

1

1

1

c

b

ak

#

iii) Draw a canonic realization of the system function H(z).

(i)

1,01

1)(

1

1

BB%

-&

%

%

baaz

bzkzH

Assume 2

1&& ba

a

bkHH

ae

bekzHH

j

j

ez j

%-

&&

%-

&&

&

%

%

&

1

1|)()0(

1

1|)()(

0#

#

#

#

# #

H(z) is a low-pass filter and as a result, the maximum amplitude occurs at # = 0

|H(0)| = 1 (given)

3

1

1

1

1

11 &

-%

&.%-

&b

ak

a

bk

(ii) ##

## #

#

cos21

cos21

9

1|)(|,

1

1

3

1)(

2

22

aa

aaH

ae

aeH

j

j

%---

&%-

&%

%

|H(#)|2 = H(#) H

*(#)

3-dB cut-off occurs at # = #c

'(

)*+

,&

&8

%

-&

'(

)*+

,%-

'(

)*+

,--&&

%

44

35cos

35cos44

cos4

5

cos4

5

9

1

2

1

cos2

12

4

11

cos2

12)

4

11(

9

1

2

1|)(|

1

2

c

c

c

c

c

c

cH

#

#

#

#

#

##

(iii) x(n)+ +

y(n)

-1/2

1

Canonic

form

z-1

1/2

-1/3

Workbook Solutions Chapter 5 14

b) A two-pole lowpass filter has the system function

211

0

)1()(

%%&

zb

kzH

Determine the values of k0 and b1 such that the frequency response H(#)satisfy the conditions

2

1)(;1)0(

2

4

&&&!

HH

Ans: k=0.46, b1 = 0.32

.%

&.&

%&

%&

%%

2

1

0

2

1

0

21

1

0

)1(11|)0(|

)1()(,

)1()(

b

kH

eb

kH

zb

kzH

j##

2

0

2

1

2

1

2

1

2

1

2

02

4

1

2

11

2

1

2

0

2

11

0

2)21(

)2

121(

2

1)(

cos21

1

cos21

1|)(|

1

1

)1()(

kbb

bb

kH

bbbbkH

ebeb

kH

jj

&%-

%-&&

%-C

%-&

%C

%&

&

%%

#

##

#

###

#

b1 = 0.32 and k0 = (1-0.32)2 = 0.46

c) A third order FIR filter has a transfer function G(z) given by

)2

51)(

3

4)(

2

31(30)( 111 %%% --%& zzzzG

From G(z), determine the transfer function of an FIR filter whose magnitude

response is identical to that of G(z) and has a maximum phase response.

2

11

2

1 )1(221 bbb %&%-

k0 = (1-b1)2

Workbook Solutions Chapter 5 15

'(

)*+

, -'(

)*+

, -'(

)*+

, %& %%% 111

2

51

3

4

2

3130)( zzzzG

Max phase filter:

'(

)*+

, -'(

)*+

, -'(

)*+

, %& %%% 111

2

51

3

41

2

31)( zzzKzP

To get the value of K, 00

)()(&&

&##

## GP

'(

)*+

, -'(

)*+

, -'(

)*+

, %& %%% #### jjj eeeG2

51

3

4

2

3130)(

'(

)*+

, -'(

)*+

, -'(

)*+

, %& %%% #### jjj eeeKP2

51

3

41

2

31)(

Thus, substituting 0&# into the above equation

30

2

511

3

4

2

3130

2

51

3

41

2

31

&

'(

)*+

, -'(

)*+

, -'(

)*+

, %&'(

)*+

, -'(

)*+

, -'(

)*+

, %

K

K

Max phase filter:

'(

)*+

, -'(

)*+

, -'(

)*+

, %& %%% 111

2

51

3

41

2

3130)( zzzzP

Q5) For the system shown below,

a) Express y1[n] in terms of y1[n-1], y2[n-1], and x[n]; do the same for y2[n].

b) Assume A = cos(#0); B = sin(#0); y1(-1) = cos(-#0); y2(-1) = sin(-#0). If

x[n] = 0, show that :

y1[n] = cos(n#0) and y2[n] = sin(n#0)

c) Calculate (for arbitrary A and B) the system function

)(

)()( 1

1zX

zYzH &

and )(

)()( 2

2zX

zYzH &

d) Take % " & "'

()* and draw the poles-zeros plot for H1(z) and H2(z).

e) Take % " & "'

()* and x[n]=D[n]. Calculate the impulse response h1[n]

for -2 E n E 10.

|z|=1

2

3

4

3%

3

4%

2

5%

Workbook Solutions Chapter 5 16

(a) y1(n) = x(n) + (-B) y2(n-1) + Ay1(n-1)

y2(n) = By1(n-1)+Ay2(n-1)

(b) If x(n) = 0

(c) Y1(z) = X(z) – BY2(z)z-1

+ AY1(z) z-1

Y2(z) = BY1(z)z-1

+ AY2(z)z-1 . Y2(z)(1-Az

-1) = BY1(z)z

-1

)(1

1)(

)(1

)()()(

1

)()()(

1

1

22

1

1

11

2

1

21

11

1

11

1

zXAzAz

zBzY

zzAYAz

zzYBzXzzAY

Az

zzBYBzzXzY

&/0

123

4%

%-

-%

%&-%

%&

%%

%

%%

%%

%

%%

221221

1

11221

1

1

11

1

1

)1)((1

1

)(

)()(

%%%%

%

%%%%

%

-%-%

%&

%%-%

%&&

zAAzzBAz

Az

AzzAzBAz

Az

zX

zYzH

2221

1

1

1

11

1

2)(21

)()1(

1)(

1)( %%

%

%

%

%

%

--%%

C%

&%

&zABAz

zXAz

Az

BzzY

Az

BzzY

z-1

+

z-1

+

x[n]

y1[n]

y2[n] A

A

B

-B

y1(n) = Ay1(n-1) –By2(n-1)

n = 0, y1(0) = cos#0 y1(-1) - sin#0 y2(-1)

= cos#0 cos#0 + sin#0 sin#0

= 1

n = 1, y(1) = cos#0y1(0) - sin#0 y2(0)

= cos #0

n = 2, y(2) = cos#0 y1(1) - sin#0 y2(1)

= cos#0 cos#0 - sin#0 sin#0

= cos2#0

...

8 y1(n) = cos n#0

y1(n) = By1(n-1) +Ay2(n-1)

n = 0, y2(0) = sin#0 y1(-1) + cos#0 y2(-1)

= sin#0 cos#0 + cos#0 (-

sin#0)

= 0

n = 1, y2(1) = sin#0y1(0) + cos#0 y2(0)

= sin #0

n = 2, y2(2) = sin#0 y1(1) + cos#0 y2(1)

= sin#0 cos#0 + cos#0 sin#0

= sin2#0

...

8 y2(n) = sin n#0

2221

1

11

)(21

1

)(

)()( %%

%

--%%

&&zABAz

Az

zX

zYzH

Workbook Solutions Chapter 5 17

(d)

We have

14

2

4

2,2

2

1 22 &-&-&- BABA

21

1

221

1

21

1

121

2

2

)(,21

2

21

12

221

2

21

)(%%

%

%%

%

%%

%

-%&

-%

%&

-%

%&

zz

z

zHzz

z

zz

z

zH

)1(22

1

12

2

2

)(

)1(22

1

2

11422

12

2

2

)(

22

21

jzatpoleszz

z

zH

jzatpoleszz

zz

zH

F&.-%

&

F&CC%F

&.-%

''(

)**+

,%

&

(e)

12

2

2

21

2

21

)(

)()(

2

2

21

1

11

-%

%&

-%

%&&

%%

%

zz

zz

zz

z

zX

zYzH

if x(n)=D(n) . X(z) = 1

z transform of cos(#0n) u(n)

)(4

cos )(

4

2

1

2

2cos

1

0

0

nunny '(

)*+

,&8

&

&&

#

#

1cos2

cos

12

2

2

)(0

2

0

2

2

2

1 -%

%&

-%

%&8

##

zz

zz

zz

zz

zY

2221

12

2)(21)(

)()(

%%

%

--%&&

zABAz

Bz

zX

zYzH

zeros: z = 0; 2

2&z , z = 0

poles: )1(2

2jz F& , )1(

2

2jz F&

Workbook Solutions Chapter 5 18

Q6)

a) Obtain a parallel realization for the following H(z)

2

2

)5.0(

34)(

-

-%&

zz

zzzH

Implement the parallel realization of H(z) which you have obtained.

b) Obtain a parallel realization for the following transfer function.

)4

1()

2

1(

1)(

2 %%

-&

zz

zzH

c) A digital filter is represented by

)1)(2

11(

1

2

11

2

1

)(111 %%% %%

-%

&zzz

zH

i) Does this transfer function represent an FIR or an IIR filter?

ii) Write a difference equation for H(z) using the direct form.

iii) Implement a parallel realization of H(z).

(a)

25.0)5.0(

34)(

22

2

---

-&-

-%&

zz

CBz

z

A

zz

zzzH

8 z2 – 4z + 3 = Az

2 + Az + 0.25A +Bz

2 + Cz

equating coefficients, we obtain

A+B = 1; A + C = -4; 0.25A = 3

8 B = -11, C = -16 & A = 12

21

211

2

4

11

161112

4

1

161112)(

%%

%%%

--

%%-&

--

%%-&

zz

zzz

zz

z

zzH

Workbook Solutions Chapter 5 19

(b)

4

1)

4

1()

4

1)(

4

1(

1

)4

1)(

4

1(

1)(

22

23

-%

--

%&

%-%

-

%-%

-&

zz

CBz

z

A

zzz

z

zzz

zzH

16,20,20541

4

414

0

4)

4()(1

4441

2

22

&&%&.&%.G5

G6

7

&%%

&%.&%

%&.&-

%-%%--&-

%%---%&-

CABB

BAC

CACA

BABA

CAz

BACzBAz

Cz

BCzBz

AAzAzz

21

12

1

1

21

1

23

4

11

)4

5(16

4

11

20

4

1

)16

201(16

4

11

20

4

1

1620

4

1

20)(

%%

%%

%

%

%

%

-%

%-

%&

-%

%-

%&

-%

-%-

%&

zz

zz

z

z

zz

z

z

z

zz

z

z

zH

+ +

y(n)

-1

x(n)

z-1

-11

12+

z-1

z-1

-1/4 -16

Workbook Solutions Chapter 5 20

(c) (i)

21

1

11

1

11

1

32

3

)1)(2(

2)1(

)1)(2

11(

1)1(2

1

)(%%

%

%%

%

%%

%

-%

%&

%%

-%&

%%

-%&

zz

z

zz

z

zz

z

zH

The filter is an IIR filter because there exists non-trivial poles

Difference equation: 2y(n) – 3y(n-1)+y(n-2) = 3x(n) – x(n-1)

(ii)

)2(2

1)1(

2

3)1(

2

1)(

2

3)( %%%-%%& nynynxnxny

(iii)

111

11

2

11

)2

1(

1

2

1

2

2

11

)1(

2

11

2

1

)(%

%%%% %

%-

%&

%-

%

%-

%&

zzz

zz

zH

+ +

y(n)

1

x(n)

z-1

-20

+

z-1

-1/4 16

+ +

z-1

1/4 20

Workbook Solutions Chapter 5 21

Q7)

a) The transfer function of a discrete-time system has poles at z = 0.5, z = 0.1

Fj0.2 and zeros at z = -1 and z = 1.

i) Sketch the pole-zero diagram for the system

ii) Derive the system transfer function H(z) from the pole-zero

diagram.

iii) Develop the difference equation.

iv) Draw the block diagram of the discrete system.

Ans:321

31

025.055.02.01)( %%%

%%

%%%%

&zzz

zzzH

b) A notch filter is given by

2

2

8.01

1)(

%

%

--

&z

zzH

Determine the frequency response at dc, +,$

and+,(

fs – sampling frequency.

Sketch the frequency response in the interval - . / .+,(

Ans:

y(n)x(n)

1/2

+

z-1

+

-1/2

2

z-1

1

+

|H(#)|

81.1

2

2

#

81.1

2

Workbook Solutions Chapter 5 22

(a)(i)

(ii)

321

31

321

21

23

2

2

2

025.015.07.01)(

)(

025.015.07.01

)1(

025.015.07.0

1

)05.02.0)(2

1(

1

)2.01.0)(2.01.0)(2

1(

)1)(1()(

%%%

%%

%%%

%%

%-%%

&

%-%%

&%-%

%&

-%%

%&

-%%%%

%-&

zzz

zz

zX

zY

zzz

zz

zzz

z

zzz

z

jzjzz

zzzH

(iii) y(n) = x(n-1) –x(n-3) + 0.7 y(n-1) - 0.15y(n-2) + 0.025y(n-3)

(iv)

0.7

0.7

0.015

x(n) +

!1

y(n)

z!1

z!1

z!1

z!1

z!1 z

!1

(b)

|z|=1

0.2

-0.20.1

0.7

-0.15

0.025

Workbook Solutions Chapter 5 23

#

#

#2

2

2

2

81.01

1)(

81.01

1)(

j

j

e

eH

z

zzH

%

%

%

%

-

-&

-

-&

0)sin)(cos81.0(1

sin)cos(1|)(,

24

1

81.1

2

81.01

11)0(0

2

&%-

%-&&.

&--

&8&.

&

#

#

#

# j

jHf

Hdc

s

'(

)*+

,&

2

sf

81.1

2

81.01

11

)2sin2)(cos81.0(1

1|)(,

2

2

&--

&%-

-&&.

%

& # #

#j

eH

f js

Q8) A digital filter is shown below.

a) Determine the system function H(z) for the above structure.

b) With a0 = a2 = 1; a1 = 2; b1 = 1.5 and b2 = -0.75, Determine the pole-zero

pattern of H(z) and indicate if the system is stable or not.

|z|=1

Im

Re

|H(#)|

81.1

2

81.1

2

2

2

2f& #

+y[n]

a0 a1 a2

b1 b2

x[n]

z-1

+ z-1

+

Workbook Solutions Chapter 5 24

(a)

P(z) = a2X(z) + b2Y(z)

Q(z) = a2X(z) z-1

+ b2Y(z) z

-1

M(z) = a2X(z) z-1

+ b2Y(z)z

-1 + a1X(z) +b1Y(z)

Y(z) = a0X(z) + a2X(z)z-2

+b2Y(z) z-2

+ a1X(z)z-1

+ b1Y(z) z-1

21

2

21

2

0

2

2

1

1

2

2

1

10

1)(

bzbz

azaza

zbzb

zazaazH

%%--

&%%--

& %%

%%

(b)

a0 = a2 = 1; a1 = 2, b1 = 1.5

4

35.1

12

75.05.11

21)(

2

2

21

21

-%

--&

-%--

& %%

%%

zz

zz

zz

zzzH

4

3

2

5.1

2

4

34)5.1(5.1 2

i

z

F&

'(

)*+

,%%F

&

|z| < 1 . the system is stable.

z-1

+ z-1

+ +Y(z)

a0a1a2

b1b2

P(z) Q(z) M(z)

|z|=1

Workbook Solutions Chapter 5 25

Q9) Sketch the pole-zero plot for 212 5.25.2)( %% %%-& zzzzzH . Is this linear

phase?

Note that '(

)*+

,%&z

HzH1

)( => ][][ nhnh %%&

}1,5.2,0,5.2,1{][ %%&nh

2

)2)(5.0)(1)(1()(

z

zzzzzH

---%&

All poles of H(z) are at z=0; there is a pair of reciprocal zeros at z=-0.5 and z=2. The

two zeros at z=-1 and z=1 occur singly.

This is a linear phase filter.

-0.5

2

-2 1

|z|=1

2

)Im(z

)Re(z

-1

Pole-zero plot

n=0

Workbook Solutions Chapter 5 26

Q10) Find all of the zeros of type 2 linear-phase sequence, if it is known that there are

zeros at 6

4

1

j

ez & and 1&z .

A type 2 sequence is even symmetry and requires an even number of zeros at z=1.

Also, there must be a zero at z=-1.

Due to conjugate reciprocal symmetry, a zero 6

4

1

j

ez & implies zeros at

6

4

1

j

ez & ,6

4

1

j

ez%

& , 64

j

ez & , 64

j

ez%

&

1

6/ 6/

-1

Even number

of zeros

Odd number

of zeros

|z|=1

)Im(z

)Re(z

r=1/4

r=1/4

1/r=4

1/r=4

Complex

conjugateReciprocal

symmetry

Reciprocal

symmetry

Workbook Solutions Chapter 5 27

Q11) Figure below shows an example of four types of FIR linear-phase impulse

responses to indentify the linear-phase sequence type and find the transfer

function in each case

0 1 2 3 4 5

1

(a)

Centre of symmetry

4][][ &%& MwherenMhnh

n

0 1 2 3 4 5

1

(b)

Centre of symmetry

5][][ &%& MwherenMhnh

n

0 1 2 3 4 5

1

(c)

Centre of symmetry

2][][ &%%& MwherenMhnh

-1

n

0 1 2 3 4 5

1

(c)

Centre of symmetry

1][][ &%%& MwherenMhnh

-1

n

Workbook Solutions Chapter 5 28

Q12) Typical plots of zeros for linear-phase systems are shown below. From the pole-

zero plot, identify the sequence type

|z|=1

)Im(z

)Re(zr11/r1

r

1/r

1/r

r

(a)

r 1/r

|z|=1

)Im(z

)Re(zr21/r2

r1

1/r1

1/r1

r1

(b)

r 1/r

|z|=1

)Im(z

)Re(z

r1

1/r1

r

1/r

1/r

r

(c)

r1

1/r1

|z|=1

)Im(z

)Re(z

r

1/r(d)

r

1/r

CL

AS

S N

OT

ES

Workbook Solutions Chapter 6 1

Workbook Solutions Chapter 6

Workbook Solutions Chapter 6 2

Q1) Let !"# denote the discrete-time Fourier transform of the sequence !"# $%&'() *!"#.a) Determine +!,#.b) Let y[n] denote a finite-duration sequence of length 10; -."/ $ 01 " 2 0

and -."/ $ 01 " 3 40. The 10 point DFT of y[n] is denoted by Y[k]

corresponds to 10 equally spaced samples of +!,#. Determine Y[k] and

y[n].

Ans: 5+!,# $ 67489) :;<)=>

)[email protected]/ $ 88 C :;<'DE&@-!"# $ 7489)F 44 C %48(&@G

+!,# $ 67489) :;<)=>)?@$ 44 C 7:;<=8 9

$ 88 C :;<=A.B/ $ +!,#H=?'DE&@$ 6 ."/:;<)=>)?;> I=?'DE&@A.B/ $ 6 !"#:;<'DE)J>

)[email protected]/ $ 88 C :;<'DE&@K*LMNON*N:5" $ P Q RS1 A.B/TU"5L:5V:WVONN:"5UM

A.B/ $ 6 6 !P Q RS#:;<'DE!XYZJ#JJ;&X?@

>Z?@

A.B/ $ 6 6 !P Q RS#:;<'DEXJ :;<'DEZJJ>Z?@

J;&X?@

Since :;[\]^_`` $ 4,

Workbook Solutions Chapter 6 3

A.B/ $ 6 6 !P Q RS#:;<'DEXJ>Z?@

J;&X?@

Comparing the above equation with the DFT equation,

A.B/ $ 6 -!P#:;<'DEXJ 5J;&X?@-!P# $ 6 !P Q RS#>

Z?@-!P# $ 67489XYZJ>Z?@-!P# $ 7489X 67489ZJ>

Z?@67489ZJ $ 44 C %48(J>Z?@

Thus,

-!"# $ 7489)F 44 C %48(&@G

Q2) A speech signal is sampled with a sampling period of 125ms. A frame of 256

samples is selected and a 256 point DFT is computed. What is the spacing

between the DFT values in Hz

Ans: 0.03125Hz

Frequency resolution, a:Mbc*NOb" $ deS $ 4Sfe$ 48gh i 48g i 40;j$ 0k0l48g mn

Workbook Solutions Chapter 6 4

Q3) Compute the N-point DFT, H[k] of the sequence h[n]. Show that when N = 3

the value of H(3) = 3/5

m!n# $ 4g n Q 4g Q 4g n;&m!,# $ m!n#Ho?p[q$ 4g r:<= Q 4 Q :;<=s$ 4g !8 tuv!,# Q 54#5m.B/ $ m!,#H=?'DEJm.B/ $ 4g !8 tuv 78wBl 9 Q 4#

m.l/ $ 4g !8 tuv!8w# Q 4# $ lgQ4) A 5 kHz sinusoidal signal is sampled at 40 kHz and 128 samples are collected

and used to compute the 128-point DFT of the signal. What is the time duration

in seconds of the collected samples? At what DFT indices do we expect to see

any peaks in the spectrum? Ans: 16 and 112

Duration = Number of samples x Sampling period

= 128 * 1/40000

= 0.0032 s

Peak occurs at 5kHz gx0 i 48y $ 4hHence, peak will occur at DFT indices 16 and 128-16=112.

Q5) Consider the finite length sequence: x[n] = [n] + 0.2 [n-2]Write the equation for the N-point DFT of x[n] for N = 25

Ans: +.B/ $ 4 Q 0k8:[\]^\z 5+!B# $ 4 Q 0k8n;'+!,# $ 4 Q 0k8:;<=+.B/ $ 4 Q 0k8:;<'DEJ 5

When N=25, +.B/ $ 4 Q 0k8:;<'DE'{

! "#$

#%&

''()otherwise0

115

1n

nh

Workbook Solutions Chapter 6 5

Q6) Let a causal linear time invariant discrete-time system be characterised by a real

impulse response h[n] with a DTFT of H(*). Consider the system of the figure

shown below, where x[n] is a finite length sequence. Determine the frequency

response of the overall system G(*) in terms of H(*), and show that it has a

zero-phase response.

+ , + , + ,- . + ,+ , + , + ,- . + ,+ , + , + ,+ , + , + , + , + , ajbajbaHHG

zHzHzG

zXzHzHzY

nxnhnhny

2

*

*

1

1

)(//)/)

/)

/)

(/)

(

(

***Hence the equivalent transfer function + ,*G is real and has zero phase and zero

phase.

h[n]Time-reversal

Time-

reversal

+x[n] y[n]

h[n]

+ , + ,+ , + , + ,+ , + , + , + ,nhnxnvnu

nhnxnv

Hnh DTFT

()()

()

00 10

*

*

*

+ ,nv + ,nu

h[n]Time-

reversal Time-

reversal

+x[n]

y[n]

h[n]

Workbook Solutions Chapter 6 6

Q7) For the system in the figure below, sketch the output y[n] when the input x[n] is

[n] and H(*) is an ideal lowpass filter as follows:

#$

#%

&

'2

'')

3*3

3*

*||

20

2||01

)(H

Ans:4444

5

6

7777

8

9

)n

n

n 2sin

1)(

3

3:

! "2

2sin

1)1(2

1)(

3

3

n

n

ny n /()

4444

5

6

7777

8

9

)(

)

;<

=>?

@)))

(

((( AA

n

n

jn

ee

jn

ededeHnw

njnj

njnjnj

2sin

1

2

1

2

11

2

1)(

2

1)(

22

2

2

2

2

3

33

3*

3**

3

33

3

3

*3

3*3

3

*

! " ! "2

2sin

1)1(2

11)1()()()()1()(

3

3

n

n

nwnwnwny nnn /()/()/()

H(*) x[n] :[n]

B

+(-1)n

y[n]

y[n]

1

0 1 2 3 4 n

y(n)

1

0 1 2 3 4 n

Workbook Solutions Chapter 6 7

Q8) The frequency response of an ideal differentiator is given by

3*3** *C ''() ( jejH )(

This response is periodic with period 23. The quantity C is the delay of the

system in samples.

a) Sketch the magnitude and phase responses of the system for -3 ' * ' 3.

Phase

H

H

magnitudeH

D(()2

/()E

D

$%&

''((

'')

2)(arg0

2)(arg0

0

0|)(|

3*C**

3*C**

*3*3**

*

H (*) = j*e-j*C

-3 ' * ' 3|H (*)| = * 0'*'3

= -* -3 < * < 0

)2

(2)(

3*C*C

3

***((( ))

jj

j

eeeH , where jej

)2

3

02

02

)}(arg{

2(()

E/()

*3

*C

*3

*C*H

|H(*)|3

3 *3arg H(*)

3/2

C32

*

C32

(

-3/2

Workbook Solutions Chapter 6 8

b) Find the impulse response h[n] of the system as a sum of a sine and cosine

function.

Note:)1(

2***

** jk

k

ede

jkjk ()A

Ans:! "

#$

#%&

)

F(

(/

(

(()

C

CC

C3C3

C3

n

nn

n

n

n

nh

0

)(cos

)(

)(sin

)( 2

! "

- . - .! "

! "

0)(

,For

)(

)](cos[

)(

)](sin[

))(cos()(2)(sin(2)(2

)()()(2

)))((1())(1()(2

))(1()(2

)(

,For

2)(

2

1)(

2

2

)()()()(

2

)()()(

2

2

)(

)

)

((

/(

(()

(((((

)

(/((((

)

(((((((

)

;<

=>?

@((

()

F

G))

((((((

(((

(

(

(

(

(AA

nh

n

n

n

n

n

nnjnjn

j

enjenjeen

j

njenjen

j

njn

ejnh

n

deej

deHnh

njnjnjnj

njnj

nj

njjnj

CC

C3C3

C3

C33CC3C3

3C3CC3

3C3CC3

*CC3

**3

**3

3C3C3C3C

3C3C

3

3

*C

3

3

**C3

3

*

Workbook Solutions Chapter 6 9

Q9) Let x[n]={1, 2, 1, 0}. With N=4, compute the 4-point DFT.

Ans:X[k]={4, -j2, 0, j2}

H)

45

678

9(

)3

0

4

2

][][n

kjn

enxkX

3

H)

45

678

9(

)3

0

2][][n

kjn

enxkX

3

}2,0,2,4{][

2021][]3[3

0021][]2[2

2021][]1[1

40121][]0[0

3

0

32

3

2

3

3

0

2

3

0

22

3

0

0

jjkX

jeeenxXk

eeenxXk

jeeenxXk

enxXk

n

jj

nj

n

jjjn

n

jj

nj

n

()I

)///)))

)///)))

()///)))

)///)))

H

H

H

H

)

(((

)

(((

)

(((

)

333

333

333

n=0

k=0 k=1 k=2 k=3

Workbook Solutions Chapter 6 10

Q10) Find the 8-point DFT of x[n] using conjugate symmetry property of X[k].

x[n]={1, 1, 0, 0, 0, 0, 0, 0}.

Ans: X[k]={2, 1.707-j0.707, 1-j, 0.293-j0.707, 0, 0.293+j0.707, 1+j, 1.707+j0.707}

H)

()

7

0

8

2

][][n

knj

enxkX

3

Since x[0] and x[1] are non-zero, n goes from 0 to 1

7,2,1,01][

][][

4

1

0

4

)/)

)I

(

)

(

H

kekX

enxkX

kj

n

kj

3

3

We need to compute 42

8

2))'

Nk

011]4[

707.0293.01]3[

11]2[

2

1

2

111]1[

211]0[

4

3

2

4

)()

()/)

()/)

(/)/)

)/)

(

(

(

X

jeX

jeX

jeX

X

j

j

j

3

3

3

Conjugate symmetry

2

1

2

11]1[]7[

1]2[]6[

707.0293.0]3[]5[

][]8[][

*

*

*

*

jXX

jXX

jXX

kXkXkNX

//))

/))

())

)()(

X[k]={2, 1.707-j0.707, 0.293-j0.707, 1-j, 0, 1+j, 0.293+j0.707, 1.707+j0.707}

k=0

CL

AS

S N

OT

ES

Workbook Solutions Chapter 7

1

Workbook Solutions Chapter 7

Workbook Solutions Chapter 7

2

Q1) Given the transfer !"# $%

&'()*&(% performing to a Butterworth low-pass filter,

find the transfer function of the corresponding high-pass filter with cut off

frequency +,.

Given the transfer function, !"# $%

&'()*&(%

Butterworth filter, Low pass High Pass

22

2

2|)(

ss

ssH

ccss c !!"

" ###

Q2)

a) The specification for an analogue Butterworth lowpass filter is given as

follows:

Passband: 0 to 2 kHz (3dB cut-off at 2 kHz)

Transistion band: 2 to 4 kHz

Stop band attenuation: -10 dB (starting at 4 kHz)

The filter is monotonic in the pass and stop bands.

Show that a second order Butterworth filter would satisfy the requirement.

Note: A Butterworth filter of order ‘n’ is defined by

n

c

jH2

1

12

$$%

&''(

)!

"

##

# )(

where #c is the cut-off frequency of the filter

b) Show that the transfer function of a second order normalised Butterworth

filter of the lowpass type is given by

)122(

1)(

!!"

sssH

(a)

4kHz 2kHz

!3dB

Workbook Solutions Chapter 7

3

Recall,

n

c

jH2

2

1

1|)(|

$$%

&''(

)!

"

##

#

Taking log on both sides,

6.12

1699.3

1699.32log

9log2

9110

1log1010

1

1log10|)(|log20

2

2

2

""*

""

"+"$$%

&''(

)

,,-

.

//0

1$$%

&''(

)!+"+

,,,,,

-

.

/////

0

1

$$%

&''(

)!

"

n

n

jwH

n

c

n

c

n

c

##

##

##

Therefore, n=2 will satisfy the requirements.

(b)

A butterworth filter of order n is given by

Workbook Solutions Chapter 7

4

n

n

n

j

s

j

jsHsH

jH

2

2

2

2

1

1

1

1)().(

1

1|)(|

$$%

&''(

)!

"

$$%

&''(

)!

"+

!"

#

##

n is even nssHsH

21

1)()(!

"+

Consider the poles,

n

kj

kjn

n

n

es

es

s

s

2

)2(

)2(2

2

2

1

01

22

22

!3

!3

"*

"

+"

"!

4

3

4 ,22

jj

ees33

"

Second order filter

where k is an integer

Workbook Solutions Chapter 7

5

For a stable filter choose H(s) such that the poles are on the

unit circle.

12

1

2

2

2

2

2

2

2

2

1

))((

1)(

2

21

!!"

,,-

.

//0

1

456

789

+++,,-

.

//0

1

456

789

!++

"

++"*

ss

jsjs

sssssH

:

s1

s2 s4

S3

j#

2/4

2/42/4

-1/;2

-1 1

Poles of

H(s)H(-s) for a

normalised

Butterworth

filter of order 2

Workbook Solutions Chapter 7

6

Q3) Determine the order and the poles of a lowpass Butterworth filter that has a -3

dB bandwidth of 500 Hz and an attenuation of 40 dB at 1000 Hz.

Ans: Order = 7, the poles are sk = 10002e j[2/2 + (2k+1)2/14]

, k = 0,1,2,…,6

!40

!3dB

500Hz 1kHz

Recall,

n

c

jH2

2

1

1|)(|

$$%

&''(

)!

"

##

#

Taking log on both sides,

6438.62

2876.13

2876.132log

9999log2

9999110

1log1040

1

1log10|)(|log20

4

2

2

2

""*

""

"+"$$%

&''(

)

,,-

.

//0

1$$%

&''(

)!+"+

,,,,,

-

.

/////

0

1

$$%

&''(

)!

"

n

n

jwH

n

c

n

c

n

c

##

##

##

Workbook Solutions Chapter 7

7

Therefore, n=7 will satisfy the requirements.

sec/1000)500(2 radHzc 22# ""

n

c

n

c

j

ssHsH

jH

2

2

2

1

1)()(

1

1|)(|

$$%

&''(

)!

"+

$$%

&''(

)!

"

#

##

#

Given that n=7, the poles are given by the following equation

,-

./0

1 !!

!

"

"

+"$$%

&''(

)

"$$%

&''(

)!

22

22

#

#

#

#

14

12

2

14/)2(

14

14

1

01

kj

c

kj

c

c

c

es

ej

s

j

s

j

s

Hence, the poles are given by

,-

./0

1 !!

"2

2

2 14

12

21000

kj

k es

for k = 0,1,…,6

Workbook Solutions Chapter 7

8

Q4) Find the order of a Butterworth low-pass continuous filter with the following

specification: Ans: n=2

a) Cutoff frequency, 75.0"c# and

b) Amplitude response to be at least 20dB down when 3"#

< =n

c

jH2

2

1

1

$$%

&''(

)!

"

##

#

< =

,,,,,,

-

.

//////

0

1

$$%

&''(

)!

"n

c

jH210

210

1

1log10log10

#

##

< =,,

-

.

//

0

1

$$%

&''(

)!+"

n

c

jH

22

10 1log101log10log10##

#

-20dB at 3"#

* > ?n

n

2

10

2

10 )4(1log275.0

31log1020 !"

,,-

.

//0

1$%

&'(

)!+"+

< =

657.14log2

99log

99log4log2;994100)4(1

10

10

1022

""*

"" "!

n

nnn

* n = 2 would satisfy the requirement.

#s #c #

-20dB

dB

0

Workbook Solutions Chapter 7

9

Q5) Consider a Butterworth lowpass filter of order n = 5 and cutoff frequency wc = 1

a) Find the 2n poles of H(s)H(-s)

b) Determine H(s)

c) Find the transfer function of the corresponding high pass filter with cut-off

frequency wc = 1.

(a)

For a Butterworth lowpass filter of order n = 5, there are 2n=10 poles of H(s)H(-s)

uniformly distributed around the unit circle in the s-plane, with the angular spacing of

5

2

(b)

)1618.1)(1618.0)(1(

1

5

3sin

5

3cos

5

3sin

5

3cos

5

4sin

5

4cos

5

4sin

5

4cos)1(

1)(

22 !!!!!"

$%

&'(

) +!$%

&'(

) !!

$%

&'(

) +!$%

&'(

) !!!"

sssss

jsjs

jsjss

sH

2222

2222

(c)

)1618.1)(1618.0)(1(

1)(

22 !!!!!"

ssssssH

LP to HP transformation is

)618.1)(618.0)((

)1618.1)(1618.0)(1(

1)(

2222

5

2

2

2

2

ccccc

c

ccccc

c

sssss

ssssssH

ss

#####

#

#####

#

!!!!!"

!!!!!

"*

@

/5 H(s)

j# H(-s)

:

-1

s-plane

Unit circle

/5

/5

/5

/5

Workbook Solutions Chapter 7

10

Q6) A first order lowpass prototype filter (LP) is to be transformed into a bandstop

(BS) filter with midband rejection frequency !0. Find the transfer function of

the BS filter. Also, find H(s) at s=0, s= and s=±j!.

Note: LP to BS transformation is 2

0

2 #!@

s

Bss where B = Bandwidth and !0 =

Midband rejection frequency.

Prototype filter transfer function, 1

1)(

!"

ssH L

Using the LP to BS transformation we obtain

2

0

2

2

0

2

2

0

21

1)(

#

#

#

!!

!"

!!

"

Bss

s

s

BSsH

where

0)(

1)(

1)(

0

0

"

"

"

3"

A"

"

#js

s

s

sH

sH

sH

CL

AS

S N

OT

ES

Workbook Solutions Chapter 8 1

Workbook Solutions Chapter 8

Workbook Solutions Chapter 8 2

Q1)

a) A second-order analogue band pass filter with an s-domain transfer

function is given by

2

pp

2

p

sbs

sb)s(H

!!

" (1)

Where p and bp are the centre frequency and bandwidth of the filter;

respectively, both expressed in rad/s. By applying the bilinear transformation to

equation (1) a digital filter with the following transfer function can be obtained:

2

2

1

1

2

10

zbzb1

zaa)z(H

##

#

!!

#"

(2)

Show that the digital filter coefficients are given by

22

pp

p

10TTb24

Tb2aa

!!

""

22

pp

22

p

1TTb24

8T2b

!!

#"

; 22

pp

p

22

p

2TTb24

Tb2T4b

!!

#!"

b) A digital filter with a centre frequency of 1000 Hz and a bandwidth of

150 Hz is required. Assuming a sampling frequency of 10kHz, compute

the digital filter coefficients a0, a1, b1 & b2 and show that a0 = a1 =

0.04409115; b1 = -1.551 and b2 = 0.918176

c) Comment on the stability of the digital filter H(z) (see equation 2 above)

which you have obtained .

(a) !2

pp

2

p

sbs

sbsH

"##$

! ! ! ! !

! ! ! 22212222

2

21221121

11

2

1

12

1

12

1

1

248224

22

)1(11214

112

1

12

1

12

1

12

)(

%%

%

%%%%

%%

%

%

%

%

%

%

###%###

%$

###%#%

#%$

#&&'

())*

+

#

%#&&

'

())*

+

#

%&'

()*

+

&&'

())*

+

#

%

$

zTTbzTTTb

TzbTb

zTzzTbz

zzTb

z

z

Tb

z

z

T

z

z

Tb

zH

ppppp

pp

pp

p

pp

p

"""

"

"

2

2

1

1

2

10

zbzb1

zaa%%

%

##

%$

Where 22

pp

p

10TTb24

Tb2aa

"##$$ ,

22

22

124

82

TTb

Tb

pp

p

"

"

##

%$

Workbook Solutions Chapter 8 3

22

pp

22

pp

2TTb24

TTb24b

"##

"#%$

(b) sradp /200010002 ,," $-$ , sradbp /3001502 ,, $-$

In order to compensate for the non-linear nature of the bilinear

mapping it is necessary to pre-warp these frequencies in the

prototype analogue filter.

sec/4.64982

102000tan

10

2

2tan

2'4

4rad

T

Tp p $&&'

())*

+.$&

'

()*

+$%

%,""

sec/2.9432

10300tan

10

2'4

4rad

pb $&&

'

())*

+$

%

%,

! ! 610926.4104.6498102.943242424422 $-#--#$## %%TTb pp "

0409115.0610926.4

102.9432 4

10 $--

$$%

aa

551.1610926.4

8104.64984.64982 8

1 %$%---

$%

b

918176.0610926.4

233646.42 $$b

(c) b1 and b2 is inside the triangle of stability. Hence, filter is

stable.

Q2) A second-order resonant system is given by

2

p

p

p2 sQ

s

1)s(H

""

#&&'

())*

+#

$

p

p

pQ

b"

$

By applying the impulse invariant transformations to the above equation, a digital

filter with the following transfer function can be obtained

2

2

1

1

1

1)(

%%

%

##$

zbzb

KzzH

Show that the filter coefficients b1 and b2 are given by,

TpTpebTqeb 22 2

221 );cos(2%% $%$

Also show that )sin(4 222 TqeqK Tp%%$ , where

p

p

Qp

22

"$ ; 14 2

22 %$ pQpq

resonant frequency

Q-factor

Associated

with the pole Bandwidth

Workbook Solutions Chapter 8 4

2

pp

2

2

p

p

p2sbs

1

sQ

s

1)s(H

"##$

"#&&'

())*

+ "#

$

2

4

22

4 2222

2,1

pppppp bj

bbbs

%/%$

%/%$

""

1Q4Q2

jQ2

2

P

p

p

p

p %"

/"%

$

222,1 jqps /%$1Q4pq,

Q2p 2

p22

p

p

2 %$"%

$

2121

1ss

B

ss

A

)ss)(ss(

1)s(H

%#

%$

%%$

01

234

5

%%

%%$

2121 ss

1

ss

1

ss

1

!

!

2

2

1

1

1

2

2

1

1

1

2

2

2

1

1

1

2

221

1

21

11

21

1

11

2

1

12

1

221

1

1

1

1

11)(

22

2

222

2

22

2

222

2222

%%

%

%%

#%%%

%%

%%%

%%%

%%

%%%

%%%%#%

##$

##

&&'

())*

+ %

$

##%

.$

#&&'

())*

+ #%

%%

$

&'

()*

+%

%%%

$

zbzb

Kz

zbzb

j

eeze

q

zbzb

eeez

jq

zeee

ze

eeez

ss

zezesszH

TjqTjqTp

TpTjqTjq

TpTjqTjq

Tp

TpTjqTjq

TjqTpTjqTp

! )sin(1

;;cos2 2

2

2

221222 Tqe

qKebTqeb TpTpTp %%% $$%$

Impulse invariant transfer

function

Workbook Solutions Chapter 8 5

Q3)

a) Determine the impulse response hd[n] of the bandpass filter whose

frequency response is given by

67

689 ::$

%

otherwise04

3

4)(3 ,

;,

;;j

d

eH

b) To obtain a finite impulse response from hd[n] a Bartlett window of length

N = 7 is used. Compute the coefficients of the FIR filter with this impulse

response.

Note: The Bartlett Window function is given by

< =

!

666

7

666

8

9

%::%

%%

%>:

%

$

otherwise0

12

1

1

22

2

10

1

2

NnN

N

n

Nn

N

n

nwB

Where N is the length of the window.

Ans: < = < =789

$

?%%%$ %

3

3)3sin()3sin(

21

443

)3(1

n

nnnnh

n

d

,,,

Ans:

(a)

667

668

9

$

?01

234

5 %%%%$

01

234

5%#%

%$

01

234

5

%#0

1

234

5

%$

#$$

%%%%%%

%%

%

%

%

%

%

%

%@@@

Rule)sHopital'L'(By32

1

34

)3sin(4

3)3sin(

)3(

1

)()()3(2

1

)3(2

1

)3(2

1

2

1

2

1)(

2

1)(

)4

()3()4

3()3()

4

3()3()

4()3(

4

3

4

)3(4

4

3

)3(

4

3

4

)3(4

4

3

)3(

n

nnnn

eeeenj

nj

e

nj

e

dededeHnh

njnjnjnj

njnj

njnjjn

dd

,,,

,

,,

;,

;,

;;,

,,,,

,

,

;,

,

;

,

,

;

,

,

;,

,

;

h[n] 0

,3

1% 0

2

1 0

,3

1% 0

n 0 1 2 3 4 5 6

Workbook Solutions Chapter 8 6

(b) N = 7

666

7

666

8

9

>:%

%

>:%

$

otherwise

nN

n

nN

n

nWB

0

631

22

301

2

)(

WB(0) = 0 WB(4) =

!

WB(1) = "

! WB(5) =

"

!

WB(2) =

! WB(6) = 0

WB(3) = 1

h(n) = hd(n) . WB(n)

h(0) = hd(0) . WB(0) = 0

h(1) = hd(1) . WB(1) = #"

!$

h(2) = 0

h(3) = 1 - 1/2 = 1/2

h(4) = h(2) = 0

h(5) = h(1) = #"

!$

h(0) = 0

Q4) A frequency sampling filter is shown below and N = 3

a) Determine a0 , a1 & a2 such that this filter has a real impulse response

1-z-N

X(z)

1/N +

1

0

z1

a%%

1N

2j

2

1N

2j

1

ze1

a

ze1

a

%%% %

#

%,,

Y(z)

Workbook Solutions Chapter 8 7

h[n], where 3)0( $H and 336

3

2)( jH #$

$,

;;

kN

kj

aeH $&&'

())*

+ ,2

; kN

kj

aeH %

%$)(

2,

b) Draw the frequency-sampling filter structure using delay elements,

multipliers and adders.

c) Derive a general expression for H(;). Ans: H(;)=5-4e-j

+2e-j2

d) Give a filter that has same frequency response H(;), but is realized an FIR

filter.

(a)&&&

'

(

)))

*

+

%

#

%

#%

%&'

()*

+$%

%%

%%

1

2

2

1

2

1

1

0

111

)1(1

)(

ze

a

ze

a

z

az

NzH

Nj

Nj

N

,,

N = 3, for a realizable filter H(;) = H*(-;)

H(0) = 3 A a0 = 3

)32(3),32(3|)( *

12

3

21 jaajHa %$$#$$$

,;

;

(b)

+ +

y(n)

-1

x(n)

z-1

-1

+

z-1

-1

+

z-1

3

4 3

+

1/N

z-3

-1

3

2,

Im(z)

Re(z)

Workbook Solutions Chapter 8 8

01

234

5

##

%$

00

1

2

33

4

5

%

%#

%

#$

%%

%

%%

%21

1

13

2

13

2 1

43

1

32

1

323

1 zz

z

ze

j

ze

j

RH

jj,,

(c)

21

211

213

121

13

245

)1)(1(

2453

3

1

1

3

1

)4(3

3

1)(

%%

%%%

%%%

%%%

%%

#%$

01

234

5

##%#%

.%

$01

234

5

%#

##%%

$

zz

zzz

zzz

zzz

zzzH

;;;; 2245|)()( jj

ezeezHH j

%%$

#%$$

(d) h(0) = 5, h(1) = - 4 and h(2) = 2.

CL

AS

S N

OT

ES

Workbook Solutions Chapter 9 1

Workbook Solutions Chapter 9

Workbook Solutions Chapter 9 2

Q1) A signal x[n] has a spectrum !"# as shown below. The signal is applied to the

system shown below. The ideal lowpass filter H(z) has a gain factor of 1 in the

passband and a cut-off frequency " $%

&. Sketch ' !"#'( ')!"#'( '*!"#'( '+!"#'

against "

2y[n]v[n]

H(z)3x[n] w[m]

!" ! #!

X(#)!1

$ %&!"$ %&!

Workbook Solutions Chapter 9 3

-

-2 /3

/3- /3

2 /9-2 /9

|V(#)|

|W(#)|

1

2 /3-2 /3

#

|X(#)|

1

#

31

#

2

4 /9-4 /9

1/2

|Y(#)|

#

2 /3

Workbook Solutions Chapter 9 4

Q2) A signal has been sampled at 44 kHz. For a particular application, this signal is

required to be used at a reduced sampling rate of 16 kHz. Explain how you

would efficiently implement a system to achieve this, indicating the type of

digital filter you would use (give reasons).

Signal is finally processed at a rate of 16 kHz. Therefore, it must be bandlimited to ,-..

/$ 0123. This is the required cut off frequency of the LPF. Since M>L, the anti-

aliasing requirement is more stringent than that from the interpolator.

11

4

1644

'

'(

M

L

M

L

kHzf

BW s 811

4.

2

Use FIR filter since it provides computational rate of !"

# which is significantly low.

On the other hand, IIR filter is NOT desirable in this case since it takes every n to

compute requiring more storage and longer computational time.

(Note: IIR filter needs previous outputs to compute Nth

input)

f s/2f s/2N

FIR

LPF

CL

AS

S N

OT

ES