You are on page 1of 94

SOLUTIONS MANUAL

to accompany

Digital Signal Processing: A Computer-Based Approach Fourth Edition

Sanjit K. Mitra

Prepared by

Chowdary Adsumilli, John Berger, Marco Carli, Hsin-Han Ho, Rajeev Gandhi, Martin Gawecki, Chin Kaye
Koh, Luca Lucchese, Mylene Queiroz de Farias, and Travis Smith Copyright © 2011 by Sanjit K. Mitra.
No part of this publication may be reproduced or distributed in any form or by any means, or stored in a
database or retrieval system, without the prior written consent of Sanjit K. Mitra, including, but not
limited to, in any network or other electronic Storage or transmission, or broadcast for distance
learning.

Chapter 10 – Part 1

10.1 For this problem, we have N =71 and ωs −ωp =0.04π and we assume that δp =δs .

(a) Using Kaiser’s formula of Eq. (10.3):

δs =10N 14.6()ωs −ωp ()/2π[]−13−20

⎛⎝

⎜ ⎜⎜ ⎞ ⎠

⎟ ⎟ ⎟ =107114.6()0.04π()/2π[]−13−20

⎛⎝

⎜⎞ ⎠

⎟ =0.0206.

αs =−20log 10δs ()=33.7320 dB.

(b) Using Bellanger’s formula of Eq. (10.4):

δs =0.1⋅ 10−3(N +1) ωs −ωp ()/2π2⎛ ⎝ ⎜⎜⎞ ⎠ ⎟ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ ⎟


1/2=0.1⋅ 10−72⋅ 3⋅ 0.04π/2π2⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ 1/2

=0.0263. αs =−20log 10δs ()=31.6 dB.

(c) Using Hermann’s formula of Eq. (10.5), we first find that:

F δs , δs ()=b 1+b 2log 10δs −log 10δs ()=b 1=11.01217.

Therefore:

D ∞δs , δs ()=N ωs −ωp ()/2π+F δs , δs ()ωs −ωp ()

2
/4π2

=710.04π()/(2π) +11.012170.04π()2

/(2π) 2=1.4244.

Solving for:

D ∞δs ()=a 1log 10δs ()2+a 2log 10δs ()+a 3⎡ ⎣ ⎢ ⎤

⎦ ⎥ log 10δs ()

a 4log 10δs ()2+a 5log 10δs ()+a 6⎡ ⎣ ⎢ ⎤

=a 1log 10δs ()3+a 2log 10δs ()2

+a 3log 10δs ()− a 4log 10δs ()2−a 5log 10δs ()−a 6

=a 1log 10δs ()3

+a 2−a 4()log 10δs ()2

+a 3−a 5()log 10δs ()−a 6.

Let x =log 10δs (), and thus

D ∞δs ()=0.005309x 3+0.06848x 2−1.0702x −0.4278=1.4244.

Solving this, we get: x =−21.5147, 10.2049, −1.589.

The most reasonable solution is the last one, which yields:

δs =10x =10−1.5890=0.0258, αs =−20log 10δs ()=31.78 dB.

10.2 For this problem, we have N =71 and ωs −ωp =0.04π=Δω. Using Eq. (10.45): αs =2.285Δω()N
+8=2.2850.04π()71+8=28.3871 dB.

10.3 (a) From Eq. (10.17): H HP (e j ω) =0, <ωc , 1, ωc ≤≤π,

⎧ ⎨ ⎩ h HP n []=

H HP

e j ω()

e j ωn d ω−π
π

∫=12π

e j ωn d ω−π

−ωc

∫+12π

e j ωn d ωωc

=12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ −π

−ωc +12πe

j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ωc

π=12πe −j ωc n jn −e −j πn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ +12πe j πn jn −e j ωc n jn ⎡ ⎣ ⎢ ⎢ ⎤

⎦⎥ ⎥ =

sin(πn ) πn −sin(ωn )

πn

. Using the properties of the sinc function, we arrive at: h HP 0[]=1−ω

Therefore: h HP n []=1−ωπ, n =0, −sin(ωn ) πn

, otherwise. ⎧ ⎨ ⎪ ⎩ ⎪ (b) From Eq. (10.18): H BP (e j ω) =0, <ωc 1, 1, ωc 1≤ω≤ωc 2, 0, ωc 2≤ω≤π, ⎧ ⎨


h BP n []=

H BP (e j ω) e j ωn d ω−π

∫=12π
e j ωn d ω−ωc 2

−ωc 1

∫+1

e j ωn d ωωc 1

ωc 2∫

=12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ −ω

c2

−ωc 1+12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ωc 1

ωc 2

=12πe −j ωc 1n jn −e −j ωc 2n jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ +12πe j ωc 2n jn −e j ωc 1n jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥

sin(ωn ) πn −sin(ωn )

πn

(c) From Eq. (10.20): H BS (e j ω) =1, <ωc 1,

0, ωc 1≤ω≤ωc 2, 1, ωc 2≤≤π. ⎧ ⎨ ⎪

⎩ ⎪ h BS n []=

H BS

(e j ω) e j ωn d ω−π

∫=12π

e j ωn

d ω−π

−ωc 2∫+12π

e j ωn

d ωωc 2
π

∫+12π

e j ωn d ω−ωc 1

ωc 1

12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ −π

−ωc 2

+12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥

ωc 2

+12πe j ωn jn ⎡ ⎣ ⎢ ⎢ ⎤

⎦⎥ ⎥

−ωc 1

ωc 1

=12πe −j ωc n jn −e −j πn jn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ +12πe j πn jn −e j ωc n jn ⎡ ⎣ ⎢ ⎢ ⎤

⎦ ⎥ ⎥ 12πe −j ωc 1n jn −e −j ωc 1n jn ⎡ ⎣ ⎢ ⎢ ⎤

⎦ ⎥ ⎥ =sin(πn ) πn −sin(ωn ) πn +sin(ωn ) πn

Using the properties of the sinc function, we arrive at: h BS 0[]=1−ω−ωπ

Therefore:h HP n []=1−ω−ωπ, n =0, sin(ωn ) πn −sin(ωn ) πn

, otherwise. ⎧ ⎨ ⎪ ⎩ ⎪

10.4 The ideal L -band digital filter H ML (z ) has a frequency response given by: H ML (e j ω) =A k , for
ωk −1≤ω≤ωk , 1≤k ≤L .

It can be considered as sum of ideal bandpass filters with cutoff frequencies at: ωc 1k =ωk −1 and ωc
2k =ωk , where ωc 10=0 and ωc 2L =π. From Eqn. (10.19) the impulse response of an ideal bandpass
filter is given by:

h BP [n ]=sin(ωn ) πn −sin(ωn )

πn
.

Therefore: h BP k

[n ]=sin(ωn ) πn −sin(ωn ) πn . .

Hence: h ML [n ]=h BP k

[n ]k =1

L ∑=A k sin(ωn ) πn −sin(ωn ) πn

⎛⎝⎜

⎞ ⎠ ⎟ k =1

∑ =A 1sin(ωn ) πn −sin(0n ) πn ⎛ ⎝ ⎜⎞ ⎠

⎟+

Ak

sin(ωn )

πn

k =2

L −1∑

−A k sin(ωn ) πn −sin(ωn ) πn ⎛ ⎝ ⎜⎞ ⎠ ⎟ k =2

L −1

∑+A L sin(ωn ) πn −sin(ωn ) πn

⎛ ⎝ ⎜⎞ ⎠ ⎟

=A 1sin(ωn ) πn

A k sin(ωn ) πn k =2

L −1∑−A k sin(ωn ) πn

k =2

L −1

∑−A L sin(ωn )

πn

=A k sin(ωn )
πn

Ak

sin(ωn )

πn

k =2

∑k =1

L −1∑.

Since ωL =π, sin(ωL n ) =0. We can add a term of:A L

sin(ωn )

πn

to the first sum in the above expression and change the index range of the second sum, resulting in:

h ML [n ]=A k sin(ωn )

πn

A k +1

sin(ωn )

πn

k =1

L −1∑k =1

L ∑. Finally, since A L +1=0, we can add a term: A L +1sin(ωn )

πn

to the second sum. This leads to:

h ML [n ]=A k sin(ωn ) πn −A k +1sin(ωn )

πn

k =1

∑k =1
L∑=

(A k −A k +1)

sin(ωn )

πn

k =1

∑.

10.5 The impulse response for the Hilbert Transformer is given by:

H HT (e j ω

) =j , −π<ω<0, −j , 0<ω<π. ⎧ ⎨ ⎩

Therefore : h HT [n ]=

H HT (e

)e

j ωn

d ω−π0

∫+

12π

H HT (e j ω) e j ωn d ω0

=12π

je j ωn d ω−π

∫−1

2πje j ωn d ω0

∫=
22πn 1−cos(πn ) ()=

2sin 2(πn /2)

πn

, n ≠0.

For n =0, h HT [0]=

jd ω−π

0∫

12π

jd ω0

∫=0.

Hence: h HT [n ]=0, if n =0, 2sin 2(πn /2)πn

, if n ≠0. ⎧ ⎨ ⎪

⎩⎪

Since h HT [n ]=−h HT [−n ], and the length of the truncated impulse response is odd, it is a

