0% found this document useful (0 votes)
44 views103 pages

dsp2 Sol

Uploaded by

phapdn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views103 pages

dsp2 Sol

Uploaded by

phapdn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 103

Solutions Manual to

Digital Signal Processing


An Introduction
Second Edition

D. Sundararajan

c Springer 2024

1
2
Chapter 1

1.1 Given a continuous-time signal x(t), find the corresponding samples of the digital signal
in decimal form. Assume rounding and represent the samples with 3-digit decimal precision
for the fractional part. For rounding, add 0.0005 to the magnitude of the number and trun-
cate the result to 3-digit decimal precision for the fractional part. Assume sampling interval
Ts = 0.25 seconds.
1.1.1 x(t) = e−t , 0 ≤ t < 2.
* 1.1.2 x(t) = cos(πt + π5 ), 0 ≤ t < 2.
1.1.3 x(t) = sin(πt + π7 ), 0 ≤ t < 2.
1.1.4 x(t) = t2 u(t), 0 ≤ t < 2.

1.1.1 Samples of the discrete decimal signal

{e−0 , e−1Ts , e−2Ts , e−3Ts , e−4Ts , e−5Ts , e−6Ts , e−7Ts }

Samples of the digital signal with 3-digit decimal precision for the fractional part are

{1.000, 0.779, 0.607, 0.472, 0.368, 0.287, 0.223, 0.174}

1.1.2
π π π π
{cos(π0 + ), cos(π1Ts + ), cos(π2Ts + ), cos(π3Ts + ),
5 5 5 5
π π π π
cos(π4Ts + ), cos(π5Ts + ), cos(π6Ts + ), cos(π7Ts + )}
5 5 7 5
Samples of the digital signal with 3-digit decimal precision for the fractional part are

{0.809, 0.156, −0.588, −0.988, −0.809, −0.156, 0.588, 0.988}

1.1.3
π π π π
{sin(π0 + ), sin(π1Ts + ), sin(π2Ts + ), sin(π3Ts + ),
7 7 7 7
π π π π
sin(π4Ts + ), sin(π5Ts + ), sin(π6Ts + ), sin(π7Ts + )}
7 7 7 7
Samples of the digital signal with 3-digit decimal precision for the fractional part are

{0.434, 0.944, 0.901, 0.330, −0.434, −0.944, −0.901, −0.330}

1.1.4 Samples of the discrete decimal signal

{0, (1Ts )2 , (2Ts )2 , (3Ts )2 , (4Ts )2 , (5Ts )2 , (6Ts )2 , (7Ts )2 }

3
Samples of the digital signal with 3-digit decimal precision for the fractional part are

{0, 0.063, 0.250, 0.563, 1, 1.563, 2.250, 3.063}

1.2 If the waveform x(n) is periodic, what is its period N ? Find the sample values of x(n)
in the range n = 0 to n = N . Verify that x(n) = x(n + N ). Find the sample value x(78).
* 1.2.1 x(n) = sin(0.4πn).

1.2.2 x(n) = sin( 2 82π n + π4 ).
1.2.3 x(n) = −6 + sin( 2π π
5 n + 3 ).

2
1.2.1 f = 0.2 = 10 is a rational number. The waveform is periodic with period N = 5. The
samples values of x(n) are The samples values of x(n) are

{0, 0.9511, 0.5878, −0.5878, −0.9511, 0, 0.9511, 0.5878, −0.5878, −0.9511, 0, 0.9511}

x(78) = x(3) = −0.5878.



1.2.2 f = 82 is an irrational number. The waveform is aperiodic.
1.2.3 The dc component is periodic with any period.
f = 15 is a rational number. The waveform is periodic with period 5. The samples values of
x(n) are
{−5.1340, −5.2569, −6.4067, −6.9945, −6.2079, −5.1340}
x(78) = x(3) = −6.9945.
1.3 Is x(n) even-symmetric, odd-symmetric, or neither? List the values of x(n) for n =
−3, −2, −1, 0, 1, 2, 3.
1.3.1 x(n) = δ(n)
x(−n) = δ(−n) = x(n). Even signal.

x(−3) = 0, x(−2) = 0, x(−1) = 0, x(0) = 1, x(1) = 0, x(2) = 0, x(3) = 0

1.3.2 x(n) = u(n), the unit-step signal.


x(−n) = u(−n) 6= x(n) or − x(n). Neither odd nor even.

x(−3) = 0, x(−2) = 0, x(−1) = 0, x(0) = 1, x(1) = 1, x(2) = 1, x(3) = 1

1.3.3 x(n) = cos( 2π π


8 n + 6 ).
π π
x(−n) = cos( 8 (−n) + 6 ) 6= x(n) or − x(n). Neither odd nor even.

x(−3) = −0.2588, x(−2) = 0.5, x(−1) = 0.9659,

x(0) = 0.8660, x(1) = 0.2588, x(2) = −0.5, x(3) = −0.9659


1.3.4 x(n) = sin( 2π
7 n).
x(−n) = sin( 2π
7 (−n)) = −x(n). Odd.

x(−3) = −0.4339, x(−2) = −0.9749, x(−1) = −0.7818,

x(0) = 0, x(1) = 0.7818, x(2) = 0.9749, x(3) = 0.4339


sin( 2π n)
1.3.5 x(n) = 2π6n .
6
sin( 2π (−n))
x(−n) = 2π6(−n) = x(n).
6
Even signal.
x(−3) = 0, x(−2) = 0.4135, x(−1) = 0.8270,

4
x(0) = 1, x(1) = 0.8270, x(2) = 0.4135, x(3) = 0

1.4 Find the even and odd components of the signal. Verify that, for n = −3, −2, −1, 0, 1, 2, 3,
the two components add up to the values of the signal. Verify that the sum of the values of
the odd component is zero and that those of the even component and the signal are equal.
1.4.1 x(0) = 1, x(1) = 2, x(2) = −3, x(3) = 4 and x(n) = 0 otherwise.
xe (n) = 0, |n| > 3 and xo (n) = 0, |n| > 3 since x(n) = 0, |n| > 3. The samples of x(n) are

{0, 0, 0, 1̂, 2, −3, 4}

The samples of time-reversed x(n) are

{4, −3, 2, 1̂, 0, 0, 0}

Adding and subtracting the two sequences and dividing by 2, we get

xe(n) = {2, −1.5, 1, 1̂, 1, −1.5, 2}

xo(n) = {−2, 1.5, −1, 0̂, 1, −1.5, 2}

1.4.2 x(n) = u(n − 1)


1

for n ≥ 1
u(n − 1) + u(−(n + 1)) 2 
xe (n) = = 0 for n = 0
2  1
2 for n ≤ −1

1

for n ≥ 1
u(n − 1) − u(−(n + 1))  2
xo (n) = = 0 for n = 0
2
− 21 for n ≤ −1

The samples of x(n) are


{0, 0, 0, 0̂, 1, 1, 1}
The samples of time-reversed x(n) are

{1, 1, 1, 0̂, 0, 0, 0}

Adding and subtracting the two sequences and dividing by 2, we get

xe(n) = {0.5, 0.5, 0.5, 0̂, 0.5, 0.5, 0.5}

xo(n) = {−0.5, −0.5, −0.5, 0̂, 0.5, 0.5, 0.5}

1.4.3 x(n) = sin( 2π π


7 n − 3)
Expressing x(n) in the rectangular form, we get

x(n) + x(−n) 3 2π
xe (n) = =− cos( n), −∞ < n < ∞
2 2 7
x(n) − x(−n) 1 2π
x0 (n) = = sin( n), −∞ < n < ∞
2 2 7
The samples of x(n) are

ˆ
{0.5633, −0.2948, −0.9309, −0.8660, −0.1490, 0.6802, 0.9972}

5
The samples of time-reversed x(n) are
ˆ
{0.9972, 0.6802, −0.1490, −0.8660, −0.9309, −0.2948, 0.5633}

Adding and subtracting the two sequences and dividing by 2, we get


ˆ
xe(n) = {0.7803, 0.1927, −0.5400, −0.8660, −0.5400, 0.1927, 0.7803}

xo(n) = {−0.2169, −0.4875, −0.3909, 0̂, 0.3909, 0.4875, 0.2169}

1.4.4 x(n) = (−0.8)n+1 u(n + 1)


(−0.8)n+1


 2 for n>1
