UNIVERSITY OF ILLINOIS AT URBANACHAMPAIGN
Department of Electrical and Computer Engineering
ECE 410
Digital Signal Processing
Homework 12 Solutions
Wednesday, November 12, 2008
Prof. Bresler, Prof. Jones
Due by November 19, 2008
Problem 1
(20 points)
Design a length7, symmetric ramp FIR filter
h
[
n
]
, n
= 0
,
1
, . . . ,
6 with desired frequency re
sponse
D
(
ω
) =

ω

(before the linear phase shift) by hand. Use the window design method with a
simple truncation (
i.e.
, rectangular/boxcar) window and give the filter coefficients as your answer.
Using Matlab, plot separately the magnitude and phase of
H
(
ω
), using at least 1000 points between

π
and
π
. Also plot the ideal desired magnitude response

D
(
ω
)

on the same plot as the actual
response.
Solution:
Introducing the required linear phaseshift, the desired frequency response is
G
d
(
ω
) =

ω

e

j
3
ω
and the ideal (IIR) filter coefficients are its inverse DTFT,
i.e.
,
g
[
n
]
=
1
2
π
Z
π

π

ω

e

j
3
ω
e
jωn
dω
=
1
2
π
•

Z
0

π
ωe
j
(
n

3)
ω
dω
+
Z
0

π
ωe
j
(
n

3)
ω
dω
‚
=
1
2
π
•Z
π
0
ωe

j
(
n

3)
ω
dω
+
Z
0

π
ωe
j
(
n

3)
ω
dω
‚
=
1
π
Z
π
0
ω
cos(
n

3)
ω dω
=
ω
π
(
n

3)
sin(
n

3)
ω
fl
fl
fl
π
0
+
1
π
(
n

3)
2
cos(
n

3)
ω
fl
fl
fl
π
0
,
n
6
= 3
π
2
,
n
= 3
=
(
1
π
(
n

3)
2
[cos(
n

3)
π

1]
,
n
6
= 3
π
2
,
n
= 3
=
(
1
π
(
n

3)
2
£
(

1)
n

3

1
/
,
n
6
= 3
π
2
,
n
= 3
With a length 7 rectangular window,
h
[
n
] =
1
π
(
n

3)
2
£
(

1)
n

3

1
/
,
0
≤
n
≤
6
, n
6
= 3
π
2
,
n
= 3
0
,
otherwise
1