Type 3 linear-phase FIR filter.

From the frequency response plots given above, we observe the presence of ripples at the band edges
due to the Gibbs phenomenon caused by the truncation of the impulse response.

10.6 First, we note that: € H {x [n ]}=h HT [n −k ]x [k ] k =−∞

∑. .

Hence, € F H x [n ]

{}

{}=H HT (e j ω) X (e j ω) =jX (e j ω), −π<ω<0, −jX (e j ω), 0<ω<π. ⎧


(a)Let € y [n ]=H {H {H {H {H {H {x [n ]}}}}}}.

Hence:

Y (e j ω) =

(j ) 6X (e j ω), −π<ω<0,

(– j ) 6X (e j ω), 0<ω<π,

=−X (e j ω).

Therefore, y [n ]=− x [n ].

(b)Define € g [n ]=H x [n ]

{}, and h *[n ]=x [n ]. Then:

Hx[]

{}x [ ]

=– ∞

∑=g [ ]h *[ ]

=– ∞

∑.

But from Parseval's relation in Table 3.4:

g [ ]h *[ ]

=– ∞

∑=1

G (e j ω)
–π

∫G (e j ω) d ω. Therefore:

Hx[]

{}x [ ]

=– ∞

∑=1

H HT (e j ω)

−π

∫X (e j ω) X (e – j ω) d ωwhere H HT (e j ω) =

j , −π<ω<0,

−j , 0<ω<π.

Since the integrand H HT (e j ω) X (e j ω) X (e – j ω) is an odd function of ω,

H HT (e j ω)

−π

∫X (e j ω) X (e – j ω) d ω=0.

As a result:

€ H x [ ]{}x [ ] =– ∞∞

∑=0.

10.7 Given the frequency response for the ideal low pass filter: H LP (z ) =h LP [n ]z −n n =0

N
∑.

Its frequency response is shown in Figure (a) below.