(−0.8)n+1 u(n + 1) + (−0.8)−(n−1) u(−(n − 1) 1+(−0.8)2

for n = −1, 1

xe (n) = = 2
2 
 −0.8 for n=0
(−0.8)n+1

for n<1

2
(−0.8)n+1


 2 for n>1
(−0.8)2 −1

for n=1

(−0.8)n+1 u(n + 1) − (−0.8)−(n−1) u(−(n − 1)

 2
x0 (n) = = 0 for n=0
2 2
− (−0.8) −1

for n = −1



 2 n+1
 (−0.8)
− 2 for n<1
The samples of x(n) are
ˆ 0.6400, −0.5120, 0.4096}
{0, 0, 1, −0.8,

The samples of time-reversed x(n) are


ˆ 1, 0, 0}
{0.4096, −0.5120, 0.6400, −0.8,

Adding and subtracting the two sequences and dividing by 2, we get


ˆ 0.8200, −0.2560, 0.2048}
xe(n) = {0.2048, −0.2560, 0.8200, −0.8,

xo(n) = {−0.2048, 0.2560, 0.1800, 0̂, −0.1800, −0.2560, 0.2048}

1.4.5 x(n) = n2 u(n)


n2

 2for n > 0
xe (n) = 0 for n = 0
 n2
2 for n < 0
 n2
 2 for n > 0
x0 (n) = 0 for n = 0
 n2
− 2 for n < 0
The samples of x(n) are
{0, 0, 0, 0̂, 1, 4, 9}
The samples of time-reversed x(n) are

{9, 4, 1, 0̂, 0, 0, 0}

Adding and subtracting the two sequences and dividing by 2, we get

xe(n) = {4.5000, 2.0000, 0.5000, 0̂, 0.5000, 2.0000, 4.5000}

6
xo(n) = {−4.5000, −2.0000, −0.5000, 0̂, 0.5000, 2.0000, 4.5000}
1.5 If x(n) is an energy signal, find its energy. If x(n) is a power signal, find its average
power.
1.5.1 x(−1) = −1, x(0) = 2, x(1) = 3, x(2) = 4 and x(n) = 0 otherwise.
This is an energy signal since,

E = (−1)2 + 22 + (3)2 + (4)2 = 30,

its energy 30 is finite.

1.5.2 x(n) = 3(0.9)n u(n)


This is an energy signal since,
∞ ∞
X X 9 900
E= (3(0.9)n )2 = 9(0.81)n = = ,
n=0 n=0
1 − 0.81 19

900
its energy 19 is finite.

1.5.3 x(n) = 3n
Neither a power nor an energy signal.

1.5.4 x(n) = 2 sin( 2π π


8 n − 3)
This is a power signal since,
7
1X 2π π 4
(2 sin( n − ))2 = 2 (0.5)2 + (0.9659)2 + (0.8660)2 + (0.2588)2 = 2,

P =
8 n=0 8 3 8

its average power 2 is finite.


2πn
1.5.5 x(n) = 2e−j( 4 )
This is a power signal since,
3
4 X −j( 2πn ) 2
P = (|e 4 |) = 4
4 n=0

its average power 4 is finite.

1.6 Using scaled and shifted impulses, obtain an analytical description of the signal x(n) .
1.6.1 x(0) = 1, x(−3) = 2, x(2) = −4, x(5) = 7 and x(n) = 0 otherwise.

x(n) = δ(n) + 2δ(n + 3) − 4δ(n − 2) + 7δ(n − 5)


1.6.2 x(0) = 3, x(−11) = 1, x(12) = −4, x(5) = 3 and x(n) = 0 otherwise.

x(n) = 3δ(n) + δ(n + 11) − 4δ(n − 12) + 3δ(n − 5)


1.6.3 x(2) = 3, x(15) = 3, x(9) = −2, x(6) = 1 and x(n) = 0 otherwise.

x(n) = 3δ(n − 2) + 3δ(n − 15) − 2δ(n − 9) + δ(n − 6)


1.7 Using scaled and shifted unit-step signals, obtain an analytical description of the signal
x(n) .
1.7.1 x(2) = 1, x(3) = 1, x(4) = 1 and x(n) = 0 otherwise.

x(n) = u(2) − u(5)

7
1.7.2 x(−1) = 1, x(0) = 1, x(1) = 1, x(2) = 2, x(3) = 2, x(4) = −5, x(5) = 3, and x(n) = 0
otherwise.

x(n) = u(n + 1) + u(n − 2) − 7u(n − 4) + 8u(n − 5) − 3u(n − 6)


1.7.3 x(−2) = 3, x(−1) = 3, x(0) = −2, x(1) = −2 and x(n) = 0 otherwise.

x(n) = 3u(n + 2) − 5u(n) + 2u(n − 2)

1.8 Find the rectangular form of the sinusoid. List the sample values of one cycle, starting
from n = 0, of the sinusoid. Convert the rectangular form back to polar form and verify
that it is the same as the given sinosoid.

1.8.1 x(n) = 2 sin( 2π π


8 n + 3 ).

−π 2π −π 2π √ 2π 2π
x(n) = 2 cos( ) cos( n) − 2 sin( ) cos( n) = 3 cos( n) + sin( n)
6 8 6 8 8 8
The samples of the sinusoid x(n) are

1.7321, 1.9319, 1, −0.5176, −1.7321, −1.9319, −1, 0.5176

1.8.2 x(n) = 2 cos( 2π π


8 n + 6 ).

2π π 2π π √ 2π 2π
x(n) = 2 cos( n) cos( ) + (2) sin( n)(− sin( ) = 3 cos( n) − 1 sin( n)
8 6 8 6 8 8
The samples of the sinusoid x(n) are

1.7321, 0.5176, −1, −1.9319, −1.7321, −0.5176, 1, 1.9319

1.8.3 x(n) = 3 cos( 2π π


8 n − 6 ).

3 3 2π 3 2π
x(n) = cos( n) + sin( n)
2 8 2 8
The samples of the sinusoid x(n) are

2.5981, 2.8978, 1.5000, −0.7765, −2.5981, −2.8978, −1.5000, 0.7765

1.8.4 x(n) = cos( 2π π


8 n + 4 ).

√ 2π √ 2π
x(n) = 0.5 2 cos( n) − 0.5 2 sin( n)
8 8
The samples of the sinusoid x(n) are

0.7071, 0, −0.7071, −1, −0.7071, −0, 0.7071, 1

1.9 Given the sinusoids x(n) and y(n), find the polar form of the sinusoid z(n) = x(n)+y(n).
Find the sample values of one cycle, starting from n = 0, of all the three sinusoids and verify
that the sample values of x(n) + y(n) are the same as those of z(n).

1.9.1 x(n) = sin( 2π π 2π π


6 n − 6 ), y(n) = 2 cos( 6 n + 3 ).
The first sinusoid can be written as x(n) = cos( 6 n − 2π

3 ).
Now, A1 = 1, A2 = 2, θ1 = − 2π 3 , and θ 2 = π
3 .
r
−2π π
A = 12 + 22 + 2(1)(2) cos( − )=1
3 3
2π π
1 sin(− 3 ) + 2 sin( 3 )
θ = tan−1 π = 1.0472 radians
1 cos( −2π
3 ) + 2 cos( 3 )

8
z(n) = 1 cos( 2π π
6 n + 3 ). The samples of the sinusoid x(n) are

−0.5000, 0.5000, 1.0000, 0.5000, −0.5000, −1.0000


The samples of the sinusoid y(n) are
1.0000, −1.0000, −2.0000, −1.0000, 1.0000, 2.0000
The samples of the sinusoid z(n) = x(n) + y(n) are
{0.5000, −0.5000, −1.0000, −0.5000, 0.5000, 1.0000}
1.9.2 x(n) = 3 cos( 2π π 2π
6 n + 6 ), y(n) = 2 cos( 6 n − 3 ).
π
π π
A1 = 3, A2 = 2, θ1 = 6 , and θ2 = − 3 .
r
π π
A = 32 + 22 + 2(3)(2) cos( − ) = 3.6056
6 3
π −π
3 sin( 6 ) + 2 sin( 3 )
θ = tan−1 = −0.0644 radians
3 cos( π6 ) + 2 cos( −π
3 )

z(n) = 3.6056 cos( 2π


6 n − 0.0644). The samples of the sinusoid x(n) are

2.5981, 0.0000, −2.5981, −2.5981, −0.0000, 2.5981


The samples of the sinusoid y(n) are
1.0000, 2.0000, 1.0000, −1.0000, −2.0000, −1.0000
The samples of the sinusoid z(n) = x(n) + y(n) are
3.5981, 2.0000, −1.5981, −3.5981, −2.0000, 1.5981
1.9.3 x(n) = cos( 2π π 2π
6 n + 4 ), y(n) = − cos( 6 n + 3 ).
π

The second sinusoid can be written as y(n) = cos( 6 n − 2π



3 ). Now, A1 = 1, A2 = 1, θ1 =
π
4,
and θ2 = − 2π
3 .
r
π 2π
A = 12 + 12 + 2(1)(1) cos( + ) = 0.2611
4 3
1 sin( π4 ) + 1 sin(− 2π
3 )
θ = tan−1 = −0.6545 radians
cos( π4 ) + 1 cos(− 2π
3 )

z(n) = 0.2611 cos( 2π


6 n − 0.6545). The samples of the sinusoid x(n) are

0.7071, −0.2588, −0.9659, −0.7071, 0.2588, 0.9659


The samples of the sinusoid y(n) are
−0.5000, 0.5000, 1.0000, 0.5000, −0.5000, −1.0000
The samples of the sinusoid z(n) = x(n) + y(n) are
0.2071, 0.2412, 0.0341, −0.2071, −0.2412, −0.0341
1.9.4 x(n) = 2 sin( 2π π 2π π
6 n − 2 ), y(n) = 1 cos( 6 n + 6 ).

The first sinusoid can be written as x(n) = 2 cos( 6 n − π). Now, A1 = 2, A2 = 1, θ1 = −π,
and θ2 = π6 .
r
π
A = 22 + 12 + 2(2)(1) cos(−π − ) = 1.2393
6
π
2 sin(−π) + 1 sin( 6 )
θ = tan−1 = 2.7263 radians
2 cos(−π) + 1 cos( π6 )

9
z(n) = 1.2393 cos( 2π
6 n + 2.7263). The samples of the sinusoid x(n) are

−2.0000, −1.0000, 1.0000, 2.0000, 1.0000, −1.0000

The samples of the sinusoid y(n) are

0.8660, 0.0000, −0.8660, −0.8660, −0.0000, 0.8660

The samples of the sinusoid z(n) = x(n) + y(n) are

−1.1340, −1.0000, 0.1340, 1.1340, 1.0000, −0.1340

1.10 Given a real sinusoid, express it in terms of complex exponentials xc(n). Find the
sample values of one cycle, starting from n = 0, of the two equivalent forms and verify that
the sample values of of both of them are the same.

1.10.1 x(n) = 3 cos( 2π π


8 n − 6)

3 j( 2π n− π ) 2π π
(e 8
xc(n) = 6 + e−j( 8 n− 6 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.

2.5981, 2.8978, 1.5000, −0.7765, −2.5981, −2.8978, −1.5000, 0.7765

1.10.2 x(n) = sin( 2π π


8 n + 4)

1 j( 2π n− π ) 2π π
(e 8
xc(n) = 4 + e−j( 8 n− 4 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.

0.7071, 1.0000, 0.7071, 0.0000, −0.7071, −1.0000, −0.7071, −0.0000

1.10.3 x(n) = −2 sin( 2π π π


8 n + 2 ) = 2 cos( 6 n + π).

2 j( 2π n+π) 2π
xc(n) = (e 8 + e−j( 8 n+π) )
2
The samples of the sinusoid x(n) and xc(n) are the same.

−2.0000, −1.4142, −0.0000, 1.4142, 2.0000, 1.4142, 0.0000, −1.4142

1.10.4 x(n) = −4 cos( 2π π


8 n + 3)

4 j( 2π n− 2π ) 2π 2π
xc(n) = (e 8 3 + e−j( 8 n− 3 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.

−2.0000, 1.0353, 3.4641, 3.8637, 2.0000, −1.0353, −3.4641, −3.8637

1.11 Given the sinusoid x(n), find the sample values of one cycle, starting from n = 0, of
x(n) and x(an + k). Assume interpolation using zero-valued samples, if necessary. First
find the samples of x(an + k) by replacing n by an + k in x(n). Then, subject x(n) to the
required shifting and then do the required scaling on the shifted signal. Verify that either
procedure produces the same result.

10
1.11.1 x(n) = sin( 2π π
8 n − 3 ), a = −2, k = 1.
The samples of the sinusoid x(n) are

−0.8660, −0.2588, 0.5000, 0.9659, 0.8660, 0.2588, −0.5000, −0.9659

The samples of the shifted sinusoid x(n + 1) are

−0.2588, 0.5000, 0.9659, 0.8660, 0.2588, −0.5000, −0.9659, −0.8660

The samples of the sinusoid x(−2n + 1) are

−0.2588, −0.9659, 0.2588, 0.9659

1.11.2 x(n) = cos( 2π π 1


8 n + 6 ), a = − 2 , k = −1.
The samples of the sinusoid x(n) are

0.8660, 0.2588, −0.5000, −0.9659, −0.8660, −0.2588, 0.5000, 0.9659

The samples of the shifted sinusoid x(n − 1) are

0.9659, 0.8660, 0.2588, −0.5000, −0.9659, −0.8660, −0.2588, 0.5000

The samples of the sinusoid x(−0.5n − 1) are

0.9659, 0, 0.5000, 0, −0.2588, 0, −0.8660, 0,

−0.9659, 0, −0.5000, 0, 0.2588, 0, 0.8660, 0

1.11.3 x(n) = cos( 2π π 1


3 n + 6 ), a = 3 , k = −2.
The samples of the sinusoid x(n) are

0.8660 − 0.8660, −0.0000

The samples of the shifted sinusoid x(n − 2) are

−0.8660, −0.0000, 0.8660

The samples of the sinusoid x((1/3)n − 2) are

−0.8660, 0, 0, 0, 0, 0, 0.8660, 0, 0

1.11.4 x(n) = cos( 2π π


12 n − 3 ), a = 3, k = 3.
The samples of the sinusoid x(n) are

0.5, 0.8660, 1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, −0

The samples of the shifted sinusoid x(n + 3) are

0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660, 1

The samples of the sinusoid x(3n + 3)) are

0.8660, −0.5, −0.8660, 0.5

11
1.12 Given the signal x(n), x(an + k). Assume interpolation using zero-valued samples, if
necessary. First find the samples of x(an + k) by replacing n by an + k in x(n). Then,
subject x(n) to the required shifting and then do the required scaling on the shifted signal.
Verify that either procedure produces the same result.

1.12.1 x(0) = 1, x(1) = −2, x(2) = 3, x(3) = 4 and x(n) = 0 otherwise. a = 2, k = −2.
The samples of the waveform x(n) are

1̂, −2, 3, 4

The samples of the waveform x(n − 2) are

0̂, 0, 1, −2, 3, 4

The samples of the waveform x(2n − 2) are

0̂, 1, 3

1.12.2 x(n) = (−0.6)n u(n). a = 2, k = 1.


The samples of the waveform x(n) are

1̂, −0.6, 0.36, −0.2160, 0.1296, −0.0778, 0.0467, −0.0280, 0.0168, −0.0101, 0.0060, −0.0036, 0.0022, . . . ,

The samples of the shifted waveform x(n + 1)u(n + 1) are


ˆ 0.36, −0.2160, 0.1296, −0.0778, 0.0467, −0.0280, 0.0168, −0.0101, 0.0060, . . . ,
1, −0.6,

The samples of the waveform x(2n + 1)u(2n + 1) are


ˆ −0.2160, −0.0778, −0.0280, −0.0101, . . . ,
−0.6,

1.12.3 x(n) = (−0.9)n u(n). a = 21 , k = −1.


The samples of the waveform x(n) are

1̂, −0.9000, 0.8100, −0.7290, 0.6561, −0.5905, 0.5314, . . . ,

The samples of the shifted waveform x(n − 1) are

0̂, 1, −0.9000, 0.8100, −0.7290, 0.6561, −0.5905, 0.5314, . . . ,

The samples of the waveform x( 21 n − 1) are

0̂, 0, 1, 0, −0.9000, 0, 0.8100, 0, −0.7290, 0, 0.6561, 0, −0.5905, 0, 0.5314, 0, . . . ,

1.12.4 x(n) = (1.1)n u(−n). a = −2, k = 1.


The samples of the waveform x(n) are

, . . . , 0.3855, 0.4241, 0.4665, 0.5132, 0.5645, 0.6209, 0.6830, 0.7513, 0.8264, 0.9091, 1̂

The samples of the shifted waveform x(n + 1) are

, . . . , 0.3855, 0.4241, 0.4665, 0.5132, 0.5645, 0.6209, 0.6830, 0.7513, 0.8264, 0.9091, 1, 0̂

The samples of the waveform x(−2n + 1) are

0̂, 0.9091, 0.7513, 0.6209, 0.5132, 0.4241, 0.3505, 0.2897, 0.2394, 0.1978, 0.1635, . . . ,

12
1.13
1.13.1 Let the low frequency fl of a bandpass signal be 10 kHz and the high frequency fh
be 15 kHz. Find the required sampling frequency.
The bandwith of the bandpass signal is B = 15 − 10 = 5 kHz. The center frequency is
fc = (10 + 15)/2 = 12.5 kHz. If fc > B/2 and fh is an integral multiple of B, then the
sampling frequency is 2B. Therefore, the sampling frequency is 2(5) = 10 kHz.

1.13.2 Let the low frequency fl of a bandpass signal be 10 kHz and the high frequency fh
be 16 kHz. Find the required sampling frequency.

If fh is not an integral multiple of B, then the sampling frequency has to be increased.


That is,
2fh
fs = ,
⌊fh /B⌋
where ⌊.⌋ indicates the nearest integer less than or equal to the operand. fh = 16 kHz.
B = 6 kHz. Then, the sampling frequency fs = 32/2 = 16 kHz.
1.14

Assuming that x(n) = 0, n < 0, and its even part is xe (0) = 1 and xe (n) = 0.5an , n 6= 0.
Find x(n).

x(0) = δ(n) = 1 and x(n) = 2xe (n) = an u(n), n > 0.


1.15
Find the period of the sum of the two sinusoids

x(n) = cos(4πn/5), y(n) = cos(4πn/6)

The period of x(n) is 5. The period of y(n) is 3. The GCD of the periods is 1. Therefore,

z(n) = x(n) + y(n) = cos(4πn/5) + cos(4πn/6)

is periodic with period (5 × 3)/1 = 15. The first 20 samples of z(n), starting with index 0,
are
{2, −1.3090, −0.1910, 1.3090, −1.3090, 0.5, 0.1910, −0.1910, −0.1910, 0.1910,
0.5, −1.3090, 1.3090, −0.1910, −1.3090, 2, −1.3090, −0.1910, 1.3090, −1.3090, 0.5}

13
14
Chapter 2

2.1 A system is characterized by the differencial equation


dy(t)
+ τ y(t) = τ u(t),
dt
where the input u(t) is the unit-step signal. Give the value of τ , find the complete response
of the system by solving the differential equation. The initial condition is y(0) = 2.
The difference equation characterizing the system is
dy(nTs )
+ τ y(nTs ) = τ u(nTs ), n = 0, 1, 2, . . .
dnTs
with the input u(nTs ), the sampled unit-step signal. Find the zero-input, zero-state and
complete responses of the discrete system for the specified sampling intervals. Compare
these responses with the samples of the output of the continuous-time response. Verify your
results by finding the first 10 total output samples using the difference equation by iteration.
2.1.1 τ = 4. The sampling intervals are: (i) Ts = 0.004 seconds and (ii) Ts = 0.04 seconds.
τ Ts 1
b= and a = −
τ Ts + 1 τ Ts + 1
yzi (n) = 2(−a)(n+1)

1 − (−a)(n+1)
 
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)
The total solution of the continuous system is

y(t) = (1 + e−τ t )u(t)

y(n) = bx(n) + (−a)y(n − 1), n = 0, 1, 2 . . .


With Ts = 0.004, τ = 4, a = −0.9843 and b = 0.0157,
The first few exact samples of the complete response are

2, 1.9841, 1.9685, 1.9531, 1.9380, 1.9231, 1.9085, 1.8940, 1.8799, 1.8659

The approximate samples of the complete response by iteration of the difference equation
are
1.9843, 1.9688, 1.9535, 1.9385, 1.9237, 1.9092, 1.8948, 1.8807, 1.8669, 1.8532
The approximate samples of the zero-input response are

1.9685, 1.9375, 1.9070, 1.8770, 1.8474, 1.8183, 1.7897, 1.7615, 1.7338, 1.7064

The approximate samples of the zero-state response are

0.0157, 0.0312, 0.0465, 0.0615, 0.0763, 0.0908, 0.1052, 0.1193, 0.1331, 0.1468

15
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9843, 1.9688, 1.9535, 1.9385, 1.9237, 1.9092, 1.8948, 1.8807, 1.8669, 1.8532

With Ts = 0.04, τ = 4, a = −0.8621 and b = 0.1379,


The first few exact samples of the complete response are

2, 1.8521, 1.7261, 1.6188, 1.5273, 1.4493, 1.3829, 1.3263, 1.2780, 1.2369

The approximate samples of the complete response by iteration of the difference equation
are
1.8621, 1.7432, 1.6407, 1.5523, 1.4761, 1.4104, 1.3538, 1.3050, 1.2630, 1.2267
The approximate samples of the zero-input response are

1.7241, 1.4863, 1.2813, 1.1046, 0.9522, 0.8209, 0.7077, 0.6101, 0.5259, 0.4534

The approximate samples of the zero-state response are

0.1379, 0.2568, 0.3593, 0.4477, 0.5239, 0.5896, 0.6462, 0.6950, 0.7370, 0.7733

The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.8621, 1.7432, 1.6407, 1.5523, 1.4761, 1.4104, 1.3538, 1.3050, 1.2630, 1.2267
2.1.2 τ = 3. The sampling intervals are: (i) Ts = 0.003 seconds and (ii) Ts = 0.03 seconds.

τ Ts 1
b= and a = −
τ Ts + 1 τ Ts + 1
yzi (n) = 2(−a)(n+1)

1 − (−a)(n+1)
 
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)

The total solution of the continuous system is

y(t) = (1 + e−τ t )u(t)

y(n) = bx(n) + (−a)y(n − 1), n = 0, 1, 2 . . .


With Ts = 0.003, τ = 3, a = −0.9911 and b = 0.0089,
The first few exact samples of the complete response are

2, 1.9910, 1.9822, 1.9734, 1.9646, 1.9560, 1.9474, 1.9389, 1.9305, 1.9222

The approximate samples of the complete response by iteration of the difference equation
are
1.9911, 1.9822, 1.9735, 1.9648, 1.9562, 1.9477, 1.9392, 1.9308, 1.9225, 1.9143
The approximate samples of the zero-input response are

1.9822, 1.9645, 1.9470, 1.9296, 1.9124, 1.8953, 1.8784, 1.8617, 1.8451, 1.8286

The approximate samples of the zero-state response are

0.0089, 0.0178, 0.0265, 0.0352, 0.0438, 0.0523, 0.0608, 0.0692, 0.0775, 0.0857

16
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9911, 1.9822, 1.9735, 1.9648, 1.9562, 1.9477, 1.9392, 1.9308, 1.9225, 1.9143

With Ts = 0.03, τ = 3, a = −0.9174 and b = 0.0826,


The first few exact samples of the complete response are

2, 1.8353, 1.7634, 1.6977, 1.6376, 1.5827, 1.5326, 1.4868, 1.4449

The approximate samples of the complete response by iteration of the difference equation
are
1.9174, 1.8417, 1.7722, 1.7084, 1.6499, 1.5963, 1.5470, 1.5019, 1.4604, 1.4224
The approximate samples of the zero-input response are

1.8349, 1.6834, 1.5444, 1.4169, 1.2999, 1.1925, 1.0941, 1.0037, 0.9209, 0.8448

The approximate samples of the zero-state response are

0.0826, 0.1583, 0.2278, 0.2916, 0.3501, 0.4037, 0.4530, 0.4981, 0.5396, 0.5776

The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9174, 1.8417, 1.7722, 1.7084, 1.6499, 1.5963, 1.5470, 1.5019, 1.4604, 1.4224
2.1.3 τ = 2. The sampling intervals are: (i) Ts = 0.002 seconds and (ii) Ts = 0.02 seconds.

τ Ts 1
b= and a = −
τ Ts + 1 τ Ts + 1
yzi (n) = 2(−a)(n+1)

1 − (−a)(n+1)
 
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)

The total solution of the continuous system is

y(t) = (1 + e−τ t )u(t)

y(n) = bx(n) + (−a)y(n − 1), n = 0, 1, 2 . . .


With Ts = 0.002, τ = 2, a = −0.9960 and b = 0.0040,
The first few exact samples of the complete response are

2, 1.9960, 1.9920, 1.9881, 1.9841, 1.9802, 1.9763, 1.9724, 1.9685, 1.9646

The approximate samples of the complete response by iteration of the difference equation
are
1.9960, 1.9920, 1.9881, 1.9842, 1.9802, 1.9763, 1.9724, 1.9686, , 1.9647, 1.9609
The approximate samples of the zero-input response are

1.9920, 1.9841, 1.9762, 1.9683, 1.9605, 1.9527, 1.9449, 1.9371, 1.9294, 1.9217

The approximate samples of the zero-state response are

0.0040, 0.0080, 0.0119, 0.0158, 0.0198, 0.0237, 0.0276, 0.0314, 0.0353, 0.0391

17
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9960, 1.9920, 1.9881, 1.9842, 1.9802, 1.9763, 1.9724, 1.9686, 1.9647, 1.9609

With Ts = 0.02, τ = 2, a = −0.9615 and b = 0.0385,


The first few exact samples of the complete response are

2, 1.9608, 1.9231, 1.8869, 1.8521, 1.8187, 1.7866, 1.7558, 1.7261, 1.6977

The approximate samples of the complete response by iteration of the difference equation
are
1.9615, 1.9246, 1.8890, 1.8548, 1.8219, 1.7903, 1.7599, 1.7307, 1.7026, 1.6756
The approximate samples of the zero-input response are

1.9231, 1.8491, 1.7780, 1.7096, 1.6439, 1.5806, 1.5198, 1.4614, 1.4052, 1.3511

The approximate samples of the zero-state response are

0.0385, 0.0754, 0.1110, 0.1452, 0.1781, 0.2097, 0.2401, 0.2693, 0.2974, 0.3244

The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9615, 1.9246, 1.8890, 1.8548, 1.8219, 1.7903, 1.7599, 1.7307, 1.7026, 1.6756

2.2 Find the linear convolution y(n) of the two finite sequences x(n) and h(n). The symbol
ˆ on the element indicates that its index is zero. Verify the convolution sum by using the
sum and alternating sum methods.

2.2.1
x = {2̂, 1, 3, 4} and {h = 1̂, −1, 4, 3}

y = {2̂, −1, 10, 11, 11, 25, 12}

2.2.2
x = {1, 2̂, 1, 3, 4} and {h = 2, 3, 1̂, −1, 4, 3}

ˆ 20, 25, 11, 11, 25, 12}


y = {2, 7, 9, 10,

2.2.3
x = {0̂, 0, 2, 1, 3, −4} and {h = 2, 3, 1̂, −1, 4, −3}

y = {4̂, 8, 11, 0, −2, −9, 13, −25, 12}

2.2.4
ˆ
x = {2, 1, 3, −4} and {h = 1, −2, 4̂, 3}

18
ˆ −12}
y = {2, −3, 9, 0, 23, −7,

2.2.5
x = {2̂, 0, 3, 0} and {h = 0̂, −2, 0, 3}

y = {0̂, −4, 0, 0, 0, 9, 0}

2.3 Find the closed-form expression of the convolution of the sequences x(n)u(n) and
h(n)u(n). Find the first few values of the convolution of x(n) and h(n) using their sample
values and verify that they are the same as those obtained from the closed-form expression.

2.3.1
x(n) = (0.9)n u(n) and h(n) = (0.6)n u(n)
The first few values of the sequences are

{1, 0.9000, 0.8100, 0.7290, 0.6561, 0.5905}

{1, 0.6000, 0.3600, 0.2160, 0.1296, 0.0778}


X n
X
y(n) = x(k)h(n − k) = (0.9)k (0.6)n−k , n ≥ 0
k=−∞ k=0
n  k n+1 !
n
X 0.9 n 1 − 0.9
0.6 
= (0.6) = (0.6)
k=0
0.6 1 − 0.9
0.6
= (3(0.9) − 2(0.6)n )u(n)
n

The first four values of the convolution output are

1, 1.5000, 1.7100, 1.7550

2.3.2
x(n) = (0.6)(n−1) u(n − 1) and h(n) = (0.5)(n−2) u(n − 2)
The convolution of
x(n) = (0.6)(n) u(n) and h(n) = (0.5)(n) u(n)
can be found and then shifted right by 3 sample intervals to get the desired output. The
first few values of the sequences are

{1, 0.6000, 0.3600, 0.2160, 0.1296, 0.0778}

{1, 0.5000, 0.2500, 0.1250, 0.0625, 0.0313}


X n
X
y(n) = x(k)h(n − k) = (0.6)k (0.5)n−k , n ≥ 0
k=−∞ k=0
n  k n+1 !
X 0.6 1 − 0.6
= (0.5)n = (0.5)n 0.5 

k=0
0.5 1 − 0.6
0.5
= (6(0.6)n − 5(0.5)n )u(n)

19
The desired output is
(6(0.6)(n−3) − 5(0.5)(n−3) )u(n − 3)
The first four values of the convolution output are

0, 0, 0, 1, 1.1000, 0.9100, 0.6710

2.3.3
x(n) = (0.7)n u(n − 1) and h(n) = (0.6)n u(n + 1)
The first few nonzero values of the sequences are

{0.7000, 0.4900, 0.3430, 0.2401, 0.1681, 0.1176}

{1.6667, 1, 0.6000, 0.3600, 0.2160, 0.1296}


These sequences can be convolved by assuming that both of them start at n = 0 and then
the output is shifted right by 0 sample intervals to get the desired output.

X n
X
y(n) = x(n) ∗ h(n) = x(l)h(n − l) = (0.6)l−1 (0.7)n−l+1 , n ≥ 0
l=−∞ l=0
n  l n+1 !
−1 n
X 0.6 n 1 − 0.6
0.7 
= (0.6) (0.7)(0.7) = 1.1667(0.7) 0.6
0.7 1 − 0.7
l=0
= (8.1667(0.7)n − 7(0.6)n )u(n)

The first few values of the convolution output are

1.1667, 1.5167, 1.4817, 1.2892

2.3.4
x(n) = (0.9)n u(n) and h(n) = δ(n − 2)
The first few values of the convolution output are

0, 0, 1, 0.9000, 0.8100, 0.7290, 0.6561, 0.5905

2.3.5
x(n) = (0.8)n u(n) and h(n) = u(n)
The convolution output is

X n
X
y(n) = x(k)h(n − k) = (0.8)k (1)n−k , n ≥ 0
k=−∞ k=0
n  k n+1 !
n
X 0.8 n 1 − 0.8
1
= (1) = (1)
1 − 0.8

1 1
k=0
!
n+1
1 − (0.8)
= = (5 − 4(0.8)n )u(n)
1 − (0.8)

Just the cumulative sum of x(n).

The first few values of the convolution output are

1, 1.8000, 2.4400, 2.9520, 3.3616

2.4 A system is characterized by the difference equation with the given input signal x(n) and
the initial condition y(−1). First, find the impulse response of the system and using which

20
find the zero-input, zero-state and total responses of the system. Verify your results by
finding the first 10 total output samples using the difference equation by iteration. Deduce
expressions for the transient and steady-state response of the system.
2.4.1 The difference equation is

y(n) = 3x(n) − 2x(n − 1) − 0.8y(n − 1) n = 0, 1, 2, . . .

The input is x(n) = u(n). The initial condition is y(−1) = 3.

By iteration, the first few values of the total response of the system are

0.6000, 0.5200, 0.5840, 0.5328, 0.5738, 0.5410, 0.5672, 0.5462, 0.5630, 0.5496

The impulse response values are

3.0000, −4.4000, 3.5200, −2.8160, 2.2528, −1.8022, 1.4418, −1.1534, 0.9227, −0.7382

h(0) = 3 and h(1) = −4.4


The response, for n > 0, can be considered as zero-input response. The zero-input response
is of the form
C(−0.8)n u(n − 1)
As u(n − 1) = u(n) − δ(n), the response is given by

h(n) = C(−0.8)n u(n) − Cδ(n)

With h(1) = −4.4, and letting n = 1, we get C = 5.5. The impulse response is

h(n) = 3δ(n) + 5.5(−0.8)n u(n) − 5.5δ(n) = −2.5δ(n) + 5.5(−0.8)n u(n), n = 0, 1, 2, . . .

The zero-state response is found using convolution as


n n
!
n+1
X X m 1 − (−0.8)
y(n) = h(m)x(n − m) = (−2.5δ(m) − (−0.8) ) = −2.5 + 5.5
m=0 m=0
1 − (−0.8)

The samples of zero-state response are

3.0000, −1.4000, 2.1200, −0.6960, 1.5568, −0.2454, 1.1964, 0.0429, 0.9657, 0.2275

The zero-input response is


(n+1)
3 (−0.8)
The samples of zero-input response are

−2.4000, 1.9200, −1.5360, 1.2288, −0.9830, 0.7864, −0.6291, 0.5033, −0.4027, 0.3221

The complete response is


n+1 (n+1) n+1 (n+1)
y(n) = −2.5+3.0556(1−(−0.8) )+3 (−0.8) = 0.5556+3.0556(− (−0.8) )+3 (−0.8)

The constant term is the steay-state response and the sum of the decaying terms is the
transient response.

2.4.2 The difference equation is

y(n) = x(n) + x(n − 1) + 0.9y(n − 1) n = 0, 1, 2, . . .

21
The input is x(n) = (0.5)n u(n). The initial condition is y(−1) = 2.

By iteration, the first few values of the total response of the system are

2.8000, 4.0200, 4.3680, 4.3062, 4.0631, 3.7505, 3.4223, 3.1035, 2.8049, 2.5303

The impulse response values are

1.0000, 1.9000, 1.7100, 1.5390, 1.3851, 1.2466, 1.1219, 1.0097, 0.9088, 0.8179

h(0) = 1 and h(1) = 1.9


The response, for n > 0, can be considered as zero-input response. The zero-input
response is of the form
C(0.9)n u(n − 1)
As u(n − 1) = u(n) − δ(n), the response is given by

h(n) = C(0.9)n u(n) − Cδ(n)

With h(1) = 1.9, and letting n = 1, we get C = 2.1111. The impulse response is

h(n) = 1δ(n)+2.1111(0.9)n u(n)−2.1111δ(n) = −1.1111δ(n)+2.1111(0.9)n u(n), n = 0, 1, 2, . . .

The zero-state response is found using convolution as


n n  
n−m
X X
y(n) = x(m)h(n − m) = (0.5)m −1.1111δ(m) + 2.1111 (0.9)
m=0 m=0
n
X
= −1.1111(0.5)n + 2.1111(0.9)n (0.5/0.9)m
m=0
!
n+1
n n 1 − (0.5/0.9)
= −1.1111(0.5) + 2.1111(0.9)
1 − (0.5/0.9)
n+1
= −1.1111(0.5)n + 2.25(2.1111)(0.9)n (1 − (0.5/0.9) )
n
= −1.1111(0.5)n + 4.75(0.9)n − 2.6389 (0.5)

The samples of zero-state response are

1, 2.4000, 2.9100, 2.9940, 2.8821, 2.6876, 2.4658, 2.2426, 2.0301, 1.8329

The zero-input response is


(n+1)
2 (0.9)
The samples of zero-input response are

1.8000, 1.6200, 1.4580, 1.3122, 1.1810, 1.0629, 0.9566, 0.8609, 0.7748, 0.6974

The complete response is


n (n+1)
y(n) = −1.1111(0.5)n + 4.75(0.9)n − 2.6389 (0.5) + 2 (0.9)

The sum of the two input modes is the steay-state response and the sum of the rest is the
transient response.

22
2.4.3 The difference equation is

y(n) = 2x(n) + x(n − 1) − 0.7y(n − 1)

The initial condition y(−1) = −2 and the input x(n) = cos( 2π π


8 n − 6 )u(n).

The input sequence is

{0.8660, 0.9659, 0.5000, −0.2588, −0.8660, −0.9659, −0.5000, 0.2588, 0.8660, 0.9659}

By iteration, the first few values of the total response of the system are

3.1321, 0.6054, 1.5421, −1.0971, −1.2229, −1.9419, −0.6066, 0.4423, 1.6813, 1.6210

The zero-state response values are

1.7321, 1.5854, 0.8561, −0.6169, −1.5590, −1.7066, −0.7713, 0.5576, 1.6006, 1.6775

The zero-input response values are

1.4000, −0.9800, 0.6860, −0.4802, 0.3361, −0.2353, 0.1647, −0.1153, 0.0807, −0.0565

The impulse response values are

2, −0.4000, 0.2800, −0.1960, 0.1372, −0.0960, 0. − 0.0471, 0.0329, −0.0231

By iteration,
h(0) = 2 and h(1) = −0.4

As the values of the input impulse signal is zero for n > 0, the response for n > 0 can be
considered as zero-input response. The characteristic equation is

(λ + 0.7) = 0

The zero-input response is of the form

C(−0.7)n u(n − 1)

As u(n − 1) = u(n) − δ(n), the response is given by

h(n) = C(−0.7)n u(n) − Cδ(n)

With h(1) = −0.4, and letting n = 1, we get C = 0.4/0.7 = 0.5714. The impulse response
is

h(n) = 2δ(n)+0.5714(−0.7)n u(n)−0.5714δ(n) = 1.4286δ(n)+0.5714(−0.7)n u(n), n = 0, 1, 2, . . .


2π π π 2π
For ease of manipulation, we can use the exponential function ej( 8 n− 6 ) = e−j 6 ej( 8 n)

as the input and take the real part of the response.


The zero-state response is found using convolution as
n n
!
π
j( 2π
X X
x(m)h(n − m) = Re e−j 8 m) n−m

y(n) = 6 e 1.4286δ(n − m) + 0.5714(−0.7)
m=0 m=0

n
!!
−j π j( 2π j( 2π
X
= Re e 6 1.4286e 8 n) + 0.5714(−0.7) n
((−1.4286)e 8 ) m
)
m=0

23
!!
j( 2π
8 ) n+1
−j π j( 2π
8 n) n (−1.4286e ) −1
= Re e 6 1.4286e + 0.5714(−0.7) 2π
(−1.4286ej( 8 ) )−1

The zero-input response is


(n+1)
−2 (−0.7)
The sum of zero-input and zero-state responses is the total output response.

2.5 The difference equation of the system is given. Apply the given inputs

xa(n) = {2̂, −1, 3, 4}, xb(n) = {3̂, 2, 0, −4}, and xc(n) = 2xa(n) + 3xb(n)

and find the outputs


ya(n), yb(n) and y(n)
Determine whether the system is linear. Aussume that the system is initially relaxed.

2.5.1. y(n) = 3 + 2x(n) + 0.8y(n − 1).

ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the difference equation has a constant term, the system is nonlinear.

ya = {7̂, 6.6000, 14.2800, 22.4240}

yb = {9̂, 14.2000, 14.3600, 6.4880}


ˆ 55.8000, 71.6400, 64.3120}
(2ya + 3yb) = {41,
ˆ 34.2000, 42.3600, 28.8880}
yc = {29,
As the outputs (2ya(n) + 3yb(n)) and yc(n) are different, the system is nonlinear.

2.5.2. y(n) = −x(n) − 0.2y 2 (n − 1).

ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the difference equation has a squared past output term, the system is nonlinear.
ˆ 0.2000, −3.0080, −5.8096}
ya = {−2,
ˆ −3.8000, −2.8880, 2.3319}
yb = {−3,

ˆ −11.0000, −14.6800, −4.6236}


(2ya + 3yb) = {−13,
ˆ
yc = 104 {−0.0013, −0.0038, −0.0292, −1.7022}
As the outputs (2ya(n) + 3yb(n)) and yc(n) are different, the system is nonlinear.

24
2.5.3. y(n) = 2x(n) − 0.4(−n)y(n − 1) − 2 sin(π).

ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the constant term is zero, the system is linear.

ya = {4̂, 2.8000, 10.4800, 28.9600}

yb = {6̂, 11.2000, 17.9200, 27.8400}

ˆ 39.2000, 74.7200, 141.4400}


(2ya + 3yb) = {26,
ˆ 39.2000, 74.7200, 141.4400}
yc = {26,
As the outputs (2ya(n) + 3yb(n)) and yc(n) are the same, the system is linear.

2.5.4. y(n) = x(n) − 0.7|y(n − 1)|.


Due to the absolute operator in the past output term, the system is nonlinear.
ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,

ya = {2̂, −2.4000, 1.3200, 3.0760}


yb = {3̂, −0.1000, −0.0700, −4.0490}

ˆ −5.1000, 2.4300, −5.9950}


(2ya + 3yb) = {13,
ˆ −5.1000, 2.4300, −5.7010}
yc = {12,
As the outputs (2ya(n) + 3yb(n)) and yc(n) are different, the system is nonlinear.

2.6 The difference equation of the system is given. Apply the given input

x(n) = {2̂, −1, 3, 4}

at starting at n = 0. Apply the same input values starting at n = 2. Find the outputs

y(n) and yd(n)

Determine whether the system is time invariant. Aussume that the system is initially relaxed
at the instant of applying the input.

2.6.1. y(n) = 3 + 2x(n) + 0.8y(n − 1).


The system is time invariant.

y = {7̂, 6.6000, 14.2800, 22.4240}

yd = {0̂, 0, 7, 6.6000, 14.2800, 22.4240}

2.6.2. y(n) = 2x(n) − 0.4(−n)y(n − 1).


The system is time variant, since the coefficient of the past output term is time variant.

y = {4̂, −0.4000, 5.6800, 14.8160}

25
yd = {0̂, 0, 4.0000, 2.8000, 10.4800, 28.9600}

2.6.3. y(n) = x(n) + cos( 2π


8 n).
The system is time variant, since the term independent of input and output is time variant.

y = {3̂, −0.2929, 3.0000, 3.2929}

yd = {0̂, 0, 2.0000, −1.7071, 2.0000, 3.2929}

2.6.4. y(n) = x(2n).


The input is
x(n) = {2̂, −1, 3, 4, 3, 1, 2, 4, 2, 4, 8}
Compare the first 4 outputs in applying x(n) at n = 0 and at n = 2, and determine whether
the system is time invariant.
The system is time variant, since the index of the input is time variant.

y = {2̂, 3, 3, 2}
yd = {0̂, 0, 3, 2, 2, 8}

2.7 The difference equation of the system is given. Determine whether the system is causal.

2.7.1. y(n) = 3 + 2x(n) + 0.8x(n − 1).


System is causal.

2.7.2. y(n) = 2x(n) + 0.8x(n − 1) − 0.6x(n − 2).


System is causal.

2.7.3. y(n) = 2x(n) + 0.8x(n − 1) − 0.6x(n + 1).


System is noncausal.

2.7.4. y(n) = 2x(−2n) + 0.8x(n − 1) − 0.6x(n − 2).


System is noncausal.

2.7.5. y(n) = 2x(n2 ) + 0.8x(n − 1) − 0.6x(n − 2).


System is noncausal.
2.8 Find the closed-form expression for the zero-state response of the system, with the
impulse response
h(n) = (a)n u(n), n = 0, 1, 2, . . . ,
to the input x(n) = ejω0 n u(n) by convolution. Find the first few samples of the signal
and the impulse response and convolve in the time-domain to find the first 4 values of the
output. Verify that the outputs by both methods are the same. Deduce the steady state
response.

26
2.8.1. ω0 = 1 and h(n) = (a)n u(n), a = 0.8. For a everlasting exponential input ejω0 (n) , we
get
X∞ ∞
X
y(n) = h(k)ejω0 (n−k) = ejω0 n h(k)e−jω0 k
k=−∞ k=−∞

As the second summation is independent of n and letting



X
H(ejω0 ) = h(k)e−jω0 k
k=0

we get,
y(n) = H(ejω0 )ejω0 n = H(ejω0 )x(n)
For a causal exponential, with ω0 = 1 and h(n) = (a)n , a = 0.8, we get
n
X n
X
jω0 (n−k) jω0 n
y(n) = h(k)e =e (a)k e−jω0 k
k=0 k=0
 
1 jω0 n

= e − (a)(n+1) e−jω0 , n = 0, 1, . . .
1 − (a)e−jω0

The first few values of the zero-state response are

1, 1.3403+j0.8415, 0.6561+j1.5825, −0.4651+j1.4071, −1.0257+j0.3689, −0.5369−j0.6638

The first few values of the input are

1, 0.5403+j0.8415, −0.4161+j0.9093, −0.9900+j0.1411, −0.6536−j0.7568, 0.2837−j0.9589

The first few values of the impulse response are

1, 0.8000, 0.6400, 0.5120, 0.4096, 0.3277


 
The first term, the steady-state component 1−(ae1−jω0 ejω0 n , is the same as the input
complex exponential with a complex scale factor. The magnitude and the phase of the
coefficient of the steady-state component are
   
1 1
| | = 1.1355 and 6 = −0.8701
1 − (ae−jω0 ) 1 − (ae−jω0 )

The steady-state response of the system to the input ej1n is 1.1355ej(1n−0.8701) .


2.8.2. With ω0 = −2 and h(n) = (a)n u(n), a = −0.6,
 
1 jω0 n (n+1) −jω0

y(n) = e − (a) e , n = 0, 1, . . .
1 − (a)e−jω0

The first few values of the zero-state response are

1, −1.0161−j0.9093, −0.0440+j1.3024, 0.9865−j0.5020, −0.7374−j0.6882, −0.3966+j0.9569

The first few values of the input are

1, −0.4161−j0.9093, −0.6536+j0.7568, 0.9602+j0.2794, −0.1455−j0.9894, −0.8391+j0.5440

The first few values of the impulse response are

1, −0.6000, 0.3600, −0.2160, 0.1296, −0.0778

27
The magnitude and the phase of the coefficient of the steady-state component are
   
1 1
| | = 1.0779 and 6 = −0.6287
1 − (ae−jω0 ) 1 − (ae−jω0 )

The steady-state response of the system to the input ej1n is 1.0779ej(1n−0.6287) .

2.9 Given the impulse response of a LTI discrete system, is the system BIBO stable?

2.9.1 h(n) = (−0.8)n u(n).



X 1
S= |a|n = < ∞, |a| < 1
0
1 − |a|

The cumulative sum of the magnitude of the impulse response converges to 5, a bounded
value. The system is BIBO stable.
2.9.2 h(n) = (0.6)n u(n).

X 1
S= |a|n = < ∞, |a| < 1
0
1 − |a|

The cumulative sum of the magnitude of the impulse response converges to 2.5, a bounded
value. The system is BIBO stable.
2.9.3 h(n) = u(n). The cumulative sum of the magnitude of the impulse response diverges.
The system is not BIBO stable.
2.9.4 h(n) = h(0)
P∞= 0, h(n) = n1 , n = 1, 2, . . ..
P ∞ 1 1 1
n=1 h(n) = n=1 n = 1 + 2 + 3 + · · · is a harmonic series, which is known to diverge. By
ratio test, the ratio of two consecutive terms

h(n) n
= →1
h(n + 1) n+1

as n → ∞, which has to be less than 1 for a stable series. Therefore, the system is unstable.
2.9.5 h(0) = 0, h(n) = n12 , n = 1, 2, . . ..
π2
P∞ P∞ 1 1 1
n=1 h(n) = n=1 n2 = 1 + 4 + 9 + · · · = 6 is absolutely convergent. Therefore, the
system is stable. This summation can be obtained using Fourier series.

2.10 The impulse response of a second-order system has been decomposed into those of the
two first-order systems and are given. The impulse responses of two systems connected in
parallel are
hp1(n) = 4(0.8n )u(n) and hp2(n) = (−3)(0.6n )u(n)
The impulse responses of two systems connected in cascade are

hc1(n) = (0.8n )u(n) and hc2(n) = (0.6n )u(n)

Find the impulse response of the single equivalent system from both the cascade and parallel
configuration impulse responses and verify that they are the same. List the first four values
of the impulse response of the single equivalent system.

The impulse response of the second-order system from the parallel configuration is

hp1(n) + hp2(n) = 4(0.8n )u(n) + (−3)(0.6n )u(n), 0, 1, 2, . . .

28
The impulse response of the second-order system from the cascade configuration is

hc1(n) ∗ hc2(n) = (0.8n ) ∗ (0.6n )u(n), 0, 1, 2, . . .

The first four values of the impulse response of the single equivalent system, from either
expression is
1.0000, 1.4000, 1.4800, 1.4000

2.11 The impulse response of a second-order system has been decomposed into those of the
two first-order systems and are given. The impulse responses of two systems connected in
parallel are

hp1(n) = −5(−0.7)(n−1) u(n − 1) and hp2(n) = 5(−0.5n )u(n)

The impulse responses of two systems connected in cascade are

hc1(n) = (−0.7)(n−1) u(n − 1) and hc2(n) = (−0.5)n )u(n)

Find the impulse response of the single equivalent system from both the cascade and parallel
configuration impulse responses and verify that they are the same. List the first four values
of the impulse response of the single equivalent system.

The impulse response of the second-order system from the parallel configuration is

hp1(n) + hp2(n) = −5(−0.7)(n) u(n) + (5)(−0.5n )u(n), 0, 1, 2, . . .

The impulse response of the second-order system from the cascade configuration is

hc1(n) ∗ hc2(n) = (−0.7)(n−1) u(n − 1) ∗ (−0.5n )u(n), 0, 1, 2, . . .

The first four values of the impulse response of the single equivalent system, from either
expression is
0, 1.0000, −1.2000, 1.0900

2.12 A initially relaxed system is characterized by the difference equation

y(n) = x(n) + 2x(n − 1) − 0.8y(n − 1)

Let the input be


x(0) = 3, x(1) = 2, x(2) = 1, x(3) = 0
By iteration, find the first 4 outputs.
By iteration, the first 4 outputs, with x(−1) = y(−1) = 0, are

y(0) = 3, y(1) = 5.6, y(2) = 0.52, y(3) = 1.5840

29
30
Chapter 3

3.1 Compute the DFT, X(k), of x(n) using the matrix form of the DFT. Find an expression
for x(n) in terms of its sinusoidal components. Compute the IDFT of X(k) to get back x(n).
Compute the least-squares error if x(n) is represented by the DC component only with the
values X(0), 0.8X(0) and 1.2X(0). Verify the values x(0) and x(2) from the DFT values
and X(0) and X(2) from the time-domain values using the sum and difference properties.
Find the energy and verify Parseval’ theorem.
3.1.1 x(n) = {4̂, 3, 2, 4}
      
X(0) 1 1 1 1 4 13
 X(1)   1 −j −1 j 
  3  =  2 + j1 
   
 X(2)  =  1 −1
  
1 −1   2   −1 
X(3) 1 j −1 −j 4 2 − j1
Let us compute the IDFT of the spectrum.
      
x(0) 1 1 1 1 13 4
 x(1)  1  1 j −1 −j   2 + j1   3 
 x(2)  = 4 
    = 
1 −1 1 −1   −1   2 
x(3) 1 −j −1 j 2 − j1 4

2π 2π
x(n) = 3.2500 + 1.1180 cos( n + 0.4636) − 0.25 cos(2 n)
4 4
The energy is 45. The least squares error is

(4 − 3.25)2 + (3 − 3.25)2 + (2 − 3.25)2 + (4 − 3.25)2 = 2.75

(4 − 1.2(3.25))2 + (3 − 1.2(3.25))2 + (2 − 1.2(3.25))2 + (4 − 1.2(3.25))2 = 4.44


Same with 0.8(3.25).

3.1.2 x(n) = {3̂, −1, 3, 2}


      
X(0) 1 1 1 1 3 7
 X(1)   1 −j −1 j   −1   j3 
 X(2)  = 
    = 
1 −1 1 −1   3   5 
X(3) 1 j −1 −j 2 −j3
Let us compute the IDFT of the spectrum.
     
x(0) 1 1 1 1 7 3
 x(1)  1  1 j −1 −j   j3   −1 
 x(2)  = 4  1 −1
    = 
1 −1   5   3 
x(3) 1 −j −1 j −j3 2

2π 2π
x(n) = 1.75 + 1.5 cos( n + 1.5708) + 1.25 cos(2 n)
4 4

31
The energy is 23. The least squares error is
(3 − 1.75)2 + (−1 − 1.75)2 + (3 − 1.75)2 + (2 − 1.75)2 = 10.75
(3 − 1.2(1.75))2 + (−1 − 1.2(1.75))2 + (3 − 1.2(1.75))2 + (2 − 1.2(1.75))2 = 11.24
Same with 0.8(1.75).

3.1.3 x(n) = {1̂, −1, 2, 3}


      
X(0) 1 1 1 1 1 5
 X(1)   1 −j −1 j   −1   −1 + j4 
 X(2)  = 
    = 
1 −1 1 −1   2   1 
X(3) 1 j −1 −j 3 −1 − j4
Let us compute the IDFT of the spectrum.
     
x(0) 1 1 1 1 5 1
 x(1)  1  1 j −1 −j 
  −1 + j4
   −1 
 =  = 
 x(2)  4  1 −1 1 −1   1   2 
x(3) 1 −j −1 j −1 − j4 3
2π 2π
x(n) = 1.25 + 2.0616 cos( n + 1.8158) + 0.25 cos(2 n)
4 4
The energy is 15. The least squares error is
(1 − 1.25)2 + (−1 − 1.25)2 + (2 − 1.25)2 + (3 − 1.25)2 = 8.75
(1 − 1.2(1.25))2 + (−1 − 1.2(1.25))2 + (2 − 1.2(1.25))2 + (3 − 1.2(1.25))2 = 9
Same with 0.8(1.25).

* 3.1.4 x(n) = {1 + j1, 2 + j3, 3 + j1, 3 − j4}


      
X(0) 1 1 1 1 1 + j1 9 + j1
 X(1)   1 −j −1 j   2 + j3   5 + j1 
 X(2)  =  1 −1
    = 
1 −1   3 + j1   −1 + j3 
X(3) 1 j −1 −j 3 − j4 −9 − j1
Let us compute the IDFT of the spectrum.
      
x(0) 1 1 1 1 9 + j1 1 + j1
 x(1)  1  1 j −1 −j   5 + j1   2 + j3 
 x(2)  = 4  1 −1
    = 
1 −1   −1 + j3   3 + j1 
x(3) 1 −j −1 j −9 − j1 3 − j4

x(n) = 0.25(X(0) + X(1)ej(2π/4)n) + X(2)ej((2)2π/4)n) + X(3)ej((3)(2π/4)n) )


The energy is 50. p = 2.2500 + j0.25. The least squares error is
|((1 + j1) − p)|2 + |((2 + j3) − p)|2 + |((3 + j1) − p)|2 + |((3 − j4) − p)|2 = 29.5
|((1+j1)−1.2(p))|2 +|((2+j3)−1.2(p))|2 +|((3+j1)−1.2(p))|2 +|((3−j4)−1.2(p))|2 = 30.32
Same with 0.8(p).

3.1.5 x(n) = {2 + j3, 2 − j2, −1 + j2, 2 − j3}


      
X(0) 1 1 1 1 2 + j3 5
 X(1)   1 −j −1 j   2 − j2   4 + j1 
 X(2)  =  1 −1
    = 
1 −1   −1 + j2   −3 + j10 
X(3) 1 j −1 −j 2 − j3 2 + j1

32
Let us compute the IDFT of the spectrum.
      
x(0) 1 1 1 1 5 2 + j3
 x(1)  1  1 j −1 −j  4 + j1   2 − j2 
 x(2)  = 4  1 −1   −3 + j10  =  −1 + j2
      
1 −1 
x(3) 1 −j −1 j 2 + j1 2 − j3

x(n) = 0.25(X(0) + X(1)ej(2π/4)n) + X(2)ej((2)2π/4)n) + X(3)ej((3)(2π/4)n) )


The energy is 39. p = 1.25. The least squares error is

|((2 + j3) − p)|2 + |((2 − j2) − p)|2 + |((−1 + j2) − p)|2 + |((2 − j3) − p)|2 = 32.75

|((2+j3)−1.2(p))|2 +|((2−j2)−1.2(p))|2 +|((−1+j2)−1.2(p))|2 +|((2−j3)−1.2(p))|2 = 33


Same with 0.8(p).

3.2 Find the samples of x(n) over one period and use the matrix form of the DFT to com-
pute the spectrum X(k) of the set of samples. Using X(k), find the exponential form of
x(n) and reduce the expression to real form. Verify that the input x(n) is obtained.
3.2.1 x(n) = 1 + 3 cos( 2π π
4 n + 6 ) + 2 cos(πn).
Samples of x(n) from index 0 are {5.5981, −2.5, 0.4019, 0.5}.
The DFT coefficients X(k) are {4, 5.1962 + j3, 8, 5.1962 − j3}.
* 3.2.2 x(n) = 1 − 2 sin( 2π π
4 n − 3 ) − 3 cos(πn).
Samples of x(n) from index 0 are {−0.2679, 3, −3.7321, 5}.
The DFT coefficients X(k) are {4, 3.4641 + j2, −12, 3.4641 − j2}.
3.2.3 x(n) = 1 − cos( 2π π
4 n − 4 ) + cos(πn).
Samples of x(n) from index 0 are {1.2929, −0.7071, 2.7071, 0.7071}.
The DFT coefficients X(k) are {4, −1.4142 + j1.4142, 4, −1.4142 − j1.4142}.
3.2.4 x(n) = 3 + sin( 2π π
4 n − 4 ) − cos(πn).
Samples of x(n) from index 0 are {1.2929, 4.7071, 2.7071, 3.2929}.
The DFT coefficients X(k) are {12, −1.4142 − j1.4142, −4, −1.4142 + j1.4142}.
3.2.5 x(n) = −1 − 2 cos( 2π π
4 n − 3 ) − 3 cos(πn).
Samples of x(n) from index 0 are {−5, 0.2679, −3, 3.7321}.
The DFT coefficients X(k) are {−4, −2 + j3.4641, −12, −2 − j3.4641}.

3.3 Find the circular convolution yc (n) of the sequences x(n) and h(n) using the DFT. Find
also the linear convolution yl (n) of the sequences x(n) and h(n) using the DFT by zero
padding the sequences. Verify yl (n) using the sum and and difference tests.
3.3.1 x(n) = {3̂, 1, 2, 4} and h(n) = {1̂, −1, 2, 3}

The DFT of x(n) and h(n) are

X(k) = {10, 1 + j3, 0, 1 − j3}

H(k) = {5, −1 + j4, 1, −1 − j4}


Multiplying the two DFTs and taking IDFT, we get

yc (n) = {6̂, 12, 19, 13}

Zero padding x(n) and h(n), finding the DFTs, multiplying the two DFTs and taking IDFT,
we get
yl (n) = {3, −2, 7, 13, 3, 14, 12}

33
ˆ 2, −3}
3.3.2 x(n) = {3̂, 1, −2, 4} and h(n) = {1, −1,

The DFT of x(n) and h(n) are

X(k) = {10, 1 + j3, 0, 1 − j3}

H([−1, 2, −3, 1]) = {−1, 2 − j1, −7, 2 + j1}


Multiplying the two DFTs and taking IDFT we get
ˆ −9, −1}
yc (n) = {−8, 12,

X([3, 1, −2, 4, 0, 0, 0]) =


{6, 0.4647 − j0.5675, 7.0734 + j1.2846, −0.0380 − j5.8973,
−0.0380 + j5.8973, 7.0734 − j1.2846, 0.4647 + 0.5675}
H([−1, 2, −3, 0, 0, 0, 1]) =
{−1, 1.5380+, 2.1430, 1.0353 − j2.2766, −5.5734 − j2.7794,
−5.5734 + j2.7794, 1.0353 + j2.2766, 1.5380 − j2.1430}
Multiplying the two DFTs and taking IDFT we get
ˆ 3, −1, −11, 14, −12}
yl (n) = {3, −2,

3.3.3 x(n) = {2, 1, 2̂, 1} and h(n) = {1, −1, −2, 3̂}

The DFT of x(n) and h(n) are The DFT of x(n) and h(n) are

X(k) = {6, 0, 2, 0}

H([3, 1, −1, −2]) = {1, 4 − j3, 3, 4 + j3}


Multiplying the two DFTs and taking IDFT we get

yc (n) = {0, 3̂, 0, 3}

X([2, 1, 0, 0, 0, 2, 1]) =
{6, 2.8019 + j1.9499, −0.2470 − j0.8678, 1.4450 − j1.5637,
1.4450 + j1.5637, −0.2470 + j0.8678, 2.8019 − j1.9499}
H([3, 0, 0, 0, 1, −1, −2]) =
{1, 1.0746 − j2.1047, 4.9695 − j2.2978, 3.9559 + j0.8890,
3.9559 − j0.8890, 4.9695+, 2.2978, 1.0746 + j2.1047}
Multiplying the two DFTs and taking IDFT we get

yl (n) = {2, −1, −3, 3, −2, 4̂, 3}


ˆ 1, 2, 4} and h(n) = {−1, −1, 2, 3̂}
3.3.4 x(n) = {−3,

The DFT of x(n) and h(n) are

X(k) = {4, −5 + j3, −6, −5 − j3}

The DFT of {3, −1, −1, 2} is


{3, 4 + j3, 1, 4 − j3}

34
Multiplying the two DFTs, taking IDFT , we get
ˆ
yc (n) = {6, 16, 3−13}

X([−3, 1, 2, 4, 0, 0, 0]) =
{4, −6.4254 − j4.4672, −2.5305 + j3.0202, −3.5441 − j2.7699,
−3.5441 + j2.7699, −2.5305 − j3.0202, −6.4254 + j4.4672}
H([3, 0, 0, 0, −1, −1, 2]) =
{3, 5.3705 + j0.1549, 2.8324 + j3.1656, 0.7971 + j0.6747,
0.7971 − j0.6747, 2.8324 − j3.1656, 5.3705 − j0.1549}
Multiplying the two DFTs and taking IDFT we get
ˆ 3, 14, 12}
yl (n) = {3, 2, −9, −13,

3.3.5 x(n) = {4, −1, 2, 4̂} and h(n) = {2, −1, 2, 3̂}

The DFT of shifted x(n) and h(n) are

X([4, 4, −1, 2]) = {9, 5 − j2, −3, 5 + j2}

H([3, 2, −1, 2]) = {6, 4, −2, 4}


Multiplying the two DFTs and taking IDFT, we get
ˆ 16}
yc (n) = {5, 8, 25,

X([4, 0, 0, 0, 4, −1, 2]) =


{9, 1.8656 + j2.3243, 6.9499 − j0.7436, 0.6845 + j5.5493,
0.6845 − j5.5493, 6.9499 + j0.7436, 1.8656 − j2.3243}
H([3, 0, 0, 0, 2, −1, 2]) =
{6, 2.6676 + j1.4565, 4.7029 + j0.8201, 0.1295 + j3.5995,
0.1295 − j3.5995, 4.7029 − j0.8201, 2.6676 − j1.4565}
Multiplying the two DFTs and taking IDFT we get
ˆ
yl (n) = {8, −6, 13, 16, −3, 14, 12}

3.4 Find the circular correlation yxhc (n) of the sequences x(n) and h(n) using the DFT.
Find also the linear correlation yxhl (n) of the sequences x(n) and h(n) using the DFT by
zero padding the sequences. Verify yxhl (n) using the sum and and difference tests. Find the
autocorrelation of x(n). Compte the signal power and verify that the autocorrelation with
lag zero is the same.
3.4.1 x(n) = {3̂, 1, 2, 4} and h(n) = {1̂, −1, 2, 3}

x(n) = {3̂, 1, 2, 4} and h(n) = {1̂, −1, 2, 3}

The DFT of x(n) and h(n) are

X(k) = {10, 1 + j3, 0, 1 − j3}

H(k) = {5, −1 + j4, 1, −1 − j4}

35
Multiplying X(k) and H ∗ (k) and taking IDFT, we get
ˆ 16, 7, 9}
yxhc (n) = {18,

Zero padding x(n) and h(n), finding the DFTs, multiplying X(k) and H ∗ (k) and taking
IDFT, we get
ˆ 7, −2, 4}
yxhl (n) = {9, 9, 5, 18,
Adding the last 3 values to the first, second, and third values and placing after the fourth
value of yxhl (n), we get
yxhc (n) = {18, 16, 7, 9}
Autocorrelation, which is the IDFT of |X 2 |, is {30, 25, 20, 25}. Signal power is 30.
ˆ 2, −3}
3.4.2 x(n) = {3̂, 1, −2, 4} and h(n) = {1, −1,

The DFT of x({3, 1, −2, 4}) and h({−1, 2, −3, 1}) are

X(k) = {6, 5 + j3, −4, 5 − j3}

H(k) = {−1, 2 − j1, −7, 2 + j1}



Multiplying X(k) and H (k) and taking IDFT, we get

yxhc (n) = {−3, 9̂, −14, 2}

XX(k) = DF T ({3, 1, −2, 4, 0, 0, 0}) =

{6, 2.8019 + j1.9499, −0.2470 − j0.8678, 1.4450 − j1.5637,


1.4450 + j1.5637
−0.2470 + j0.8678, 2.8019 − j1.9499}
HH(k) = DF T ({−1, 2, −3, 0, 0, 0, 1}) =
{−1, 1.5380 + j2.1430, 1.0353 − j2.2766, −5.5734 − j2.7794,
−5.5734 + j2.7794, 1.0353 + j2.2766, 1.5380 − j2.1430}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get

yxhl (n) = {5̂, −14, 11, −6, 4, −9, 3}

Autocorrelation, which is the IDFT of |X 2 |, is {30, 25, 20, 25}. Signal power is 30.

3.4.3 x(n) = {2, 1, 2̂, 1} and h(n) = {1, −1, −2, 3̂}

The DFT of x({2, 1, 2, 1}) and h({3, 1, −1, −2}) are

X(k) = {6, 0, 2, 0}

H(k) = {1, 4 − j3, 3, 4 + j3}


Multiplying X(k) and H ∗ (k) and taking IDFT, we get

yxhc (n) = {0, 3̂, 0, 3}

XX(k) = DF T ({2, 1, 0, 0, 0, 2, 1}) =

{6, 2.8019 + j1.9499, −0.2470 − j0.8678, 1.4450 − j1.5637,

36
1.4450 + j1.5637, −0.2470 + j0.8678, 2.8019 − j1.9499}
HH(k) = DF T ({3, 0, 0, 0, 1, −1, −2}) =
{1, 1.0746 − j2.1047, 4.9695 − j2.2978, 3.9559 + j0.8890
3.9559 − j0.8890, 4.9695 + j2.2978i, 1.0746 + j2.1047}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get

yxhl (n) = {2̂, 0, −3, 1, 1, 6, −1}

Autocorrelation, which is the IDFT of |X 2 |, is {10, 8, 10, 8}. Signal power is 10.

ˆ 1, 2, 4} and h(n) = {−1, −1, 2, 3̂}


3.4.4 x(n) = {−3,

The DFT of x({−3, 1, 2, 4}) and h({3, −1, −1, 2}) are

X(k) = {4, −5 + j3, −6, −5 − j3}

H(k) = {3, 4 + j3, 1, 4 − j3}


Multiplying X(k) and H ∗ (k) and taking IDFT, we get
ˆ
yxhc (n) = {−9, 7, 18, −4}

XX(k) = DF T ({−3, 1, 2, 4, 0, 0, 0}) =

{4, −6.4254 − j4.4672, −2.5305 + j3.0202, −3.5441 − j2.7699,


−3.5441 + jj2.7699, −2.5305 − j3.0202, −6.4254 + j4.4672}
HH(k) = DF T ({3, 0, 0, 0, −1, −1, 2}) =
{3, 5.3705 + j0.1549, 2.8324 + j3.1656, 0.7971 + j0.6747,
0.7971 − j0.6747, 2.8324 − j3.1656, 5.3705 − j0.1549}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get
ˆ −3, 11, 18, 5, −6, −4}
yxhl (n) = {−9,

Autocorrelation, which is the IDFT of |X 2 |, is {30, −5, −4, −5}. Signal power is 30.

3.4.5 x(n) = {4, −1, 2, 4̂} and h(n) = {2, −1, 2, 3̂}

The DFT of x({4, 4, −1, 2}) and h({3, 2, −1, 2}) are

X(k) = {9, 5 − j2, −3, 5 + 2, }

H(k) = {6, 4, −2, 4}


Multiplying X(k) and H ∗ (k) and taking IDFT, we get
ˆ 16}
yxhc (n) = {5, 8, 25,

XX(k) = DF T ({4, 0, 0, 0, 4, −1, 2}) =

{9.0000, 1.8656 + j2.3243, 6.9499 − j0.7436, 0.6845 + j5.5493,

37
0.6845 − j5.5493, 6.9499 + j0.7436, 1.8656 − j2.3243}
HH(k) = DF T ({3, 0, 0, 0, 2, −1, 2}) =
{6, 2.6676 + j1.4565, 4.7029 + j0.8201, 0.1295 + j3.5995,
0.1295 − j3.5995, 4.7029 − j0.8201, 2.6676 − j1.4565}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get
ˆ 4, 0, 8, 12, 5, 0}
yxhl (n) = {25,

Autocorrelation, which is the IDFT of |X 2 |, is {37, 18, 8, 18}. Signal power is 37.

3.5 Two sequences x(n) and h(n) are given. Using the frequency-domain convolution prop-
erty, find the DFT Pxy (k) of their product y(n) = x(n)h(n). Verify that the IDFT of Pxy (k)
yields y(n).
3.5.1
x(n) = {1̂, −1, 2, 4}, h(n) = {4̂, 2, −1, 3}
3.5.2
x(n) = {1̂, −3, 2, 2}, h(n) = {4̂, −1, 3, 2}
3.5.3
x(n) = {2̂, 1, 2, 4}, h(n) = {3̂, 1, 2, 4}
3.5.1
The DFT of x(n) is
X(k) = {6, −1 + j5, 0, −1 − j5}
The DFT of h(n) is
H(k) = {8, 5 + j1, −2, 5 − j1}
Let us convolve the DFTs using DFT. The DFT of X(n) is

XX(k) = {4, 16, 8, −4}

The DFT of H(n) is


HH(k) = {16, 12, −4, 8}
Multiplying the last two DFTs and dividing by 4, we get

XH(k) = X(k)H(k)/4 = {16, 48, −8, −8}

Taking the IDFT of XH(k), we get the DFT of y(n) = x(n)h(n)

Pxy (k) = {12, 6 + j14, −8, 6 − j14}

Taking the IDFT of Pxy (k),we get

y(n) = {4, −2, −2, 12}

3.5.2
The DFT of x(n) is
X(k) = {2, −1 + j5, 4, −1 − j5}
The DFT of h(n) is
H(k) = {8, 1 + j3, 6, 1 − j3}
Let us convolve the DFTs using DFT. The DFT of X(n) is

XX(k) = {4, 8, 8, −12}

38
The DFT of H(n) is
HH(k) = {16, 8, 12, −4}
Multiplying the last two DFTs and dividing by 4, we get

XH(k) = X(k)H(k)/4 = {16, 16, 24, 12}

Taking the IDFT of XH(k), we get the DFT of y(n) = x(n)h(n)

Pxy (k) = {17, −2 + j1, 3, −2 − j1}

Taking the IDFT of Pxy (k),we get

y(n) = {4, 3, 6, 4}

3.5.3
The DFT of x(n) is
X(k) = {9, j3, −1, −j3}
The DFT of h(n) is
H(k) = {10, 1 + j3, 0, 1 − j3}
Let us convolve the DFTs using DFT. The DFT of X(n) is

XX(k) = {8, 16, 8, 4}

The DFT of H(n) is


HH(k) = {12, 16, 8, 4}
Multiplying the last two DFTs and dividing by 4, we get

XH(k) = X(k)H(k)/4 = {24, 64, 16, 4}

Taking the IDFT of XH(k), we get the DFT of y(n) = x(n)h(n)

Pxy (k) = {27, 2 + j15, −7, 2 − j15}

Taking the IDFT of Pxy (k),we get

y(n) = {6, 1, 4, 16}

3.6 Find the even and odd components of the signal using the DFT and IDFT. Verify
that, for n = −3, −2, −1, 0, 1, 2, 3, the two components add up to the values of the signal.
Verify that the sum of the values of the odd component is zero and that those of the even
component and the signal are equal.
3.6.1 x(0) = 1, x(1) = 2, x(2) = −3, x(3) = 4 and x(n) = 0 otherwise.
Taking the 7-point DFT of zero-padded x(n), we get

Xz (k) = 4, −0.6893 − j0.3744, 5.7518 − j0.1242, −3.5625 − j7.1130,

−3.5625 + j7.1130, 5.7518 + j0.1242, −0.6893 + j0.3744


Taking the IDFT of the real part of Xz (k), we get

{1, 1, −1.5, 2, 2, −1.5, 1}

Circularly shifting left by 4 samples, we get

xe(n) = {2, −1.5, 1, 1̂, 1, −1.5, 2}

39
Taking the IDFT of the imaginary part of Xz (k) multiplied by j, we get

{0, 1, −1.5, 2, −2, 1.5, −1}

Circularly shifting left by 4 samples, we get

xo(n) = {−2, 1.5, −1, 0̂, 1, −1.5, 2}

3.6.2 x(n) = u(n − 1), n = −3 : 3

Taking the 7-point DFT of shifted x(n), we get

X(k) = 3, −0.5 − j2.1906, −0.5 + j0.2408, −0.5 − j0.6270,

−0.5 + j0.6270, −0.5 − j0.2408, −0.5000 + j2.1906


Taking the IDFT of the real part of X(k), we get

{0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5}

Circularly shifting left by 4 samples, we get

xe(n) = {0.5, 0.5, 0.5, 0̂, 0.5, 0.5, 0.5}

Taking the IDFT of the imaginary part of X(k) multiplied by j, we get

{0, 0.5, 0.5, 0.5, −0.5, −0.5, −0.5}

Circularly shifting left by 4 samples, we get

xo(n) = {−0.5, −0.5, −0.5, 0̂, 0.5, 0.5, 0.5}

3.6.3 x(n) = (−0.8)n+1 u(n + 1), n = −3 : 3

Taking the 7-point DFT of shifted x(n), we get

−0.8000, 0.6400, −0.5120, 0.4096, 0, 0, 1,

we get

X(k) = 0.7376, −0.0326 + j0.6029, −0.4483 + j0.4491, −2.6880 − j0.6434,

−2.6880 + j0.6434, −0.4483 − j0.4491 − 0.0326 − j0.6029


Taking the IDFT of the real part of X(k), we get

= {−0.8000, 0.8200, −0.2560, 0.2048, 0.2048, −0.2560, 0.8200}

Circularly shifting left by 4 samples, we get

xe(n) = {0.2048, −0.2560, 0.8200, −0.8000, 0.8200, −0.2560, 0.2048}

Taking the IDFT of the imaginary part of X(k) multiplied by j, we get

{0, −0.1800, −0.2560, 0.2048, −0.2048, 0.2560, 0.1800}

Circularly shifting left by 4 samples, we get

xo(n) = {−0.2048, 0.2560, 0.1800, 0̂, −0.1800, −0.2560, 0.2048}

40
3.6.4 x(n) = n2 u(n)

Taking the 7-point DFT of zero-padded x(n), we get

Xz (k) = 14, −8.3753 − j8.5865, 1.7850 + j7.7971, −0.4097 − j6.0809,

−0.4097 + j6.0809, 1.7850 − j7.7971, −8.3753 + j8.5865


Taking the IDFT of the real part of Xz (k), we get

{0, 0.5000, 2.0000, 4.5000, 4.5000, 2.0000, 0.5000}

Circularly shifting left by 4 samples, we get

xe(n) = {4.5000, 2.0000, 0.5000, 0̂, 0.5000, 2.0000, 4.5000}

Taking the IDFT of the imaginary part of X(k) multiplied by j, we get

{0, 0.5000, 2.0000, 4.5000, −4.5000, −2.0000, −0.5000}

Circularly shifting left by 4 samples, we get

xo(n) = {−4.5000, −2.0000, −0.5000, 0̂, 0.5000, 2.0000, 4.5000}

3.7 Given x(n), find its DFT X(k). Now, find the DFT of X(k) to get N x(N − n) and,
hence verify the duality theorem of the DFT.

3.7.1 x(n) = {1, 2, −3, 4}.

{1, 2, −3, 4} → {4, 4 + j2, −8, 4 − j2} → {4, 16, −12, 8}

3.7.2 x(n) = {2, 1, 4, −3}.

{2, 1, 4, −3} → {4, −2 − j4, 8, −2. + j4} → {8, −12, 16, 4}

3.7.3 x(n) = {2, 1, 4 + j2, −3}.

{2, 1, 4 + j2, −3} → {4 + j2, −2 − j6, 8 + j2, −2 + j2} → {8, −12, 16 + j8, 4}

3.8 Given the polar form of a sinusoid x(n), List the sample values x(n) of one cycle, start-
ing from n = 0, of the sinusoid. Take the DFT of the samples and find the the rectangular
form xr (n) of the sinusoid from the DFT coefficients. List the sample values xr (n) of one
cycle, starting from n = 0, of the sinusoid and verify that they are the same as those of x(n).

3.8.1 x(n) = 2 sin( 2π π


8 n + 3 ).
The samples of x(n) are

{1.7321, 1.9319, 1, −0.5176, −1.7321, −1.9319, −1, 0.5176}

Computing the DFT X(k) of x(n), we get

{0, 6.9282 − j4, 0, 0, 0, 0, 0, 6.9282 + j4}

Negating the imaginary part of X(1) and dividing by 4, we get


√ 2π 2π
xr (n) = 3 cos( n) + sin( n)
8 8

41
3.8.2 x(n) = 2 cos(2 2π π
8 n + 6 ).
The samples of x(n) are

{1.7321, −1.0000, −1.7321, 1.0000, 1.7321, −1.0000, −1.7321, 1}

Computing the DFT X(k) of x(n), we get

{0, 0, 6.9282 + j4.0, 0, 0, 6.9282 − j4, 0}

Negating the imaginary part of X(2) and dividing by 4, we get


√ 2π 2π
xr (n) = 3 cos((2) n) − 1 sin((2) n)
8 8
3.8.3 x(n) = cos( 2π π
8 n + 4 ).
The samples of x(n) are

{0.7071, 0, −0.7071, −1, −0.7071, −0, 0.7071, 1}

Computing the DFT X(k) of x(n), we get

{0, 2.8284 + j2.8284, 0, 0, 0, 0, 0, 2.8284 − j2.8284}

Negating the imaginary part of X(1) and dividing by 4, we get


√ 2π √ 2π
xr (n) = 0.5 2 cos( n) − 0.5 2 sin( n)
8 8

3.9 Given the sinusoids x(n) and y(n), find the polar form of the sinusoid z(n) = x(n)+y(n)
using the DFT. Find the sample values of one cycle, starting from n = 0, of all the three
sinusoids and verify that the sample values of x(n) + y(n) are the same as those of z(n).

3.9.1 x(n) = sin( 2π π 2π π


6 n − 6 ), y(n) = 2 cos( 6 n + 3 ).
The DFT of x(n) is

{X(k) = 0, −1.5000 − j2.5981, 0, 0, 0, −1.5000 + j2.5981}

The DFT of y(n) is

{Y (k) = 0, 3.0000 + j5.1962, 0, 0, 0, 3.0000 − j5.1962}

The DFT of z(n) is Z(k) = X(k) + X(k) is

{Z(k) = 0, 1.5000 + j2.5981, 0, 0, 0, 1.5000 − j2.5981}

The magnitude and phase of z(n) are

|(X(1))| = 1, 6 (X(1)) = 1.0472

z(n) = 1 cos( 2π π
6 n + 3 ). The samples of the sinusoid x(n) are

−0.5000, 0.5000, 1.0000, 0.5000, −0.5000, −1.0000

The samples of the sinusoid y(n) are

1.0000, −1.0000, −2.0000, −1.0000, 1.0000, 2.0000

The samples of the sinusoid z(n) = x(n) + y(n) are

0.5000, −0.5000, −1.0000, −0.5000, 0.5000, 1.0000

42
3.9.2 x(n) = 3 cos( 2π π 2π π
6 n + 6 ), y(n) = 2 cos( 6 n − 3 ).
The DFT of x(n) is

{X(k) = 0, 7.7942 + j4.5000, 0, 0, 0, 7.7942 − j4.5000}

The DFT of y(n) is

{Y (k) = 0, 3.0000 − j5.1962, 0, 0, 0, 3.0000 + j5.1962}

The DFT of z(n) is Z(k) = X(k) + X(k) is

{Z(k) = 0, 10.7942 − j0.6962, 0, 0, 0, 10.7942 + j0.6962}

The magnitude and phase of z(n) are

|(X(1))| = 3.6056, 6 (X(1)) = −0.0644

z(n) = 3.6056 cos( 2π


6 n − 0.0644). The samples of the sinusoid x(n) are

2.5981, 0.0000, −2.5981, −2.5981, −0.0000, 2.5981

The samples of the sinusoid y(n) are

1.0000, 2.0000, 1.0000, −1.0000, −2.0000, −1.0000

The samples of the sinusoid z(n) = x(n) + y(n) are

3.5981, 2.0000, −1.5981, −3.5981, −2.0000, 1.5981

3.9.3 x(n) = cos( 2π π 2π π


6 n + 4 ), y(n) = − cos( 6 n + 3 ).
The DFT of x(n) is

{X(k) = 0, 2.1213 + j2.1213, 0, 0, 0, 2.1213 − j2.1213}

The DFT of y(n) is

{Y (k) = 0, −1.5000 − j2.5981, 0, 0, 0, −1.5000 + j2.5981}

The DFT of z(n) is Z(k) = X(k) + X(k) is

{Z(k) = 0, 0.6213 − j0.4768, 0, 0, 0, 0.6213 + j0.4768}

The magnitude and phase of z(n) are

|(X(1))| = 0.2611, 6 (X(1)) = −0.6545

z(n) = 0.2611 cos( 2π


6 n − 0.6545). The samples of the sinusoid x(n) are

0.7071, −0.2588, −0.9659, −0.7071, 0.2588, 0.9659

The samples of the sinusoid y(n) are

−0.5000, 0.5000, 1.0000, 0.5000, −0.5000, −1.0000

The samples of the sinusoid z(n) = x(n) + y(n) are

0.2071, 0.2412, 0.0341, −0.2071, −0.2412, −0.0341

3.10 Given the sequence x(n), find its DFT X(k). Make the odd-indexed coefficients of
X(k) zero to get the DFT XE(k) of the even half-wave symmetric component of x(n). Make

43
the even-indexed coefficients of X(k) zero to get the DFT XO(k) of the odd half-wave sym-
metric component of x(n). Take the IDFT of the last two DFTs to get the symmetric
components of x(n). Verify that the sum of the the sample values of the symmetric compo-
nents are the same as those of x(n).

3.10.1 x(n) = {2̂, 1, −3, 4, 2, −1, 3, −1}

The DFT of x(n) is

X(k) = {7, −2.1213+j1.0503, 4+j3, 2.1213−j10.9497, 1, 2.1213+j10.9497, 4−j3, −2.1213−j1.0503}

The DFT of xe(n) is

XE(k) = {7, 0, 4.0000 + j3.0000, 0, 1, 0, 4.0000 − j3.0000, 0}

The DFT of xo(n) is

XO(k) = {0, −2.1213+j1.0503, 0, 2.1213−j10.9497, 0, 2.1213+j10.9497, 0, −2.1213−j1.0503}

The IDFT of XE(k) is


xe(n) = {2, 0, 0, 1.5, 2, 0, 0, 1.5}
The IDFT of XO(k) is

xo(n) = {0, 1, −3, 2.5, 0, −1, 3, −2.5}

3.10.2 x(n) = {2̂, 1, −3, −2, 1, −1, 3, −1}

The DFT of x(n) is

X(k) = {0, 3.1213+j5.2929, 3−j3, −1.1213−j6.7071, 6, −1.1213+j6.7071, 3+j3, 3.1213−j5.2929}

The DFT of xe(n) is


XE(k) = {0, 0, 3 − j3, 0, 6, 0, 3 + j3, 0}
The DFT of xo(n) is

XO(k) = {0, 3.1213+j5.2929, 0, −1.1213−j6.7071, 0, −1.1213+j6.7071, 0, 3.1213−j5.2929}

The IDFT of XE(k) is

xe(n) = {1.5, 0, 0, −1.5, 1.5, 0, 0, −1.5}

The IDFT of XO(k) is

xo(n) = {0.5, 1, −3, −0.5, −0.5, −1, 3, 0.5}

3.10.3 x(n) = {4̂, 1, 3, −2, 1, −1, 2, −1}

The DFT of x(n) is

X(k) = {7, 5.1213−j1.7071, −j3, 0.8787+j0.2929, 13, 0.8787−j0.2929, j3, 5.1213+j1.7071}

The DFT of xe(n) is


XE(k) = {7, 0, −j3, 0, 13, 0, j3, 0}
The DFT of xo(n) is

XO(k) = {0, 5.1213 − 1.7071, 0, 0.8787 + j0.2929, 0, 0.8787 − j0.2929, 0, 5.1213 + j1.7071}

44
The IDFT of XE(k) is

xe(n) = {2.5, 0, 2.5, −1.5, 2.5, 0, 2.5, −1.5}

The IDFT of XO(k) is

xo(n) = {1.5, 1, 0.5, −0.5, −1.5, −1, −0.5, 0.5}

3.11 The number of samples for the DFT computation is N = 8. The sampling frequency fs
is specified as 4 Hz. Find the frequencies in Hz of the real sinusoids that can be represented
correctly.
The frequency increment is fs /N = 4/8 = 0.5 Hz. The highest frequency that can be
represented is (fs /2) − (fs /N ) = 2 − 0.5 = 1.5 Hz. The set of frequencies are {0, 0.5, 1, 1.5}
Hz.
3.12 The number of samples for the DFT computation is N = 16. The sampling frequency
fs is specified as 16 Hz. Find the frequencies in Hz of the real sinusoids that can be
represented correctly.
The frequency increment is fs /N = 16/16 = 1 Hz. The highest frequency that can be
represented is (fs /2) − (fs /N ) = 8 − 1 = 7 Hz. The set of frequencies are {0, 1, 2, 3, 4, 5, 6, 7}
Hz.

45
46
Chapter 4

4.1 (a) Find the DTFT of



1 for −N ≤ n ≤ N
x(n) =
0 otherwise

For N = 4, deduce the samples of X(ejω ) in polar form at ω = 0 and ω = π. From the
DTFT, deduce the samples of x(0).
(b) Using the time-domain shift theorem, deduce the DTFT of

1 for 0 ≤ n ≤ N
x(n) =
0 otherwise

For N = 4, deduce the samples of X(ejω ) in polar form at ω = 0 and ω = π. From the
DTFT, deduce the value of the sample x(0).

4.1.1 (i) With the identity


N
X r(N +1) − rM
rn = , r 6= 1
r−1
n=M

N
X (e−j(N +1)ω ) − (ej(N )ω ) sin( 2N2+1 ω)
X(ejω ) = (e−jω )n = =
(e−jω ) − 1 sin( ω2 )
n=−N

With N = 4, X(ej0 ) = 9 and X(ejπ ) = 1. x(0) = 1.

(ii)
N sin( N2+1 ω)
X(ejω ) = e−j 2 ω
sin( ω2 )
With N = 4, X(ej0 ) = 5 and X(ejπ ) = 1. x(0) = 1.

4.2 The samples over a period of a periodic sequence x(n) are given. Find its DTFT using
the DFT.
4.2.1 {x(0) = 1, x(1) = 1, x(2) = 2, x(3) = −3}.

The DFT of the sequence is

{X(0) = 1, X(1) = −1 − j4, X(2) = 5, X(3) = −1 + j4}

One period of the DTFT X(ejω ) is


2π 2π 2π 2π
{X(ej0 ) = 1( )δ(ω), X(ej 4 ) = (−1 − j4)( )δ(ω − ),
4 4 4

47
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = 5( )δ(ω − 2 ), X(ej3 4 ) = (−1 + j4)( )δ(ω − 3 )}
4 4 4 4
.

4.2.2. {x(0) = 2, x(1) = −1, x(2) = 4, x(3) = 3}.


The DFT of the sequence is

{X(0) = 8, X(1) = −2 + j4, X(2) = 4, X(3) = −2 − j4}

One period of the DTFT X(ejω ) is

2π 2π 2π 2π
{X(ej0 ) = 8( )δ(ω), X(ej 4 ) = (−2 + j4)( )δ(ω − ),
4 4 4
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = 4( )δ(ω − 2 ), X(ej3 4 ) = (−2 − j4)( )δ(ω − 3 )}
4 4 4 4
.

4.2.3. {x(0) = −2, x(1) = 3, x(2) = −2, x(3) = 4}.

The DFT of the sequence is

{X(0) = 3, X(1) = j1, X(2) = −11, X(3) = −j1}

One period of the DTFT X(ejω ) is

2π 2π 2π 2π
{X(ej0 ) = 3( )δ(ω), X(ej 4 ) = (j1)( )δ(ω − ),
4 4 4
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = −11( )δ(ω − 2 ), X(ej3 4 ) = (−j1)( )δ(ω − 3 )}
4 4 4 4
.

4.3 Find the DFT, X(k), of x(n) with its only 4 nonzero values given. Find the samples of
the DTFT, X(ejω ), of x(n) at ω = {0, π2 , π, 3π
2 }. Verify that they are the same as those of
X(k).

4.3.1. {x(n), n = 0, 1, 2, 3} = {4, 3, −1, 2} and x(n) = 0 otherwise.


The DFT of x(n) is {X(k), k = 0, 1, 2, 3} = {8, 5 − j1, −2, 5 + j1}. The samples of X(ejω )

X(ejω ) = 4 + 3e−jω − e−j2ω + 2e−j3ω

at ω = 0, π2 , π, 3π
2 are also the same.
4.3.2. {x(n), n = 0, 1, 2, 3} = {1, 2, 3, 4} and x(n) = 0 otherwise.
The DFT of x(n) is

{X(k), k = 0, 1, 2, 3} = {10, −2 − j2, −2, −2 + j2}

The samples of X(ejω )

X(ejω ) = 1 + 2e−jω + 3e−j2ω + 4e−j3ω

at ω = 0, π2 , π, 3π
2 are also the same.

48
4.3.3 {x(n), n = 0, 1, 2, 3} = {0, 0, 0, 1} and x(n) = 0 otherwise.
The DFT of x(n) is
{X(k), k = 0, 1, 2, 3} = {1, j1, −1, −j1}
The samples of X(ejω )
X(ejω ) = e−j3ω
at ω = 0, π2 , π, 3π
2 are also the same.

4.4 Find the convolution y(n) of x(n) and h(n), using the time-domain convolution property
of the DTFT. Find the first 4 values of y(n) by time-domain convolution and verify that
they are the same as those obtained using the DTFT.

4.4.1. x(n) = (0.8)n u(n) and h(n) = x(n).


1
(0.8)n u(n) ↔
1 − 0.8e−jω
The DTFT of the signal x(n) ∗ h(n) in the transform domain is
1
(1 − 0.8e−jω )2

Taking the inverse DTFT, we get

y(n) = ((n + 1)0.8n )u(n)

The first 4 values of y(n) are

{1, 1.6000, 1.9200, 2.0480}

4.4.2. x(n) = (0.9)n u(n) and h(n) = u(n).


1 1
(0.9)n u(n) ↔ and u(n) ↔ πδ(ω) +
1 − 0.9e−jω 1 − e−jω
The DTFT of the signal x(n) ∗ h(n) in the transform domain is
 
1 1 1 1
πδ(ω) + = 10πδ(ω) +
1 − 0.9e−jω 1 − e−jω 1 − 0.9e−jω 1 − e−jω

1 0.9
= 10(πδ(ω) + −jω
) − 10
1−e 1 − 0.9e−jω
Taking the inverse DTFT, we get

y(n) = (10 − (9)0.9(n) )u(n)

The first 4 values of y(n) are

{1, 1.9000, 2.7100, 3.4390}

* 4.4.3. x(n) = (0.8)n u(n) and h(n) = (0.6)n u(n).


1 1
(0.8)n u(n) ↔ and (0.6)n u(n) ↔
1 − 0.8e−jω 1 − 0.6e−jω
The DTFT of the signal x(n) ∗ h(n) in the transform domain is
1 1
1 − 0.8e −jω 1 − 0.6e−jω

49
4 3
= −jω

1 − 0.8e 1 − 0.6e−jω
Taking the inverse DTFT, we get

y(n) = ((4)0.8(n) − (3)0.6(n) )u(n)

The first 4 values of y(n) are

{1, 1.4000, 1.4800, 1.4000}

4.5 Using the frequency-domain convolution property, find the DTFT of the product of x(n)
and h(n) and then find the inverse of the DTFT to verify that it is the same as the product
of x(n) and h(n). Use the DFT to approximate the DTFT.

4.5.1. The nonzero samples of x(n) is {x(n), n = 0, 1, 2, 3} = {1, 2, 3, 4}. The nonzero
samples of h(n) is {x(n), n = 0, 1, 2, 3} = {3, −1, 2, 4}.

The product of x(n) and h(n) is


{3, −2, 6, 16}
The periodic DTFT of x(n) is

X(ejω ) = 1 + 2e−jω + 3e−j2ω + 4e−jω

The DFT can be obtained by sampling at intervals of 2π/4. The periodic DTFT of h(n) is

H(ejω ) = 3 − e−jω + 2e−j2ω + 4e−jω

Let us find the circular convolution of X(ejω ) and H(ejω ) using the DFT. The DFT of X(k)
is
XX(k) = {4, 16, 12, 8}
The DFT of H(k) is
HH(k) = {12, 16, 8, −4}
The product of the samples of X(ejω ) and H(ejω ) divided by 4 is

XH(k) = {12, 64, 24, −8}

The IDFT of XH(k) is


{23, −3 + j18, −5, −3 − j18}
These are the spectral samples of the the DTFT of x(n)h(n) at intervals of π/2. Taking the
IDFT of these samples, we get
{3, −2, 6, 16}

4.5.2. The nonzero samples of x(n) is {x(n), n = 0, 1, 2, 3, 4} = {3, 2, 1, 4, −2]}. The nonzero
samples of h(n) is {x(n), n = 0, 1, 2, 3, 4} = {1 − 1, 3, 4, −1}.