A plot of the frequency response of: H HT (e j ω) = H LP (e j (ω−π2

) +H LP (e

j (ω+π2

is shown in Figure (b) below.

It is evident from this figure that H HT (e j ω) is the frequency response of an ideal Hilbert transformer.
Therefore, we have:

H HT (e j ω) =H LP (e

j (ω+π2

) +H LP (e

j (ω−π2

=h LP [n ]e

−jn (ω+π2

n =0N

∑+

h LP [n ]e

−jn (ω−π2

n =0


=

h LP [n ]n =0

N ∑e −jn ωe −jn π/2+e jn π/2()=2h LP [n ]e −jn ωn =0

∑cos n π2⎛ ⎝⎜⎞ ⎠

⎟ . For n odd, cos(n ω/2)=0 and we can drop all odd terms in the above expression. Let

N =2M with N even and let r =2n . Then, we can rewrite the above equation as:

H HT (e j ω) =

2h LP [2r ]r =0

∑cos(r π) e −j 2r ω.

The corresponding transfer function of the Hilbert transformer is therefore given by:

H HT (z ) =

2h LP [2n ]cos(n π) z −2n n =0

M ∑=2(−1) n h LP [2n ]z −2n n =0

∑.

10.8 We know that the frequency response of the ideal differentiator is given by:H DIF (e j ω) =j ω.

Hence: h DIF [n ]=12πj ωe j ωn −ππ∫d ω=j 2πωe j ωn −ππ∫d ω=j 2πωe j ωn jn +e j ωn n ⎛ ⎝ ⎜⎜⎞⎠⎟⎟
−ππ. Therefore: h DIF [n ]=cos(πn ) n −sin(πn ) πn

=cos(πn )

n , n ≠0. For n =0: h DIF [0]=1

2πj ωd ω−ππ∫=0. Hence: h DIF [n ]=0, n =0, cos(πn ) n , |n |>0. ⎧ ⎨ ⎪ ⎩ ⎪

Since h DIF [n ]=−h DIF [−n ], the truncated impulse response is a Type 3 linear-phase FIR filter. The
magnitude responses of the above differentiator for several values of M are given below:

10.9 Given that N = 2M + 1, we can write the impulse response of the high pass filter as:

ˆ h HP

[n ]=1−ωπ, for n =M , −sin ωc (n −m ) ()π(n −m ) , if n ≠M ,0≤n <N , 0, otherwise. ⎧ ⎨ ⎪ ⎪

⎪⎩
⎪⎪

⎪ Next, we check for the delay complementary property:

ˆ H HP (z ) +ˆ H LP

(z ) =ˆ h HP

[n ]z −n

n =−∞

∑+

ˆ h LP

[n ]z −n

n =−∞

∑=

ˆ h HP

[n ]z −n

n =0N −1

∑+

ˆ h LP

[n ]z −n n =0

N −1

∑ =

ˆ h HP [n ]+ˆ h LP

[n ]()z −n n =0

N −1

∑.

But: ˆ h HP [n ]+ˆ h LP [n ] = ˆ h HP [n ]+ˆ h LP [n ]=

0, 0≤n ≤N– 1, n≠M , 1, n=M.


Hence, ˆ H HP (z ) + ˆ H

LP (z ) =z

– M , and the two filters are delay-complementary.

10.10 The frequency response of the zero-phase ideal linear passband lowpass filter is:

H LLP (e j ω) =

, <ωc , 0, otherwise. ⎧

Therefore, the impulse response is computed as:

h LLP [n ]=

−ωe j ωn d ω

−ωc

∫+ωe j ωn d ω0

ωc

∫⎛

⎞⎠⎟

ωe j ωn
jn

e j ωn

– ωc

ωe j ωn

jn

e j ωn n

⎤ ⎦ ⎥ ⎥ 0ωc ⎛

⎜⎜

⎞⎠⎟

⎟⎟

=
1

ωe j ωc n −ωe −j ωc n

jn

e j ωc n +e −j ωc n −2 n

⎜⎜

⎞⎠⎟⎟

πn

sin(ωc n ) +

cos(ωn ) −1πn .

10.11 The frequency response of the zero-phase ideal band-limited differentiator is:

H BLDIF (e j ω) =

ω, <ωc , 0, otherwise. ⎧

Hence , the impulse response can be found as follows:

h BLDIF [n ]=

ωe j ωn d ω

−ωc

ωc

∫=1

ωe j ωn
jn

e j ωn n

⎤ ⎦ ⎥ ⎥ −ωc ωc ⎛

⎜⎜

⎞⎠⎟

⎟⎟

ωe j ωc n +ωe −j ωc n

jn

e j ωc n −e −j ωc n n

⎜⎜

⎞⎠⎟⎟

=– j ω

πn

cos(ωc n ) +j

πn 2
sin(ωc n ).

10.12 The frequency response of a causal ideal notch filter can thus be expressed as:

€ H notch (e j ω) =

H notch (ω) e j θ(ω) ,

where €

H notch (ω) is the amplitude response which can be expressed as:

H notch (ω) =

1, 0≤ω≤ωo ,

−1, ωo <ω<π.

It follows then that

H notch (ω) is related to the amplitude response

H LP (ω) of the ideal lowpass filter with a cutoff at ωo through

H notch (ω) =±[2

H LP (ω) −1]. Hence, the impulse response of the ideal notch filter is given by h notch [n ]=±2h LP [n
]−δ[n ]

[], where: h LP [n ]=

sin(ωn )

πn

, −∞<n <∞.

Therefore: h notch [n ]=

±1, n =0,

2sin(ωn )
πn

, otherwise.

⎩⎪

10.13 First, consider another filter with a frequency response G (e j ω) given by

G (e j ω) =

0, 0≤ω≤ωp ,

−π

2Δω

sin

π(ω−ωp )

Δω

⎟, ωp <ω≤ωs ,

−π

2Δω

sin

π(ω+ωp )

Δω


⎟, −ωs ≤ω≤−ωp ,

0, elsewhere.

Clearly: G (e j ω) =

dH (e j ω)

Finding the impulse response of the secondary function:

g [n ]=

G (e j ω) e j ωn d ω

−π

−π

8πΔωj

j
π(ω−ωp )

Δω

⎜⎜

⎟⎟

e j ωn d ω

ωp

ωs

∫−e −j

π(ω−ωp )

Δω

⎜⎜

⎟⎟

e j ωn d ω

ωp

ωs

⎜⎜
+e

π(ω+ωp )

Δω

⎜⎜

⎟⎟

e j ωn d ω

−ωs

−ωp

∫−e −j

π(ω+ωp )

Δω

⎜⎜

⎟⎟

e j ωn d ω

−ωs

−ωp


⎟⎟

−1

j 8Δω

j πωp

Δω

j ωs n +

Δω

−e

j ωp n +

Δω

⎟)
jn+

Δω

−e

j πωp

Δω

e
j ωs n −

Δω

−e

j ωp n −πΔω⎛

⎞⎠⎟

jn−

Δω

⎤⎦⎥

⎥⎥⎥
+e j πωp Δωe −j ωp n +πΔω⎛ ⎝ ⎜ ⎞ ⎠ ⎟ −e −j ωs n +πΔω⎛ ⎝ ⎜ ⎞ ⎠ ⎟ j n +πΔω⎝ ⎜ ⎠ ⎟ ⎡ ⎣ ⎢ ⎢ ⎢ ⎢
⎤ ⎦ ⎥ ⎥ ⎥ ⎥ −e −j πωp Δωe −j ωp n −πΔω⎛ ⎝ ⎜ ⎞ ⎠ ⎟ −e −j ωs n −πΔω⎛ ⎝ ⎜ ⎞ ⎠ ⎟ j n −πΔω⎝ ⎜ ⎠ ⎟
⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ =−14Δωj −sin(ωs n ) −sin(ωp n ) n +πΔω⎝ ⎜ ⎠ ⎟ −

−sin(ωs n ) −sin(ωp n ) n −πΔω⎝ ⎜ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜⎜ ⎜ ⎞ ⎠

⎟⎟⎟ =

sin(ωs n ) +sin(ωp n ) 4Δωj

−2π/Δωn 2−πΔω⎛ ⎝ ⎜ ⎜⎜ ⎜ ⎞

⎟ ⎟ ⎟ =sin(ωn )cos(Δωn /2)Δωj 1π1−(Δω/π) 2n 2⎛ ⎝ ⎜⎜⎞

⎟ ⎟ . Using the properties of the DTFT, we know that: h LP [n ]=j

g [n ].

Therefore: h LP [n ]=cos(Δωn /2)1−(Δω/π) n ⎛ ⎝

⎜⎞ ⎠ ⎟ sin(ωn ) πn ⎛ ⎝ ⎜⎞

⎠⎟.

10.14 From Eq. (10.9): ΦR =12π

H t e j ω()−H d e j ω()

2d ω−π

π∫, , where

Hte

()

h t n []e −j ωn n =−M

∑.
Using Parseval’s relation, we can write: ΦR =h t n []−h d n []2n =−∞

h t n []−h d n []2

h d 2n []n =−∞−M −1

∑+h d 2n []n =M +1

n =−M

Therefore: ΦHaan =h d n []⋅ w Hann n []−h d n []2n =−∞

h d n []12+12cos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜⎞ ⎠

⎟ −h d n []2n =−M

+h d

2n []n =−∞

−M −1

∑+h d 2

n []n =M +1∞

Hence: ΦExcess =ΦR −ΦHaan =h d n []⋅ w R n []−h d n []2n =−M


M

h d n []⋅ 12+12

cos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜⎞ ⎠ ⎟ −h d n []2

n =−M

=−

h n []2cos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ −

h n []

n =−M

=121+2M ()cos 2πM 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ −2. 10.15 For a Hamming window: ΦHamm =

h d n []⋅ w Hamm n []−h d n []2n =−∞

∑. Recall

ΦR =

h t n []−h d n []2n =−∞

∑.

Therefore: ΦExcess =ΦR −ΦHamm =−

h d n []0.46cos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ −0.46⎛ ⎝ ⎜ ⎞⎠⎟2n =−M

=−0.46h d n []cos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ −1⎛ ⎝ ⎜ ⎞⎠⎟2


n =−M

∑=0.462M +1()cos 2πM 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ −12

10.16 The responses of an ideal lowpass filter with a cutoff frequency ωc =π/2 are:

h HB n []=sin ωc n ()πn =sin πn /2()πn ,

H HB (e j ω

) =1, −π/2<ω<π/2,0, otherwise. ⎧ ⎨ ⎩

The frequency responses of the Hilbert Transformer (from Eq. (10.24)) and the ideal discrete-time
Differentiator (from Eq. (10.26)) are as follows:

H HT (e j ω

) =j , −π<ω<0, −j , 0<ω<π. ⎧ ⎨ ⎩

H DIF (e j ω) =j ω. In order to get derive the impulse response of the Hilbert Transformer, we note that:
H HT (e j ω) =jH HB (e j ω−π/2()) −jH HB (e j ω+π/2()). Therefore, using the properties of the DTFT, we
get: h HT n []=jh HB [n ]e jn (π/2) −jh HB [n ]e −jn (π/2)

=2h HB [n ]12j e jn (π/2) −12j e −jn (π/2) ⎛ ⎝ ⎜⎞ ⎠

=2n πsin n π2⎛ ⎝ ⎜⎞ ⎠ ⎟ s in n π2⎛ ⎝ ⎜⎞

⎠ ⎟ . In order to derive the impulse response of the Differentiator, we note that: H DIF (e j ω) =j ωH HB
(e j ω−π/2()) +j ωH HB (e j ω+π/2()).

Therefore, using the properties of the DTFT, and in particular: ∂

∂n

x [n ]⇔
j ωX e j ω()

We get (by use of the double angle formula):

h DIF n []=∂∂n h HB [n ]e jn (π/2) ()+∂

∂n

h HB [n ]e −jn (π/2) ()

=2∂∂n h HB [n ]12e jn (π/2) +12

e −jn (π/2) ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ =2∂∂n h HB [n ]cosπn 2⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛

⎝ ⎜ ⎞ ⎠ ⎟ =∂∂n 2sin(πn /2)cos(πn /2)πn ⎛ ⎝ ⎜⎞ ⎠ ⎟ =∂∂n sin(πn ) πn ⎛ ⎝ ⎜⎞ ⎠ ⎟ =


cos(πn ) πn −sin(πn )

πn

10.17 For each problem, the codes used to generate the plots are given below, assuming that ωc

is the average of the stopband and passband frequencies:

fRange = -M:M;

idealLPF = (wc/pi)*sinc((wc/pi)*fRange); fNum = idealLPF.*hann(L)'; [h,w] = freqz(fNum,1,512);

plot(w/pi,20*log10(abs(h)));grid;

xlabel('\omega/\pi'); ylabel('Gain, dB');

(a) Given:ωp =0.42π, ωs =0.58π, δp =0.002, δs =0.008.

Thus: Δω=0.16π, αs =−20log 10δs =41.93 dB.

From Table 10.2, we see that for fixed-window functions, we can achieve the minimum stopband
attenuation by using Hann, Hamming, or Blackman windows. Hann will have the lowest filter length:

Since M =3.11π

0.16π

=19.43, N Haan =2M +1⎡ ⎤ =40.

The corresponding frequency response, generated with the code, is shown below:

(b) Given:ωp =0.65π, ωs =0.76π, δp =0.002, δs =0.004.

Thus: Δω=0.11π,

αs

=−20log 10δs =47.95 dB.

From Table 10.2, we see that for fixed-window functions, we can achieve the minimum stopband
attenuation by using Hann, Hamming, or Blackman windows. Hann will have the lowest filter length:

Since M =3.11π

0.16π

=28.27, N Haan =2M +1⎡ ⎤ =59.

The corresponding frequency response, generated with the code, is shown below:

10.18 The code for the plotting of the frequency response is as follows:

fRange = -M:M;
idealBPF = (wc2/pi)*sinc((wc2/pi)*fRange)... -(wc1/pi)*sinc((wc1/pi)*fRange); fNum =
idealBPF.*hann(L)'; [h,w] = freqz(fNum,1,512);

plot(w/pi,20*log10(abs(h)));grid;

xlabel('\omega/\pi'); ylabel('Gain, dB');

We are given that: ωp 1=0.4π, ωp 2=0.55π, ωs 1=0.25π, ωs 2=0.75π,

δp =0.02, δs 1=0.006, δs 2=0.008.

We can compute the following: Δω1=0.15π, Δω2=0.2π,

αs 1=−20log 10δs 1=44.43 dB, αs 2=−20log 10δs 2=41.93 dB.

From Table 10.2, we see that the Hann window will have minimum length and meet the minimum
stopband attenuation. We can use the smaller stopband, so that it definitely meets

these more restrictive criteria: M =3.11π

0.15π

=20.733.

Therefore

N =43. The frequency response is given below:

10.19 The code for this problem is given below:

wp1 = 0.4*pi;

wp2 = 0.55*pi;

ws1 = 0.25*pi;

ws2 = 0.75*pi;

dp = 0.002;

ds1 = 0.006;

ds2 = 0.008;

as1 = -20*log10(ds1);

as2 = -20*log10(ds2);

diff1 = wp1 - ws1;

diff2 = ws2 - wp2;

diff = min(diff1,diff2);

wc1 = (wp1+ws1)/2;
wc2 = (wp2+ws2)/2;

M = 3.11*pi/diff;

L = 2*ceil(M) + 1;

[as1 as2 M L]

M = ceil(M);

fRange = -M:M;

idealBPF = (wc2/pi)*sinc((wc2/pi)*fRange)... -(wc1/pi)*sinc((wc1/pi)*fRange);

fNum = idealBPF.*hann(L)';

[h,w] = freqz(fNum,1,512);

plot(w/pi,20*log10(abs(h)));grid;

xlabel('\omega/\pi'); ylabel('Gain, dB'); We are given that: ωp 1=0.33π, ωp 2=0.8π, ωs 1=0.5π, ωs


2=0.7π, δp 1=0.008, δp 2=0.01, δs =0.03.

We can compute: Δω1=0.17π, Δω2=0.2π, αs =−20log 10δs =41.93 dB.

From Table 10.2, we see that the Hann window will have minimum length and meet the minimum
stopband attenuation. Again, can use the smaller stopband, so that it definitely

meets the more restrictive criteria:M =3.11π

0.17π

=31.1.

Therefore N =65. The frequency response is given below:

10.20 The raised cosine window is given as follows:

w GC

[n ]=α+βcos 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ +γcos 4πn 2M +1⎛ ⎝ ⎜⎞

⎠⎟⎡ ⎣ ⎢ ⎤ ⎦

⎥ w R [n ] =α+2βe j 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ +e −j 2πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +2γe


j 4πn 2M +1⎛ ⎝ ⎜⎞

⎠ ⎟ +e −j 4πn 2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟

⎡ ⎣ ⎢ ⎢ ⎢ ⎤ ⎦

⎥ ⎥ ⎥ w R [n ]. Hence: ΨGC (e j ω) =αΨR (e j ω) +2βΨR e j ω−2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟


⎟ ⎟ +2βΨR e j ω+2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠
⎟ ⎟ ⎟ +2γΨR e j ω−4π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +2γΨR e j ω+4π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟
⎛⎝⎜⎜⎜⎞⎠

⎟ ⎟ ⎟ . For the Hann window: α=0.5, β=0.5, and γ=0. Hence:

ΨHaan (e j ω) =0.5ΨR (e j ω) +ΨR e j ω−2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +2βΨR e j


ω+2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠

⎟⎟⎟

=0.5sin (2M +1) ω2

⎛ ⎝ ⎜⎞ ⎠ ⎟ sin(ω/2)

+sin (2M +1) ω2−π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜

⎞ ⎠ ⎟ sin ω2−π2M +1⎝ ⎜⎠

⎟ +sin (2M +1) ω2+π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝

⎜⎞⎠⎟

sin ω2+π2M +1⎝ ⎜⎠

⎟ . For the Hamming window, α=0.54, β=0.46, and γ=0. Hence:

ΨHamming (e j ω) =0.54ΨR (e j ω) +0.92ΨR e j ω−2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟


+0.92ΨR e j ω+2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠

⎟ ⎟ ⎟ =0.54sin (2M +1) ω2

⎛ ⎝ ⎜⎞ ⎠ ⎟

sin(ω/2)

+0.92sin (2M +1) ω2−π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ sin ω2−π2M +1⎝ ⎜⎠

⎟ +0.92sin (2M +1) ω2+π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝

⎜⎞⎠⎟

sin ω2+π2M +1⎝ ⎜⎠

⎟ . For the Blackmann window α=0.42, β=0.5, and γ=0.08.

ΨBlackman (e j ω) =0.42ΨR (e j ω) +ΨR e j ω−2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +ΨR e j


ω+2π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +0.16ΨR e j ω−4π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛
⎝ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ +0.16ΨR e j ω−4π2M +1⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎜ ⎜ ⎞ ⎠

⎟ ⎟ ⎟ =0.42sin (2M +1) ω2

⎛ ⎝ ⎜⎞ ⎠ ⎟ sin(ω/2)

+sin (2M +1) ω2−π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜


⎞ ⎠ ⎟ sin ω2−π2M +1⎝ ⎜⎠

⎟ +sin (2M +1) ω2+π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ sin ω2+π2M +1⎝ ⎜⎠ ⎟ +0.16sin (2M +1)
ω2−2π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝

⎜⎞⎠⎟

sin ω2−2π2M +1⎝ ⎜⎠

⎟ +0.16sin (2M +1) ω2−2π2M +1⎛ ⎝ ⎜⎞ ⎠ ⎟ ⎛ ⎝

⎜⎞⎠⎟

sin ω2−2π2M +1⎝ ⎜⎠

⎟.

10.21 Given that:

H z ()=z −D ≈h n []z −n =h 0[]+h 1[]z −1+h 2[]z −2+ +h N []z −N n =0N

∑.

(a) We see that if: ˆ x

a t ()=P k t ()x n +k []k =−N 1

N2

∑,

Then: P k t ()=t −t t k −t l ⎛

⎝ ⎜⎞

⎠⎟

l =−N 1l ≠k

N 2∏

for −N 1≤k ≤N 2. Here, we have: ˆ

H z ()=

h n []z

−n n =0

∑.

And the solution follows if: P k t ()=h n [], N 1=0, N 2=N , k =n , t =D , €


t =k , and t k =n . Therefore, we have: h n []=

D −k

n −k k =0k ≠n

for 0≤n ≤N .

(b) Given that: N = 21, D = 90/13, L = 22

H z ()≈

h n []z −n n =0

21

∑,

where h n []=

90/13−k

n −k k =0

k ≠n

21

. % Problem #10.21

D = 90/13; N = 21;

for n = 0:N,

for k = 0:N, if n ~= k,

tmp(n+1,k+1) = (D-k)/(n-k); else

tmp(n+1,k+1) = 1; end end end

h = prod(tmp');

[Gd,W] = grpdelay(h,1,512); [H, w] = freqz(h,1,512);

figure(1);

plot(W/pi, Gd);

xlabel('\omega/\pi'); ylabel('Group Delay');

title('Group delay of z^-^D'); grid;


figure(2);

plot(w/pi, (abs(H))); xlabel('\omega/\pi'); ylabel('Magnitude' );

title('Magnitude response of z^-^D'); grid;

10.22 The frequency response of an ideal comb filter is given as:

H comb (e j ω

) =0, ω=k ω0 0≤k ≤M , 1, otherwise. ⎧ ⎨ ⎩

(a) To show this note that: x [n ]=s [n ]+

A k k =0

∑sin(k ωo n +φk ) =s [n ]+r [n ],

where s [n ] is the desired signal and r [n ]=

A k k =0M

∑sin(k ωo n +φk ) is the harmonic interference

with fundamental frequencyωo . Therefore:

r [n −D ]=

A k k =0

∑sin[k ωo (n −D ) +φk ]=A k k =0

∑sin(k ωo n +φk −2πk ) =r [n ].

(b ) We first compute the output as follows:

y [n ]=x [n ]−x [n −D ] =s [n ]+r [n ]−s [n −D ]−r [n −D ] =s [n ]+r [n ]−s [n −D ]−r [n ] =s [n ]−s [n −D ].

Hence, does not contain any harmonic disturbances.

(c ) Given the modified filter: H c (z ) =1−z −D

1−ρD z

−D

Thus: H c (e j ω

)=
1−e −jD ω

1−ρe

=1−cos(D ω) ()+j sin(D ω)

1−ρ

cos(D ω) +j ρD

sin(D ω)

Then: H c (

e j ω) =

A plot of H c (e j ω) for ωo =0.22π and ρ=0.99 is shown below:

(d) The realization is shown below, and includes only a single delay and two additions.

x[n]

y[n]

z –D

10.23 Using the results of Problems 10.21 and 10.22: H c (z ) =P (z )

Q (z )

1−N (z ) 1−0.9D

N (z )

with D =2π/0.16π, N = 20, and ρ=0.9

The code for plotting the results is shown below:

% Problem #10.23 D = 2/.16; N = 20; rho = 0.9; for n = 0:N,

for k = 0:N, if n ~= k,

tmp(n+1,k+1) = (D-k)/(n-k); else

tmp(n+1,k+1) = 1; end end


end

h = prod(tmp');

[H,w] = freqz(h,1,1024); Hc = (1-H)./(1-(rho^D)*H); x = sqrt((2*(1-cos(D*w)))./(1-


2*(rho^D)*cos(D*w)+rho^(2*D))); %plot(w/pi, abs(Hc)); plot(w/pi, x); grid; xlabel('\omega/\pi');
ylabel('Magnitude' );

title('Comb filter using FIR fractional delay');

The resulting plot is shown next:

10.24 Using the results of Problems 9.34 and 10.22:

H c (z ) =P (z ) Q (z ) =D (z ) −z −11D (z −1)

D (z ) −0.9z D (z )

with D =2π/0.16π

, N = 10, and ρ=0.9.

The code for plotting the results is shown below:

% Problem #10.24 D = 2/0.16; rho = 0.9;

N = min(10,floor(D)); for k = 1:N,

for n = 0:N,

p(n+1) = (D-N+n)/(D-N+k+n); end

d(k) = ((-1)^k)*nchoosek(N,k)*prod(p); end

[H,w] = freqz(fliplr(d)-d, fliplr(d)-(rho^D).*d , 512);

plot(w/pi, abs(H));grid;

xlabel('\omega/\pi');

ylabel('Magnitude' );

title('Comb filter using allpass IIR fractional delay' );

The resulting plot is shown next:

10.25 We start with the expression for the low pass filter, derived from Figure 10.13(a):

H LP (e j ω) =

1, −ωp ≤ω≤ωp , 1−

ω−ωp
ωs −ωp

⎜⎜

⎟⎟, ωp <ω≤ωs , 1+

ω+ωp

ωs −ωp

⎜⎜

⎟⎟, −ωs <ω≤ωp , 0, elsewhere. ⎧

For n ≠ 0, we can directly apply the inverse DTFT:

h LP [n ]=

H LP (e j ω) e j ωn d ω−π

π

e j ωn d ω

−ωp

ωp

∫+1−ω−ωp

Δω

⎟e j ωn d ω+1+

ω+ωp

Δω

⎟e j ωn d ω−ωs

−ωp

ωp

ωs


⎤⎦⎥⎥⎥

e j ωn d ω

−ωs

ωs

∫−ω−ωp

Δω

e j ωn d ω+

ω+ωp

Δω

e j ωn d ω−ωs

−ωp

ωp

ωs

⎦⎥⎥⎥
=

2sin(ωn )

πn

Δω

(ω−ωp ) e j ωn

jn

e j ωn

ωp

ωs

+
1

Δω

(ω+ωp ) e j ωn

jn

e j ωn

⎤ ⎦ ⎥ ⎥ – ωs – ωp ⎫ ⎬ ⎪ ⎭ ⎪

2sin(ωn )

πn

Δω

Δωe j ωs n

jn

e j ωs n −e j ωp n

−Δωe −j ωs n

jn


e −j ωp n −e −j ωs n n

⎤⎦⎥⎥⎧

⎩⎪

⎫⎬⎪⎭⎪

2sin(ωn )

πn

Δω

Δωsin(ωn )

cos(ωs n ) −cos(ωp n ) n

⎤⎦⎥⎧

⎫⎬⎭
=

Δω

cos(ωp n )

πn

cos(ωn ) πn ⎧

⎫⎬⎭

Δω

cos((ω−Δω/2)n )

πn

cos((ω+Δω/2)n ) πn

⎫⎬⎭

= 2sin(Δωn /2)

Δω

sin(ωn )

πn

h LP [0]=

1

H LP (e j ω) d ω

−π

∫=1

2(ωs +ωp ) 2

=ωπ.

Hence, we verify the result in Figure 10.13(b):

h LP [n ]=

, if n =0, 2sin(Δωn /2)

Δωn

sin(ωn )

πn

, if n ≠0. ⎧

An alternate approach to solving this problem is to consider the frequency response:

G (e j ω) = d H (e j ω)

0, −ωp ≤ω≤ωp , –

Δω

, ωp <ω<ωs , 1
Δω

, −ωs <ω<−ωp , 0, elsewhere. ⎧

⎪⎪

Its inverse DTFT is given by

g [n ]=

G (e j ω) e j ωn d ω

–π

∫=1

Δω

– ωs

– ωp

∫e j ωn d ω−1

Δω

ωp

ωs

∫e j ωn d ω
=

2πΔω

−ωs

−ωp

e j ωn

jn

ωp

ωs

e j ωn

jn

j πn Δω

cos(ωp n ) −cos(ωs n ) (). .

Thus: h LP [n ]=j

n g [n ] =1πn Δωcos(ωp n ) −cos(ωs n ) ()

=1πn Δωcos ωc −Δω2⎛ ⎝ ⎜ ⎞ ⎠ ⎟ n ⎛ ⎝


⎜ ⎞ ⎠ ⎟ −cos ω

s +Δω2⎛ ⎝ ⎜ ⎞ ⎠ ⎟ n ⎛ ⎝ ⎜ ⎞

⎠ ⎟ ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ =2sin(Δωn /2)Δωn ⋅ sin(ωn )

πn

, for n ≠0.

And for n =0, h LP [n ]=

ωπ

10.26 Consider the case when the transition region is approximated by a second order spline. In this
case, the ideal frequency response can be constructed by convolving an ideal, no-transition-band
frequency response with a triangular pulse of width Δω=ωs −ωp , which in turn can be obtained by
convolving two rectangular pulses of width Δω/2. In the time

domain this implies that the impulse response of a filter with transition band approximated by a second
order spline is given by the product of the impulse response of an ideal low pass filter with no transition
region and square of the impulse response of a rectangular pulse.

Thus: H LP (ideal ) [n ]=sin(ωn ) πn and H rec [n ]=sin(Δωn /4)

Δωn /4

Hence: H LP [n ]=H LP (ideal ) [n ]H rec [n ]()2

Thus, for a lowpass filter with a transition region approximated by a second order spline:

h LP [n ]=ωπ

, if n =0, sin(Δωn /4)Δωn /4⎛ ⎝ ⎜⎞ ⎠ ⎟ 2sin(ωn ) πn , otherwise. ⎧ ⎨ ⎪ ⎪ ⎩ ⎪ ⎪ Similarly the


frequency response of a lowpass filter with the transition region specified by a P -th order spline can be
obtained by convolving in the frequency domain an ideal filter with no transition region with
rectangular pulses of width Δω/P . Hence:

H LP [n ]=H LP (ideal ) [n ]H rec [n ]()P

where the rectangular pulse is of width Δω/P . Therefore:

h LP [n ]=ωπ

, if n=0, sin(Δωn /2P ) Δωn /2P ⎛ ⎝ ⎜⎞ ⎠ ⎟ P sin(ωn ) πn , otherwise. ⎧ ⎨ ⎪ ⎪ ⎩ ⎪ ⎪

10.27 Given the mean square error: ε(αi ) =


x k []−x a (k ) {}2

k =−L

∑.

(a) N = 1 and hence, x a (t ) =α0+α1t .

For L =5. we first fit the data set {x [k ]} for each of −5≤k ≤5, to the polynomial x a (t ) =α0+α1t with a
minimum mean-square error at €

t =−5, −4, … , −1,0,1, … ,5, and then replace x [0] with a new value [0]=x (0)=α0. The mean-square error
is then given by:

ε(α0, α1) =x [k ]−α0−α1k ()2k =−5

∑.

We set:

∂ε(α, α) ∂α0=0 and ∂ε(α, α)

∂α1

=0,

which yields: 11α0+α1k k =−5

∑=x [k ],k =−5

∑ and α0k k =−55∑+α1k 2

k =−55

∑=k x [k ].k =−5

∑ From the first equation we get: [0]=α0=

11

x [k ].k =−5

5

In the general case we thus have n ]=α0=

11

x [k ]k =−5

∑, which is a moving average filter of

length 11.

(b) N = 1 and hence, x a (t ) =α0+α1t +α2t 2. Here, we fit the data set {x [k ]} for each of

−5≤k ≤5, to the polynomial x a (t ) =α0+α1t +α2t 2 with a minimum mean-square error at

t =−5, −4, … , −1,0,1, … ,5, and then replace x [0] with a new value [0]=x a (0)=α0. The mean-square
error is now given by:

ε(α0, α1, α2) =

x [k ]−α0−α1k −α2k

2()2

k =−5

∑.

We set:

∂ε(α, α, α) α0=0, ∂ε(α, α, α) α1=0, ∂ε(α, α, α)

α2=0,

which yields:

11α0+110α2=

x [k ],

k =−5

110α1=k x [k ],
k =−5

110α0+1958α2=k 2x [k ].

k =−5

From the first and the third equations we then get:

α0=1958

x [k ]5∑−110k 2x [k ]

∑(1958×11) −(110)=1429

89−5k 2()k =−5

∑x [k ].

Hence, here we replace x [n ] with a new value x '[n ]=α0 which is a weighted combination of the
original data set:

x '[n ]=

429

89−5k 2()k =−5

∑x [n −k ]

=1429(− 36x [n +5]+9x [n +4]+44x [n +3]+69x [n +2]+84x [n +1]

+69x [n +2]+84x [n +1]+89x [n ]+84x [n − 1]

+69x [n −2]+44x [n −3]+9x [n −4]−36x [n −5]).

(c) The impulse response of the FIR filter of Part (a) is given by

h 1[n ]=1

11
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1{},

whereas, the impulse response of the FIR filter of Part (b) is given by:

h 2[n ]=1

429

−36, 9, 44, 69, 84, 89, 84, 69, 44, 9, −36{}.

The corresponding frequency responses are given by:

H 1(e

) =111

−j ωk

k =−5

∑,

H 2(e

) =1429

89−5k 2()e −j ωk k =−5

∑.

A plot of the magnitude responses of these two filters are shown below from which it can be seen that
the filter of Part (b) has a wider passband and thus provides smoothing over a larger frequency range
than the filter of Part (a).

10.28 Spencer's smoothing formula is given as:

y [n ]=1

320

{−3x [n −7]−6x [n −6]−5x [n −5]+3x [n −4]+21x [n −3]+46x [n −2]

+67x [n − 1]+74x [n ]+67x [n +1]+46x [n +2]+21x [n +3]+3x [n +4]

+5x [n +5]−6x [n −6]−3x [n +7]}.


Hence : H 3(e

)=

Y (e j ω) X (e

j)

320

−3e −j 7ω−6e −j 6ω−5e −j 5ω+3e −j 4ω+21e −j 3ω{

46e −j 2ω+67e −j ω+74 +67e j ω+46e j 2ω+21e j 3ω+3e j 4ω−5e j 5ω−6e j 6ω−3e j 7ω}

=1160

74+67cos ω+46cos(2ω) +21cos(3ω) +3cos(4ω) {

–5cos(5ω) – 6cos(6ω) – 3cos(7ω) }.

The magnitude response of the above FIR filter H 3(z ) is plotted below (solid line) along

with that of the FIR filter H 2(z ) of Part (b) of Problem 10.27 (dashed line). Note that both filters have
roughly the same passband but the Spencer's filter has very large attenuation in the stopband and
hence it provides better smoothing than the filter of Part (b).

10.29 The coefficients for each of L = 3, 4, and 5, are determined as follows:

(a)

P (x ) =α1x +α2x 2+α3x 3. Now P (0)=0 is satisfied by the way P (x ) has been defined. Also to ensure P
(1)=1 we require α1+α2+α3=1. Choose m =1 and n =1. Since dP (x )

dx x =0

=0, hence α1+2α2x +3α3x 2x =0=0, implying α1=0. Also since

dP (x )

dx x =1

=0, hence, α1+2α2+3α3=0. Thus solving the three equations:

α1+α2+α3=1, α1=0, and α1+2α2+3α3=0,

we arrive at α1=0, α2=3, α3=−2. Therefore, P (x ) =3x 2− 2x 3.

(b) Hence, P (x ) =α1x +α2x 2+α3x 3+α4x 4. Choose m =2 and n =1

(alternatively one can choose m =1and n =2


for better stopband performance ). Then,

P (1)=1⇒α1+α2+α3+α4=1. Also, dP (x )

dx x =0=0⇒α1+2α2x +3α3x 2+4α4x 3x =0=0,

d 2P (x ) dx

x =0

=0⇒2α2+6α3x +12α4x 2x =0=0,

dP (x )

dx x =1

=0⇒α1+2α2+3α3+4α4=0.

Solving the above four simultaneous equations we get α1=0, α2=0, α3=4, α4=−3. Therefore, P (x )
=4x 3− 3x 4.

(c) Hence, P (x ) =α1x +α2x 2+α3x 3+α4x 4+α5x 5. Choose m =2and n =2. Following a procedure
similar to that in parts (a) and (b) we get α1=0, α2=0, α3=10, α4=−15, α5=6. Therefore P (x ) =10x 3−
15x 4+6x 5.

10.30 (a) H [k ]=H (e

j ωk

) =H (e

j 2πk /M

), 0≤k ≤M −1. Thus, h [n ]=

H [k ]W M

−kn

k =0

M −1∑, where W M =e −j 2πk /M .

Now, H (z ) =h [n ]z −n n =0M −1

∑=

H [k ]W M
−kn k =0

M −1

∑z −n

n =0M −1∑

=1M

H [k ]W M −kn z −n n =0M −1∑⎛ ⎝ ⎜ ⎜ ⎞

⎠ ⎟ ⎟ k =0

M −1

∑. We can write

WM

−kn z −n n =0

M −1

∑=W M −kn z −n n =0∞

∑−W M −kn z −n

n =M

=W M −kn z −n

n =0

−W M −kM z

−M W M −kn z −n

n =0∞

=1−z −M

)W M −kn z −n

n =0

1−z −M

1−W M z

Therefore, H (z ) =

1−z

−M M

H [k ]

1−W M z k =0

M −1

(b) A diagram of this realization is shown below:

x[n]y[n]

(c) Note H (z ) = 1−z −M

H [k ]

1−W M z

k =0

M −1

∑=1

H [k ]W M −kn z −n n =0

M −1

∑⎛


⎞⎠⎟⎟k =0

M −1

∑.

On the unit circle the above reduces to H (e j ω) = 1

H [k ]W M −kn e −j ωn

n =0

M −1

k =0

M −1

∑. For

ω=j 2π /M ,

we then get from the above € H (e j 2π /M ) =H [k ]

W M −kn e −2π n /M n =0

M −1


⎞⎠⎟⎟k =0

M −1

=H [k ]

W M −kn W M n

n =0

M −1

k =0

M −1

=H [k ]

1
M

W M −(k − ) n

n =0

M −1

k =0

M −1

∑. Using the identity of Eq. (5.23) of text we observe that

W M −(k − ) n

n =0

M −1

∑=1, if =k ,

0, otherwise.

Hence,


H (e j 2π /M ) =H [ ].

10.31 The desired magnitude response is denoted as: H d (e j ω)

(a) For the Type 1 FIR filter, H (e j ω) =e

−j

ω(M −1)

2H (e j ω Since in the frequency sampling approach we sample the DTFT H (e j ω) at points given by ω=

2πk

, 0≤k ≤M −1,

therefore H [k ]=H (e j 2πk /M ) =H d (e j 2πk /M ) e j 2πk (M −1) /M , 0≤k ≤M −1. Since the filter is of
Type 1, M − 1 is even, thus, e j 2πk (M −1) /2=1. . Moreover, h [n ] being real,

H (e j ω) =H *(e j ω). Thus, H (e j ω) =e j ω(M −1) /2H (e j ωπ≤ω<2π. Hence,

H [k ]=

H d (e j 2πk /M ) e −j 2πk (M −1) /2M , k =0,1,2, … , M −1

H d (e j 2πk /M ) e −j 2π(M −k )(M −1) /2M k =M +1

, M +3

, … , M −1.

⎩⎪

(b) For the Type 2 FIR filter

€ H [k ]=

H d (e j 2πk /M ) e −j 2πk (M −1) /2M , k =0,1,2, … , M −1 2 , 0, k =M 2

,
H d (e j 2πk /M ) e −j 2π(M −k )(M −1) /2M , k =M

+1, … , M −1. ⎧

10.32 We design a linear phase FIR lowpass filter of length 21 using the frequency sampling approach
with passband edge at ωp =0.6π.

(a) From the length, we can determine that the frequency spacing between 2 consecutive DFT samples is
given by 2π/21 = 0.2992. The desired passband edge is between the

frequency samples at ω = 2π(6/21) and ω = 2π(7/21), and again between ω = 2π(13/21) and ω =
2π(14/21) for the other side of the frequency axis. We then simply use the corresponding shifted
impulse responses for those frequencies within the low pass range of this set:

G [k ]=e −j (2π/N ) (N −1) /2

()k , and leave the rest of the coefficients as zero. Therefore, the 21-point DFT is given by:

H [k ]=

e −j (2π/21)10k , k ∈0,...,6

[]

{}∪14,...,20 [] {}, 0, k ∈7,...,13

[] {}. ⎧

⎩⎪

A 21-point IDFT of the above DFT samples yields the impulse response coefficients given below in
ascending powers of z − 1:

Columns 1 through 11

0.0414 0.0000 0.0443 0.0476 0.0000 0.0606 0.0732 0.0000 0.1399 0.2767 0.6667
Columns 12 through 21

0.2767 0.1399 0.0000 0.0732 0.0606 0.0000 0.0476 0.0443 0.0000 0.0414

(b) The program for finding and plotting the magnitude response is as follows:

% Problem #10.32

clear;

clc;

N = 21;

index = 1;

for k = 0:6,

H(index) = exp(-1i*((2*pi)/N)*((N-1)/2)*k); index = index + 1;

end

for k = 7:13,

H(index) = 0;

index = index + 1;

end

for k = 14:20,

H(index) = exp(-1i*((2*pi)/N)*((N-1)/2)*k); index = index + 1;

end

h = ifft(H);

disp(abs(h)); % Display coefficients

[FF, w] = freqz(h, 1, 512);

figure;

plot(w/pi, abs(FF)); axis([0 1 0 1.2]);grid;

ylabel('Gain, in dB'); xlabel('\omega/\pi');

The resulting plot is shown below:

10.33 We design a linear phase FIR lowpass filter of length 37 using the frequency sampling approach
with passband edge at ωp =0.45π.

(a) From the length, we can determine that the frequency spacing between 2 consecutive DFT samples is
given by 2π/37 = 0.1698. The desired passband edge is between the
frequency samples at ω = 2π(8/21) and ω = 2π(9/21), and again between ω = 2π(28/21) and ω =
2π(29/21) for the other side of the frequency axis. We then simply use the corresponding

shifted impulse responses for those frequencies within the low pass range of this set:

G [k ]=e −j (2π/N ) (N −1) /2

()k , and leave the rest of the coefficients as zero. Therefore, the 37-point DFT is given by:

H [k ]=

e −j (2π/37)10k , k ∈0,...,8

[]

{}∪29,...,36 [] {}, 0, k ∈9,...,28

[] {}. ⎧

⎩⎪

A 21-point IDFT of the above DFT samples yields the impulse response coefficients given below in
ascending powers ofz − 1:

Columns 1 through 11

0.0203 0.0153 0.0247 0.0094 0.0285 0.0026 0.0317 0.0057 0.0344 0.0161 0.0366

Columns 12 through 22

0.0303 0.0383 0.0528 0.0396 0.0995 0.0403 0.3161 0.4595 0.3161 0.0403 0.0995

Columns 23 through 33

0.0396 0.0528 0.0383 0.0303 0.0366 0.0161 0.0344 0.0057 0.0317 0.0026 0.0285

Columns 34 through 37

0.0094 0.0247 0.0153 0.0203

(b) The program for finding and plotting the magnitude response is as follows:

% Problem #10.33

clear;

clc;

N = 37;

index = 1;
for k = 0:8,

H(index) = exp(-1i*((2*pi)/N)*((N-1)/2)*k);

index = index + 1;

end

for k = 9:28,

H(index) = 0;

index = index + 1;

end

for k = 29:36,

H(index) = exp(-1i*((2*pi)/N)*((N-1)/2)*k); index = index + 1;

end

length(H)

h = ifft(H);

disp(abs(h)); % Display coefficients

[FF, w] = freqz(h, 1, 512);

figure;

plot(w/pi, abs(FF)); axis([0 1 0 1.2]);grid; ylabel('Gain, in dB'); xlabel('\omega/\pi');

The resulting plot is shown below:

10.30From Eq. (10.57) we have €

H (ω) =c [k ]sin(ωk ). k =1

∑ Now

H (π−ω) =c [k ]sin(π−ω) k

()

k =1

∑=−c [k ]sin

k =1
M

∑(ωk )cos(πk ) =c [k ](−1) k +1(ωk ).

k =1

Thus,

H (ω) =

H (π−ω) implies c [k ]sin(ωk ) =c [k ](−1) k +1sin(ωk ),

k =1

k =1

∑ or equivalently, 1−(−1) k +1

()c [k ]sin(ωk ) =0,

k =1

∑ which in turn implies that c [k ]=0 for

k =2,4,6, … .

But from Eq. (10.58) we have c [k ]=2h [M −k ],1≤k ≤M , or, h [k ]=1

c [M − k ]. For k even,

i.e., k =2R , h [2R ]=1

c [M − 2R ]=0 if M is even.

10.35 By expressing cos(ωn ) =T n (cosω), where T n (x ) is the n -th order Chebyshev polynomial in x

, we first rewrite Eq. (10.73) in the form:


H (ω) =a [n ]cos(ωn )

n =0

∑=αn cos n (ω)

n =0

∑.

Therefore, we can rewrite Eq. (10.73) repeated below for convenience P (ωi ) H (ωi ) −D (ωi )

[]=(−1) i ε, 1≤i ≤M +2, in a matrix form as

1cos(ω1) cos M (ω1) 1/P (ω1)

1cos(ω2) cos M (ω2) −1/P (ω2)

1cos(ωM +1) cos M (ωM +1) (−1) M /P (ωM +1)

1cos(ωM +2) cos M (ωM +2) (−1) M +1/P (ωM +2)


α0

α1

αM

D (ω1)

D (ω2)

D (ωM +1) D (ωM +2) ⎡


⎤⎦⎥

⎥ ⎥ ⎥ ⎥ ⎥ . Note that the coefficients {αi } are different from the coefficients {a [i ]} of Eq. (10.73). To
determine the expression of ε we use Cramer's rule arriving at ε=Δ

, where

€ Δ=det

cos(ω1) cos M (ω1) 1/P (ω1)

cos(ω2) cos M (ω2) −1/P (ω2)

cos(ωM +1) cos M (ωM +1) (−1) M /P (ωM +1) cos(ωM +2) cos M (ωM +2) (−1) M +1/P (ωM +2) and

Δε=

cos(ω1) cos M (ω1) D (ω1)

cos(ω2) cos M (ω2) D (ω2)

cos(ωM +1) cos M (ωM +1) D (ωM +1)

cos(ωM +2) cos M (ωM +2) D (ωM +2)

..

Expanding both determinants using the last column we get Δε=b i

i =1

M +2

∑D (ωi +1) and

Δ=b i

i =1

M +2

∑(−1) i −1

P (ωi )
, where

b i =det

cos(ω1) cos 2(ω1) cos M (ω1)

cos(ω2) cos 2(ω2) cos M (ω2)

cos(ωi −1) cos 2(ωi −1) cos M (ωi −1)

cos(ωi +1) cos 2(ωi +1) cos M (ωi +1)

cos(ωM +2) cos 2(ωM +2) cos M (ωM +2)

The above matrix is seen to be a Vandermonde matrix and is determinant is given by

€ b i =(cosωk

k≠,k>

k , ≠i

∏−cos ω ). Define c i =b

br

r =1

r ≠i

. It can be shown by induction that c i =

cos ωi −cos ωn

n =1

n ≠i

M +2

∏. Therefore, ε=

b i D (ωi )

M +2

bi

i =1
∑(−1) i

P (ωi )

c D (ω) +c D (ω) + +c D (ω)

P (ω1)

P (ω2)

++

c (−1)

P (ωM +2)

10.36 Using the Parks-McClellan method in Section 10.3.1:

W ω()=

1ω∈passband,

δp

δs

ω∈stopband.

⎩⎪

W ω()=

1, 0≤ω≤0.4π, 36/7,0.55π≤ω≤π. ⎧

10.37 Using the Parks-McClellan method in Section 10.3.1:


W ω()=

1ω∈passband,

δp

δs

ω∈stopband.

⎩⎪

W ω()=

4, 0≤ω≤0.65π, 1, 0.8π≤ω≤π. ⎧

10.38 Using the Parks-McClellan method in Section 10.3.1:

W ω()=

δp

δs 1

0≤ω≤ωs 1,

1ωp 1≤ω≤ωp 2,

δp

δs 2

ωs 2≤ω≤π,


W ω()=

1/6,0≤ω≤0.4π, 1, 0.5π≤ω≤0.65π, 1/4,0.8π≤ω≤π. ⎧

10.39 From Eq. (10.55) we have €

H (ω) =˜ b [k ]cos(ωk )cos ω

⎜⎞

k =0

(N −1) /2

∑. Expanding the right-hand

side of this equation using the trigonometric identity cos A cos B =1

[cos(A +B ) +cos(A − B )], we arrive at

H (ω) =1

˜ b [k ]cosωk +1

⎜⎞


k =0

(N −1) /2

∑+1

˜ b [k ]cosωk −1

⎜⎞

k =0

(N −1) /2

=1

2
˜ b [k −1]cosωk −1

⎜⎞

k =1

(N +1) /2

∑+1

˜ b [k ]cosωk −1

⎜⎞


k =0

(N −1) /2

=1

˜ b [0]cosω

⎜⎞

⎟+1

˜ b [k ]+˜ b [k −1]

()

k =1

(N −1) /2

∑cos ωk −1

⎜⎞


⎟+1

˜ b N −1

⎡⎤

⎦ ⎥ cos ω

⎜⎞

⎟.

Comparing the above expression with Eq. (10.53) we observe b [1]=

˜ b [1]+˜ b [0],

b [k ]=1

˜ b [k ]+˜ b [k −1]

(), 2≤k ≤N −1

2
, b N +1

⎣⎢

⎦⎥=

˜ b N −1

⎡⎤

⎦ ⎥ , which are seen to be the same as given in Eq. (10.56).

10.40 From Eq. (10.57) we have

H (ω) =˜ c [k ]cos(ωk )sin(ω)

k =0

(N /2) −1

∑. Expanding the right-hand

side of this equation using the trigonometric identity cos A sin B =1

[sin(A +B ) −sin(A −B )], we arrive at

H (ω) =1

˜ c [k ]sinω(k +1)

()

k =0

(N /2) −1

∑−1

˜ c [k ]sinω(k −1)
()

k =0

(N /2) −1

=1

˜ c [0]sin(ω) −1

˜ c [0]sin(−ω) +1

˜ c [1]sin(2ω) +1

˜ c [2]sin(3ω) −1

˜ c [2]sin(ω)

+1

˜ c [3]sin(4ω) −1

˜ c [3]sin(2ω) +1

˜ c [4]sin(5ω) −1

˜ c [4]sin(3ω) +

+1

˜cN

2
−2

⎣⎢

⎦ ⎥ sin ω

−1

⎜⎞

⎟−1

˜cN

−2

⎣⎢

⎦ ⎥ sin ω

2
−3

⎜⎞

⎟+1

˜cN

−1

⎣⎢

⎦ ⎥ sin ω

⎜⎞


⎟−1

˜cN

−1

⎣⎢

⎦ ⎥ sin ω

N 2−2⎛⎝⎜⎞⎠⎟⎛

⎞⎠⎟.

Comparing the above expression with Eq. (10.57) we observe c [1]=˜ c [0]− 1

˜ c [2],

c [k ]=1

˜ c [k −1]−˜ c [k +1]

(), 2≤k ≤N

−2, and c N

−1

⎣⎢

⎦⎥=

˜cN

−2

⎣⎢

⎦ ⎥ ,c

⎣⎢

⎦⎥=

˜cN

−1

⎣⎢

⎦⎥.

10.41 From Eq. (10.57) we have

H (ω) =˜ d [k ]cos(ωk )sin ω


2

()

k =0

(N −1) /2

∑. Expanding the right-hand

side of this equation using the trigonometric identity cos A sin B =1

[sin(A +B ) −sin(A −B )],

we arrive at

€ H (ω) =12˜ d [k ]sinωk +12⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ k =0(N −1) /2∑−12˜ d [k ]sinωk −12⎛ ⎝ ⎜ ⎞ ⎠


⎟⎛⎝⎜⎞⎠

⎟ k =0(N −1) /2

∑ =12˜ d [k ]sinωk −12⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ k =1(N +1) /2∑−12˜ d [k ]sinωk −12⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝


⎜⎞⎠

⎟ k =0(N −1) /2

∑ =−12˜ d [0]sin−ω2⎛ ⎝ ⎜ ⎞ ⎠ ⎟ +12˜ d [k −1]−˜ d [k ]()

k =1

(N −1) /2

∑sin ωk −12⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠

⎟ +12d N +12−1⎡ ⎣ ⎢ ⎤ ⎦ ⎥ sin ωN +12−12⎛ ⎝⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ =12

˜ d [0]sinω2⎛ ⎝⎜⎞ ⎠ ⎟ +

12˜ d [k −1]−˜ d [k ]()k =1

(N −1) /2∑sin ωk −12⎛ ⎝ ⎜ ⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ +12d N −12⎡ ⎣ ⎢ ⎤ ⎦ ⎥ sin ωN 2⎛ ⎝⎜⎞ ⎠ ⎟ ⎛ ⎝ ⎜ ⎞

⎟ . Comparing the above expression with Eq. (10.61) we observe d [1]=˜ d

[0]− 12

˜ d [1], d [k ]=12˜ d [k −1]−˜ d [k ]()

, 2≤k ≤N −12

, and d N +12⎡ ⎣ ⎢ ⎤ ⎦ ⎥ =˜ d N −12⎡ ⎣ ⎢ ⎤ ⎦ ⎥ , which are the same as given in Eq. (10.64).
10.42 From Step 2, we have € G (e j ω) = G (ω) e −jN ω=δs (F ) e −jN ω

+ F (ω) e −jN ω.

The amplitude response € G (ω) has been obtained by raising the amplitude response €

F (ω) by δs

F () and hence, the filter G (z ) has double zeros in the stopband.

We may factorize as follows: G (z ) =z −N H m (z ) H m (z −1

), where H m (z ) is a real-coefficient

minimum-phase FIR lowpass filter with half the degree of the originalH (z ). Since, €

G (ω) ≥0, the amplitude response €

H m (ω) of the minimum-phase filter H m (z ) does not oscillate about

δs F (), €

H m (ω) must

Therefore,

G (e j ω) 2δs 1 + δ + δp s

1+δ δp s

For

H m (ω) , we can see δs F ()=δp F ()=−1=−1.

10.43 Here L = 4. From Eq. (10.69), for a Type 1 FIR transfer function, orderN =2L =8. Next, from Eq.
(10.68), a [k ]=˜ a [k ]={− 5, 8, 6, 4, 2}.Next, using Eq. (10.52) we compute the impulse response
coefficients: h [4]=a [0], h [4−k ]=

a [k ]

, 1≤k ≤4. Hence, h [4]=− 5, h [3]=4, h [2]=3, h [1]=2, h [0]=1. Therefore,

{h [n ]}={−5, 4, 3, 2, 1, 2, 3, 4, −5}.

10.44 Here L = 4. From Eq. (10.69), for a Type 2 FIR transfer function, orderN =2L +1=9. Next, from Eq.
(10.68), ˜ b [k ]=˜ a [k ]={16,20, 8, − 8, 16}.

Now, using Eq. (10.56) we obtain b [5]=


1

˜ b [4], and b [k ]=1

˜ b [k ]+2˜ b [k −1]

(), 1≤k ≤4.

Hence, b [5]=2, b [4]=1

˜ b [4]+2˜ b [3]

()=4, b [3]=1

˜ b [3]+2˜ b [2]

()=0,

b [2]=1

˜ b [2]+2˜ b [1]

()=14, b [1]=1

˜ b [1]+2˜ b [0]

()=14.

Next, using Eq. (10.52) we obtain h N +1

−k

⎣⎢

⎦ ⎥ =2b [k ], 1≤k ≤5. Hence,

h [4]=1

2
b [1]=13, h [3]=1

b [2]=7, h [2]=1

b [3]=0, h [1]=1

b [4]=2,

h [0]=1

b [5]=1. Therefore, {h [n ]}={13,7, 0, 2, 1, 1, 2, 0, 7, 13}.

10.45 Here L = 4. From Eq. (10.69), for a Type 3 FIR transfer function, orderN =2L =8. Next, from Eq.
(10.68), ˜ c [k ]=˜ a [k ]={2,0, 8, − 4, 0}.

Now, using Eq. (10.60) we obtain

c [1]=˜ c [0]−1

˜ c [2]=−2, c [2]=1

˜ c [1]−˜ c [3]

()=2, c [3]=1

˜ c [2]=4, c [4]=1

˜ c [3]=−4. Next, using Eq. (10.58) we arrive at

h [3]=1

c [1]=−1, h [2]=1

c [2]=1, h [1]=1

2
c [3]=2, h [0]=1

c [4]=−2.

Therefore,

{h [n ]}={−2, 2, 1, −1, 0, 1, −1, −2, 2}.

2δs

1+δ +δ

ps

δδ

ps

H (e j ω)

10.46 Here L = 4. From Eq. (10.62), for a Type 4 FIR transfer function, orderN =2L +1=9. Next, from Eq.
(10.68), ˜ d [k ]=˜ a [k ]={6,0, −4, −8, −12}.

Now, using Eq. (10.64) we obtain

d [1]=˜ d [0]−1 2 ˜ d [1]=6, d [2]=1

˜ d [1]−˜ d [2]

()=2, d [3]=1

˜ d [2]−˜ d [3] ()=2,

d [4]=1 2

˜ d [3]−˜ d [4]

()=2, d [5]=˜ d [4]=−12.

Next, using Eq. (10.62) we arrive at

h [4]=1 2 d [1]=3, h [3]=1

d [2]=1, h [2]=1
2

d [3]=1, h [1]=1

d [4]=1, h [0]=1

d [5]=− 6.

Therefore,

{h [n ]}={−6, 1, 1, 1, 3, −3, −1, −1, −1, 6}.

10.47 It follows from Equation 10.25 that the impulse response of an ideal Hilbert Transformer is an
anti-symmetric sequence. If we truncate it to a finite number of terms between – M ≤ n ≤ M the
impulse response is of length (2M + 1) which is odd. Hence the FIR Hilbert Transformer obtained by
truncation and satisfying Equation 10.86 cannot be satisfied by a Type 4 FIR filter.

10.48 (a)Thus, € X (

z ) =X (z ) z −1=−α+ z −1

1−αz

=x [n ]

−α+

z −1

1−αz

⎜⎜

⎞⎠⎟⎟

n =0

N −1

∑=P ( z ) D (z ) ,

where € P (

z ) =p [n ]

z −1

n =0
N −1

∑=x [n ](1−α z −1) N −1−n

∑(−α+ z −1) n , and

D(

z ) =d [n ]

z −n

n =0

N −1

∑=(1−α z −1) N −1.

(b)

X [k ]=X (

z ) z =e j 2πk /N =

P(

z)

D (z ) z =e j 2πk /N

P [k ]

D [k ]

, where

P [k ]=P (

z ) z =e j 2πk /N is the N -point DFT of the sequence p [n ] and

D [k ]=D (

z ) z =e j 2πk /N is the N -point DFT of the sequence d [n ].

(c) Let


P =p [0]p [1] p [N −1]

[]T and

X =x [0]x [1] x [N −1]

[]T . Without any loss of generality, assume N =4 in which case

P(

z ) =p [n ]

z −n

n =0

=x [0]−αx [1]+α2x [2]−α3x [3]

()

€ +−3αx [0]+(1+2α2) x [1]−α(2+α2) x [2]+3α2x [3] () z −1 +3α2x [0]−α(2+α2) x [1]+(1+2α2) x [2]−3αx [3] ()
z −2

+−α3x [0]+α2x [1]−αx [2]+αx [3]

() z −3. Equating like powers of

z −1 we can write P =Q ⋅ X , where P =p [0]p [1]p [2]p [3]

[]T , X =x [0]x [1]x [2]x [3]

[]T and Q =

1−αα2−α3

−3α1+2α2−α(2+α2) 3α2

3α2−α(2+α2) 1+2α2−3α

−α3α2−α21


It can be seen that the e lements q r , s , 0≤r , s ≤3, of the 4×4 matrix Q can be determined as follows:

(i) The first row is given by q 0, s =(−α) s ,

(ii) The first column is given by q r ,0=3C r (−α) r =

3!

r !(3−r )!

(−α) r , and

(iii) the remaining elements can be obtained using the recurrence relation

q r , s =q r −1, s −1−αq r , s −1+αq r −1, s .

In the general case, we only change the computation of the elements of the first column using the
relation q r ,0=N −1C r (−α) r =

(N −1)!

r !(N −1−r )!

(−α) r .

10.49The specifications for the linear-phase IFIR filter are: ωp =0.02π, ωs =0.09π,

δp =0.02, δs =0.001.

(a) Using Eq. (10.111) we get L opt =

==4.1308.
Therefore the optimal value 4, as that is the nearest smaller integer.

(b)The specifications of the shaping filter F (z ) and interpolator I (z ) are as follows:

ωp (F ) =L opt ωp =0.08π, ωs (F ) =L opt ωs =0.36π, δp (F ) =

δp

=0.01, δs (F ) =δs =0.001, ωp (I ) =0.02π, ωs (I ) =

L opt

−ωs =0.41π, δp (I ) =

δp

=0.01, δs (I ) =δs =0.001.

From this we can determine the filter orders of each filter using the M-file firpmord :

Nf = firpmord([0.08 0.36],[1 0],[0.01 0.001])

Ni = firpmord([0.02 0.41],[1 0],[0.01 0.001])

本文档下载自 360 文档中心,www.360docs.net 更多营销,职业规划,工作简历,入党,工作报告,总结,


学习资料,学习总结,PPT 模板下载,范文等文档下载;转载请保留出处
:http://www.360docs.net/doc/info-31757d8cd5bbfd0a78567306.html

You might also like