The product of x(n) and h(n) is


{3, −2, 3, 16, 2}
The periodic DTFT of x(n) is

X(ejω ) = 3 + 2e−jω + e−j2ω + 4e−jω − 2e−jω

50
The DFT can be obtained by sampling at intervals of 2π/5. The periodic DTFT of h(n) is

H(ejω ) = 1 − 1e−jω + 3e−j2ω + 4e−jω − e−jω

Let us find the circular convolution of X(ejω ) and H(ejω ) using the DFT. The DFT of X(k)
is
XX(k) = {15, −10, 20, 5, 10}
The DFT of H(k) is
HH(k) = {5, −5, 20, 15, −5}
The product of X(k) and H(k) divided by 5 is

XH(ejω ) = {15, 10, 80, 15, −10}

The IDFT of XH(k) is

{22, −12.3713 + j11.4454, 8.8713 − j10.0126, 8.8713 + j10.0126, −12.3713 − j11.4454}

These are the spectral samples of the the DTFT of of x(n)h(n) at intervals of 2π/5. Taking
the IDFT of these samples, we get

x(n)h(n) = {3, −2, 3, 16, 2}

4.5.3. x(n) = 2 sin(n) and h(n) = sin(n).


The DTFT of 2 sin(n) sin(n) is the convolution of the DTFT of 2 sin(n) and sin(n) divided
by 2π. That is,
1
(jπ(δ(ω + 1) + δ(ω − 1)) ∗ j2π(δ(ω + 1) − δ(ω − 1)))

= −π ((δ(ω + 1) ∗ δ(ω + 1)) − (δ(ω − 1) ∗ δ(ω − 1)) − (δ(ω + 1) ∗ δ(ω − 1)))
= −π (δ(ω + 2) − δ(ω − 2)) + 2πδ(n) ↔ 1 − cos(2n) = 2 sin2 (n)

4.6 A sequence x(n) is given. Find the summation


n
X
s(n) = x(n)
n=−∞

using the time-summation property of the DTFT.

4.6.1 x(n) = n2 u(n).


The sum is unbounded.

4.6.2 x(n) = cos( 2π


4 n), n = 0, 1, 2, 3, 4.

X(ejω ) = 1 − e−j2ω + e−j4ω


and X(ej0 ) = 1. Therefore,

(1 − e−j2ω + e−j4ω ) (−e−j2ω + e−j4ω )


 
1
S(ejω ) = πδ(ω) + = πδ(ω) + +
(1 − e−jω ) (1 − e−jω ) (1 − e−jω )
Taking the inverse DTFT, we get

s(n) = u(n) − 0.5 sgn(n − 2)u(n − 2) + 0.5 sgn(n − 4)u(n − 4)

51
where sgn(n) is 
1 for n ≥ 0
sgn(n) =
−1 for n < 0
The samples of the components of s(n) are

{· · · , 0, 0, 1̂, 1, 1, 1, 1, 1, 1, 1, · · ·}

ˆ 0.5, −0.5, −0.5, −0.5, −0.5, · · ·}


{· · · , 0.5, 0.5, 0.5, 0.5, 0.5,
ˆ −0.5, −0.5, −0.5, 0.5, 0.5 · · ·}
{· · · , −0.5, −0.5, −0.5,
The sum of the components

{· · · , 0, 0, 0, 1̂, 1, 0, 0, 1, 1, 1, 1, 1, · · ·}

are the samples of s(n).

4.6.3 x(n) = (0.8)n u(n).

1
X(ejω ) =
1 − (0.8)e−jω
and X(ej0 ) = 5. Therefore,

1
S(ejω ) = + 5πδ(ω)
(1 − 0.8e−jω )(1 − e−jω )

Taking the inverse DTFT, we get

s(n) = (5 − 4(0.8)n )u(n)

The first few samples of s(n), n = 0, 1, 2, . . . are

{1, 1.8, 2.44, 2.952, 3.3616, 3.6893, 3.9514, 4.1611, 4.3289, 4.4631, 4.5705}

4.6.4 x(n) = (1.4286)n u(−n)).

1
X(ejω ) =
(1 − 0.7ejω )
and X(ej0 ) = 1/(1 − 0.7) = 3.3333. Therefore,

1 1
S(ejω ) = + 3.3333πδ(ω) = 3.3333(πδ(ω) + )
(1 − 0.7ejω )(1 − ejω ) (1 − ejω )

2.3333

(1 − 0.7ejω )
Taking the inverse DTFT, we get

s(n) = (3.3333(1) − 2.3333(1.4286)n )u(−n)

The first few samples of s(n), n = 0, −1, −2, . . . are

{1, 1.7, 2.19, 2.533, 2.7731, 2.9412, 3.0588, 3.1412, 3.1988, 3.2392, 3.2674}

52
4.7 The difference equation governing a system is
7 1
y(n) = x(n) − x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
6 3
with input x(n) and output y(n). Use the DTFT to find the impulse response h(n) of the
system. List the first four values of h(n).

1 − 1e−jω + 1e−j2ω
H(ejω ) =
(1 − 12 e−jω )(1 − 23 e−jω )
Expanding into partial fractions, we get
9 −jω 14 −jω
2e 3 e
H(ejω ) = 1 − +
(1 − 21 e−jω ) (1 − 23 e−jω )

Taking the inverse DTFT, we get the impulse response as


 n−1  n−1 !
9 1 14 2
h(n) = 1δ(n) + − + u(n − 1)
2 2 3 3

The first four values of the impulse response are

{h(0) = 1, h(1) = 0.1667, h(2) = 0.8611, h(3) = 0.9491}

4.8 The difference equation governing a system is


17 1
y(n) = x(n) + 2x(n − 1) − x(n − 2) + y(n − 1) − y(n − 2)
12 2
with input x(n) and output y(n). Use the DTFT to find the zero-state response y(n) of the
system with the input x(n) = u(n), the unit-step function. List the first four values of y(n).

1 + 2e−jω − e−j2ω 1 + 2e−jω − e−j2ω


H(ejω ) = =
(1 − 17
12 e
−jω + 1 e−j2ω )
2 (1 − 34 e−jω )(1 − 32 e−jω )
1
With X(ejω ) = (1−e−jω ) + πδ(ω),

1 + 2e−jω − e−j2ω
Y (ejω ) = H(ejω )X(ejω ) = + 24πδ(ω)
(1 − e−jω )(1 − 34 e−jω )(1 − 32 e−jω )

Expanding into partial fractions, we get


51 28
Y (ejω ) = − − + 24πδ(ω)
(1 − 43 e−jω ) (1 − 32 e−jω )

Taking the inverse DTFT, we get the zero-state response.


  n  n 
3 2
y(n) = 24 − 51 + 28 u(n)
4 3

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = 4.4167, y(2) = 7.7569, y(3) = 10.7807}

4.9 The difference equation governing a system is


4 4
y(n) = x(n) − 2x(n − 1) − x(n − 2) + y(n − 1) − y(n − 2)
3 9

53
with input x(n) and output y(n). Use the DTFT to find the zero-state response y(n) of the
system with the input x(n) = ( 54 )n u(n). List the first four values of y(n).
4 4
Y (ejω ) = X(ejω )(1 − 2e−jω − e−j2ω ) + Y (ejω )( e−jω − e−j2ω )
3 9
Solving for Y (ejω ) and factoring, we get, with X(ejω ) = (1− 41e−jω ) ,
5

−jω
1 − 2e − e−j2ω
Y (ejω ) = H(ejω )X(ejω ) = 4 −jω
(1 − 5 e )(1 − 23 e−jω )2
Expanding into partial fractions, we get
−110.25 14.1667 111.25
Y (ejω ) = 4 −jω + 2 −jω 2 +
(1 − 5 e ) (1 − 3 e ) (1 − 23 e−jω )
Taking the inverse DTFT, we get the zero-state response.
 n  n  n
4 2 2
y(n) = (−110.25) + n(14.1667) + (111.25) , n = 0, 1, . . .
5 3 3
The first four values of the sequence y(n) are
{y(0) = 1, y(1) = 0.1333, y(2) = −2.2267, y(3) = −4.5961}

4.10 Use the DFT and IDFT to construct an analytic signal with one-sided spectrum.
4.10.1 {x(n), n = 0, 1, 2, 3} = {2, 1, 3, 4}
Taking the DFT of x(n), we get
X(k) = {10, −1 + j3, 0, −1 − j3}
Multiplying X(k) with {0, −j, 0, j}, we get
XH (k) = {0, 3 + j1, 0, 3 − j1}
Taking the IDFT of XH (k) ,we get
xH (n) = {1.5, −0.5000 − 1.5000, 0.5}
The analytic signal is
xa (n) = x(n) + jxH (n) = {2 + j1.5, 1 − j0.5, 3 − j1.5, 4 + j0.5}
The DFT of xa (n) is
XH (k) = {10, −2 + j6, 0, 0}
a one-sided spectrum.

4.10.2 {x(n), n = 0, 1, 2, 3} = {3, −1, 2, 2}


Taking the DFT of x(n), we get
X(k) = {6, 1 + j3, 4, 1 − j3}
Multiplying X(k) with {0, −j, 0, j}, we get
XH (k) = {0, 3 − j1, 0, 3 + j1}
Taking the IDFT of XH (k),we get
xH (n) = {1.5, 0.5, −1.5, −0.5}
The analytic signal is
xa (n) = x(n) + jxH (n) = {3 + j1.5, −1 + j0.5, 2 − j1.5, 2 − j0.5}}
The DFT of xa (n) is
XH (k) = {6, 2 + j6, 4, 0}
a one-sided spectrum.

54
Chapter 5

5.1 Determine the autocorrelation of the sequence

{x(0) = 2, x(1) = −1, x(2) = 4, x(3) = 3}

from the definition. (a) raw, (b) biased, (c) unbiased and (d) normalized.

(a) {6, 5, 6, 30, 6, 5, 6}.


The middle value corresponds to index 0.

(b) {1.5, 1.25, 1.5, 7.5, 1.5, 1.25, 1.5}.


The middle value corresponds to index 0.

(c) {6, 2.5, 2, 7.5, 2, 2.5, 6}.


The middle value corresponds to index 0.

(d) {0.2, 0.1667, 0.2, 1, 0.2, 0.1667, 0.2}.


The middle value corresponds to index 0.

5.2 Determine the raw autocorrelation of the sequence

{x(0) = 1, x(1) = −2, x(2) = 3, x(3) = 4}

using the DFT and IDFT.

By zero-padding the sequence, we get

{x(0) = 1, x(1) = −2, x(2) = 3, x(3) = 4, x(4) = 0, x(5) = 0, x(6) = 0}

The DFT X(k) of the zero-padded sequence is

{6, −4.5184 − j3.0967, 1.2361 + j6.3788, 3.7823 − j0.6864,

3.7823 + j0.6864, 1.2361 − j6.3788, −4.5184 + j3.0967}


The magnitude squared of X(k), |X(k)|2 , is

{36, 30.0054, 42.2174, 14.7772, 14.7772, 42.2174, 30.0054}

The IDFT of |X(k)|2 is


{30, 4, −5, 4, 4, −5, 4}
The value at lag 0 appears first.
By circularly shifting, we get

{4, −5, 4, 30, 4, −5, 4}

55
Now, the value at lag 0 appears in the middle.

5.3 Determine the autocovariance of the sequence

{x(0) = 2, x(1) = −1, x(2) = 4, x(3) = 3}

The mean value is 2. subtacting the mean, we get the sequence

{x(0) = 0, x(1) = −3, x(2) = 2, x(3) = 1}

Squaring and summing, we get 14 and dividing by 14/(N − 1) = 14/3 = 4.6667.


5.4 The 16 samples of the input sequence are

{1.1075, 0.3668, −1.4518, 0.1724, 1.0638, −0.2615, −1.0867, 0.0685,

1.7157, 0.5539, −1.27, 0.607, 1.1451, −0.0126, −0.8571, −0.0410}


Let the segment length be M = 4. Let the overlap be 50%. Assume rectangular window.
Using the welch method, estimate the PSD.

The number of segments is


16 − 4
1+ =7
2
The sequence values of the 7 segments are

{1.1075, 0.3668, −1.4518, 0.1724}, {−1.4518, 0.1724, 1.0638, −0.2615, }

{1.0638, −0.2615, −1.0867, 0.0685, }, {−1.0867, 0.0685, 1.7157, 0.5539, }


{1.7157, 0.5539, −1.27, 0.607}, {−1.27, 0.607, 1.1451, −0.0126, }
{1.1451, −0.0126, −0.8571, −0.0410}
The rectangular window has all elements equal to 1. Therefore, after windoing, the values
of the 7 segments remain the same. The squared absolute values of the DFT values of the
7 segments are

{0.0380, 6.5878, 0.7806, 6.5878}, {0.2276, 6.5165, 0.0893, 6.5165}

{0.0466, 4.7336, 0.0289, 4.7336}, {1.5660, 8.0891, 0.0000, 8.0891}


{2.5812, 8.9172, 0.5115, 8.9172}, {0.2204, 6.2166, 0.5174, 6.2166}
{0.0549, 4.0096, 0.1167, 4.0096}
The average of these values, divided by N = 4 gives the estimated PSD values

{0.1691, 1.6097, 0.0730, 1.6097}

These values clearly indicate that a sinusoidal component with frequency 1 is buried in the
random input sequence.
5.5 The samples of the input signal are

{1.0538, 0.8905, −0.2259, −0.6209, −0.9681, −0.8379, −0.0434, 0.7414}

Assume Hamming window is used. Estimate the PSD using the Blackman-Tukey method.

56
With 8 samples, the biased autocorrelation is computed using the expression
7
1 X
rxx (τ ) = x(k)x(k + τ )
8
k=−7

This computation yields the following 15 values

{0.0977, 0.0768, −0.1361, −0.2771, −0.2522, −0.0789, 0.2867,

0.5663, 0.2867, −0.0789, −0.2522, −0.2771, −0.1361, 0.0768, 0.0977}


The values of the Hamming window of length 15 are

{0.08, 0.1256, 0.2532, 0.4376, 0.6424, 0.8268, 0.9544, 1,

0.9544, 0.8268, 0.6424, 0.4376, 0.2532, 0.1256, 0.08}


The point-by-point product of the autocorrelation and window values is

{0.0078, 0.0096, −0.0345, −0.1213, −0.1620, −0.0652, 0.2737,

0.5663, 0.2737, −0.0652, −0.1620, −0.1213, −0.0345, 0.0096, 0.0078}


Now, we have to circularly shift these values to suit the computation of the DFT. That
is, the correlation value 0.5663 with lag 0 becomes the first value as

{0.5663, 0.2737, −0.0652, −0.1620, −0.1213, −0.0345, 0.0096,

0.0078, 0.0078, 0.0096, −0.0345, −0.1213 − 0.1620, −0.0652, 0.2737}


The magnitude of the DFT of this sequence is

{0.3826, 0.9079, 1.5003, 0.9526, 0.3444, 0.2011, 0.0996,

0.0504, 0.0504, 0.0996, 0.2011, 0.3444, 0.9526, 1.5003, 0.9079}


Taking the first 8 values of the DFT sequence and multiplying by 2 all the values, except the
first one, we get the one-sided PSD estimation of the input sequence by Blackman-Tukey
method as
{0.3826, 1.8157, 3.0007, 1.9053, 0.6887, 0.4021, 0.1992, 0.1009}
The peak occurs at DFT index k = 2, since the data is almost doubled in computing the
autocorrelation. Therefore, the frequency index k = 1 of the periodic wave occurs at about
k = 2.
5.6
Let the data sequence be {2, −1, 4, 3}. Let the order of the all-pole (autoregressive) signal
modeling be 2. Determine the coefficients of the all-pole model using the autocorrelation
method.

The raw autocorrelation of the given sequence is

{6, 5, 6, 30, 6, 5, 6}

with the middle value corresponding to rx (0). Substituting these values in the matrix
equation, we get     
30 6 a(1) 6
=−
6 30 a(2) 5
Solving, we get a(1) = −0.1736 and a(2) = −0.1319.

57
The minimum modeling error for the all-pole model is
N
X
|b(0)|2 = σ 2 = rx (0) + a(k)rx∗ (k)
k=1

For the example,

|b(0)|2 = 30 + (−0.1736)(6) + (−0.1319)(5) = 28.2986

5.7
Let the data sequence be {2, −1, 4, 3}. Let the order of the all-pole (autoregressive) signal
modeling be 3. Determine the coefficients of the all-pole model using the autocorrelation
method.

The raw autocorrelation of the given sequence is

{6, 5, 6, 30, 6, 5, 6}

with th middle value corresponding to rx (0). Substituting these values in the matrix equa-
tion, we get     
30 6 5 a(1) 6
 6 30 6  a(2)  = −  5 
5 6 30 a(3) 6
Solving, we get a(1) = −0.1534, a(2) = −0.1053 and a(3) = −0.1534. The minimum
modeling error for the all-pole model is, for the example,

|b(0)|2 = 30 + (−0.1534)(6) + (−0.1053)(5) + (−0.1534)(6) = 27.6329

5.8
Let the data sequence be {2, −1, 4, 3}. Let the order of the all-pole (autoregressive) signal
modeling be 2. Determine the coefficients of the all-pole model using the covariance method.

The matrix equation is


    
17 −6 a(1) 8
=−
−6 5 a(2) 5

Solving, we get a(1) = −1.4286 and a(2) = −2.7143.


The minimum modeling error for the all-pole model is
N
X
|b(0)|2 = ǫ = rx (0, 0) + a(k)rx∗ (0, k)
k=1

For the example,


|b(0)|2 = 25 + (−1.4286)(8) + (−2.7143)(5) = 0
5.9
Let the data sequence be {1, 2, −1, 4, −1, 6}. Let the order of the all-pole (autoregressive)
signal modeling be 3. Determine the coefficients of the all-pole model using the covariance
method.

The matrix equation is


    
18 −10 8 a(1) −14
 −10 21 −4   a(2)  = −  33 
8 −4 6 a(3) −4

58
Solving, we get a(1) = 0.1538, a(2) = −1.6154 and a(3) = −0.6154.
The minimum modeling error for the all-pole model is, for the example,

|b(0)|2 = 53 + (0.1538)(−14) + (−1.6154)(33) + (−0.6154)(−4) = 0

5.10
Let the data sequence be {1, 3, −1, 4}. Let the order of the all-pole (autoregressive) signal
modeling be 2. Determine the coefficients of the all-pole model using the modified covariance
method.
The matrix equation is     
20 −7 a(1) −7
=−
−7 27 a(2) 22
Solving, we get a(1) = 0.0713 and a(2) = −0.7963.
The minimum modeling error for the all-pole model is
p
X
|b(0)|2 = rx (0, 0) + a(k)rx∗ (0, k)
k=1

For the example, the forward prediction error is

|b(0)|2 = 27 + (0.0713)(−7) + (−0.7963)(22) = 8.9817

The backward prediction error is also the same.

5.11
Let the data sequence be {1, 2, −1, 4, −1, 6}. Let the order of the all-pole (autoregressive)
signal modeling be 3. Determine the coefficients of the all-pole model using the modified
covariance method.

The matrix equation is


    
39 −20 41 a(1) −18
 −20 39 −18   a(2)  = −  41 
41 −18 59 a(3) −8

Solving, we get a(1) = 0.4324, a(2) = −1.0541, and a(3) = −0.4865.


The minimum modeling error for the all-pole model is
p
X
|b(0)|2 = rx (0, 0) + a(k)rx∗ (0, k)
k=1

The minimum modeling error for the all-pole model is, for the example,

|b(0)|2 = 59 + (0.4324)(−18) + (−1.0541)(41) + (−0.4865)(−8) = 11.8919

5.12
Let the samples be
{2.0538, 0.1834, −2.2259, 0.0862}
and p = 2. Estimate the PSD using MUSIC method.

The average of these values is 0.0244. Subtracting the average value from the samples,
we get
{2.0294, 0.1590, −2.2503, 0.0618}
The number of values is N = 4. After subtracting the average value, we are finding the
autocorrelation values. Multiplying these values term-by-term, summing and dividing by

59
N − 1 = 3, we get the first entry in the covariance matrix R. The covariance matrix of the
samples is  
3.0704 −0.0581 −1.5189 0.0418
 −0.0581 3.0704 −0.0581 −1.5189 
R=  −1.5189 −0.0581

3.0704 −0.0581 
0.0418 −1.5189 −0.0581 3.0704
Now, we have to determine the eigenvalues and the corresponding eigenvectors of the
covariance matrix R. The eigenvalues are
 
1.4844 0 0 0
 0 1.6168 0 0 
d= 
 0 0 4.5402 0 
0 0 0 4.6401

The corresponding eigenvectors are


 
0.4920 −0.5085 0.4914 −0.5079
 0.5079 0.4914 0.5085 0.4920 
v=  0.5079 −0.4914

−0.5085 0.4920 
0.4920 0.5085 −0.4914 −0.5079

The absolute values of the DFT of the first two eigenvectors (the first two column values)
are computed and added. Taking the 20 log10 (.) of these values, we get

{−6.0195, 26.6405, −6.0193, 26.6405}

The peaks are at frequencies 1 and 3.

60
Chapter 6

6.1 The values of the sequence x(n) is given as

{x(n) = x(−3) = 3, x(0) = −1, x(2) = −2}

and zero otherwise. Find the unilateral z-transform of the versions of x(n).
6.1.1. x(n).
6.1.2. 2x(n − 1).
6.1.3. x(−n).
6.1.4. 3x(n + 1).
6.1.5. −2x(n + 3).

6.1.1. X(z) = −1 − 2z −2 .
6.1.2. X(z) = 2(−1z −1 − 2z −3 ).
6.1.3. X(z) = −1 + 3z −3 .
6.1.4. X(z) = −6z −1 .
6.1.5. X(z) = 0.

6.2 Find the nonzero values of the inverse of the given unilateral z-transform.
6.2.1. X(z) = 1 + 2z −1 + 4z −2 .
6.2.2. X(z) = 2 + z −3 − z −5 .
6.2.3. X(z) = z −7 + 2z −9 .
6.2.4. X(z) = 2(1 + z −3 + 2z −5 ).
6.2.5. X(z) = −z −1 − z −4 .

6.2.1. {x(0) = 1, x(1) = 2, x(2) = 4}.


6.2.2. {x(0) = 2, x(3) = 1, x(5) = −1}.
6.2.3. {x(7) = 1, x(9) = 2}.
6.2.4. {x(0) = 2, x(3) = 2, x(5) = 4}.
6.2.5. {x(1) = −1, x(4) = −1}.
6.3 The nonzero values of two sequences x(n) and h(n) are given. Using the z-transform,
find the convolution of the sequences y(n) = x(n) ∗ h(n).
6.3.1. {x(0) = 1, x(1) = 2, x(2) = −4} and {h(0) = 3, h(1) = 2}.
6.3.2. {x(1) = 1, x(3) = 3} and {h(2) = −3, h(4) = 2}.
6.3.3. {x(2) = 1, x(3) = −3} and {h(1) = 3, h(2) = 2}.
6.3.4. {x(0) = 2, x(4) = −1} and {h(1) = −2, h(3) = 2}.
6.3.5. {x(1) = −2, x(3) = −1} and {h(2) = 3, h(3) = 1}.

61
6.3.1.
X(z) = 1 + 2z −1 − 4z −2 and H(z) = 3 + 2z −1 }
X(z)H(z) = 3 + 8z −1 − 8z −2 − 8z −3
The inverse of X(z)H(z) is
y(n) = {3̂, 8, −8, −8}
6.3.2.
X(z) = z −1 + 3z −3 and H(z) = −3z −2 + 2z −4 }
X(z)H(z) = 0 + 0z −1 + 0z −2 − 3z −3 + 0z −4 − 7z −5 + 0z −6 + 6z −7
The inverse of X(z)H(z) is

y(n) = {0̂, 0, 0, −3, 0, −7, 0, 6}

6.3.3.
X(z) = z −2 − 3z −3 and H(z) = 3z −1 + 2z −2 }
X(z)H(z) = 0 + 0z −1 + 0z −2 + 3z −3 − 7z −4 − 6z −5
The inverse of X(z)H(z) is
y(n) = {0̂, 0, 0, 3, −7, −6}
6.3.4.
X(z) = 2 − z −4 and H(z) = −2z −1 + 2z −3 }
X(z)H(z) = 0 − 4z −1 + 0z −2 + 4z −3 + 0z −4 + 2z −5 + 0z −6 − 2z −7
The inverse of X(z)H(z) is

y(n) = {0̂, −4, 0, 4, 0, 2, 0, −2}

6.3.5.
X(z) = −2z −1 − z −3 and H(z) = 3z −2 + z −3
X(z)H(z) = −6z −3 − 2z −4 − 3z −5 − 1z −6
The inverse of X(z)H(z) is

y(n) = {0̂, 0, 0, −6, −2, −3, −1}

6.4
6.4.1. Use the multiplication by n property to find the z-transform of x(n). Verify that the
inverse of the resulting transform gets back the given signal.
6.4.1. x(n) = nδ(n − 4)u(n).
6.4.2. x(n) = n(−0.8)n u(n).
6.4.3. x(n) = nu(n − 1).

6.4.1.  
d 1
X(z) = −z = 4(z)−4
dz (z 4 )
6.4.2.  
d z −0.8z
X(z) = −z =
dz (z + 0.8) (z + 0.8)2
6.4.3.    
d 1 z
X(z) = −z =
dz (z − 1) (z − 1)2

62
6.5 Given the samples x0 (n) of the first period of the semi-periodic signal x(n), find its
z-transform X(z).

6.5.1.
ˆ
x0 (n) = {0.5000, −0.8660, −0.5000, 0.8660}
0.5z 3 − 0.866z 2 − 0.5z + 0.866
X0 (z) =
z3
 4 
z
X(z) = 4
X0 (z), |z| > 1
z −1
z3 0.5z 3 − 0.866z 2 − 0.5z + 0.866
 
X(z) 0.2500 + j0.4330 0.2500 − j0.4330
= = + , |z| > 1
z z4 − 1 z 3 z−j z+j
Taking the inverse, we get
2π ˆ −0.8660, −0.5000, 0.8660, . . .}
x(n)u(n) = cos( n + (1.0472)) = {0.5,
4
6.5.2.
x0 (n) = {1̂, 2, 1}
z 2 + 2z + 1
X0 (z) =
z2
 3 
z
X(z) = X0 (z), |z| > 1
z3 − 1
z2 z 2 + 2z + 1
 
X(z) 1.3333 −0.1667 + j0.2887 −0.1667 − j0.2887
= 3
= + + , |z| > 1
z z −1 z2 (z − 1) z + (0.5000 + j0.866) z + (0.5000 − j0.866)
Taking the inverse, we get

x(n)u(n) = 1.3333 + (2)0.3334 cos( n − (2.0944)) = {1̂, 2, 1, . . .}
3
6.5.3.
x0 (n) = {3̂, 2}
3z + 2
X0 (z) =
z
z2
 
X(z) = X0 (z), |z| > 1
z2 − 1
 
X(z) z 3z + 2 0.25 0.5
= 2
= + , |z| > 1
z z −1 z (z − 1) (z + 1)
Taking the inverse, we get

x(n)u(n) = 0.5(−1)n + 2.5 = {3̂, 2, . . .}

6.6 The difference equation of a causal discrete system is given. Using the z-transform,
find a closed-form expression for the time-domain response y(n). Assume that the system
is initially relaxed and the input is the unit-impulse, x(n) = δ(n). Verify that the first 4
values of the response of the system obtained using the expression for y(n) and by iterating
the difference equation are the same.

6.6.1
y(n) = x(n) − 2y(n − 1) − y(n − 2) + 2y(n − 3)

63
The required partial fraction is
(0.0924)z 0.4538 + j0.4087z 0.4538 − j0.4087z
Y (z) = + +
(z − 0.6956) (z − (−1.3478 + j1.0289)) (z − (−1.3478 − j1.0289)

Finding the inverse z-transform of each term, we get the inverse of Y (z),

y(n) = ((0.0924)(0.6956)n + (2)(0.6107)(1.6956)n cos(2.4896n + (0.7332))) u(n)

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = −2, y(2) = 3, y(3) = −2}

6.6.2
y(n) = x(n) + 2y(n − 1) + y(n − 2) − 2y(n − 3)
Taking the z-transform of both sides, we get, with zero initial conditions,
Y (z) A B C
= + +
z (z − 1) (z + 1) (z − 2)
The required partial fraction is
(−0.5)z 0.1667z 1.3333z
Y (z) = + +
(z − 1) (z + 1) (z − 2)

Finding the inverse z-transform of each term, we get the inverse of Y (z),
n n n
y(n) = ((−0.5) (1) + 0.1667 (−1) + 1.3333 (2) ) u(n)

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = 2, y(2) = 5, y(3) = 10}

6.6.3
y(n) = x(n) + x(n − 1) − x(n − 2) + 2y(n − 1) + y(n − 2) − 2y(n − 3)
Taking the z-transform of both sides, we get, with zero initial conditions,
Y (z) A B C
= + +
z (z − 1) (z + 1) (z − 2)
The required partial fraction is
(−0.5)z −0.1667z 1.6667z
Y (z) = + + +
(z − 1) (z + 1) (z − 2)

Finding the inverse z-transform of each term, we get the inverse of Y (z),
n n n
y(n) = ((−0.5) (1) − 0.1667 (−1) + 1.6667 (2) ) u(n)

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = 3, y(2) = 6, y(3) = 13}

6.6.4
y(n) = x(n) + 5y(n − 1) − 8y(n − 2) + 4y(n − 3)

64
Taking the z-transform of both sides, we get, with zero initial conditions,

Y (z) A B C
= + +
z (z − 1) (z − 2)2 (z − 2)

The required partial fraction is

(1)z 4z 0z
Y (z) = + +
(z − 1) (z + 1)2 (z − 2)

Finding the inverse z-transform of each term, we get the inverse of Y (z),
 
n n−1
y(n) = (1) (1) + 4n (2) u(n)

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = 5, y(2) = 17, y(3) = 49}

6.7 A discrete system is governed by the difference equation

3 9
y(n) = 2x(n) − x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
2 16
Using the z-transform, find the complete response of the system for the input x(n) = u(n),
the unit-step function. The initial conditions are y(−1) = 1 and y(−2) = 2. List the first
four values of the complete response of the system. Verify your answer by finding the first
few values of the response by iterating the difference equation. Verify that the zero-input
response satisfies the initial conditions. Verify that the total response in the z-transform
domain satisfies the initial and final value theorems.

Taking the z-transforms of the terms of the difference equation, we get

z 1 1
x(n) ↔ , x(n − 1) ↔ , x(n − 2) ↔
z−1 z−1 z(z − 1)
y(n) ↔ Y (z), y(n − 1) ↔ y(−1) + z −1 Y (z) = z −1 Y (z) + 1
y(n − 2) ↔ y(−2) + z −1 y(−1) + z −2 Y (z) = z −2 Y (z) + z −1 + 2

Substituting the corresponding transform for each term in the difference equation, factoring
and simplifying, we get

Y (z) 2z 2 − z + 1 (0.375z − 0.5625)


= +
z (z − 1)(z − 43 )2 (z − 43 )2

The first and second group of terms on the right-hand side corresponds, respectively, to the
zero-state response and zero-input response. The corresponding partial-fraction expansion
is
Y (z) 32 30 5.5 0.375 0.2813
= − − − −
z (z − 1) (z − 43 ) (z − 43 ) (z − 34 ) (z − 43 )2
The inverse z-transform yields the complete response.
 n  (n−1) !  n  n−1 !
3 3 3 3
y(n) = 32 − 30 − 5.5n + 0.375 − 0.2813n , n = 0, 1, . . .
4 4 4 4

65
The first four values of y(n) are

{y(0) = 2.3750, y(1) = 4, y(2) = 6.6640, y(3) = 9.7460}

6.8 A discrete system is governed by the difference equation


5 1
y(n) = x(n) − 2x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
6 6
Using the z-transform, find the complete response of the system for the input x(n) =
0.8n u(n). The initial conditions are y(−1) = 0 and y(−2) = 1. List the first four values of
the complete response of the system. Verify your answer by finding the first few values of the
response by iterating the difference equation. Verify that the zero-input response satisfies
the initial conditions. Verify that the total response in the z-transform domain satisfies the
initial and final value theorems.

Taking the z-transforms of the terms of the difference equation, we get


z 1 1
x(n) ↔ , x(n − 1) ↔ , x(n − 2) ↔
z−1 z−1 z(z − 1)
y(n) ↔ Y (z), y(n − 1) ↔ y(−1) + z −1 Y (z) = z −1 Y (z)
y(n − 2) ↔ y(−2) + z −1 y(−1) + z −2 Y (z) = z −2 Y (z) + 1

Substituting the corresponding transform for each term in the difference equation, factoring
and simplifying, we get

Y (z) z 2 − 2z + 1 (−(1/6)z)
= +
z (z − 0.8)(z − 13 )(z − 21 ) (z − 13 )(z − 12 )

The first and second group of terms on the right-hand side corresponds, respectively, to the
zero-state response and zero-input response. The corresponding partial-fraction expansion
is
Y (z) 0.2857 5 5.7143 0.5 0.3333
= − + − +
z (z − 0.8) (z − 12 ) (z − 13 ) (z − 12 ) (z − 13 )
The inverse z-transform yields the complete response.
 n  (n) !   n  n 
n 1 1 1 1
y(n) = 0.2857(0.8) − 5 + 5.7143 + −0.5 + 0.3333 , n = 0, 1, . . .
2 3 2 3

The first four values of y(n) are

{y(0) = 0.8333, y(1) = −0.5056, y(2) = −0.5202, y(3) = −0.3172}

6.9 A discrete system is governed by the difference equation


5
y(n) = x(n) − 2x(n − 1) + y(n − 1)
6
Using the z-transform, find the complete response of the system for the input x(n) =
cos( 2π π
8 n + 3 )u(n). The initial condition is y(−1) = 3. List the first four values of the
complete response of the system. Verify your answer by finding the first few values of the
response by iterating the difference equation. Verify that the zero-input response satisfies

66
the initial conditions. Verify that the total response in the z-transform domain satisfies the
initial and final value theorems.

π
ej 3 z(z − 2) (3) 56
Y (z) = +
z − 65

(z − 56 )(z − ej 8 )
jπ (3) 56
Y (z) e (z − 2)
3
= +
(z − 56 )(z − ej 8 ) z − 56

z
5
Y (z) −0.7420 + j1.9127 1.2420 − j1.0467 2
= + 5 +
(z − 65 )

z (z − ej 8 ) (z − 6 )

  n  n 
j 2π n 5 5 5
y(n) = (−0.7420 + j1.9127)(e ) + (1.2420 − j1.0467)
8 + , n = 0, 1, . . .
6 2 6

Taking the real part the sequence of y(n), we get


The first four values of y(n) are

{y(0) = 3, y(1) = 1.2412, y(2) = 0.6859, y(3) = 1.3377}

6.10 A discrete system is governed by the difference equation

y(n) = 2x(n) − 2x(n − 1) + x(n − 2) + 1.6y(n − 1) − 0.64y(n − 2)

Using the z-transform, find the complete response of the system for the input x(n) =
0.8n u(n). The initial conditions are y(−1) = 2 and y(−2) = 1. List the first four values of
the complete response of the system. Verify your answer by finding the first few values of the
response by iterating the difference equation. Verify that the zero-input response satisfies
the initial conditions. Verify that the total response in the z-transform domain satisfies the
initial and final value theorems.

Taking the z-transform of both sides, the partial fraction form is zero initial conditions
 2   
Y (z) 2z − 2z + 1 A B C D E
= = + + + +
z (z − 0.8)3 (z − 0.8)3 (z − 0.8)2 (z − 0.8) (z − 0.8)2 (z − 0.8)

Finding the constants, we get


 
0.68z 1.2z 2 0.768 2.56
Y (z) = + + + +
(z − 0.8)3 (z − 0.8)2 (z − 0.8) (z − 0.8)2 (z − 0.8)
 
n−1 n n−1 n
y(n) = 0.68(0.5)n(n − 1)(0.8)n−2 + 1.2(n) (0.8) + 2 (0.8) + 0.768n (0.8) + 2.56 (0.8) u(n)

The first four values of the sequence y(n) are

{y(0) = 4.5600, y(1) = 5.6160, y(2) = 6.7472, y(3) = 7.7453}

Example 6.11 Find the z-transform Y (z) of the difference equation of a causal discrete
system
y(n) = x(n) + x(n − 1) + 0.9y(n − 1), n = 0, 1, . . .
Find the inverse z-transform of Y (z) getting a closed-form expression for the time-domain
response y(n). Assume that the system is initially relaxed and the nonzero samples of the
input are x(0) = 1, x(1) = 3. Verify that the first 4 values of the response of the system
obtained using the expression for y(n) and by iterating the given difference equation are the

67
same.

Solution
Taking the z-transform of the difference equation and including the respective inputs, we
get
z(z + 1)(z + 3)
Y (z) = H(z)X(z) =
z 2 (z − 0.9)
=
Y (z) A B C
= + 2+
z z z z − 0.9
The inverse z-transform is

y(n) = −8.1481δ(n) − 3.3333δ(n − 1) + 9.1481(0.9)n u(n)

The first four values of the sequence y(n) are

{y(0) = 1, y(1) = 4.9, y(2) = 7.4100, y(3) = 6.6690}

68
Chapter 7

7.1 The passband and stopband edge frequencies of a lowpass filter are specified, respec-
tively, as ωc = 0.3π radians and ωs = 0.4π radians, respectively. The minimum attenuation
required in the stopband is 18 dB. Design the lowpass filter using the rectangular window.
The sampling frequency is fs = 1024 Hz.
Solution
Now, we find the order of the filter as

N ≥ 0.9 = 18
0.4π − 0.3π
The cutoff frequency of the corresponding ideal filter is computed as
ωs + ωc 0.3π + 0.4π
ωci = = = 0.35π
2 2
The shifted impulse response of the filter is given by
sin(ωci ( N2 − n)) sin(0.35π(9 − n))
h(n) = N
= , n = 0, 1, . . . , 18
π( 2 − n) π(9 − n)
The shifted impulse response values, with a precision of four digits after the decimal point,
are
{hs (n), n = 0, 1, . . . , 18} =
{−0.0161, 0.0234, 0.0449, 0.0164, −0.0450, −0.0757, −0.0166, 0.1288, 0.2836,
0.3500, 0.2836, 0.1288, −0.0166, −0.0757, −0.0450, 0.0164, 0.0449,
0.0234, −0.0161}

7.2 The passband and stopband edge frequencies of a highpass filter are specified, respec-
tively, as ωc = 0.7π radians and ωs = 0.4π radians, respectively. The minimum attenuation
required in the stopband is 40 dB. Design the highpass filter using the Hamming window.
The sampling frequency is fs = 1024 Hz.
Solution
The approximate average slope of the transition band of the Hamming window provides is
given as 3.3 2π
N . Now, we find the order of the filter as


N ≥ 3.3 = 22
0.7π − 0.4π
The cutoff frequency of the corresponding ideal filter is computed as
ωs + ωc 0.4π + 0.7π
ωci = = = 0.55π
2 2
The shifted impulse response of the lowpass filter is given by
sin(ωci ( N2 − n)) sin(0.55π(11 − n))
h′ (n) = = , n = 0, 1, . . . , 22
π( N2 − n) π(11 − n)

69
The values, for this example, are

{h′s (n), n = 0, 1, . . . , 22} =


{0.0045, −0.0318, 0.0055, 0.0378, −0.0206, −0.0429, 0.0450,
0.0468, −0.0945, −0.0492, 0.3144, 0.5500, 0.3144, −0.0492,
−0.0945, 0.0468, 0.0450, −0.0429, −0.0206, 0.0378, 0.0055,
−0.0318, 0.0045}

The values of the Hamming window with length N + 1 are


2πn
0.54 − 0.46 cos( ), n = 0, 1, 2, . . . , N
N
For N = 22,the samples of the window are

{0.0800, 0.0986, 0.1530, 0.2388, 0.3489, 0.4745, 0.6055, 0.7311, 0.8412,

0.9270, 0.9814, 1, 0.9814, 0.9270, 0.8412, 0.7311, 0.6055, 0.4745,


0.3489, 0.2388, 0.1530, 0.0986, 0.0800}
Multiplying the window values by the impulse response values, we get the 23 windowed
values of h′s (n) of the lowpass filter

{−0.0004, 0.0031, −0.0008, −0.0090, 0.0072, 0.0204, −0.0273, −0.0342, 0.0795,

0.0456, −0.3085, 0.5500, −0.3085, 0.0456, 0.0795, −0.0342, −0.0273, 0.0204,


0.0072, −0.0090, −0.0008, 0.0031, −0.0004}
The impulse response of the highpass filter
Let us design two lowpass filters, one with cutoff frequency ωci = π and another with
ωci , the desired frequency. The impulse response of the highpass filter with the same cutoff
frequency with ωci is the difference between the two lowpass filters. That is,

hhp (n) = hπlp (n) − hdlp (n)

Therefore, the impulse response of a highpass filter is given by

sin(π( N2 − n)) sin(ωci ( N2 − n))


hhp (n) = − , n = 0, 1, . . . , N
π( N2 − n) π( N2 − n)
sin(ωci ( N2 − n))
= δ(n) −
π( N2 − n)

If the cutoff frequency is π, then the frequency response is 1 from −π to π with its inverse
DTFT δ(n). That is,
hhp (n) = δ(n) − h′s (n)
The shifted impulse response values, with a precision of four digits after the decimal
point, of the highpass filter are

{hhp (n), n = 0, 1, . . . , 22} =


{−0.0004, 0.0031, −0.0008, −0.0090, 0.0072, 0.0204, −0.0273,
−0.0342, 0.0795, 0.0456, −0.3085, 0.4500, −0.3085, 0.0456,
0.0795, −0.0342, −0.0273, 0.0204, 0.0072, −0.0090, −0.0008,
0.0031 − 0.0004}

70
7.3 The passband and stopband edge frequencies of a lowpass filter are specified, respec-
tively, as ωc = 0.3π radians and ωs = 0.54π radians, respectively. The minimum attenuation
required in the stopband is 41 dB. Design the lowpass filter using the Kaiser window. The
sampling frequency is fs = 1024 Hz.
Solution
The ripple size in the stopband is found as

δ = 10−0.05(41) = 0.0089

The parameter b is found as

b = 0.5842(A − 21)0.4 + 0.07886(A − 21) = 3.5135

Now, the order of the filter is found as

N = ((A − 7.95)(2π))/(14.36(ωs − ωc )) = 19.1794 ≈ 21

The 22 Kaiser window coefficients, starting with index 0, are

kaiw (n) = {0.1340, 0.2202, 0.3192, 0.4273, 0.5394, 0.6503, 0.7541, 0.8453, 0.9187,

0.9702, 0.9967, 0.9967, 0.9702, 0.9187, 0.8453, 0.7541, 0.6503, 0.5394,


0.4273, 0.3192, 0.22020.1340}
The cutoff frequency of the corresponding ideal filter is computed as
ωs + ωc 0.3π + 0.61π
ωci = = = 0.0.42π
2 2
The shifted impulse response of the filter is given by

sin(ωci ( N2 − n)) sin(0.42π(10.5 − n))


h(n) = = , n = 0, 1, . . . , 21
π( N2 − n) π(10.5 − n)

The shifted impulse response values, with a precision of four digits after the decimal point,
are

{hs (n), n = 0, 1, . . . , 21} = {0.0291, −0.0011, −0.0365, −0.0193, 0.0367, 0.0479, −0.0240,
−0.0905, −0.0199, 0.1948, 0.3902, 0.3902, 0.1948, −0.0199,
−0.0905, −0.0240, 0.0479, 0.0367, −0.0193, −0.0365, −0.0011, 0.0291}

Mjultiplying with the window coefficients kaiw (n), we get the shifted and windowed impulse
response values

{hsw (n), n = 0, 1, . . . , 21} = {0.0039, −0.0002, −0.0117, −0.0082, 0.0198, 0.0311, −0.0181,
−0.0765, −0.0183, 0.1889, 0.3889, 0.3889, 0.1889, −0.0183, −0.0765
−0.0181, 0.0311, 0.0198, −0.0082, −0.0117, −0.0002, 0.0039}

7.4 The lower passband and stopband edge frequencies of a bandpass filter are 0.3π and
0.1π, respectively. The upper passband and stopband edge frequencies of the bandpass
filter are 0.5π and 0.7π, respectively. The minimum attenuation required in the stopband
is As = 48 dB. The maximum deviation acceptable in the passband is Ac = 0.1 dB. Design
the bandpass filter using the Kaiser window. The sampling frequency is fs = 512 Hz.
Solution
With Ac = 0.1 dB and As = 48 dB, compute

100.05Ac − 1
δc = = 0.0058,
100.05Ac + 1

71
δs = 10−0.05As = 0.0040
With A = 48, the window shape parameter b is computed as

b = 0.5842(A − 21)0.4 + 0.07886(A − 21) = 2.789

With the sharper transition band 0.2π, the order of the filter, N , is given as

(A − 7.95) 2π
B= = 2.5801 and N ≥ B = 27.89 ≈ 28
14.36 0.3π − 0.1π
With the order of the filter N and the parameter b known, we get the coefficients of the
window as

kaiw (n) = {0.0674, 0.1181, 0.1801, 0.2526, 0.3340, 0.4221, 0.5142,


0.6070, 0.6971, 0.7809, 0.8550, 0.9163, 0.9621, 0.9904,
1, 0.9904, 0.9621, 0.9163, 0.8550, 0.7809, 0.6971,
0.6070, 0.5142, 0.4221, 0.3340, 0.2526, 0.1801, 0.1181, 0.0674}

With one-half of the shorter transition band 0.5(0.3 − 0.1)π = 0.1π, the cutoff frequencies
of the ideal lowpass filters are computed as

ωci1 = 0.3π − 0.1π = 0.2π, ωci2 = 0.5π + 0.1π = 0.6π


 
sin(0.6π(14 − n)) sin(0.2π(14 − n))
h(n) = kaiw (n) −
π(14 − n) π(14 − n)
The impulse response of the filter, before multiplying the window, is given by

h(n) = {0.0083, −0.0377, −0.0408, 0.0105, −0.0000, −0.0128, 0.0612, 0.0700, −0.0193,

0.0000, 0.0289, −0.1633, −0.2449, 0.1156, 0.4, 0.1156, −0.2449, −0.1633,


0.0289, 0.0000, −0.0193, 0.0700, 0.0612, −0.0128, −0.0000, 0.0105, −0.0408,
−0.0377, 0.0083}
Multiplying the impulse response values with that of the Kaiser window values, we get the
impulse response values, with a precision of four digits after the decimal point, are

{hBP (n), n = 0, 1, . . . , 28} =


{0.0006, −0.0044, −0.0074, 0.0027, −0.0000, −0.0054, 0.0315,
0.0425, −0.0134, 0.0000, 0.0247, −0.1496, −0.2356, 0.1145,
0.4, 0.1145, −0.2356, −0.1496, 0.0247, 0, −0.0134,
0.0425, 0.0315, −0.0054, 0, 0.0027, −0.0074, −0.0044, 0.0006}

7.5 The lower passband and stopband edge frequencies of a bandstop filter are 0.1π and
0.4π, respectively. The upper passband and stopband edge frequencies of the bandstop
filter are 0.8π and 0.5π, respectively. The minimum attenuation required in the stopband
is As = 35 dB. The maximum deviation acceptable in the passband is Ac = 0.2 dB. Design
the bandstop filter using the Hamming window. The sampling frequency is fs = 512 Hz.
Solution
With the sharper transition band 0.3π, the order of the filter, N , is given as


N ≥ 3.3 = 22
0.4π − 0.1π

72
With N = 22, the Hamming window coefficients are

hammingw (n) =
{0.0800, 0.0986, 0.1530, 0.2388, 0.3489, 0.4745, 0.6055, 0.7311, 0.8412,
0.9270, 0.9814, 1, 0.9814, 0.9270, 0.8412, 0.7311, 0.6055, 0.4745,
0.3489, 0.2388, 0.1530, 0.0986, 0.0800}

With one-half of the shorter transition band 0.5(0.4 − 0.1)π = 0.15π, the cutoff frequencies
of the ideal lowpass filters are computed as

ωci1 = 0.3π − 0.15π = 0.15π, ωci2 = 0.5π + 0.15π = 0.65π

(0.15 − 0.65)π
h(N B2) = 1 + = 0.5
π
 
sin(0.15π(11 − n)) sin(0.65π(11 − n))
h(n) = − otherwise
π(11 − n) π(11 − n)
The impulse response of the, before multiplying by the window, filter is given by

h(n) = {0.0336, 0, 0.0411, 0.0234, −0.0771, −0.0367, 0.0000, −0.0757, 0.0916,

0.2879, −0.0585, 1, −0.0585, 0.2879, 0.0916, −0.0757, 0.0000, −0.0367,


−0.0771, 0.0234, 0.0411, 0, 0.0336}
Multiplying the impulse response values with that of the Hamming window values, we get
the impulse response values, with a precision of four digits after the decimal point, as

{hBP (n), n = 0, 1, . . . , 22} =


{0.0027, −0.0000, 0.0063, 0.0056, −0.0269, −0.0174, 0.0000,
−0.0553, 0.0771, 0.2669, −0.0574, 0.6, −0.0574, 0.2669,
0.0771, −0.0553, 0.0000, −0.0174, −0.0269, 0.0056, 0.0063, −0.0000, 0.0027}

7.6 Find the impulse response of the 22-th order Type III Hilbert transformer using the
window FIR filter design method. Use the Hamming window. The sampling frequency is
fs = 512 Hz.
Solution
From the impulse response of the ideal Hilbert transformer is given in an earlier chapter,
the shifted version of the impulse response for a finite order N filter is obtained as
( π(N B2−n)
2 sin2 ( )
h(n) = π(N B2−n)
2
for n 6= N B2, 0 ≤ n ≤ N
0 for n = N B2

The 23 shifted and windowed impulse response values, with a precision of four digits after
the decimal point, of the Hilbert filter are

{hhilbert (n), n = 0, 1, . . . , 22} =


−0.0046, −0.0000, −0.0108, −0.0000, −0.0317, −0.0000, −0.0771,
−0.0000, −0.1785, −0.0000, −0.6248, 0, 0.6248, 0.0000,
0.1785, 0.0000, 0.0771, 0.0000, 0.0317, 0.0000, 0.0108,
0.0000, 0.0046, }

7.7 Find the impulse response of the 20-th order Type III differentiating filter using the
window FIR filter design method. Use the Hamming window. The sampling frequency is

73
fs = 512 Hz.
Solution
From the impulse response of the ideal differentiating filter is given in an earlier chapter,
the shifted version of the impulse response for a finite order N filter is obtained as
(
(−1)(n−10)
h(n) = n−10 for n 6= N B2, 0 ≤ n ≤ N
0 for n = N B2

The 21 shifted and widowed impulse response values, with a precision of four digits after
the decimal point, of the differentiator are

{hdif f (n), n = 0, 1, . . . , 20} =


{−0.0080, 0.0114, −0.0210, 0.0385, −0.0663, 0.1080, −0.1705,
0.2701, −0.4561, 0.9775, 0, −0.9775, 0.4561, −0.2701,
0.1705, −0.1080, 0.0663, −0.0385, 0.0210, −0.0114, 0.0080}

7.8 A Type I 22-th order optimal equiripple linear-phase lowpass filter with the passband
and stopband edge frequencies, respectively, ωp = 0.25π and ωs = 0.4π radians is required.
The size of the ripple δs in the stopband is to be 3 times that in the passband δp . The
sampling frequency is fs = 512 Hz. Design the filter.
The 23 impulse response values, with a precision of four digits after the decimal point, are

{−0.0019, −0.0211, 0.0027, 0.0211, 0.0266, −0.0007, −0.0460, −0.0606, 0.0011,

0.1344, 0.2730, 0.3320, 0.2730, 0.1344, 0.0011,


−0.0606, −0.0460, −0.0007, 0.0266, 0.0211, 0.0027, −0.0211, −0.0019}
δp = 0.0109 and δs = 0.0327

7.9 A Type I 20-th order optimal linear-phase highpass filter with the passband and stop-
band edge frequencies, respectively, ωp = 0.4π and ωs = 0.25π radians is required. The size
of the ripple δs in the stopband is to be 4 times that in the passband δp . The sampling
frequency is fs = 512 Hz. Design the filter.
The 21 impulse response values, with a precision of four digits after the decimal point, are

{0.0014, −0.0175, −0.0270, −0.0195, 0.0133, 0.0507, 0.0511, −0.0169, −0.1415,

−0.2641, 0.6848, −0.2641, −0.1415, −0.0169, 0.0511, 0.0507, 0.0133, −0.0195,


−0.0270, −0.0175, 0.0014}
δp = 0.0138 and δs = 0.0551

7.10 A Type II 19-th order optimal linear-phase lowpass filter with the passband and
stopband edge frequencies are 0.34π and 0.39π radians, respectively, is required. The size of
the ripple in the stopband is to be 3/2 times that of the passband. The sampling frequency
is fs = 512 Hz. Design the filter.
The 20 impulse response values, with a precision of four digits after the decimal point, are

{−0.0711, −0.0537, 0.0706, 0.0197, 0.0169, −0.0737, −0.0626, 0.0297, 0.2118,

0.3451, 0.3451, 0.2118, 0.0297, −0.0626, −0.0737, 0.0169, 0.0197, 0.0706, −0.0537, −0.0711}
δp = 0.1345 and δs = 0.2018

74
7.11 The six edge frequencies of a 18th order linear-phase Type I bandstop filter in radians
are
{0, 0.1π, 0.2π, 0.8π, 0.9π, π}
The ripple ratio in the stopband is to be 3 times that in the passband. Find the impulse
response of the filter using the optimum FIR filter design method. The sampling frequency
is fs = 512 Hz. The 19 impulse response values, with a precision of four digits after the
decimal point, are

{−0.0000, −0.0805, 0.0000, 0.0315, 0.0000, 0.1451, 0.0000, 0.2666, 0.0000,

0.3189, 0.0000, 0.2666, 0.0000, 0.1451, 0.0000, 0.0315, 0.0000, −0.0805, −0.0000}
δp = 0.0493 and δs = 0.1480

7.12 The six edge frequencies of a 23th order linear-phase Type II bandpass filter in radians
are
{0, 0.1π, 0.2π, 0.8π, 0.9π, π}
The ripple ratio in the stopband is to be 4 times that in the passband. Find the impulse
response of the filter using the optimum FIR filter design method. The sampling frequency
is fs = 512 Hz.
The 24 impulse response values, with a precision of four digits after the decimal point, are

{0.0079, 0.0123, 0.0330 − 0.0206, 0.0377, −0.0587, 0.0021, −0.0931, −0.0931,

−0.0629, −0.3017, 0.4733, 0.4733, −0.3017, −0.0629, −0.0931, −0.0931, 0.0021,


−0.0587, 0.0377, −0.0206, 0.0330, 0.0123, 0.0079}
δp = 0.0319 and δs = 0.1274

7.13 The cutoff frequencies of the two edges of the passband of a 20th order Type III Hilbert
transformer filter are 0.2π and 0.8π radians, respectively. Find the impulse response of the
filter using the optimum FIR filter design method. The sampling frequency is fs = 512 Hz.
The 21 impulse response values, with a precision of four digits after the decimal point, are

{−0.0000, −0.0044, −0.0000, −0.0204, −0.0000 − 0.0623, −0.0000, −0.1656, −0.0000,

−0.6196, 0, 0.6196, 0.0000, 0.1656, 0.0000, 0.0623, 0.0000, 0.0204,


0.0000, 0.0044, 0.0000}
δp = 5.9583e − 04

7.14 The cutoff frequencies of the the passband and stopband of a 19th order Type IV
differentiating filter filter are 0.6π and 0.7π radians, respectively. The magnitude of the
frequency response is to be 1 at the passband edge frequency. The ripple ratio in the
stopband is to be 4 times that in the passband. Find the impulse response of the filter using
the optimum FIR filter design method. The sampling frequency is fs = 512 Hz.
The 20 impulse response values, with a precision of four digits after the decimal point, are

{−0.0047, −0.0236, 0.0572, −0.0369, −0.0201, 0.0717, −0.0480, −0.0798, 0.2333, 0.2192,

−0.2192, −0.2333, 0.0798, 0.0480, −0.0717, 0.0201, 0.0369, −0.0572, 0.0236, 0.0047}
δp = 0.0335 and δs = 0.1340

75
76
Chapter 8

8.1 Design a lowpass digital filter with Butterworth response. The passband and stopband
edge frequencies of the digital filter are fdc = 41 Hz and fds = 81 Hz, respectively. The
maximum passband attenuation is Ac = 3 dB and the minimum stopband attenuation is
As = 10 dB. Let te stopband attenuation be better than the specification. The sampling
frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies.
In the analog frequency domain, the prewarped edge frequencies, which are slightly higher
than the specified ones, correspond to
   
πfdc π41
ωac = (2fs ) tan = 2(512) tan = 263.1864 rad/sec
fs 512
   
πfds π81
ωas = (2fs ) tan = 2(512) tan = 555.4444 rad/sec
fs 512
Step 2: The order of the required filter is found as
 0.1A   0.1(10) 
s −1
log10 10
100.1Ac −1
log10 10 −1
100.1(3) −1
N≥ = = 1.4741
2 log10 ( ωωsc ) 2 log10 ( 555.4444
263.1864 )

To make the filter order an integer, we find the nearest integer greater than or equal to
1.4741 to be N = 2.
Step 3: Find the factored form of the second order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 1.41421s + 1)
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to lowpass analog frequency transformation is s = ωl s/ωd , where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
The normalized reference frequency ωl has to be computed. As the estimated filter order
N is usually a real value, it is rounded to the nearest higher integer. Due to this, the filter
performance becomes better at the edge frequencies. Using N = 2, we get the reference
frequency as
ωl = (100.1Ac − 1)1/(2N ) = (100.1(3) − 1)1/(2(2)) = 0.9988
The frequency transformation is given by

s = 0.0.9988s/263.1864 = s/263.4991

Step 5: Find the second-order lowpass digital filter transfer function.


This transformation
s
263.4991

77
can be combined with the bilinear transformation as
2fs (z − 1) (z − 1) (z − 1)
s= = 3.8862 =k
263.4991 (z + 1) (z + 1) (z + 1)

Then, using the formulas given earlier, for the second-order section

a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 3.8862,

1 2 1 2(1 − k 2 ) (1 − d1 k + k 2 )
a2 = , a 1 = , a 0 = , b1 = , b0 = ,
D D D D D
where D = (1 + d1 k + k 2 ).
The transfer function of the lowpass digital filter H(z) is obtained as

0.0463(z 2 + 2z + 1)
H(z) =
(z 2 − 1.3059z + 0.4911)

8.2 Design a highpass digital filter with Chebyshev response. The passband and stopband
edge frequencies of the digital filter are fdc = 60 Hz and fds = 30 Hz, respectively. The
maximum passband attenuation is Ac = 1 dB and the minimum stopband attenuation is
As = 11 dB. The sampling frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
   
πfdc π60
ωac = (2fs ) tan = 2(512) tan = 395.0004 rad/sec
fs 512
   
πfds π30
ωas = (2fs ) tan = 2(512) tan = 190.6538 rad/sec
fs 512
Now, we design an analog lowpass filter with ωc = ωas and ωs = ωac .
Step 2: The order of the required filter is found as
q  q 
100.1As −1 100.1(11) −1
cosh−1 10 0.1A c −1
cosh −1
10 0.1(1) −1
N≥ = = 1.9066
cosh−1 ( ωωsc ) cosh−1 ( 395.0004
190.6538 )

To make the filter order an integer, we find the nearest integer greater than or equal to
1.9066 to be N = 2.
Step 3: Find the factored form of the fifth order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.3 as
0.9826
H(s) =
(s2 + 1.0977s + 1.1025)

Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to highpass analog frequency transformation is s = (ωl ωd )/s, where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
With ωl = 1 and ωd = 395.0004, the transformation is s = (395.0004/s).
Step 5: Find the factored form of the fifth order highpass digital filter function.
This transformation
s = (395.0004/s)

78
can be combined with the bilinear transformation as
395.0004 (z + 1) (z + 1) (z + 1)
s= = 0.3857 =k
2fs (z − 1) (z − 1) (z − 1)
Then, using the formulas given earlier, for the second-order section

a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 0.3857,

1 2 1 −2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a 1 = − , a 0 = , b1 = , b0 = ,
D D D D D
where D = (d0 + d1 k + k 2 ).
The transfer function of the Chebyshev highpass digital filter H(z) is obtained as

0.5867(z 2 − 2z + 1)
H(z) =
(z 2 − 1.1389z + 0.4943)

8.3 Design a bandpass digital filter with Butterworth response. The cutoff and stopband
edge frequencies of the filter are fdc1 = 800, fdc2 = 1700 Hz and fds1 = 300, fds2 = 2700
Hz, respectively. The maximum attenuation in the passband is Ac = 3 dB. The minimum
attenuation in the stopband attenuation is As = 11 dB. Let te stopband attenuation be bet-
ter than the specification. Design the bandpass digital filter using the analog Butterworth
filter. The sampling frequency is fs = 8192 Hz.

Step 1: Prewarp the frequencies


In the analog frequency domain, the edge frequencies correspond to
   
πfdc1 π800
ωac1 = (2fs ) tan = 2(8192) tan = 5190.4 rad/sec
fs 8192
   
πfdc2 π1700
ωac2 = (2fs ) tan = 2(8192) tan = 12505 rad/sec
fs 8192
   
πfds1 π300
ωas1 = (2fs ) tan = 2(8192) tan = 1893.3 rad/sec
fs 8192
   
πfds2 π2700
ωas2 = (2fs ) tan = 2(8192) tan = 27623 rad/sec
fs 8192
Bandpass frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ). As-
sume that the passband are edges are fixed. If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), ωas1 has to be
increased or ωas2 has to be decreased. The frequency ωas1 is increased to (ωac1 ωac2 )/ωas2 =
2349.8, since (ωac1 ωac2 ) > (ωas1 ωas2 ). Then, the cutoff frequency of the normalized lowpass
filter becomes
ωc = ωac2 − ωac1 = 7315
The stopband edge frequency becomes

ωs = ωas2 − ωas1 = 25273

Step 2: The required order N of the filter has to be determined.


The order of the required filter is found as
 0.1A   0.1(11) 
s −1
log10 1010 0.1A c −1
log 10
10 −1
100.1(3) −1
N≥ = = 0.9900
2 log10 ( ωωsc ) 2 log10 ( 25273
7315 )

79
To make the filter order an integer, we find the nearest integer greater than or equal to
0.9900 to be N = 1.
Step 3: Find the factored form of the third order normalized analog lowpass Butter filter
transfer function.
The transfer function is given in Table 8.1 as

1
H(s) =
(s + 1)

Step 4: The center frequency of the bandpass filter is


p p
Wo = (ωac1 ωac2 ) = (ωas1 ωas2 ) = 8056.6

The factored form of the second order denormalized Butterworth analog bandpass filter
s
transfer function, in terms of sn , where sn = Wo .
The lowpass to bandpass frequency transformation is

s2 + ωd1 ωd2
s = ωl
s(ωd2 − ωd1 )

where ωl is the reference frequency of the normalized lowpass filter and ωd1 and ωd2 are the
corresponding desired frequencies of the bandpass filter. Let us specify that the specification
of the lowpass filter is to be met exactly at the passband edge frequency. In this case, the
passband edge frequency of the normalized lowpass filter is computed as

ωl = (100.1Ac − 1)1/(2N ) = (100.1(3) − 1)1/(2(1)) = 0.9976

The passband bandwidth Bw is


ωac2 − ωac1
= 7315/0.9976 = 7332.4
ωl

For this design, the frequency transformation becomes

s2 + ωac1 ωac2 s2 + Wo2 s2 + (8056.6)2 (s/8056.6)2 + 1 s2 + 1


s= = = = = n
7332.4s 7332.4s 7332.4s 0.9101(s/8056.6) 0.9101sn

This transformation is applied to the first-order denominator terms of the normalized trans-
fer function. The order of the filter doubles to N = 2. The numerator is

(0.9101sn )N = (0.9101sn ),

where 0.9101 is the constant in the denominator of the transformation formula. The transfer
function H(sn ) is

0.9101sn
H(sn ) =
(sn + 0.9101sn + 1)

Step 5: Find the factored form of the eighth order bandpass digital filter.
The transformation sn = sn /Wo = sn /8056.6 can be combined with the bilinear transfor-
mation as
2fs (z − 1) (z − 1) (z − 1)
sn = = 2.0336 =k
8056.6 (z + 1) (z + 1) (z + 1)
Then, for the second-order section, we get

k −k 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a1 = 0, a0 = , b1 = , b0 = ,
D D D D

80
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as

0.2649(z 2 − 1)
H(z) =
(z 2 − 0.8976z + 0.4702)

The constant is the product of the k/D term multiplied by 0.9101.


8.4 Design a bandstop digital filter with Chebyshev response. The cutoff and stopband edge
frequencies of a bandstop filter are fdc1 = 300, fdc2 = 2700 Hz and fds1 = 800, fds2 = 1700
Hz, respectively. The maximum passband attenuation is specified as Ac = 3 dB. The
minimum stopband attenuation is specified as As = 10 dB. Design the bandstop digital
filter using the analog Chebyshev filter. The sampling frequency is fs = 8192 Hz.
Step 1: Prewarp the frequencies and find the specification of the prototype lowpass filter.
We prewarp the frequencies to get
   
πfdc1 π300
ωac1 = (2fs ) tan = 2(8192) tan = 1893.3 rad/sec
fs 8192
   
πfdc2 π2700
ωac2 = (2fs ) tan = 2(8192) tan = 27623 rad/sec
fs 8192
   
πfds1 π800
ωas1 = (2fs ) tan = 2(8192) tan = 5190.4 rad/sec
fs 8192
   
πfds2 π1700
ωas2 = (2fs ) tan = 2(8192) tan = 12505 rad/sec
fs 8192
The bandstop frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ).
If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), with fixed passband edges, ωas1 has to be decreased or ωas2 has
to be increased. The frequency ωas1 is decreased to (ωac1 ωac2 )/ωas2 = 4182 since
(ωac1 ωac2 ) < (ωas1 ωas2 ). Now, we design a lowpass filter with cutoff frequency ωc = ωas2 −
ωas1 = 8323.4 and stopband edge frequency ωs = ωac2 − ωac1 = 25729.
Step 2: Find the required filter order N .
The order of the required filter is found as
q  q 
100.1As −1 100.1(10) −1
cosh−1 10 0.1A c −1
cosh −1
10 0.1(3) −1
N≥ = = 0.9823
cosh−1 ( ωωsc ) cosh−1 ( 8323.4
25729
)

As the filter order must be an integer, by rounding 0.9837 up to the nearest integer, we get
N = 1.
Step 3: Find the factored form of the second order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.6 as
1
H(s) =
(s + 1)

Step 4: Find the factored form of the fourth order denormalized Chebyshev analog bandstop
s
filter transfer function in terms of sn , where sn = Wo and Wo = 7231.7 is the center
frequency of the bandstop filter. The frequency transformation for lowpass to bandstop is

s(ωc2 − ωc1 )
s=
s2 + ωc1 ωc2
For this design, the frequency transformation becomes

25729s Bws 25729s 3.5578(s/7231.7)


s= = 2 = 2 =
s2 + ωc1 ωc2 s + Wo2 s + (7231.7)2 (s/7231.7)2 + 1

81
We apply this transformation to the first-order denominator polynomial. The first order
polynomial (s + a) transforms to

(s2n + a1 sn + 1), a1 = Bw/(a Wo)

with the numerator (1/a)(s2n + 1). where sn = s/Wo. The transfer function H(sn ) is
(s2n + 1)
(s2n + 3.5578n + 1)
Step 5: Find the second-order digital bandstop filter.
The transformation sn = s/Wo = s/7231.7 can be combined with the bilinear transforma-
tion as
2fs (z − 1) (z − 1) (z − 1)
s= = 2.2656 =k
7231.7 (z + 1) (z + 1) (z + 1)
Then, for the second-order section, we get
1 + k2 2(1 − k 2 ) 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = a0 = , a1 = , b1 = , b0 = ,
D D D D
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as
0.4321(z 2 − 1.3478z + 1)
(z 2 − 0.5824z − 0.1358)
The constant 0.4321 in the numerator is the (1 + k 2 )/D.
8.5
Design a lowpass digital filter with Butterworth response. The passband and stopband
edge frequencies of the digital filter are fdc = 51 Hz and fds = 81 Hz, respectively. The
maximum passband attenuation is Ac = 3 dB and the minimum stopband attenuation is
As = 17 dB. Let te stopband attenuation be better than the specification. The sampling
frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies.
In the analog frequency domain, the prewarped edge frequencies, which are slightly higher
than the specified ones, correspond to
   
πfdc π51
ωac = (2fs ) tan = 2(512) tan = 331.3290 rad/sec
fs 512
   
πfds π81
ωas = (2fs ) tan = 2(512) tan = 555.4444 rad/sec
fs 512
For example, fdc = 51 Hz corresponds to 52.7326 Hz. Now, we find the transfer function of
the analog lowpass filter with ωc = ωac and ωs = ωas .
Step 2: The required order N of the filter has to be determined.
The order of the required filter is found as
 0.1A   0.1(17) 
s −1
log10 10
100.1Ac −1
log 10
10 −1
100.1(3) −1
N≥ = = 3.7733
2 log10 ( ωωsc ) 555.4444
2 log10 ( 331.3290 )

To make the filter order an integer, we find the nearest integer greater than or equal to
3.7733 to be N = 4.
Step 3: Find the factored form of the fifth order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 0.7654s + 1)(s2 + 1.8478s + 1)

82
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to lowpass analog frequency transformation is s = ωl s/ωd , where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
The normalized reference frequency ωl has to be computed. As the estimated filter order
N is usually a real value, it is rounded to the nearest higher integer. Due to this, the
filter performance becomes better at the edge frequencies. Now, we have three choices. We
can specify that the filter performs better at both the edge frequencies or one of the edge
frequencies and meeting the given specification at the other.
We can specify that the specification of the filter is to be met exactly at the cutoff
frequency. The cutoff frequency of the normalized filter, with the attenuation to be exact
as specified, is computed as

ωl = (100.1Ac − 1)1/(2N ) = (100.1(3) − 1)1/(2(4)) = 0.9994

With the desired prewarped cutoff frequency ωac = 331.3290, the frequency transformation
is given by
0.9994s s
s= =
331.3290 331.5258
Step 5: Find the factored form of the fifth order lowpass digital filter transfer function.
This transformation
0.9994s s
s= =
331.3290 331.5258
can be combined with the bilinear transformation as
2fs (z − 1) (z − 1) (z − 1)
s= = 3.0887 =k
331.4896 (z + 1) (z + 1) (z + 1)
Then, using the formulas given earlier, for each second-order section

a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 3.0887,

1 2 1 2(1 − k 2 ) (1 − d1 k + k 2 )
a2 = , a 1 = , a 0 = , b1 = , b0 = ,
D D D D D
where D = (1+d1 k +k 2 ). The transfer function of the lowpass digital filter H(z) is obtained
as
0.0048(z 2 + 2z + 1)(z 2 + 2z + 1)
H(z) =
(z 2 − 1.0513z + 0.2975)(z 2 − 1.3236z + 0.6336)

8.6 Design a highpass digital filter with Chebyshev response. The passband and stopband
edge frequencies of the digital filter are fdc = 60 Hz and fds = 40 Hz, respectively. The
maximum passband attenuation is Ac = 2 dB and the minimum stopband attenuation is
As = 31 dB. The sampling frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
   
πfdc π60
ωac = (2fs ) tan = 2(512) tan = 395.0004 rad/sec
fs 512
   
πfds π40
ωas = (2fs ) tan = 2(512) tan = 256.4986 rad/sec
fs 512
Now, we design an analog lowpass filter with ωc = ωas and ωs = ωac .

83
Step 2: The required order N of the filter has to be determined.
The order of the required filter is found as
q  q 
100.1As −1 100.1(31) −1
cosh−1 100.1Ac −1
cosh−1 100.1(2) −1
N≥ = = 4.5418
cosh−1 ( ωωsc ) cosh−1 ( 395.0004
256.4986 )

To make the filter order an integer, we find the nearest integer greater than or equal to
4.5418 to be N = 5.
Step 3: Find the factored form of the fifth order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.3 as
0.0817
H(s) =
(s + 0.2183)(s2 + 0.1349s + 0.9522)(s2 + 0.3532s + 0.3932)
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to highpass analog frequency transformation is s = (ωl ωd )/s, where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
With ωl = 1 and ωd = 395.0004, the transformation is s = (395.0004/s).
Step 5: Find the factored form of the fifth order highpass digital filter function.
This transformation
s = (395.0004/s)
can be combined with the bilinear transformation as
395.0004 (z + 1) (z + 1) (z + 1)
s= = 0.3857 =k
2fs (z − 1) (z − 1) (z − 1)
Then, using the formulas given earlier, for each second-order section

a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 0.3857,

1 2 1 −2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a 1 = − , a 0 = , b1 = , b0 = ,
D D D D D
where D = (d0 + d1 k + k 2 ). For the first-order section, the transformation yields
1
(z+1)
k (z−1) + 0.2183

The transfer function of the Chebyshev highpass digital filter H(z) is obtained as

0.1730(z 2 − 2z + 1)(z 2 − 2z + 1)(z − 1)


H(z) =
(z 2 − 0.7206z + 0.5982)(z 2 − 1.3935z + 0.9097)(z + 0.2772)

8.7
Design a bandpass digital filter with Butterworth response. The cutoff and stopband
edge frequencies of the filter are fdc1 = 800, fdc2 = 1700 Hz and fds1 = 300, fds2 = 2700
Hz, respectively. The maximum attenuation in the passband is Ac = 2 dB. The minimum
attenuation in the stopband attenuation is As = 15 dB. Let te stopband attenuation be bet-
ter than the specification. Design the bandpass digital filter using the analog Butterworth
filter. The sampling frequency is fs = 8192 Hz.

84
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
   
πfdc1 π800
ωac1 = (2fs ) tan = 2(8192) tan = 5190.4 rad/sec
fs 8192
   
πfdc2 π1700
ωac2 = (2fs ) tan = 2(8192) tan = 12505 rad/sec
fs 8192
   
πfds1 π300
ωas1 = (2fs ) tan = 2(8192) tan = 1893.3 rad/sec
fs 8192
   
πfds2 π2700
ωas2 = (2fs ) tan = 2(8192) tan = 27623 rad/sec
fs 8192
Bandpass frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ). As-
sume that the passband are edges are fixed. If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), ωas1 has to be
increased or ωas2 has to be decreased. The frequency ωas1 is increased to (ωac1 ωac2 )/ωas2 =
2349.8, since (ωac1 ωac2 ) > (ωas1 ωas2 ). Then, the cutoff frequency of the normalized lowpass
filter becomes
ωc = ωac2 − ωac1 = 7315
The stopband edge frequency becomes

ωs = ωas2 − ωas1 = 25273

Step 2: The required order N of the filter has to be determined.


The order of the required filter is found as
 0.1A   0.1(15) 
s −1
log10 1010 0.1A c −1
log 10
10 −1
100.1(2) −1
N≥ = = 1.5963
2 log10 ( ωωsc ) 2 log10 ( 25273
7315 )

To make the filter order an integer, we find the nearest integer greater than or equal to
1.5963 to be N = 2.
Step 3: Find the factored form of the second-order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 1.4142s + 1)

Step 4: The center frequency of the bandpass filter is


p p
Wo = (ωac1 ωac2 ) = (ωas1 ωas2 ) = 8056.6

The factored form of the sixth order denormalized Butterworth analog bandpass filter trans-
s
fer function, in terms of sn , where sn = Wo .
The lowpass to bandpass frequency transformation is

s2 + ωd1 ωd2
s = ωl
s(ωd2 − ωd1 )

where ωl is the reference frequency of the normalized lowpass filter and ωd1 and ωd2 are the
corresponding desired frequencies of the bandpass filter. Let us specify that the specification
of the lowpass filter is to be met exactly at the passband edge frequency. In this case, the
passband edge frequency of the normalized lowpass filter is computed as

ωl = (100.1Ac − 1)1/(2N ) = (100.1(1) − 1)1/(2(3)) = 0.7984

85
The passband bandwidth Bw is
ωas2 − ωas1
= 7315/0.7984 = 9162.6
ωl
For this design, the frequency transformation becomes

s2 + ωac1 ωac2 s2 + Wo2 s2 + (8056.6)2 (s/8056.6)2 + 1 s2 + 1


s= = = = = n
9162.6s 9162.6s 9162.6s 1.1373(s/8056.6) 1.1373sn
This transformation is applied to the second-order denominator terms of the normalized
transfer function. The order of the filter doubles to N = 4. The polynomial

(s2 + as + b) becomes (s2n + a1 sn + b1 )(s2n + a2 sn + b2 ),

where
√ sn = s/Wo. The constants a1 , a2 , b1 , and b2 are computed as follows. Let x =
+ b, y = x/a, z = (Bw/Wo)x, and p = 1 + z42 . Then,
v s
u
y u 4
m = √ t p + p2 − 2
2 (yz)

Let q = zm/y. Then,


p p
n1 = 0.5(q + q 2 − 4), n2 = 0.5(q − q 2 − 4)
b1 = n21 , b2 = n22 , a1 = n1 /m, a2 = n2 /m

The numerator is
(1.1373sn )N = 1.2935s2n ,
where 1.1373 is the constant in the denominator of the transformation formula. The transfer
function H(sn ) is

1.2935s2n
H(sn ) =
(s2n + 1.0013sn + 2.1439)(s2n + 0.4670sn + 0.4664)
Step 5: Find the factored form of the eighth order bandpass digital filter.
The transformation sn = sn /Wo = sn /8056.6 can be combined with the bilinear transfor-
mation as
2fs (z − 1) (z − 1) (z − 1)
sn = = 2.0336 =k
8056.6 (z + 1) (z + 1) (z + 1)
Then, for each second-order section, we get

k −k 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a1 = 0, a0 = , b1 = , b0 = ,
D D D D
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as

0.0966(z 2 − 2z + 1)(z 2 + 2z + 1)
H(z) =
(z 2 − 0.4790z + 0.5103)(z 2 − 1.3218z + 0.6579)

The constant is the product of the k/D terms of each of the two second-order terms multi-
plied by 1.2935.
8.8 The cutoff and stopband edge frequencies of a bandstop filter are fdc1 = 600, fdc2 = 5400
Hz and fds1 = 1600, fds2 = 3400 Hz, respectively. The maximum passband attenuation is
specified as Ac = 2 dB. The minimum stopband attenuation is specified as As = 15 dB.
Design the bandstop digital filter using the analog Chebyshev filter. The sampling frequency
is fs = 16384 Hz.

86
Step 1: Prewarp the frequencies and find the specification of the prototype lowpass filter.
We prewarp the frequencies to get
   
πfdc1 π600
ωac1 = (2fs ) tan = 2(16384) tan = 3786.6 rad/sec
fs 16384
   
πfdc2 π5400
ωac2 = (2fs ) tan = 2(16384) tan = 55245 rad/sec
fs 16384
   
πfds1 π1600
ωas1 = (2fs ) tan = 2(16384) tan = 10381 rad/sec
fs 16384
   
πfds2 π3400
ωas2 = (2fs ) tan = 2(16384) tan = 25011 rad/sec
fs 16384
The bandstop frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ).
If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), with fixed passband edges, ωas1 has to be decreased or ωas2 has
to be increased. The frequency ωas1 is decreased to (ωac1 ωac2 )/ωas2 = 8364.1 since
(ωac1 ωac2 ) < (ωas1 ωas2 ). Now, we design a lowpass filter with cutoff frequency ωc = ωac2 −
ωac1 = 51458 and stopband edge frequency ωs = ωas2 − ωas1 = 16647.
Step 2: Find the required filter order N .
The order of the required filter is found as
q  q 
100.1As −1 100.1(15) −1
cosh−1 100.1Ac −1
cosh−1 10 0.1(2) −1
N≥ = = 1.4865
cosh−1 ( ωωsc ) cosh−1 ( 51458
16647 )

As the filter order must be an integer, by rounding 1.4865 up to the nearest integer, we get
N = 2.
Step 3: Find the factored form of the second order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.4 as
0.65378
H(s) =
(s2 + 0.80382s + 0.82306)

Step 4: Find the factored form of the fourth order denormalized Chebyshev analog bandstop
s √
filter transfer function in terms of sn , where sn = Wo and Wo = ωc1 ωc2 = 14463 is
the center frequency of the bandstop filter. The frequency transformation for lowpass to
bandstop is
s(ωc2 − ωc1 )
s= 2
s + ωc1 ωc2
For this design, the frequency transformation becomes

Bw s Bw s 51458s 3.5578(s/14463)
s= = 2 = 2 =
s2 + ωc1 ωc2 s + Wo2 s + (14463)2 (s/14463)2 + 1

The polynomial

(s2 + as + b) becomes (s2n + a1 sn + b1 )(s2n + a2 sn + b2 ),

where
√ sn = s/Wo. The constants a1 , a2 , b1 , and b2 are computed as follows. Let x =
+ b, y = x/a, z = Bw/(Wo x), and p = 1 + z42 . Then,
v s
u
y u 4
m = √ tp + p 2 − 2
2 (yz)

87
Let q = zm/y. Then,
p p
n1 = 0.5(q + q 2 − 4) n2 = 0.5(q − q 2 − 4)
b1 = n21 , b2 = n22 , a1 = n1 /m, a2 = n2 /m

The numerator is 0.65378(1/b)(s2n + 1)2 . The transfer function H(sn ) is

0.7943(s2n + 1)2
(s2n + 3.2780sn + 16.6748)(s2n + 0.1966sn + 0.06)

Step 5: Find the factored form of the fourth order digital bandstop filter.
The transformation sn = s/Wo = s/14463 can be combined with the bilinear transformation
as
2fs (z − 1) (z − 1) (z − 1)
s= = 2.2656 =k
14463 (z + 1) (z + 1) (z + 1)
Then, for each second-order section, we get

1 + k2 2(1 − k 2 ) 2(d0 − k 2 ) (d0 − d1 k + k 2 )


a2 = a0 = , a1 = , b1 = , b0 = ,
D D D D
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as

0.1813(z 2 − 1.3478z + 1)(z 2 − 1.3478z + 1)


(z 2 + 0.7896z + 0.4919)(z 2 − 1.7995z + 0.8420)

The constant 0.1813 in the numerator is the product of the (1 + k 2 )/D of the two terms and
the constant 0.7943.

88
Chapter 9

9.1 Given the nonzero samples of x(n), find its DTFT X(ejω ). Express the DTFT Xd (ejω )
of x(M n) in terms of X(ejω ) using the formula
M −1
1 X ω−2πk
Xd (ejω ) = X(ej( M ) )
M
k=0

Verify that the inverse of Xd (ejω ) is the same as x(M n). Approximate the DTFT and
inverse DTFT, respectively, by DFT and IDFT.
9.1.1
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M = 1
9.1.2
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M =2
* 9.1.3
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M =3

9.1.1
Xd (ejω ) = X(ejω )
9.1.2
1
1X ω−2πk
Xd (ejω ) = X(ej( 2 ) )
2
k=0

With k = 0, the partial DFT samples, using the defining equation, are

{1.5, 1.9749 − j1.8536, −2 − j3.5, −2.9749 + j1.1464}

With k = 1, the partial DFT samples, using the defining equation, are

{0.5, −2.9749 − j1.1464, −2 + j3.5, 1.9749 + j1.8536}

The sum of the two 4-point DFT is

Xd (k) = {2, −1 − j3, −4, −1 + j3}

The 2-point of IDFT of Xd (0) = 2, Xd (2) = −4

xd (0) = −1, xd (1) = 3

9.1.3
2
1X ω−2πk
Xd (ejω ) = X(ej( 3 ) )
3
k=0

With k = 0, the partial DFT samples, using the defining equation, are

{1, 1.1856−j0.2328, 1.3617−j0.9758, 0.8333−j2.0207, −0.5415−j2.5211, −2.0046−j1.8371}

89
With k = 1, the partial DFT samples, using the defining equation, are

{−2.5000+j0.2887, −2.0046+j1.8371, −0.5415+j2.5211, 0.8333+j2.0207, 1.3617+j0.9758, 1.1856+j0.23

With k = 2, the partial DFT samples, using the defining equation, are

{−2.5000−j0.2887, −1.6811+j0.9938, −0.3202+j1.0528, 0.3333, −0.3202−j1.0528, −1.6811−j0.9938}

The sum of the three 6-point DFT is

Xd (k) = {−4, −2.5 + j2.5981, 0.5 + j2.5981, 2, 0.5 − j2.5981, −2.5 − j2.5981}

The 2-point of IDFT of Xd (0) = −4, Xd (3) = 2

xd (0) = −1, xd (1) = −3

9.2 Given the samples over one period of a periodic signal x(n) starting with index 0, find
its DTFT X(ejω ). Filter X(ejω ) by an ideal lowpass filter with cutoff frequency π/M . Find
the inverse of the filtered spectrum and downsample by a factor of M to get the decimated
version xdec (n) of x(n). Approximate the DTFT and inverse DTFT, respectively, by DFT
and IDFT.
9.2.1

x(n) = {2, 0.8660, −0.5, 0, 0.5, −0.8660, −2, −0.8660, 0.5, 0, −0.5, 0.8660}, M =4

The DFT of x(n) is


X(k) = {0, 6, 0, 6, 0, 0, 0, 0, 0, 6, 0, 6}
After filtering,
Xf (k) = {0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}
The IDFT of Xf (k) is

xf (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}

Downsampling by a factor M = 4, we get

xdec (n) = {1, −0.5, −0.5}

9.2.2
x(n) = {2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1}, M =4
The DFT of x(n) is
X(k) = {12, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0}
After filtering,
Xf (k) = {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
The IDFT of Xf (k) is
xf (n) = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
Downsampling by a factor M = 4, we get

xdec (n) = {1, 1, 1}

9.2.3

x(n) = {2, −0.1340, 1.5, −1, 0.5, −1.8660, 0, −1.8660, 0.5, −1, 1.5, −0.1340}, M =2

90
The DFT of x(n) is
X(k) = {0, 6, 0, 0, 0, 0, 12, 0, 0, 0, 0, 6}
After filtering,
Xf (k) = {0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}
The IDFT of Xf (k) is

xf (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}

Downsampling by a factor M = 2, we get

xdec (n) = {1, 0.5, −0.5, −1, −0.5, 0.5}

9.3 Given the nonzero samples of x(n), find its DTFT X(ejω ). Express the DTFT Xu (ejω )
of x(n/L) in terms of X(ejω ) using the formula

Xu (ejω ) = X(ejLω ), 0 < ω < 2π

Verify that the inverse of Xu (ejω ) is the same as x(n/L). Approximate the DTFT and
inverse DTFT, respectively, by DFT and IDFT.
9.3.1
x(n) = {2, 1, 3, 4}, L = 2
The DFT of x(n) is
X(k) = {10, −1 + j3, 0, −1 − j3}
The DFT of xu (n) is

Xu (k) = {10, −1 + j3, 0, −1 − j3, 10, −1 + j3, 0, −1 − j3}

The IDFT of Xu (k) is


xu (n) = {2, 0, 1, 0, 3, 0, 4, 0}

9.3.2
x(n) = {2, 1, 3, 4}, L=3
The DFT of x(n) is
X(k) = {10, −1 + j3, 0, −1 − j3}
The DFT of xu (n) is

Xu (k) = {10, −1 + j3, 0, −1 − j3, 10, −1 + j3, 0, −1 − j3, 10, −1 + j3, 0, −1 − j3}

The IDFT of Xu (k) is


xu (n) = {2, 0, 0, 1, 0, 0, 3, 0, 0, 4, 0, 0}

9.3.3
x(n) = {2, 3}, L=4
The DFT of x(n) is
X(k) = {5, −1}
The DFT of xu (n) is
Xu (k) = {5, −1, 5, −1, 5, −1, 5, −1}
The IDFT of Xu (k) is
xu (n) = {2, 0, 0, 0, 3, 0, 0, 0}

91
9.4 Given the samples over one period of a periodic signal x(n) starting with index 0, find
its DTFT X(ejω ). Express the DTFT Xu (ejω ) of x(n/L) in terms of X(ejω ) using the
formula
Xu (ejω ) = X(ejLω ), 0 < ω < 2π
Filter Xu (ejω ) by an ideal lowpass filter with cutoff frequency π/L. Find the inverse of the
filtered spectrum multiplied by L to get the interpolated version xi (n) of x(n). Approximate
the DTFT and inverse DTFT, respectively, by DFT and IDFT.
9.4.1
x(n) = {1, 0, −1, 0}, L = 2
The DFT of x(n) is
X(k) = {0, 2, 0, 2}
Xu (k) = {0, 2, 0, 2, 0, 2, 0, 2}
The filtered spectrum is
Xu (k) = {0, 2, 0, 0, 0, 0, 0, 2}
The IDFT of the filtered spectrum multiplied by 2 is

xi (n) = {1, 0.7071, 0, −0.7071, −1, −0.7071, 0, 0.7071}

9.4.2
x(n) = {0, 1, 0, −1}, L=3
The DFT of x(n) is
X(k) = {0, −j2, 0, j2}
Xu (k) = {0, −j2, 0, j2, 0, −j2, 0, j2, 0, −j2, 0, j2}
The filtered spectrum is
{0, −j2, 0, 0, 0, 0, 0, 0, 0, 0, 0, j2}
The IDFT of the filtered spectrum multiplied by 3 is

xi (n) = {0, 0.5, 0.8660, 1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5}

9.5 Find the convolution of x(n) and h(n) in the time domain: (i) directly and (2) convolving
x(n) with he (n) and ho (n).
9.5.1
x(0) = 1, x(1) = 0, x(2) = 3, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1

9.5.2
x(0) = 1, x(1) = 0, x(2) = 1, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1

9.5.3
x(0) = 4, x(1) = 0, x(2) = 1, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1

92
k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 1 0 3 0 x(k) 1 3
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 3 −2 10 −6 3 y(n) 3 −2 10 −6 3
(a) (b)
Figure 1: 9.5.1 (a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output

k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 1 0 1 0 x(k) 1 1
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 3 −2 4 −2 1 y(n) 3 −2 4 −2 1
(a) (b)
Figure 2: 9.5.2 (a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output

k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 4 0 1 0 x(k) 4 1
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 12 −8 7 −2 1 y(n) 12 −8 7 −2 1
(a) (b)
Figure 3: 9.5.3(a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output

93
9.6 Given a periodic signal x(n), find its sampling rate converted version y(n) by a factor
L/M using DFT and IDFT.
9.6.1

x(n) = cos( n), L = 3, M = 2
4

x(n) = {1, 0, −1, 0}


Its DFT is
X(k) = {0, 2, 0, 2}
xu (n) = {1, 0, 0, 0, 0, 0, −1, 0, 0, 0, 0, 0}
3Xf (k) = {0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}
xi (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}
Downsample by 2. The spectral rate sampled signal and its DFT are

y(n) = {1, 0.5, −0.5, −1, −0.5, 0.5}

Y (k) = {0, 3, 0, 0, 0, 3}

9.6.2

x(n) = cos( n), L = 2, M =3
6

x(n) = {1, 0.5, −0.5, −1, −0.5, 0.5}


Its DFT is
X(k) = {0, 3, 0, 0, 0, 3}
xu (n) = {1, 0, 0.5, 0, −0.5, 0, −1, 0, −0.5, 0, 0.5, 0}
2Xf (k) = {0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}
xi (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}
Downsample by 3. The spectral rate sampled signal and its DFT are

y(n) = {1, 0, −1, 0}

Y (k) = {0, 2, 0, 2}

9.7 Let the nonzero values of the input signal and the impulse response of the filter, with
the starting index zero, be, respectively,

x(n) = {3, 1, 2, 4, −3, 2, 1, 1, 2, 3, 2, 4} and h(n) = {2, −1, 3, 1, 2}

Find the every second, M = 2, convolution output of x(n) and h(n) directly and by the
polyphase approach.
The complete output y(n) of convolving h(n) and x(n) is

y(n) = x(n) ∗ h(n) = {6, −1, 12, 12, 3, 23, −1, 12, 2, 12, 10, 19, 9, 20, 8, 8}

The decimated output, with M = 2, is

{6, 12, 3, −1, 2, 10, 9, 8}

94
First, zero-pad the impulse response to make its length equal to an integral multiple of
M = 2 to get
h(n) = {2, −1, 3, 1, 2, 0}
By grouping the even- and odd-indexed values, we get

h1(n) = {2, 3, 2} and h2(n) = {−1, 1, 0}

The input data is grouped as

x1(n) = {3, 2, −3, 1, 2, 2, 0} and x2(n) = {0, 1, 4, 2, 1, 3, 4}

The initial value 0 in the second group is x(−1).


The outputs of convolving the even- and odd-indexed coefficients of h(n) with those of
x(n) are, respectively,
{6, 13, 6, −3, 1, 12, 10, 4, 0}
{0, −1, −3, 2, 1, −2, −1, 4, 0}
The decimated output is the sum of the partial results

{6, 12, 3, −1, 2, 10, 9, 8, 0}

9.8 Let the input signal and the impulse response of the filter be, respectively,

x(n) = {2, 1, −3, 4} and h(n) = {2, 2, 3, 1}

The interpolation factor is L = 2 and xu (n) = {2, 0, 1, 0, −3, 0, 4, 0}. Find the convolution
of xu (n) and h(n) using the direct and polyphase method.
The upsampled input is
xu (n) = {2, 0, 1, 0, −3, 0, 4, 0}
The convolution output of convolving h(n) and xu (n) is

xu (n) ∗ h(n) = {4, 4, 8, 4, −3, −5, −1, 5, 12, 4, 0}

The subfilters are


h1 = {2, 3} and h2 = {2, 1}
The convolution of x(n) with the subfilters yield

y1 = {4, 8, −3, −1, 12} and y2 = {4, 4, −5, 5, 4}

The output y(n) is obtained by interleaving the two partial outputs, which is the same that
obtained by the direct method.

9.9 Using the Haar transform matrix, find the DWT of x(n). Verify that x(n) is recon-
structed by computing the IDWT. Verify Parseval’s theorem.

{x(0) = 1, x(1) = 2}
      
Xφ (0, 0) 1 1 1 1 2.1213
=√ =
Xψ (0, 0) 2 1 −1 2 −0.7071

      
x(0) 1 1 1 2.1213 1
=√ =
x(1) 2 1 −1 −0.7071 2

12 + (2)2 = 5 = (2.1213)2 + (−0.7071)2

95
9.10 Using the Haar transform matrix, find the 1-level DWT of x(n). Verify that x(n) is
reconstructed by computing the IDWT. Verify Parseval’s theorem.

{x(0) = 2, x(1) = 1, x(2) = 3, x(3) = 4}


      
Xφ (1, 0) 1 1 0 0 2 2.1213
 Xφ (1, 1)  1  0 0 1 1   1   4.9497 
 Xψ (1, 0)  = √2  1
    = 
−1 0 0  3   0.7071 
Xψ (1, 1) 0 0 1 −1 4 −0.7071

The inverse is
      
x(0) 1 0 1 0 2.1213 2
 x(1)  1  1 0 −1 0   4.9497   1 
 x(2)  = √2  0 1
    = 
0 1   0.7071   3 
x(3) 0 1 0 −1 −0.7071 4

22 + (1)2 + 32 + (4)2 + = 30 = (2.1213)2 + (−0.7071)2 + (4.9497)2 + (0.7071)2

96
Chapter 10

10.1 Given the samples of a waveform x(n), find the samples of its even half-wave symmetric
and odd half-wave symmetric components. Verify that the sum of the samples of the two
components add up to the samples of x(n). Compute the DFT of x(n) and its components.
Verify that the DFT of the even half-wave symmetric component consists of zero-valued odd-
indexed spectral values. Verify that the DFT of the odd half-wave symmetric component
consists of zero-valued even-indexed spectral values.
10.1.1 x(n) = {0̌, 1, 2, 3}.
10.1.2 x(n) = {0̌, 1, 0, 1}.
10.1.3 x(n) = {1̌, 3, −1, −3}.
10.1.4 x(n) = {2̌, 1, 3, 4}.
10.1.5 x(n) = {3̌, 1, 2, 4}.
10.1.1
xe(n) = {1, 2, 1, 2}, xo(n) = {−1, −1, 1, 1}
X(k) = {6, −2 + j2, −2, −2 − j2}, Xe(k) = {6, 0, −2, 0}, Xo(k) = {0, −2 + j2, 0, −2 − j2}
10.1.2
xe(n) = {0, 1, 0, 1}, xo(n) = {0, 0, 0, 0}
X(k) = {2, 0, −2, 0}, Xe(k) = {2, 0, −2, 0}, Xo(k) = {0, 0, 0, 0}
10.1.3
xe(n) = {0, 0, 0, 0}, xo(n) = {1, 3, −1, −3}
X(k) = {0, 2 − j6, 0, 2 + j6}, Xe(k) = {0, 0, 0, 0}, Xo(k) = {0, 2 − j6, 0, 2 + j6}
10.1.4
xe(n) = {2.5, 2.5, 2.5, 2.5}, xo(n) = {−0.5, −1.5, 0.5, 1.5}
X(k) = {10, −1 + j3, 0, −1 − j3}, Xe(k) = {10, 0, 0, 0}, Xo(k) = {0, −1 + j3, 0, −1 − j3}
10.1.5
xe(n) = {2.5, 2.5, 2.5, 2.5}, xo(n) = {0.5, −1.5, −0.5, 1.5}
X(k) = {10, 1 + j3, 0, 1 − j3}, Xe(k) = {10, 0, 0, 0}, Xo(k) = {0, 1 + j3, 0, 1 − j3}
10.2 Given a waveform x(n) with period 8, find the samples of the waveform. (a) Give
the trace of the PM DIF DFT algorithm in computing its DFT X(k). (b) Give the trace of
the PM DIT DFT algorithm in computing its DFT X(k). Verify that both are the same.
In both cases, find the IDFT of X(k) using the same DFT algorithms, give the trace and
verify that the samples of the input x(n) are obtained.
2π π
10.2.1 x(n) = −2e−j( 8 n+ 6 )
2π π
10.2.2 x(n) = −e−j( 8 6n− 3 )
2π π 2π π
10.2.3 x(n) = ej( 8 0n− 3 ) + ej( 8 4n− 6 )
2π π 2π π
10.2.4 x(n) = −ej( 8 n+ 4 ) + ej( 8 2n+ 6 )

97
2π π 2π π
10.2.5 x(n) = 3ej( 8 6n− 4 ) + ej( 8 7n+ 3 )

10.2.1

x(n) = {−1.7321 + j1, −0.5176 + j1.9319, 1 + j1.7321, 1.9319 + j0.5176,

1.7321 − j1, 0.5176 − j1.9319, −1 − j1.7321, −1.9319 − j0.5176}


X(k) = {0, 0, 0, 0, 0, 0, 0, −13.8564 + j8}
10.2.2

x(n) = {−0.5000 − j0.8660, 0.8660 − j0.5000, 0.5000 + j0.8660, −0.8660 + j0.5000

−0.5000 − j0.8660, 0.8660 − j0.5000, 0.5000 + j0.8660, −0.8660 + j0.5000}


X(k) = {0, 0, −4.0000 − j6.9282, 0, 0, 0, 0, 0}
10.2.3

x(n) = {1.3660 − j1.3660, −0.3660 − j0.3660, 1.3660 − j1.3660, −0.3660 − j0.3660,

1.3660 − j1.3660, −0.3660 − j0.3660, 1.3660 − j1.3660, −0.3660 − j0.3660}


X(k) = {4 − j6.9282, 0, 0, 0, 6.9282 − j4, 0, 0, 0}
10.2.4

x(n) = {0.1589 − j0.2071, −0.5000 − j0.1340, −0.1589 − j1.2071, 1.5000 − j0.8660

1.5731 + j1.2071, −0.5000 + j1.8660, −1.5731 + j0.2071, −0.5000 − j0.8660}


X(k) = {0, −5.6569 − j5.6569, 6.9282 + j4, 0, 0, 0, 0, 0}
10.2.5

x(n) = {2.6213 − j1.2553, −1.1554 − j1.8625, −1.2553 + j1.6213, 2.3801 + j1.1554,

1.6213 − j2.9873, −3.0872 − j2.3801, −2.9873 + j2.6213, 1.8625 + j3.0872}


X(k) = {0, 0, 0, 0, 0, 0, 16.9706 − j16.970, 4.0000 + j6.9282}
10.3 Given two waveforms x(n) and y(n) with period 8, find the samples of the waveforms.
Use the PM DIT DFT algorithm for complex data to find their DFTs using the algorithm
for computing the DFTs of two real data sets simultaneously. Compute the IDFTs of the
DFTs using a DFT algorithm for complex data sets simultaneously. Verify the DFT X(k)
and Y (k) by expressing x(n) and y(n) into its complex exponential components.
10.3.1 x(n) = cos( 2π π 2π π
8 1n + 6 ) and y(n) = cos( 8 3n − 6 ).
10.3.2 x(n) = cos( 8 2n − 6 ) and y(n) = cos( 8 7n − π3 ).
2π π 2π

10.3.3 x(n) = cos( 2π π 2π π


8 3n + 4 ) and y(n) = cos( 8 5n − 3 ).
10.3.4 x(n) = cos( 8 0n + 6 ) and y(n) = cos( 8 6n + π3 ).
2π π 2π

10.3.5 x(n) = cos( 2π π 2π π


8 6n + 4 ) and y(n) = cos( 8 5n − 3 ).
10.3.1

x(n) = {0.8660, 0.2588, −0.5000, −0.9659, −0.8660, −0.2588, 0.5000, 0.9659}

y(n) = {0.8660, −0.2588, −0.5000, 0.9659, −0.8660, 0.2588, 0.5000, −0.9659}


x(n) + jy(n) = {0.8660 + j0.8660, 0.2588 − j0.2588, −0.5000 − j0.5000, −0.9659 + j0.9659,
−0.8660 − j0.8660, −0.2588 + j0.2588, 0.5000 + j0.5000, 0.9659 − j0.9659}
X(k) + jY (k) = {0, 3.4641 + j2, 0, 2 + j3.4641, 0, −2 + j3.4641, 0, 3.4641 − j2}
X(k) = {0, 3.4641 + j2, 0, 0, 0, 0, 0, 3.4641 − j2}

98
Y (k) = {0, 0, 0, 3.4641 − j2, 0, 3.4641 + j2, 0, 0}
10.3.2

x(n) = {0.8660, 0.5000, −0.8660, −0.5000, 0.8660, 0.5000, −0.8660, −0.5000}

y(n) = {0.5000, −0.2588, −0.8660, −0.9659, −0.5000, 0.2588, 0.8660, 0.9659}


x(n) + jy(n) = {0.8660 + j0.5000, 0.5000 − j0.2588, −0.8660 − j0.8660, −0.5000 − j0.9659,
0.8660 − j0.5000, 0.5000 + j0.2588, −0.8660 + j0.8660, −0.5000 + j0.9659}
X(k) + jY (k) = {0, −3.4641 + j2, 3.4641 − j2, 0, 0, 0, 3.4641 + j2, 3.4641 + j2}
X(k) = {0, 0, 3.4641 − j2, 0, 0, 0, 3.4641 + j2, 0}
Y (k) = {0, 2 + j3.4641, 0, 0, 0, 0, 0, 2 − j3.4641}
10.3.3

x(n) = {0.7071, −1.0000, 0.7071, 0.0000, −0.7071, 1.0000, −0.7071, 0.0000}

y(n) = {0.5000, −0.9659, 0.8660, −0.2588, −0.5000, 0.9659, −0.8660, 0.2588}


x(n) + jy(n) = {0.7071 + j0.5000, −1.0000 − j0.9659, 0.7071 + j0.8660, 0.0000 − j0.2588
−0.7071 − j0.5000, 1.0000 + j0.9659, −0.7071 − j0.8660, 0.0000 + j0.2588}
X(k) + jY (0, 0, 0, −0.6357 + j4.8284, 0, 6.2925 − j0.8284, 0, 0}
X(k) = {0, 0, 0, 2.8284 + j2.8284, 0, 2.8284 − j2.8284, 0, 0}
Y (k) = {0, 0, 0, 2 + j3.4641, 0, 2 − j3.4641, 0, 0}
10.3.4
x(n) = {0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660}
y(n) = {0.5000, 0.8660, −0.5000, −0.8660, 0.5000, 0.8660, −0.5000, −0.8660}
x(n) + jy(n) = {0.8660 + j0.5000, 0.8660 + j0.8660, 0.8660 − j0.5000, 0.8660 − j0.8660
0.8660 + j0.5000, 0.8660 + j0.8660, 0.8660 − j0.5000, 0.8660 − j0.8660}
X(k) + jY (k) = {6.9282, 0, 3.4641 + j2, 0, 0, 0, −3.4641 + j2, 0}
X(k) = {6.9282, 0, 0, 0, 0, 0, 0, 0}
Y (k) = {0, 0, 2 − j3.4641, 0, 0, 0, 2 + j3.4641, 0}
10.3.5

x(n) = {0.7071, 0.7071, −0.7071, −0.7071, 0.7071, 0.7071, −0.7071, −0.7071}

y(n) = {0.5000, −0.9659, 0.8660, −0.2588, −0.5000, 0.9659, −0.8660, 0.2588}


x(n)+jy(n) = {0.7071+j0.5000, 0.7071−j0.9659, −0.7071+j0.8660, −0.7071−j0.2588, 0.7071−j0.5000, 0.7071+j0.9
X(k) + jY (k) = {0, 0, 2.8284 − j2.8284, −3.4641 + j2, 0, 3.4641 + j2, 2.8284 + j2.8284, 0}
X(k) = {0, 0, 2.8284 − j2.8284, 0, 0, 0, 2.8284 + j2.8284, 0}
Y (k) = {0, 0, 0, 2 + j3.4641, 0, 2 − j3.4641, 0, 0}

10.4 Given a waveform x(n) with period 8, find the samples of the waveform. Find its
DFT X(k) using the PM RDFT algorithm. Find the IDFT of X(k) using the PM RIDFT
algorithm to get back the samples of x(n). Verify the DFT X(k) by expressing x(n) into
its complex exponential components.
10.4.1 cos( 2π π
8 0n + 6 ).

99
10.4.2 cos( 2π
8 1n −
π
6 ).
10.4.3 cos( 2π
8 2n +
π
4 ).
10.4.4 cos( 2π
8 3n −
π
4 ).
10.4.5 cos( 2π
8 4n +
π
3 ).
10.4.1
x(n) = {0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660}
X(k) = {6.9282, 0, 0, 0, 0, 0, 0, 0}
10.4.2

x(n) = {0.8660, 0.9659, 0.5000, −0.2588, −0.8660, −0.9659, −0.5000, 0.2588}

X(k) = {0, 3.4641 − j2.0000, 0, 0, 0, 0, 0, 3.4641 + j2}


10.4.3

x(n) = {0.7071, −0.7071, −0.7071, 0.7071, 0.7071, −0.7071, −0.7071, 0.7071}

X(k) = {0, 0, 2.8284 + j2.8284, 0, 0, 0, 2.8284 − j2.8284, 0}


10.4.4

x(n) = {0.7071, 0.0000, −0.7071, 1.0000, −0.7071, −0.0000, 0.7071, −1.0000}

X(k) = {0, 0, 0, 2.8284 − j2.8284, 0, 2.8284 + j2.8284, 0, 0}


10.4.5

x(n) = {0.5000, −0.5000, 0.5000, −0.5000, 0.5000, −0.5000, 0.5000 − 0.5000}

X(k) = {0, 0, 0, 0, 4, 0, 0, 0}

100
Chapter 11

11.1 Determine the 2’s complement 4-bit representation B of the decimal number x with
rounding. Determine also the 2’s complement representation of −x. Add the two represen-
tations and verify that the sum of the two numbers is zero.
11.1.1 x = 0.6321.
* 11.1.2 x = −0.0728.
11.1.3 x = 0.8321.

11.1.1
B = 0.1010
B ∗ = 1.0110
11.1.2
B = 0.0001
B ∗ = 1.1111
11.1.3
B = 0.1110
B ∗ = 1.0010

11.2 A white noise signal has amplitudes uniformly distributed between -1 and 1. Find the
total signal variance.
The variance σq2 , is
1 1 2 1
Z
σq2 = e de =
2 −1 3
The variance, for uniform density function, is equal to the square of the width of the density
function divided by 12.

* 11.3 Let the number of input samples to the DFT be N = 256 with the desired SNR 30
dB. Determine the number of bits required: (i) with all the scaling carried out at the input
and (ii) with distributed scaling in fast DFT algorithms.

(i) 10 log10 (X) = 30, log10 (X) = 3, X = 103 = 29.9658 = 2(2b−16) ,

b = (9.9658 + 16)/2 = 12.9829


Rounding, we get b = 13.

(ii) 10 log10 (X) = 30, log10 (X) = 3, X = 103 = 29.9658 = 2(2b−9) ,

b = (9.9658 + 9)/2 = 9.4829


Rounding, we get b = 10.

101
11.4 The difference equation

y(n) = x(n) + 0.8y(n − 1)

characterizes a IIR filter and it is realized with a wordlength of 4 bits. Using the time- and
frequency-domain relations, find the output round-off noise power, due to quantization. Use
256-point DFT to compute the noise power in the frequency domain. Verify that the noise
power is the same in both the domains.
In the time-domain, the output noise power, with a = 0.8, is

2−2b 1 2−2(4) 1
2
= = 9.0422e − 04
12 1 − a 12 1 − (0.8)2

up to a precision of four decimal places.


The DTFT of the impulse response 0.8n of the filter is

ejω
H(ejω ) =
ejω − 0.8
With N = 256 we get the noise power as 9.0422e − 04.

* 11.5 Two filters governed by the difference equations

y(n) = 0.6x(n) + 0.8y(n − 1) and y(n) = x(n) + 0.7y(n − 1)

are connected in cascade in that order and is realized with a word length of four bits. Find
the output round-off noise power, due to quantization.

For the first stage, the noise power is

2 1
σqo = σq2 = σq2 2.7778,
1 − 0.82
where
2−2b
σq2 =
12
and b = 4. For the second stage, the noise power is

2 1
σqo = σq2 = σq2 1.9608
1 − 0.72
The impulse response of the cascade stages is the convolution of the individual stages, which
is
h(n) = (8(0.8)n − 7(0.7)n )u(n)
The corresponding noise power is

2 82 72 8(7)
σqo = σq2 ( 2
+ 2
− ) = σq2 146.5835
1 − 0.9 1 − 0.7 1 − 0.8(0.7)

The total output noise power is

σq2 (146.5835 + 146.5835 + 1.9608 = σqo


2
= σq2 295.1277

11.6 Consider the filter governed by the difference equation

y(n) = x(n) − 0.85y(n − 1)

102
Let the input be x(n) = 10δ(n) with the initial condition y(−1) = 0. Let the multiplier
output is rounded to the nearest integer. By iteration, find the first 10 values of the output
of the filter. List also the first 10 output values with infinite precision. Is there limit cycle
oscillation?

y(n) = {10, −9, 8, −7, 6, −5, 4, −3, 3, −3}


Limit cycle oscillation.

y(n) = {10, −8.5, 7.2250, −6.1412, 5.2201, −4.4371, 3.7715, −3.2058, 2.7249, −2.3162}

* 11.7 Given the difference of a second-order FIR filter

y(n) = x(n) + x(n − 1) − 2x(n − 2),

find the corresponding lattice structure coefficients.

1
{K1 = = −1, and K2 = −2}
1−2

103

You might also like