You are on page 1of 36

Solutions Manual to accompany Digital Signal Processing: A Computer Based Approach 3rd editi

Solutions Manual to accompany Digital Signal


Processing: A Computer Based Approach 3rd edition
9780073048376

To download the complete and accurate content document, go to:


https://testbankbell.com/download/solutions-manual-to-accompany-digital-signal-proc
essing-a-computer-based-approach-3rd-edition-9780073048376/

Visit TestBankBell.com to get complete for all chapters


Chapter 5
N −1 ~ N −1 ~ ~
5.1 Let ~
y[ n] = ∑ ~ x[r ]h [ n − r ]. Then ~
y[ n + kN ] = ∑ ~ x[r ]h [ n + kN − r ]. Since h [ n] is
r =0 r =0
~ ~
periodic in n with a period N , h [ n + kN − r ] = h [ n − r ]. Therefore ~
y[ n + kN ]
N −1 ~
= ∑ ~ x[r ]h [ n − r ] = ~
y[ n], hence ~
y[ n] is also periodic in n with a period N .
r =0

4 ~ ~ ~ ~ ~ ~
5.2 (a) ~
y[ 0] = ∑ ~
x[r ]h [ −r ] = ~
x[0]h [0] + ~
x[1]h [ 4] + ~
x[2]h [3] + ~
x[3]h [2] + ~
x[ 4]h [1] = −13,
r =0
4 ~ ~ ~ ~ ~ ~
~
y[1] = ∑ ~
x[r ]h [1 − r ] = ~
x[0]h [1] + ~
x[1]h [0] + ~
x[2]h [ 4] + ~
x[3]h [3] + ~
x[ 4]h [2] = −13,
r =0
4 ~ ~ ~ ~ ~ ~
~
y[ 2] = ∑ ~
x[r ]h [2 − r ] = ~
x[0]h [2] + ~
x[1]h [1] + ~
x[2]h [0] + ~
x[3]h [ 4] + ~
x[ 4]h [3] = −13,
r =0
4 ~ ~ ~ ~ ~ ~
~
y[3] = ∑ ~
x[r ]h [3 − r ] = ~
x[0]h [3] + ~
x[1]h [2] + ~
x[2]h [1] + ~
x[3]h [0] + ~
x[ 4]h [ 4] = −13,
r =0
4 ~ ~ ~ ~ ~ ~
~
y[ 4] = ∑ ~
x[r ]h [ 4 − r ] = ~
x[0]h [ 4] + ~
x[1]h [3] + ~
x[2]h [2] + ~
x[3]h [1] + ~
x[ 4]h [0] = −13.
r =0
Therefore, ~
y[ n] = {− 13, − 13, − 13, − 13, − 13,}, 0 ≤ n ≤ 4.

(b) ~
y[ n] = {1, 1, 1, 1, 1,}, 0 ≤ n ≤ 4.

5.3 Since ψ ~ [ n + rN ] = ψ
~ [ n], hence all the terms which are not in the range 0,1,K, N − 1,
k k
can be accumulated to ψ ~ [ n], where 0 ≤ k ≤ N − 1. Hence, in this case the Fourier
k
series representation involves only N complex exponential sequences. Let
~ 1 N −1 ~ j 2 πkn / N
x [ n] = ∑ X[ k ] e , then
N k =0
N −1 1 N − 1 N −1 ~ 1 N −1 ~ ⎛ N −1 j 2 π( k − r )n / N ⎞
∑ ~ x[ n] e − j 2 πrn / N = ∑ ∑ X[ k ] e
j 2 π( k − r )n / N
= ∑ X[ k ] ⎜⎜ ∑ e ⎟⎟.
n =0 N n=0 k =0 N k =0 ⎝ n=0 ⎠

Now, from Eq. (5.11), the inner summation is equal to N if k = r , otherwise it is equal
N −1 ~ ~
to 0. Thus, ∑ ~ x[ n] e − j 2 πrn / N = X [r ]. Next, we observe X[ k + lN ]
n=0
N −1 N −1 N −1 ~
x[ n] e − j 2 π( k + lN )n / N = ∑ ~
= ∑ ~ x[ n] e − j 2 πkn / N e − j 2 πln = ∑ ~ x[ n] e − j 2 πkn / N = X[ k ].
n=0 n=0 n=0

Not for sale. 109


5.4 (a) ~ πn
⎝ 4⎠ 2
{ }
x1[ n] = cos⎛⎜ ⎞⎟ = e jπn / 4 + e − jπn / 4 . The period of ~
1
x1[n] is N = 8.

~ 1⎧ 7 7 ⎫
X1[ k ] = ⎨ ∑ e j 2 πn / 8 e − j 2 πkn / 8 + ∑ e − j 2 πn / 8 e − j 2 πkn / 8 ⎬
2 ⎩n = 0 n =0 ⎭
1 ⎧ 7 − j 2 πn( k −1) / 8 7 ⎫
= ⎨ ∑ e + ∑ e − j 2 πn( k +1) / 8 ⎬. Now, from Eqn. (5.11) we observe
2 ⎩n = 0 n =0 ⎭
8, for k = 1, 8, for k = 7,
= ⎧⎨ and ∑ e − j 2 πn( k +1) / 8 = ⎧⎨
7 7
− j 2 πn( k −1) / 8
∑e
n=0 ⎩0, otherwise , n=0 ⎩0, otherwise.

4, for k = 1,7,
Hence, X1[ k ] = ⎧⎨
~
⎩ , otherwise.
0

πn πn
x 2 [ n] = sin⎛⎜ ⎞⎟ + 3 cos⎛⎜ ⎞⎟ = {e jπn / 3 − e − jπn / 3} + {e jπn / 4 + e − jπn / 4 }. The
1 3
(b) ~
⎝ 3⎠ ⎝ 4⎠ 2 j 2

period of sin
πn
( )
is 6 and the period of cos
3
πn
( )
is 8. Hence, the period of ~
4
x [ n] is the 2
GCM of (6,8) and is 24.
~ 1 ⎧ 23 j8πn / 24 − j 2 πkn / 24 23 − j8πn / 24 − j 2 πkn / 24 ⎫
X 2 [k ] = ⎨ ∑e e − ∑e e ⎬
2 j ⎩n = 0 n =0 ⎭
3 ⎧ 23 23 ⎫
+ ⎨ ∑ e j 6 πn / 24 e − j 2 πkn / 24 − ∑ e − j 6 πn / 24 e − j 2 πkn / 24 ⎬
2 ⎩n = 0 n=0 ⎭
1 ⎧ 23 − j 2 πn( k − 3) / 24 23 − j 2 πn( k + 3) / 24 ⎫
= ⎨ ∑e − ∑e ⎬
2 j ⎩n = 0 n=0 ⎭
⎧− j12, k = 3,
3 ⎧ 23 − j 2 πn( k − 4) / 24 23 − j 2 πn( k + 4) / 24 ⎫ ~ ⎪ j12, k = 21,
+ ⎨ ∑e − ∑e ⎬. Hence X 2 [ k ] = ⎨ 36,
2 ⎩n = 0 ⎭ k = 4, 20,
n =0 ⎪
⎩ 0, otherwise.

~
5.5 Let P[ k ] denote the coefficients of the Fourier series representation of ~
p[ n]. Since
~
p[ n] is periodic with a period N , then from Eq. (5.185b), we have
~ N −1
P[ k ] = ∑ ~ p[ n] e − j 2 πkn / N = 1. Hence, from Eq. (5.185a) we get
n=0
~ 1 N −1 ~ j 2 πln / N 1 N −1 j 2 πln / N
p[ n] = ∑ P[l] e = ∑ e .
N l =0 N l=0

~ ∞
5.6 X [ k ] = X ( e jω ) = X (e j 2 πk / N ) = ∑ x[ n] e − j 2 πk / N , − ∞ < k < ∞.
ω = 2 πk / N n = −∞
~ ~
Now, X[ k + lN ] = X (e j 2 π( k + lN ) / N ) = X (e j 2 πk / N e jπl ) = X (e j 2 πk / N ) = X[ k ].

Not for sale. 110


1 N −1 ~ j 2 πkn / N 1 N −1⎛ ∞ − j 2 πln / N ⎞⎟ j 2 πkn / N
Likewise, ~ x [ n] = ∑ X[ k ] e = ∑ ⎜⎜ ∑ x[l] e ⎟e
N k =0 N k = 0 ⎝ l = −∞ ⎠
1 N −1 ∞ j 2 π( k − l )n / N
= ∑ ∑ x[l] e . Let l = n + rN. Then
N k =0 l = −∞
1 ∞ ⎛ N −1 − j 2 πkr ⎞ N −1
~
x [ n] = ∑ x[ n + rN ]⎜⎜ ∑ e ⎟⎟. But ∑ e − j 2 πkr = N . Hence,
N r = −∞ ⎝ k =0 ⎠ k =0

~
x[ n] = ∑ x[ n + rN ].
r = −∞

~ N −1 N −1
5.7 (a) G[ k ] = ∑ g~[ n] e − j 2 πkn / N = ∑ ~ y[ n] e − j 2 πkn / N . Now,
x [ n ]~
n=0 n=0
1 N −1 ~
~ − j 2 πrn / N
x [ n] = ∑ X [r ] e . Therefore,
N r =0
~ 1 N −1 N −1 ~ t − j 2 π( k − r )n / N 1 N −1 ~ N −1t − j 2 π( k − r ) n / N
G[ k ] = ∑ ∑ X[r ] y[ n] e = ∑ X[r ] ∑ y[ n] e
N n=0 r =0 N r =0 n=0
1 N −1 ~ ~
= ∑ X[r ]Y [ k − r ].
N r =0
~ 1 N −1 ~ ~ j 2 πkn / N 1 N −1 N −1 ~ ~ j 2 πk ( n − r ) / N
(b) h [ n] = ∑ X[ k ]Y [ k ] e = ∑ ∑ x[r ]Y [ k ] e
N k =0 N k =0 r =0
N −1 ⎛ 1 N −1 ~ N −1
j 2 πk ( n − r ) / N ⎞⎟
= ∑ ~ x[r ] ⎜⎜ ∑ Y [k] e ⎟ = ∑~ x [r ] ~
y[ n − r ] .
r =0 ⎝ N k = 0 ⎠ r = 0

(a) x a [ n] = sin(2πn / N ) = (e j 2 πn / N − e − j 2 πn / N ). Therefore,


1
5.8
2j
1 N −1 j 2 πn / N − j 2 πkn / N 1 N −1 − j 2 πn / N − j 2 πkn / N
X a [k ] = ∑ e e − ∑ e e
2 j n=0 2 j n=0
1 N −1 − j 2 π( k −1)n / N 1 N −1 − j 2 π( k +1)n / N
= ∑ e − ∑ e . From Eq. (5.11), the first sum is
2 j n=0 2 j n=0
equal to N when k = 1 and 0 othereise. Likewise, from Eq. (5.11), the second sum is
equal to N when k = N − 1 and 0 otherwise. Therefore,
⎧ N / 2 j, k = 1,

X a [ k ] = ⎨− N / 2 j, k = N − 1,
⎪⎩ 0, otherwise.
2 πn ⎞ 1 1 4 πn ⎞
(b) x b [ n] = cos 2 ⎛⎜ ⎟ = + cos⎛⎜
1 N
⎟. Now the N –point DFT of is for
⎝ N ⎠ 2 2 ⎝ N ⎠ 2 2

k = 0 and 0 otherwise. From Example 5.2, the N –point DFT of cos ( ) is


4 πn
N
N
2
for
k = 2 and k = N − 2 and 0 otherwise. Therefore,

Not for sale. 111


⎧⎪ N / 2, k = 0,
X b [ k ] = ⎨ N / 4, k = 2, N − 2,
⎪⎩ 0, otherwise.

2 πn ⎞ 1 6 πn ⎞ 2 πn ⎞
(c) x c [ n] = cos 3 ⎛⎜ ⎟ = cos⎛⎜ cos⎛⎜
3
⎟+ ⎟. From Example 5.2, the N –point
⎝ N ⎠ 4 ⎝ N ⎠ 4 ⎝ N ⎠
6 πn ⎞
DFT of cos⎛⎜
N
⎟ is for k = 3 and k = N − 3 and 0 otherwise. Likewise, from
⎝ N ⎠ 2
2 πn ⎞
Example 5.2, the N –point DFT of cos⎛⎜
N
⎟ is for k = 1 and k = N − 1 and 0
⎝ N ⎠ 2
⎧ N / 8, k = 3, N − 3,

otherwise. Therefore, X c [ k ] = ⎨3N / 8, k = 1, N − 1,
⎪⎩ 0, otherwise.

N −1 N −1 1 − αWNkN 1− α
5.9 (a) Ya [ k ] = ∑ α nWNkn = ∑ (αWNk ) n = = .
n=0 n=0 1 − αWNk 1 − αWNk

(b) Yb [ k ] = 2 ∑ WNkn − 3 ∑ WNkn . Assume first N is even, i.e., N = 2L. Then


k even k odd
L −1 L −1 L −1 L −1 ⎛ 1 − W kL
Yb [ k ] = 2 ∑ W2kL2r − 3 ∑ W2kL(2r +1) = 2 ∑ WLkr − 3W2kL ∑ WLkr = 2 − 3WNk ⎜

L
k
( ) ⎞
⎟ = 0.

r =0 r =0 r =0 r =0 ⎝ 1 − WL ⎠
L L −1
Next, assume N is odd, i.e., N = 2 L + 1. Then Yb [ k ] = 2 ∑ W2kL2r − 3 ∑ W2kL(2r +1)
r =0 r =0
L −1 ⎛ 1 − W k ( L +1) ⎞ ⎛ kL ⎞ ⎛ k ⎞
k ⎜ 1 − WL ⎟ = 2⎜ 1 − W L
L
= 2 ∑ WLkr − 3W2kL ∑ WLkr =2 ⎜ L ⎟ − 3W2 L ⎟ = 2.
r =0 r =0
⎜ 1−W k ⎟ ⎜ 1−W k ⎟ ⎜1− W k ⎟
⎝ L ⎠ ⎝ L ⎠ ⎝ L ⎠

5.10 x[ n] = cos(ωo n) = (e jω o n + e − jω o n ), 0 ≤ n ≤ N − 1. Therefore,


1
2
1 N −1 jω o n − j 2 πkn / N 1 N −1
X[ k ] = ∑ e e + ∑ e − j jω o n e − j 2 πkn / N
2 n=0 2 n=0
2 πk 2 πk
1 N −1 − j ( − ω o )n 1 N −1 − j ( + ω o )n
= ∑ e N + ∑ e N
2 n=0 2 n=0
2 πk 2 πk
− j ⎛⎜ −ωo ⎞⎟ N − j ⎛⎜ +ωo ⎞⎟ N
1 1− e ⎝ N ⎠ 1 1− e ⎝ N ⎠
= ⋅ + ⋅
2 πk 2 πk
2 − j ⎛⎜ −ωo ⎞⎟ 2 − j ⎛⎜ +ωo ⎞⎟
1− e ⎝ N ⎠ 1− e ⎝ N ⎠

Not for sale. 112


1 − j⎜
= e ⎝
⎛ 2 πk −ω ⎞⎛ N −1 ⎞
o ⎟⎜
⎠⎝ 2 ⎠
⎟ (
sin πk −
ωo N
)+ 1 e − j ⎛⎜
2 πk
⎝ N
+ ωo ⎞⎟⎛⎜
N −1 ⎞
⎠⎝ 2 ⎠
⎟ (
sin πk +
ωo N
).

sin ( ) 2 ⋅
( )
N 2 2
πk ωo πk ωo
2 − sin +
N 2 N 2

N −1 ( N / 2 ) −1 ( N / 2 ) −1
5.11 X [ k ] = ∑ x[ n]WNnk = ∑ x[2r ]WN2rk + ∑ x[2r + 1]WN(2r +1)k
n=0 r =0 r =0
( N / 2 ) −1 ( N / 2 ) −1
= ∑ x[2r ]WNrk/ 2 + WNk ∑ x[2r + 1]WNrk/ 2
r =0 r =0
( N / 2) −1 ( N / 2 ) −1
= ∑ x0 [r ]WNrk/ 2 + WNk ∑ x1[r ]WNrk/ 2
r =0 r =0
k
= X 0 [〈 k 〉 N / 2 ] + WN X1[ 〈 k 〉 N / 2 ], 0 ≤ k ≤ N − 1.

N −1 ( N / 2 ) −1 N −1
5.12 X [ k ] = ∑ x[ n]WNnk = ∑ x[ n]WNnk + nk
∑ x[ n]WN
n=0 n=0 n= N / 2
( N / 2 ) −1 ( N / 2 ) −1 N
= ∑ x[ n]WNnk + WN( N / 2 )k ∑ x[ + n]WNnk
n=0 n=0 2
( N / 2 ) −1 ⎛ ⎞ nk
k N
= ∑ ⎜ x[ n] + (−1) x[ + n] ⎟WN . For k = 2l, we get
n=0 ⎝ 2 ⎠
( N / 2 ) −1 ⎛ N ⎞ ( N / 2 ) −1 ⎛ N ⎞
X [2l] = ∑ ⎜ x[ n] + x[ + n] ⎟WN2 nl = ∑ ⎜ x[ n] + x[ + n] ⎟WNnl/ 2 = X 0 [l]
n=0 ⎝ 2 ⎠ n=0 ⎝ 2 ⎠
( N / 2 ) −1 ⎛ N ⎞
and for k = 2l + 1 we get X [2l + 1] = ∑ ⎜ x[ n] − x[ + n] ⎟WN(2 l +1)n
n=0 ⎝ 2 ⎠
( N / 2 ) −1 ⎛ N ⎞ n N
nl
= ∑ ⎜ x[ n] + x[ + n] ⎟WN ⋅ WN / 2 = X1[l] where 0 ≤ l ≤ − 1.
n=0 ⎝ 2 ⎠ 2

1 1 N
5.13 g[ n] = ( x[2n] + x[2 n + 1]), h[ n] = ( x[2n] − x[2n + 1]), 0 ≤ n ≤ − 1. Solving for
2 2 2
x[2n] and x[2n + 1], we get x[2 n] = g[ n] + h[ n] and x[2 n + 1] = g[ n] − h[ n]. Therefore,
N −1 ( N / 2 ) −1 ( N / 2 ) −1
X [ k ] = ∑ x[ n]WNnk = ∑ x[2r ]WN2rk + ∑ x[2r + 1]WN(2r +1)k
n=0 r =0 r =0
( N / 2 ) −1 ( N / 2 ) −1
= ∑ x[2r ]WNrk/ 2 + WNk ∑ x[2r + 1]WNrk/ 2
r =0 r =0
( N / 2 ) −1 ( N / 2 ) −1
= ∑ ( g[ n] + h[ n]) WNrk/ 2 + WNk ∑ ( g[ n] − h[ n]) WNrk/ 2
r =0 r =0
( N / 2 ) −1 ( N / 2 ) −1
= (1 + WNk ) ∑ g[ n]WNrk/ 2 + (1 − WNk ) ∑ h[ n]WNrk/ 2
r =0 r =0

Not for sale. 113


= (1 + WNk )G[ 〈 k 〉 N / 2 ] + (1 − WNk )H [ 〈 k 〉 N / 2 ], 0 ≤ k ≤ N − 1.

N
5.14 g[ n] = a1 x[2n] + a 2 x[2n + 1], h[ n] = a3 x[2 n] − a 4 x[2 n + 1], 0 ≤ n ≤ − 1, with
2
a g[ n] − a 2 h[ n]
a1a 4 ≠ a 2 a3 . Solving for x[2n] and x[2n + 1], we get x[2n] = 4 and
a1a 4 − a 2 a3
− a3 g[ n] + a1h[ n]
x[2n + 1] = . Therefore,
a1a 4 − a 2 a3
N −1 ( N / 2 ) −1 ( N / 2 ) −1
X [ k ] = ∑ x[ n]WNnk = ∑ x[2r ]WN2rk + ∑ x[2r + 1]WN(2r +1)k
n=0 r =0 r =0
( N / 2 ) −1 ( N / 2 ) −1
= ∑ x[2r ]WNrk/ 2 + WNk ∑ x[2r + 1]WNrk/ 2
r =0 r =0
( N / 2 ) −1 ⎛ a
g[r ] − a 2 h[r ] ⎞ rk ( N / 2 ) −1 ⎛ − a g[ n] + a h[ n] ⎞
= ∑ ⎜⎜ 4 ⎟⎟ WN / 2 + WNk ∑ ⎜⎜ 3 1 ⎟⎟ WNrk/ 2
r = 0 ⎝ a1a 4 − a 2 a3 ⎠ r = 0 ⎝ a1a 4 − a 2 a3 ⎠

=
1
a1a 4 − a 2 a3
( )
(a 4 − a3WNk )G[〈 k 〉 N / 2 ] + (− a 2 + a1WNk )H[〈 k 〉 N / 2 ] , 0 ≤ n ≤ N − 1.

N −1 N −1
2 ln
5.15 (a) G[ k ] = ∑ x[ n]W2nk
N . For k even, i.e., k = 2l, G[ 2l] = ∑ x[ n]W2 N
n=0 n=0
N −1
= ∑ x[ n]2lnN = X[l], 0 ≤ l ≤ N − 1.
n=0

2 N −1
(b) H[ k ] = ∑ x[ n − N ]W2nk
N . Let m = n − N or n = m + N . Then
n=N
N −1 m + N )k N −1
H[ k ] = ∑ x[ m]W2(N = (−1) k ∑ x[ m]W2mk
N . For k even, i.e., k = 2l,
m=0 m=0
N −1 N −1
H[2l] = ∑ x[ n]W22Nln = ∑ x[ n]WNln = X[l], 0 ≤ l ≤ N − 1.
n=0 n=0

2 N −1 2 N −1
5.16 Y [ k ] = ∑ y[ n]W2nk nk
N = ∑ ( g[ n] + h[ n]) W2 N = G[ k ] + H[ k ]. For k even, i.e.,
n=0 n=0
k = 2l, Y [ 2l] = G[ 2l] + H [ 2l] = 2 X [ l], 0 ≤ l ≤ N − 1.
N −1
2l +1)n N −1
For k odd, i.e., k = 2l + 1, G[2l + 1] = ∑ x[ n]W2(N = ∑ x[ n]W2nN WNln and
n=0 n=0
N −1
2l +1)n N −1
H[2l + 1] = − ∑ x[ n]W2(N = − ∑ x[ n]W2nN WNln = −G[2l + 1], 0 ≤ l ≤ N − 1.
n=0 n=0
Hence, for k = 2l + 1, Y [ 2l + 1] = G[ 2l + 1] − G[ 2l + 1] = 0, 0 ≤ l ≤ N − 1.

Not for sale. 114


MN −1 N −1
nk nk
5.17 Y [ k ] = ∑ y[ n]WMN = ∑ x[ n]WMN . Thus,
n=0 n=0
N −1 N −1
nkM
Y [ kM ] = ∑ x[ n]WMN = ∑ x[ n]WNnk = X[ k ].
n=0 n=0
5.18

N −1 N −1
5.19 (a) Now, X[ N / 2] = ∑ x[ n]WNnN / 2 = ∑ (−1) n x[ n]. Hence if x[ n] = x[ N − 1 − n]
n=0 n=0
N −1
and N is even, then X[ N / 2] = ∑ (−1) n x[ n] = 0.
n=0

N −1
(b) X[0] = ∑ x[ n]. Hence if x[ n] = − x[ N − 1 − n], then X [0] = 0.
n=0

N −1 ( N / 2 ) −1 N −1
(c) X[2l] = ∑ x[ n]WN2 nl = ∑ x[ n]WN2 nl + 2 nl
∑ x[ n]WN
n =0 n=0 n = ( N / 2 ) −1
( N / 2 ) −1 ( N / 2 ) −1 M −1
x[ n]WN2 nl + ]WN2 nl = ∑ (x[ n] + x[ n + M ])W22M
nl
N
= ∑ ∑ x[ n + . Hence if
2
n=0 n=0 n=0
x[ n] = − x[ n + M ], then X [2l] = 0 for 0 ≤ l ≤ M − 1.

N −1 ( N / 2 ) −1 N −1
5.20 X [2m] = ∑ x[n]W N2mn = ∑ x[n]W N2mn + 2 mn
∑ x[n]W N
n=0 n=0 n= N / 2
( N / 2 ) −1 N / 2 −1 ( N / 2 ) −1
x[n]W N2 mn + ∑ x[n + ]W N2mnW NmN = ∑ ⎛⎜ x[n] + ⎟⎞ W N = 0,
N N 2 mn
= ∑ x[n +
n=0 n=0 2 n=0 ⎝ 2 ⎠
N N
0≤m≤ − 1. This implies x[n] + x[ n + ] = 0.
2 2

5.21 (a) Using the circular convolution property of the DFT given in Table 5.3, we get
km1 km2
DFT{x[〈 n − m1 〉 N } = W N X [k ] and DFT{x[〈 n − m2 〉 N } = W N X [k ].
km1 km2 km1 km1
Hence, W [k ] = DFT {w[n]} = W N X [k ] + W N X [k ] = (W N + WN ) X [k ].

(b) g[n] =
1
2
(x[n] + (−1) n x[n]) = 12 (x[n] + WN− ( N / 2)n x[n]). Using the circular
convolution property of the DFT given in Table 5.3, we get
G[k ] = DFT{g[n]} =
1
2
{X [k ] + X [〈k − N

2 N
}.
(c) Using the circular convolution property of the DFT given in Table 5.3, we get
Y [k ] = DFT { y[n]} = X [k ] ⋅ X [k ] = X 2 [k ].

Not for sale. 115


{
5.22 (a) DFT x[〈 n − }= W X [k ] = (−1) X [k ]. Hence,
N

2 N
k ( N / 2)
N
k

U [k ] = DFT{u[n]} = DFT{x[n] − x[〈 n − 〉 }= X [k ] − (−1) X [k ] = ⎨


N ⎧2 X [k ], k for k odd,
2 N ⎩ 0, for k even.
⎧ N ⎫
(b) V [k ] = DFT{v[n]} = DFT ⎨ x[n] − x[n − ]⎬ = X [k ] + X [k ] = 2 X [k ].
⎩ 2 ⎭
( N / 2) n
(c) y[n] = (−1) n x[n] = W N x[n]. Hence, using the circular frequency-shifting
property of the DFT given in Table 5.3, we get
{
Y [k ] = DFT{ y[n]} = DFT W N( N / 2) n x[n] = X [〈 k − } N
〉 ].
2 N

5.23 (a) From the circular frequency-shifting property of the DFT given in Table 5.3, we get
− m1 n −m 2 n
IDFT{ X [〈 k − m1 〉 N } = W N x[n] and IDFT{ X [〈 k − m2 〉 N } = W N x[n]. Hence,
w[n] = IDFT{W [k ]} = IDFT{αX [〈 k − m1 〉 N } + βX [〈 k − m2 〉 N }
− m1n − m2 n − m1n − m2 n
= αW N x[n] + βW N x[n] = (αW N + βW N ) x[n].
(b) G[k ] = ( X [k ] + (−1) k X [k ]) =
1
2
1
2
(X [k ] + W − ( N / 2) k
N X [k ] . ) Using the circular
time-shifting property of the DFT given in Table 5.3, we get
g[n] = IDFT{G[k ]} = ⎛⎜ x[n] + x[〈 n − 〉 N ⎞⎟.
1 N
2⎝ 2 ⎠
(c) Using the modulation property of the DFT given in Table 5.3, we get
y[n] = IDFT{Y [k ]} = N ⋅ x[n] ⋅ x[n] = N ⋅ x 2 [n].

N −1 ( N / 2 ) −1 N −1
5.24 (a) X [2m] = ∑ x[n]W N2mn = ∑ x[n]W N2mn + 2 mn
∑ x[n]W N
n=0 n=0 n= N / 2
N
( N / 2 ) −1 N / 2 −1 N 2m( n + )
= ∑ x[n]W N2mn + ∑ x[n + ]W N 2
n=0 n=0 2
( N / 2 ) −1 N / 2 −1 N
= ∑ x[n]W N2 mn + ∑ x[n + ]W N2mnW Nmn
n=0 n=0 2
( N / 2 ) −1 ( N / 2 ) −1
= ∑ ⎛⎜ x[n] + x[n + N ]⎟⎞ W 2mn = ∑ (x[n] − x[n])W N = 0, 0 ≤ m ≤ − 1.
2 mn N
N
n=0 ⎝ 2 ⎠ n=0 2

N −1
(b) X [4l] = ∑ x[n]W N4ln
n=0
( N / 4 ) −1 ( N / 2 ) −1 ( 3 N / 4 ) −1 N −1
= ∑ x[n]W N4ln + ∑ x[n]W N4ln + ∑ x[n]W N4ln + 4 ln
∑ x[n]W N
n=0 n= N / 4 n= N / 2 n = 3N / 4

Not for sale. 116


N
−1
4 ⎛ 4l ( n + ) ⎞⎟
N N 3N
⎜ N 4l ( n + ) N 4l ( n + ) 3N
4 ln
= ∑ ⎜ x[n]W N + x[n + ]W N 4 + x[n + ]W N 2 + x[n + ]W N 4
⎟⎟
n=0 ⎜ 4 2 4
⎝ ⎠
N
−1
= ∑ ⎛⎜ x[n] + x[n + ]W Nln + x[n + ]W N2ln + x[n + ]W N3ln ⎞⎟ W N4ln
4 N N 3N
n=0⎝ 4 2 4 ⎠
N
−1
4
= ∑ ( x[n] − X [n] + x[n] − x[n]) W N4ln = 0 as W NlN = W N2lN = W N3lN = 1.
n=0

N −1 N −1
5.25 (a) X [ N − k ] = ∑ x[n]W N( N − k ) n = ∑ x[n]W N− kn + X * [k ].
n=0 n=0
N −1 N −1
(b) X [0] = ∑ x[n]W N0 ∑ x[n] which is real.
n=0 n=0
N N −1 N −1
(c) X [ ] = ∑ x[n]W N( N / 2) n = ∑ (−1) n x[n] which is real.
2 n=0 n=0

N −1
5.26 X [k ] = ∑ x[n]W Nnk .
n=0
N −1
(a) X * [k ] = ∑ x * [n]W N− nk . Replacing n by N − n in the summation we obtain
n=0
N −1 N −1
X * [k ] = ∑ x * [ N − n]W N− ( N − n) k = ∑ x * [ N − n]W Nnk . Thus,
n=0 n=0
DFT{x * [ N − n]} = DFT{x * [〈− n〉 N } = X * [k ].
1
(b) Re{x[n]} = {x[n] + x * [n]}. Taking the DFT of both sides and using the results
2
of Part (a) we get DFT{Re{x[n]}} = {X [k ] + X * [〈− k 〉 N }.
1
2
(c) j Im{x[n]} = {x[n] − x * [n]}. Thus, DFT{ j Im{x[n]}} = {X [k ] − X * [〈− k 〉 N }.
1 1
2 2
1
(d) x cs [n] = {x[n] + x * [〈− n〉 N ]}. Using the linearity property and results of Part (b)
2
1
we get DFT{xcs [n]} = { X [k ] + X * [k ]} = Re{ X [k ]}.
2
1
(e) x ca [n] = {x[n] − x * [〈− n〉 N ]}. Using the linearity property and results of Part (b)
2
1
we get DFT{xca [n]} = { X [k ] − X * [k ]} = j Im{X [k ]}.
2

Not for sale. 117


5.27 Since for a real sequence, x[ n] = x * [ n], taking the DFT of both sides we get
X [k ] = X * [〈− k 〉 N ]. This implies
Re{ X [k ]} + j Im{X [k ]} = Re{ X [〈− k 〉 N ]} − j Im{X [〈− k 〉 N ]}.
Comparing real and imaginary parts we get Re{ X [k ]} = Re{ X [〈− k 〉 N ]} and
Im{X [k ]} = − Im{X [〈− k 〉 N ]}.
Also, X [k ] = (Re{ X [k ]}) 2 + (Im{X [k ]}) 2

= (Re{ X [〈− k 〉 N ]}) 2 + (Im{X [〈− k 〉 N ]}) 2 = X [〈− k 〉 N ] and


⎛ Im{X [k ]} ⎞ ⎛ − Im{X [〈− k 〉 N ]} ⎞
arg{X [k ]} = tan −1 ⎜⎜ ⎟⎟ = tan −1 ⎜⎜ ⎟⎟ = − arg{X [〈− k 〉 N ]}.
⎝ Re{ X [ k ]} ⎠ ⎝ Re{ X [ 〈− k 〉 N ]} ⎠

5.28 (a) x1[〈− n〉 9 ] = {4 3 − 5 1 − 2 − 2 1 − 5 3} = x1[n]. Thus, x1[n] is a


circular even sequence and hence, it has a real-valued 9 -point DFT.

(b) x2 [〈− n〉 9 ] = {0 − 5 − 1 − 4 3 − 3 4 1 5} = − x2 [n]. Thus, x2 [n] is a


circular odd sequence and hence, it has an imaginaryl-valued 9 -point DFT.

(c) x3 [〈−n〉 9 ] = {0 − 5 − 1 − 4 3 − 3 4 2 − 5} which is neither equal to


x 3 [n] nor equal to − x 3 [n]. Thus, x3 [ n] has a complex-valued 9 -point DFT.

(d) x4 [〈− n〉 9 ] = {− 5 5 − 2 2 4 4 2 − 2 5} = x 4 [n]. Thus, x4 [n] is a


circular even sequence and hence, it has a real-valued 9 -point DFT.

5.29 (a) h[n] = g[〈 n − 5〉 8 ]. Hence, H [k ] = W8−5k G[k ] = e j10πk / 8G[k ] = e j 5πk / 4 G[k ]
= {2.6 + j 4.1, e j 5π / 4 (3 − j 2.7), e j 5π / 2 (−4.2 + j1.4), e j15π / 4 (3.5 − j 2.6),
e j 5π (0.5), e j 25π / 4 (1.3 + j 4.4), e j15π / 2 (2.4 − j1.6), e j 35π / 4 (−3 + j1.6)}.

(b) H [k ] = G[〈 k + 3〉 8 ]. Hence, h[n] = W83 g[n] = e − j 6πn / 8 g[n] = e − j 3πn / 4 g[n]
= {−0.1 − j 0.7, e − j 3π / 4 (1.3 + j ), e − j 3π / 2 (2 + j 0.7), e − j 9π / 4 (1.1 + j 2.2),
e − j 3π (−0.8 + j 0.2), e − j15π / 4 (3.4 − j 0.1), e − j 9π / 2 (−1.2 + j 3.1), e − j 21π / 4 ( j1.5)}.

5.30 (a) y[ n] = αg[ n] + βh[ n]. Therefore,


N −1 N −1 N −1
Y [k ] = ∑ y[n]W Nnk = α ∑ g[n]W Nnk + β ∑ h[n]W Nnk = αG[k ] + βH [k ].
n=0 n=0 n=0

N −1
(b) x[n] = g[〈 n − no 〉 N ]. Therefore, X [k ] = ∑ g[〈 n − no 〉 N ]W Nnk
n=0

Not for sale. 118


n o −1 N −1
= ∑ g[ N + n − no ]W Nnk + ∑ g[n − no ]W Nnk
n=0 n = no

N −1 (n + no − N ) k N − n −1 (n + no )k n k N −1 n k
nk
= ∑ g[n]W N + ∑ g[no ]W N = WN o ∑ g[n]W N = W N o G[k ].
n = N − no n=0 n=0

−ko n N −1 N −1 (k − k o )n
(c) u[n] = W N g[n]. Therefore, U [k ] = ∑ u[n]W Nkn = ∑ g[n]W N
n=0 n=0
⎧ N −1 (k − k o )n
⎪⎪ ∑ g[n]W N , if k ≥ k o ,
= ⎨ N −1 n = 0
⎪ ∑ g[n]W ( N + k − k o ) n , if k < k o .
⎪⎩ n = 0 N

⎧ G[k − k o ], if k ≥ k o ,
Thus, U [k ] = ⎨ = G[〈 k − k o 〉 N ].
⎩G[ N + k − k o ], if k < k o ,

N −1 N −1
(d) h[ n] = G[ n]. Therefore, H [k ] = ∑ h[n]W Nnk = ∑ G[n]W Nnk
n=0 n=0
N −1 N −1 N −1 N −1 ( k + r ) n
= ∑ ∑ g[r ]W Nnr W Nkr = ∑ g[r ] ∑ W N . The second sum is nonzero only if
n=0 r =0 r =0 n=0
k = r = 0 or else if r = N − k and k ≠ 0. Hence,
⎧ Ng[0], if k = 0,
H [k ] = ⎨ = Ng[〈− k 〉 N ].
⎩ Ng[ N − k ], if k > 0,

N −1 N −1 N − 1
(e) u[ n] = ∑ g[ m] h[〈− n − m〉 N ]. Therefore, U[ k ] = ∑ ∑ g[ m] h[〈− n − m〉 N ]WNnk
m=0 n=0 m=0
N −1 N −1 N −1
= ∑ g[ m] ∑ h[〈− n − m〉 N ]WNnk = ∑ g[ m] H[ k ]WNmk = H[ k ] G[ k ].
m =0 n=0 m =0

N −1 1 N −1 N − 1 1 N −1 N −1
− nk − nk
5.31 ∑ g[ n] h * [ n] = ∑ ∑ G[ k ]WN h * [ n] = ∑ G[ k ] ∑ h * [ n]WN
n=0 N n=0 k =0 N k =0 n=0
1 N −1
= ∑ G[ k ] H * [ k ].
N k =0

N −1 N −1⎛ N −1 ⎞
5.32 DFT{ r xy [l]} = R xy [l] = ∑ r xy [l]WNlk = ∑ ⎜⎜ ∑ x[ n] y[〈l + n〉 N ⎟⎟ WNlk
l=0 l=0 ⎝ n=0 ⎠
N −1 ⎛ N −1 ⎞ N −1 ⎛ N −1 ⎞
= ∑ x[ n]⎜⎜ ∑ y[〈l + n〉 N ]WNlk ⎟⎟ = ∑ x[ n]⎜⎜ ∑ y[ m]WNl( m − n) ⎟⎟
n =0 ⎝ l=0 ⎠ n=0 ⎝ l=0 ⎠

Not for sale. 119


N −1 ⎛ N −1 ⎞
= ∑ x[ n]WN− nk ⎜⎜ ∑ y[ m]WNlm ⎟⎟ = X * [ k ]Y [ k ].
n=0 ⎝ l=0 ⎠

5.33 Note X [k ] is the MN –point DFT of the sequence x e [n] obtained from x[n] by
appending it with M ( N − 1) zeros. Thus, the length- MN sequence y[n] is given by
M −1
y[ n] = ∑ x e [〈 n − Nl〉 MN ], 0 ≤ n ≤ MN − 1. Taking the MN –DFT of both sides we
l =0
⎛ M −1 Nkl ⎞ ⎛ M −1 ⎞
get Y [ k ] = ⎜⎜ ∑ WMN ⎟⎟ X[ k ] = ⎜⎜ ∑ WNkl ⎟⎟ X [ k ].
⎝ l=0 ⎠ ⎝ l=0 ⎠

9
5.34 (a) X[0] = ∑ x[ n] = 30.
n=0
9
(b) X[5] = ∑ (−1) n x[ n] = 0.
n=0
9
(c) ∑ X[ k ] = 10 ⋅ x[0] = −30.
k =0
9
(d) The inverse DFT of e − j 2 πk / 5 X[ k ] is x[〈 n − 2〉 10 ]. Thus, ∑ e − j 2 πk / 5 X[ k ]
k =0
= 10 ⋅ x[〈0 − 2〉 10 ] = 10 ⋅ x[8] = −100.
9 2 9 2
(e) From Parseval’s relation, ∑ X[ k ] = 10 ⋅ ∑ x[ n] = 38600.
k =0 n=0

5.35 X[7] = X * [〈−7〉12 ] = X * [5] = 2 − j, X[8] = X * [〈−8〉12 ] = X * [ 4] = −3 − j 2,


X[9] = X * [〈−9〉12 ] = X * [3] = 6 − j3, X[10] = X * [〈−10〉12 ] = X * [2] = 1 + j12,
X[11] = X * [〈−11〉12 ] = X * [1] = 8 + j 2.
1 11
(a) x[0] = ∑ X[ k ] = 4.5,
12 k = 0
1 11 k
(b) x[6] = ∑ (−1) X[ k ] = −0.8333,
12 k = 0
11
(c) ∑ x[ n] = X[0] = 11,
n=0
(d) Let g[ n] = e j 2 πn / 3 x[ n] = W12
−4 n −4 n
x[ n]. Then, DFT{W12 x[ n]} = X [〈 k − 4〉 12 ].
11 11
Thus, ∑ g[ n] = ∑ e j 2 πn / 3 x[ n] = X[〈0 − 4〉 12 ] = X[8] = −3 − j 2,
n=0 n=0
11 2 1 11 2
(e) From Parseval’s relation, ∑ x[ n] = ∑ X[ k ] = 74.8333.
n =0 12 k =0

Not for sale. 120


6
5.36 Now, yC [ n] = ∑ g[l] h[〈 n − l〉 7 ]. Hence,
l=0
yC [0] = g[0] h[0] + g[1] h[6] + g[2] h[5] + g[3] h[ 4] + g[ 4] h[3] + g[5] h[2] + g[6] h[1],
yC [1] = g[0] h[1] + g[1] h[0] + g[2] h[6] + g[3] h[5] + g[ 4] h[ 4] + g[5] h[3] + g[6] h[2],
yC [2] = g[0] h[2] + g[1] h[1] + g[2] h[0] + g[3] h[6] + g[ 4] h[5] + g[5] h[ 4] + g[6] h[3],
yC [3] = g[0] h[3] + g[1] h[2] + g[2] h[1] + g[3] h[0] + g[ 4] h[6] + g[5] h[5] + g[6] h[ 4],
yC [ 4] = g[0] h[ 4] + g[1] h[3] + g[2] h[2] + g[3] h[1] + g[ 4] h[0] + g[5] h[6] + g[6] h[5],
yC [5] = g[0] h[5] + g[1] h[ 4] + g[2] h[3] + g[3] h[2] + g[ 4] h[1] + g[5] h[0] + g[6] h[6],
yC [6] = g[0] h[6] + g[1] h[5] + g[2] h[ 4] + g[3] h[3] + g[ 4] h[2] + g[5] h[1] + g[6] h[0].

6
Likewise, y L [ n] = ∑ g[l] h[ n − l]. Hence,
l=0
y L [0] = g[0]h[0],
y L [1] = g[0]h[1] + g[1]h[0],
y L [2] = g[0]h[2] + g[1]h[1] + g[2]h[0],
y L [3] = g[0]h[3] + g[1]h[2] + g[2]h[1] + g[3]h[0],
y L [ 4] = g[0]h[ 4] + g[1]h[3] + g[2]h[2] + g[3]h[1] + g[ 4]h[0],
y L [5] = g[0]h[5] + g[1]h[ 4] + g[2]h[3] + g[3]h[2] + g[ 4]h[1] + g[5]h[0],
y L [6] = g[0]h[6] + g[1]h[5] + g[2]h[ 4] + g[3]h[3] + g[ 4]h[2] + g[5]h[1] + g[6]h[0],
y L [7] = g[1]h[6] + g[2]h[5] + g[3]h[ 4] + g[ 4]h[3] + g[5]h[2] + g[6]h[1],
y L [8] = g[2]h[6] + g[3]h[5] + g[ 4]h[ 4] + g[5]h[3] + g[6]h[2],
y L [9] = g[3]h[6] + g[ 4]h[5] + g[5]h[ 4] + g[6]h[3],
y L [10] = g[ 4]h[6] + g[5]h[5] + g[6]h[ 4],
y L [11] = g[5]h[6] + g[6]h[5],
y L [12] = g[6]h[6].

Comparing yC [n] with y L [n] we observe that


yC [0] = y L [0] + y L [7],
yC [1] = y L [1] + y L [8],
yC [2] = y L [2] + y L [9],
yC [3] = y L [3] + y L [10],
yC [ 4] = y L [ 4] + y L [11],
yC [5] = y L [5] + y L [12],
yC [6] = y L [6].

5.37 Since x[n] is a length-9 real sequence, its DFT satisfies X[ k ] = X * [〈− k 〉 9 ]. Therefore,
X[1] = X * [〈−1〉 9 ] = X * [8] = −7.7 + j 3.2,

Not for sale. 121


X[3] = X * [〈−3〉 9 ] = X * [6] = 8.6 + j 9.6,
X[5] = X * [〈−5〉 9 ] = X * [ 4] = −3.5 − j 5.3,
X[7] = X * [〈−7〉 9 ] = X * [2] = 1.2 + j 4.1.

5.38 X[1] = X * [〈−1〉 9 ] = X * [8] = 4.5 − j1.6,


X[ 4] = X * [〈−4〉 9 ] = X * [5] = −3.1 − j8.2,
X[6] = X * [〈−6〉 9 ] = X * [3] = −7.2 + 4.1,
X[7] = X * [〈−7〉 9 ] = X * [2] = 1.2 + j 2.3.

5.39 Since the DFT X [k ] is real-valued, x[n] is a circularly even sequence, i.e.,
x[ n] = x[〈− n〉12 ]. Therefore,
x[1] = x[〈−1〉12 ] = x[11] = −2,
x[ 4] = x[〈−4〉12 ] = x[8] = 9.3,
x[7] = x[〈−7〉 12 ] = x[5] = 4.1,
x[9] = x[〈−9〉 12 ] = x[3] = −3.25,
x[10] = x[〈−10〉12 ] = x[2] = 0.7.

5.40 Since the DFT X [k ] is imaginary-valued, x[n] is a circularly odd sequence, i.e.,
x[ n] = − x[〈− n〉12 ]. Therefore,
x[7] = − x[〈−7〉 12 ] = − x[5] = 9.3,
x[8] = − x[〈−8〉12 ] = − x[ 4] = −2.87,
x[9] = − x[〈−9〉12 ] = − x[3] = −4.1,
x[10] = − x[〈−10〉12 ] = − x[2] = 3.25,
x[11] = − x[〈−11〉12 ] = − x[1] = −0.7.

5.41 X[ k ] = X * [〈− k 〉174 ] = X * [174 − k ].


X [9] = X * [174 − 9] = X * [165] = −3.4 + j 5.9 ⇒ X [165] = −3.4 − j 5.9.
X [51] = X * [174 − 51] = X * [123] = 5 − j1.6 ⇒ X [123] = 5 + j1.6.
X [113] = X * [174 − 113] = X * [61] = 8.7 − j 4.9 ⇒ X [61] = 8.7 + j 4.9.
X [162 ] = X * [174 − 162 ] = X * [12 ] = 7.1 − j 2.4 ⇒ X [12 ] = 7.1 + j 2.4.
X[ k1 ] = 7.1 + j 2.4, X[ k 2 ] = 8.7 + j 4.9, X[ k3 ] = 5 + j1.6, X[ k 4 ] = −3.4 − j 5.9.

(a) Comparing these 4 DFT samples with the DFT samples given above we conclude
k1 = 12, k2 = 61, k3 = 123, k 4 = 165.
(b) dc value of {x[ n]} = X [0] = 11.
1 173 − kn 1 − 9n − 51n
(c) x[ n] = ∑ X[ k ]W174 = ( X[0] + 2 Re{X[9]W174 } + 2 Re{X[51]W174 }
174 k = 0 174
−87 n −113n −162 n
+ X [87] W174 + 2 Re{X [113] W174 } + 2 Re{X [162 ] W174 })

Not for sale. 122


173 2 1 173 2
(d) ∑ x[ n] = ∑ X[ k ] = 86.0279.
n=0 174 k = 0

5.42 X[ k ] = X * [〈− k 〉 126 ] = X * [126 − k ].


X [ 0] = 12.8 + jα.
X [13] = X * [126 − 13] = X * [113] = −3.7 + j 2.2 ⇒ X [113] = −3.7 − j 2.2.
X [ 51] = X * [126 − 51] = X * [75] = − j1.7 ⇒ X [ 75] = j1.7.
X [13] = X * [126 − 13] = X * [113] = −3.7 + j 2.2 ⇒ X [113] = −3.7 − j 2.2.
X[ k1 ] = X * [126 − k1 ] = 9.1 − j 5.4 ⇒ X[126 − k1 ] = 9.1 + j 5.4.
X[ k2 ] = X * [126 − k2 ] = 6.3 + j 2.3 ⇒ X[126 − k2 ] = 6.3 − j 2.3.
X[ k3 ] = X * [126 − k3 ] = γ + j1.7 ⇒ X[126 − k3 ] = γ − j1.7.
X[ k 4 ] = X * [126 − k 4 ] = −3.7 − j 2.2 ⇒ X[126 − k 4 ] = −3.7 + j 2.2.

(a) (b) Since x[n] is a real-valued sequence of length 126, X [0] and X[63] must be
real. Thus, α = 0 and β = 0. As X[126 − k1 ] and X[108] have the same imaginary
part, ε = 9.1 and k1 = 126 − 108 = 18. Likewise, as X[ k2 ] and X [79] have the same
real part, δ = −2.3 and k2 = 126 − 79 = 47. Similarly, as X[126 − k3 ] and X[51] have
the same imaginary part, γ = 0 and k3 = 126 − 51 = 75. Finally, as
X[ k 4 ] = X[113], k 4 = 113.

(c) dc value of x[n] is X[0] = 12.8.

1 125 − kn 1 − 26 πn / 126
(d) x[ n] = ∑ X[ k ]W126 =
126 k = 0 126
(
X[0] + 2 Re{X[13]W126 }

− 36 πn / 126 −94 πn / 126 − 63πn


+ 2 Re{X[18]W126 } + 2 Re{X[ 47]W126 } + X[63]W126
−150πn / 126 − 226πn / 126
+ 2 Re{X[75]W126 } + 2 Re{X[113]W126 } . )
125 2 1 125 2
(e) ∑ x[ n] = ∑ X[ k ] = 5.767.
n=0 126 k = 0

5.43 Y [ k ] = W3−2 k X [ k ] = W9−6 k X [ k ]. Therefore, y[ n] = x[〈 n − 6〉 9 ]. Thus,


y[ 0] = x[3] = 4, y[1] = x[ 4] = −3, y[ 2] = x[ 5] = 5, y[3] = x[6] = −2, y[ 4] = x[ 7] = −2,
y[ 5] = x[8] = 4, y[6] = x[ 0] = 3, y[ 7] = x[1] = 5, y[8] = x[ 2] = 1.

5.44 H[ k ] = H * [〈− k 〉 9 ] = X * [9 − k ]. Hence, H [ 5] = H * [ 4] = −6.876 − j11.4883,


H [6] = H * [3] = − j8.6603, H [ 7] = H * [ 2] = 6.0346 + j1.957,
H [8] = H * [1] = 6.8414 + j 6.0572 .

Not for sale. 123


Now g[ n] = e j 2 πn / 3 h[ n] = e j 6 πn / 9 h[ n] = W9−6 n h[ n]. Therefore,
G[ k ] = H[〈 k − 6〉 9 ], 0 ≤ k ≤ 8. Thus, G[0] = H[〈−6〉 9 ] = H[3] = j8.6603,
G[1] = H[〈1 − 6〉 9 ] = H[ 4] = −6.876 − j11.4883,
G[2] = H[〈2 − 6〉 9 ] = H[5] = H * [ 4] = −6.876 + j11.4883,
G[3] = H[〈3 − 6〉 9 ] = H[6] = H * [3] = − j8.6603,
G[ 4] = H[〈 4 − 6〉 9 ] = H[7] = H * [2] = 6.0346 + j1.957,
G[5] = H[〈5 − 6〉 9 ] = H[8] = H * [1] = 6.8414 + j.0572,
G[6] = H[〈6 − 6〉 9 ] = H[0] = 15,
G[7] = H[〈7 − 6〉 9 ] = H[1] = 6.8414 − j 6.0572,
G[8] = H[〈8 − 6〉 9 ] = H[2] = 6.0346 − j1.957.

5.45 (a) y L [0] = g[0] h[0] = −4,


y L [1] = g[0] h[1] + g[1] h[0] = 10,
y L [2] = g[0] h[2] + g[1] h[1] + g[2] h[0] = −6,
y L [3] = g[0] h[3] + g[1] h[2] + g[2] h[1] = 8,
y L [ 4] = g[1] h[3] + g[2] h[2] = 7,
y L [5] = g[2] h[3] = −3.

(b) yC [0] = g e [0] h[0] + g e [1] h[3] + g e [2] h[2] + g e [3] h[1]
= g[ 0]h[ 0] + g[1]h[3] + g[ 2]h[ 2] = 3,
yC [1] = g e [0] h[1] + g e [1] h[0] + g e [2] h[3] + g e [3] h[2]
= g[0]h[1] + g[1]h[ 0] + g[ 2]h[3] = 7,
yC [2] = g e [0] h[2] + g e [1] h[1] + g e [2] h[0] + g e [3] h[3]
= g[ 0]h[ 2] + g[1]h[1] + g[2]h[ 0] = −6,
yC [3] = g e [0] h[3] + g e [1] h[2] + g e [2] h[1] + g e [3] h[0]
= g[0]h[3] + g[1]h[ 2] + g[ 2]h[1] = 8.
⎡Ge [0]⎤ ⎡1 1 1 1 ⎤⎡ 2 ⎤ ⎡ 4 ⎤
⎢ Ge [1] ⎥ ⎢1 − j − 1 j ⎥ ⎢− 1⎥ ⎢− 1 + j ⎥
(c) ⎢ = =
G [2]⎥ ⎢1 − 1 1 − 1⎥ ⎢ 3 ⎥ ⎢ 6 ⎥
,
⎢ e ⎥ ⎢1 j − 1 j ⎥ ⎢ 0 ⎥ ⎢ − 1 − j ⎥
⎣Ge [3]⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦
⎡ H[0]⎤ ⎡1 1 1 1 ⎤ ⎡− 2⎤ ⎡ 3 ⎤
⎢ H [1] ⎥ ⎢1 − j − 1 j ⎥ ⎢ 4 ⎥ ⎢ − 4 − j 5⎥
⎢ H[2]⎥ = ⎢1 − 1 1 − 1⎥ ⎢ 2 ⎥ = ⎢ − 3 ⎥.
⎢ H [3]⎥ ⎢⎣1 j − 1 j ⎥⎦ ⎣⎢ − 1 ⎦⎥ ⎢⎣− 4 + j 5⎥⎦
⎣ ⎦
⎡YC [0]⎤ ⎡Ge [0]H [0]⎤ ⎡ 12 ⎤
⎢ YC [1] ⎥ ⎢ Ge [1]H [1] ⎥ ⎢9 + j ⎥
⎢Y [2]⎥ = ⎢G [2]H[2]⎥ = ⎢ − 18 ⎥. Therefore
⎢ C ⎥ ⎢ e ⎥ ⎢9 − j ⎥
⎣YC [3]⎦ ⎣ Ge [3]H[3]⎦ ⎣ ⎦

Not for sale. 124


⎡ yC [0]⎤ ⎡1 1 1 1 ⎤ ⎡ 12 ⎤ ⎡ 3 ⎤
⎢ yC [1] ⎥ 1 ⎢1 j − 1 − j ⎥ ⎢9 + j ⎥ ⎢ 7 ⎥
⎢ y [2]⎥ = ⎢1 − 1 1 − 1⎥ ⎢ − 18 ⎥ = ⎢− 6 ⎥.
⎢ C ⎥ 4 ⎢1 − j − 1 j ⎥ ⎢9 − j ⎥ ⎢ 8 ⎥
⎣ yC [3]⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦

(d) g e [ n] = [2, − 1, 3, 0, 0, 0], he [ n] = [− 2, 4, 2, − 1, 0, 0].


yC [0] = g e [0] he [0] + g e [1] he [5] + g e [2] h e [ 4] + g e [3] he [3] + g e [ 4] he [2] + g e [5] he [1]
= g[0]h[0] = −4 = y L [0],
yC [1] = g e [0] he [1] + g e [1] he [0] + g e [2] h e [5] + g e [3] he [6] + g e [ 4] he [3] + g e [5] he [2]
= g[0]h[1] + g[1]h[0] = 10 = y L [1],
yC [2] = g e [0] he [2] + g e [1] he [1] + g e [2] h e [0] + g e [3] he [5] + g e [ 4] he [ 4] + g e [5] he [3]
= g[0]h[2] + g[1]h[1] + g[2]h[0] = −6 = y L [2],
yC [3] = g e [0] he [3] + g e [1] he [2] + g e [2] h e [1] + g e [3] he [0] + g e [ 4] he [5] + g e [5] he [ 4]
= g[0]h[3] + g[1]h[2] + g[2]h[1] = 8 = y L [3],
yC [ 4] = g e [0] he [ 4] + g e [1] he [3] + g e [2] h e [2] + g e [3] he [1] + g e [ 4] he [0] + g e [5] he [5]
= g[1]h[3] + g[2]h[2] = 7 = y L [ 4],
yC [5] = g e [0] he [5] + g e [1] he [ 4] + g e [2] h e [3] + g e [3] he [2] + g e [ 4] he [1] + g e [5] he [0]
= g[2]h[3] = −3 = y L [5].

N h[ n] = h[ n] O
5.46 We need to show g[ n] O N g[ n]. Let

N −1
x[ n] = g[ n] O
N h[ n] = ∑ g[ m ]h[ 〈 n − m〉 N ] and
m=0
N −1 n N −1
y[ n] = h[ n] O
N g[ n] = ∑ h[ m ]g[ 〈 n − m〉 N ] = ∑ h[ m ]g[ n − m ] + ∑ h[ m]g[ N + n − m]
m=0 m=0 m = n +1
n N −1 N −1
= ∑ h[ n − m]g[ m] + ∑ h[ N + n − m]g[ m] = ∑ h[〈 n − m〉 N ]g[ m] = x[ n].
m =0 m = n +1 m=0

N −1
5.47 (a) y[ n] = x1[ n] O
N x 2 [ n] = ∑ x1[ m ] x 2 [ 〈 n − m〉 N ]. Thus,
m=0
N −1 N −1 N −1 ⎛ N −1 ⎞⎛ N −1 ⎞
∑ y[ n] = ∑ x1[ m] ∑ x[〈 n − m〉 N ] = ⎜⎜ ∑ x1[ n] ⎟⎟⎜⎜ ∑ x 2 [ n] ⎟⎟.
n=0 m =0 n =0 ⎝ n=0 ⎠⎝ n = 0 ⎠

(b)
N −1 N −1 N −1
n n
∑ (−1) y[ n] = ∑ x1[ m] ∑ x[〈 n − m〉 N ](−1)
n=0 m=0 n=0
⎛ N −1 ⎞⎛ m −1 N −1 ⎞
= ⎜⎜ ∑ x1[ m] ⎟⎟⎜⎜ ∑ x 2 [ N + m − n](−1) n + ∑ x 2 [ m − n](−1) n ⎟⎟. Replacing n by
⎝ m =0 ⎠⎝ n = 0 n=m ⎠

Not for sale. 125


N + n − m in the first sum on the right-hand side and by n − m in the second sum on
the right-hand side we obtain
N −1 ⎛ N −1 ⎞⎛ m −1 N −1 ⎞
n−N +m
∑ (−1) y[ n] = ⎜⎜ ∑ x1[ m] ⎟⎟⎜⎜ ∑ x 2 [ n](−1)
n
+ ∑ x 2 [ n](−1) n + m ⎟⎟
n =0 ⎝ m =0 ⎠⎝ n = 0 n=m ⎠
⎛ N −1 ⎞⎛ N −1 ⎞
= ⎜⎜ ∑ (−1) n x1[ n] ⎟⎟⎜⎜ ∑ (−1) n x 2 [ n] ⎟⎟.
⎝ n=0 ⎠⎝ n = 0 ⎠
N N
−1 −1
N 3 3
5.48 y[ n] = x[3n], 0 ≤ n ≤ − 1. Therefore, Y [ k ] = ∑ y[ n]WNnk/ 3 = ∑ x[ 4 n]WNnk/ 3 .
3 n= n=
1 N −1 1 N −1
− 3mn − mn
Now, x[ n] = ∑ X [ m ] WN = ∑ X [ m]WN / 3 . Hence,
N m =0 N m=0
N N
−1 −1
1 3 N −1 1 N −1
( k − m )n 3
− mn nk
Y [k ] = ∑ ∑ X [ m ] WN / 3 WN / 3 = ∑ X[ m] ∑ WN / 3 . Since
N n =0 m =0 N m=0 n=0
N
−1
3 ⎧N
( k − m )n ⎪ , m = k , k + , k +
N 2N
, k + N,
∑ WN / 3 =⎨3 3 3 Thus,
n=0 ⎪⎩ 0, elsewhere.

Y [ k ] = ⎛⎜ X [ k ] + X [ k + ] + X [ k + ] + X [ k + N ] ⎞⎟.
1 N 2N
3⎝ 3 3 ⎠

1
5.49 v[ n] = x[ n] + jy[ n]. Hence, X[ k ] = {V [ k ] + V * [〈− k 〉 8 ]} is the 8 –point DFT of x[n]
2
1
and Y [ k ] = {V [ k ] − V * [〈− k 〉 8 ]} is the 8 –point DFT of y[n].
2j
V [ k ] = [3 + j 7, − 2 + j 6, 1 − j 5, 4 − j 9, 5 + j 2, 3 − j 2, j 4, − 3 − j8].
V * [〈− k 〉 8 ] = [3 + j 7, − 3 + j8, − j 4, 3 + j 2, 5 − j 2, 4 + j 9, 1 + j 5, − 2 − j 6].
Therefore,
X[ k ] = ⎡3 + j 7, − + j 7, − j , − − j 7 ⎤,
5 1 9 7 7 7 7 1 9 5
+ j , − j , 5, + j ,
⎢⎣ 2 2 2 2 2 2 2 2 2 2 ⎥⎦
Y [ k ] = ⎡0, − 1 − j , − − j , − − j , 2, − + j , − + j , − 1 + j ⎤.
1 1 1 11 1 11 1 1 1 1
⎢⎣ 2 2 2 2 2 2 2 2 2 2 ⎥⎦
The IDFT of V [k ] obtained using MATLAB is given by

Columns 1 through 4

1.3750 - 0.6250i -0.8044 + 1.7223i -1.7500 + 1.2500i


-0.9331 - 0.1187i

Columns 5 through 8

0.8750 + 2.6250i 2.5544 - 0.2223i 3.5000 + 1.2500i


-1.8169 + 1.1187i

Not for sale. 126


The same result is obtained by computing the IDFT x[n] of X [k ] and the IDFT y[n]
of Y [k ] using MATLAB and then forming x[ n] + jy[ n].

5.50 v[ n] = g[ n] + j h[ n] = [2 − j 2, − 1 + j 4, 3 + j 2, − j ]. Therefore,
⎡V [0]⎤ ⎡1 1 1 1 ⎤ ⎡ 2 − j 2 ⎤ ⎡ 4 + j3 ⎤
⎢ V [1] ⎥ ⎢1 − j − 1 j ⎥ ⎢− 1 + j 4⎥ ⎢ 4 − j 3 ⎥
⎢V [2]⎥ = ⎢1 − 1 1 − 1⎥ ⎢ 3 + j 2 ⎥ = ⎢ 6 − j 3 ⎥, i.e.,
⎢V [3]⎥ ⎢⎣1 j − 1 − j ⎥⎦ ⎢ − j ⎥ ⎢− 6 − j 5⎥
⎣ ⎦ ⎣ ⎦ ⎣ ⎦
V [ k ] = [4 + j3, 4 − j3, 6 − j3, − 6 − j 5].
Thus, V * [〈− k 〉 4 ] = [4 + j3, − 6 + j 5, 6 + j 3, 4 + j3]. Therefore,
G[ k ] =
1
2
( ) [
V [ k ] + V * [〈− k 〉 4 ] = 4, − 1 + j, 6, − 1 − j ] and

H[ k ] =
1
2j
( ) [
V [ k ] − V * [〈− k 〉 4 ] = 3, − 4 − j 5, − 3, − 4 + j 5].

5.51 Let p[ n] = IDFT{P[ k ]}. Thus,


⎡ p[0]⎤ ⎡1 1 1 1 ⎤ ⎡ − 5 ⎤ ⎡ − 1.25 ⎤
⎢ p[1] ⎥ 1 ⎢1 j − 1 − j ⎥ ⎢− 2 + j 5⎥ ⎢− 4.75⎥
⎢ p[2]⎥ = ⎢1 − 1 1 − 1⎥ ⎢ 4 ⎥ = ⎢ 0.75 ⎥
⎢ ⎥ 4 ⎢1 − j − 1 j ⎥ ⎢− 2 − j 5⎥ ⎣⎢ 0.25 ⎦⎥
⎣ p[3]⎦ ⎣ ⎦⎣ ⎦
⎡d[0]⎤ ⎡1 1 1 1 ⎤⎡ 3 ⎤ ⎡ 1 ⎤
⎢ d[1] ⎥ 1 ⎢1 j − 1 − j ⎥ ⎢4 + j ⎥ ⎢ 2 ⎥
⎢d[2]⎥ = 4 ⎢1 − 1 1 − 1⎥ ⎢ − 7 ⎥ = ⎢− 3⎥. Therefore,
⎢ d[3]⎥ ⎢⎣1 − j − 1 j ⎥⎦ ⎢⎣4 − j ⎥⎦ ⎢⎣ 3 ⎥⎦
⎣ ⎦
− 1.25 − 4.75 e − jω + 0.75 e − j 2 ω + 0.25 e − j 3ω
X ( e jω ) = .
1 + 2 e − j ω − 3 e − j 2 ω + 3 e − j 3ω
5.52 Let p[ n] = IDFT{P[ k ]}. Thus,
⎡ p[0]⎤ ⎡1 1 1 1 ⎤ ⎡ 8 ⎤ ⎡ − 1.25 ⎤
⎢ p[1] ⎥ 1 ⎢1 j − 1 − j ⎥ ⎢− 5 − j 6 ⎥ ⎢ 5.75 ⎥
⎢ p[2]⎥ = ⎢1 − 1 1 − 1⎥ ⎢ − 3 ⎥ = ⎢ 3.75 ⎥
⎢ ⎥ 4 ⎢1 − j − 1 j ⎥ ⎢− 5 + j 6 ⎥ ⎢⎣− 0.25⎥⎦
⎣ p[ 3] ⎦ ⎣ ⎦⎣ ⎦
⎡d[0]⎤ ⎡1 1 1 1 ⎤ ⎡ 3 ⎤ ⎡ 2.75 ⎤
⎢ d[1] ⎥ 1 ⎢1 j − 1 − j ⎥ ⎢4 + j ⎥ ⎢− 3.75⎥
⎢d[2]⎥ = 4 ⎢1 − 1 1 − 1⎥ ⎢ − 7 ⎥ = ⎢− 3.25⎥. Therefore,
⎢ d[3]⎥ ⎢⎣1 − j − 1 j ⎥⎦ ⎢⎣4 − j ⎥⎦ ⎣⎢ − 1.75 ⎦⎥
⎣ ⎦
jω − 1.25 + 54.75 e − jω + 3.75 e − j 2 ω − 0.25 e − j 3ω
X (e )= .
2.75 − 3.75 e − jω − 3.25 e − j 2ω − 1.75 e − j 3ω

N −1 N −1
5.53 X (e jω ) = ∑ x[ n] e − jωn and Xˆ [ k ] = ∑ x[ n] e − j 2 πkn / M . Now,
n=0 n=0

Not for sale. 127


1 M −1 ˆ − nk 1 M −1 N −1 − j 2 πkm / M − nk
xˆ[ n] = ∑ X [ k ] WM = ∑ ∑ x[ m] e WM
M k =0 M k =0 m =0
1 N −1 N −1
− j 2 πk ( m − n ) / M

= ∑ x[ m] ∑ e = ∑ x[ n + rM ].
M m =0 k =0 r = −∞
Thus, xˆ[ n] is obtained by shifting x[n] in multiples of M and adding the shifted
copies. Since the new sequence is obtained by shifting in multiples of hence, to recover
the original sequence take any consecutive N samples in the range 0 ≤ n ≤ N − 1 for
any value of r. This would be true only if the shifted copies of x[n] did not overlap
with each other, that is, if and only if M ≥ N .

8 8
5.54 (a) X (e jω ) = ∑ x[ n] e − jωn . Therefore, X1[ k ] = ∑ x[ n] e − j 2 πkn / 12 . Hence,
n=0 n=0
1 11 j 2 πkn / 12 1 11 ⎛ 8 j 2 πkm / 12 ⎞⎟ j 2 πkn / 12
x1[ n] = ∑ X[ k ] e = ∑ ⎜⎜ ∑ x[ m] e ⎟e
12 k = 0 12 k = 0 ⎝ m = 0 ⎠
1 8 11 ∞
j 2 πk ( n − m ) / 12
= ∑ x[ m] ∑ e = ∑ x[ n + 12r ] using the results of Problem 5.53.
12 m = 0 k =0 r = −∞
Since M = 12 and N = 9, M > N , and hence, x[n] is recoverable from x1[ n]. In fact
x1[ n] = {1, − 2, 3, − 4, 5, − 4, 3, − 2, 1, 0, 0, 0}, 0 ≤ n ≤ 11, and x[n] is
given by the first 9 samples of x1[ n].

8
(b) Here, X 2 [ k ] = ∑ x[ n] e − j 2 πkn / 8 . Hence,
n=0
1 7 7 ⎛ 8 ⎞
j 2 πkn / 8 1
x1[ n] = ∑ X[ k ] e = ∑ ⎜⎜ ∑ x[ m] e j 2 πkm / 8 ⎟⎟ e j 2 πkn / 8
8 k =0 8 k =0 ⎝ m =0 ⎠
1 8 7 ∞
j 2 πk ( n − m ) / 8
= ∑ x[ m] ∑ e = ∑ x[ n + 8r ] using the results of Problem 5.53.
8 m =0 k =0 r = −∞
Since M = 8 and N = 9, M < N , and hence, x[n] is not recoverable from x1[ n]. In
fact x 2 [ n] = [2, − 2, 3, − 4, 5, − 4, 3, − 2, 2, − 1, 1], 0 ≤ n ≤ 10.

1 N −1 − kn
5.55 x[ n] = ∑ X[ k ]WN . Let n = N − m. Then,
N k =0
1 N −1 − k( N − m) 1 N −1 km 1
x[ m] = ∑ X [ k ] WN = ∑ X[ k ]WN = F {X [ k ]}. Therefore,
N k =0 N k =0 N
1 1
x[ N − n] = F {X [ k ]} = F { F {x[ n]}}, or, F { F {x[ n]}} = N ⋅ x[ N − n]. Hence,
N N
F { F { F { F {x[ n]}}}} = N 2 ⋅ x[ N − n].

Not for sale. 128


100 100 36
5.56 y[ n] = x[ n] O
* h[ n] = ∑ x[ k ] h[ n − k ] = ∑ h[ k ] x[ n − k ] = ∑ h[ k ] x[ n − k ].
k =0 k =0 k =17
50 36
u[ n] = x[ n] O
N h[ n] = ∑ h[ k ] x[ 〈 n − k 〉 51 ] = ∑ h[ k ] x[ 〈 n − k 〉 51 ].
k =0 k =17
Now, for n ≥ 36, x[〈 n − k 〉 51 ] = x[ n − k ]. Thus, y[ n] = u[ n] for 36 ≤ n ≤ 50.

5.57 (a) Overlap-add method: Since the impulse response is of length and the DFT size to
be used is 128, hence, the number of data samples required for each convolution will be
128 − 109 = 19. Thus the total number of DFTs required for the length- 1300 data
sequence is ⎡
1300 ⎤
= 69. Also, the DFT of the impulse response needs to be computed
⎢ 19 ⎥
once. Hence, the total number of DFTs used are = 69 + 1 = 70. The total number of
IDFTs used are = 69.

(b) Overlap-save method: In this case, since the first 110 − 1 = 109 points are lost, we
need to pad the data sequence with 109 zeros for a total length of 1409. Again, each
convolution will result in 128 − 109 = 19 correct values. Thus the total number of
DFTs required for the data are ⎡
1409 ⎤
= 75. Again, 1 DFT is required for the impulse
⎢ 19 ⎥
response. The total number of DFTs used are 75 + 1 = 76. The total number of IDFTs
used are = 75.

⎧ x[ n / L ], n = 0, L, 2 L,K, ( N − 1)L,
5.58 (a) y[ n] = ⎨
⎩ 0, elsewhere.
NL −1 N −1 N −1
nk nLk
Y [ k ] = ∑ y[ n]WNL = ∑ x[ n]WNL = ∑ x[ n]WNnk . For k ≥ N , let k = k o + rN
n=0 n=0 n=0
N −1 n( k o + rN ) N −1 nk o
where ko = 〈 k 〉 N . Then, Y [ k ] = Y [ k o + rN ] = ∑ x[ n]WN = ∑ x[ n]WN
n=0 n=0
= X[ ko ] = X[〈 k 〉 N ].

(b) Since Y [ k ] = X[〈 k 〉 5 ] for 0 ≤ k ≤ 20, a sketch of Y [k ] is thus as shown below.

5.59 x 0 [ n] = x[2 n + 1] + x[2n], x1[ n] = x[2 n + 1] − x[2n], y0 [ n] = y[2n + 1] + y[2n], and


N
y1[ n] = y[2n + 1] − y[2n], 0 ≤ n ≤ − 1. Since x[n] and y[n] are real, symmetric
2
sequences, it follows that x 0 [ n] and y0 [ n] are real, symmetric sequences, and x1[ n]
N
and y1[ n] are real, antisymmetric sequences. Now, consider the –length sequence
2
u[ n] = x 0 [ n] + y1[ n] + j (x1[ n] + y0 [ n]). Its conjugate sequence is given by
u * [ n] = x 0 [ n] + y1[ n] − j (x1[ n] + y0 [ n]). Next, we observe that
u[〈− n〉 N / 2 ] = x 0 [〈− n〉 N / 2 ] + y1[〈− n〉 N / 2 ] + j (x1[〈− n〉 N / 2 ] + y0 [〈− n〉 N / 2 ])

Not for sale. 129


= x 0 [ n] − y1[ n] + j (− x1[ n] + y0 [ n]). Its conjugate sequence is given by
u * [〈− n〉 N / 2 ] = x 0 [ n] − y1[ n] − j (− x1[ n] + y0 [ n]).
By adding the last 4 sequences we get
4 x 0 [ n] = u[ n] + u * [ n] + u[〈− n〉 N / 2 ] + u * [〈− n〉 N / 2 ].
From Table 5.3, if U [ k ] = DFT{u[ n]}, then U * [〈− k 〉 N / 2 ] = DFT{u * [ n]},
U * [ k ] = DFT{u * [〈− n〉 N / 2 ]}, and U[〈− k 〉 N / 2 ] = DFT{u[〈− n〉 N / 2 ]}. Thus,
X 0 [ k ] = DFT{x 0 [ n]} =
1
4
(U[k ] + U * [〈− k〉 N / 2 ] + U[〈− k〉 N / 2 ] + U * [k ]). Similarly,
j 4 x1[ n] = u[ n] − u * [ n] − u[〈− n〉 N / 2 ] + u * [〈− n〉 N / 2 ]. Hence,
X1[ k ] = DFT{x1[ n]} =
1
j4
(
U[ k ] − U * [〈− k 〉 N / 2 ] − U[〈− k 〉 N / 2 ] + U * [ k ] . Likewise, )
4 y1[ n] = u[ n] − u[〈− n〉 N / 2 ] + u * [ n] − u * [〈− n〉 N / 2 ]. Thus,
Y1[ k ] = DFT{y1[ n]} =
1
4
(U[k ] − U[〈− k〉 N / 2 ] + U * [〈− k〉 N / 2 ] − U * [k ]). Finally,
j 4 y0 [ n] = u[ n] + u[〈− n〉 N / 2 ] − u * [ n] − u * [〈− n〉 N / 2 ]. Hence,
Y0 [ k ] = DFT{y0 [ n]} =
1
j4
(
U[ k ] + U[〈− k 〉 N / 2 ] − U * [〈− k 〉 N / 2 ] − U * [ k ] . )

2 π( n + a )( k + b )
N −1 −j
5.60 X GDFT [ k, a, b] = ∑ x[ n] e N .
n=0
2 π( n + a )( k + b ) 2 π( r + a ) k + b ) 2 π( n + a ) k + b )
1 N −1 j 1 N −1 N − 1 −j j
x[ n] = ∑ X[ k ] e N = ∑ ∑ x[r ] e N e N
N k =0 N k =0 r =0
2 π( n + a − r − a )( k + b ) 2 π( n − r )( k + b )
1 N −1 N − 1 j 1 N −1 N − 1 j
= ∑ ∑ x[r ] e N = ∑ ∑ x[r ] e N
N k =0 r =0 N k =0 r =0
2 π( n − r )( k + b )
1 N −1 N −1 j 1
= ∑ x[r ] ∑ e N = ⋅ x[ n] ⋅ N = x[ n], as from Eq. (5.23)
N r =0 k =0 N
2 π( n − r )( k + b )
N −1 j N , if n = r ,
∑ e N = ⎧⎨
k =0 ⎩ 0, otherwise.

5.61 (a) x[ n] = α g[ n] + β h[ n]. Thus,


N −1 N −1
⎟ = ∑ (α g[ n] + β h[ n]) cos⎛⎜
πk (2 n +1) ⎞ πk (2 n + 1) ⎞
X DCT [ k ] = ∑ x[ n] cos⎛⎜ ⎟
n=0 ⎝ 2N ⎠ n=0 ⎝ 2N ⎠
N −1 πk (2 n +1) ⎞ N −1
πk (2 n + 1) ⎞
= ∑ α g[ n] cos⎛⎜ ⎟ + ∑ β h[ n] cos⎛⎜ ⎟ = α G DCT [ k ] + β H DCT [ k ].
n=0 ⎝ 2N ⎠ n =0 ⎝ 2N ⎠

Not for sale. 130


N −1 πk (2 n + 1) ⎞ N −1 πk (2 n + 1) ⎞
(b) G DCT [ k ] = ∑ g[ n] cos⎛⎜ ⎟ ⇒ G *DCT [ k ] = ∑ g * [ n] cos⎛⎜ ⎟.
n=0 ⎝ 2N ⎠ n=0 ⎝ 2N ⎠
DCT
Therefore, g * [ n] ↔ G *DCT [ k ].

N −1 ⎧ N , if k = m = 0,
πk (2 n +1) ⎞ πm(2 n +1) ⎞ ⎪
(c) Note that ∑ cos⎛⎜ ⎟ cos⎛⎜ ⎟ = ⎨ N/2, if k = m and k ≠ 0, Now,
n=0 ⎝ 2N ⎠ ⎝ 2N ⎠ ⎪
⎩ 0, otherwise.
1 N −1 N −1 π(2 n +1)k ⎞ π(2 n +1)k ⎞
∑ α[ k ] α[ m] G DCT [ k ]G DCT [ m] cos⎛⎜ ⎟ cos⎛⎜
*
g[ n] g * [ n] = ∑ ⎟.
N2 k =0 m =0 ⎝ 2N ⎠ ⎝ 2N ⎠
Thus,
N −1 1 N −1 N − 1 N − 1 π(2 n +1)k ⎞ π(2 n +1)k ⎞
∑ α[ k ] α[ m] G DCT [ k ]G DCT [ m] cos⎛⎜ ⎟ cos⎛⎜
2 *
∑ g[ n] = ∑ ∑ ⎟.
n=0 N2 n=0 k =0 m =0 ⎝ 2 N ⎠ ⎝ 2N ⎠

Using the orthogonality property mentioned earlier we get


N −1 2 1 N −1 2
∑ g[ n] = ∑ α[ k ] G DCT [ k ] .
n=0 2N k =0

⎡13 13 13 13 ⎤
⎢17 7 − 7 − 17⎥⎥
5.62 (a) HN =⎢ . The matrix H N is orthogonal if H N H TN = cI
⎢13 − 13 − 13 13 ⎥
⎢ ⎥
⎣7 − 17 17 −7⎦
where I is the 4 × 4 identity matrix and c is a constant. Now,
⎡13 13 13 13 ⎤ ⎡13 17 13 7 ⎤ ⎡676 0 0 0 ⎤
H N H TN = ⎢17 7 − 7 − 17⎥ ⎢13 7 − 13 − 17⎥ = ⎢ 0 676 0 0 ⎥.
⎢13 − 13 − 13 13 ⎥ ⎢13 − 7 − 13 17 ⎥ ⎢ 0 0 676 0 ⎥
⎣⎢ 7 − 17 17 − 7 ⎦⎥ ⎣⎢13 − 17 13 − 7 ⎦⎥ ⎣⎢ 0 0 0 676⎦⎥
Hence, the matrix is orthogonal and all its rows have the same L 2 -norm.

⎡1 1 1 1 ⎤
⎢2 1 − 1 − 2 ⎥
(b) G N = ⎢ ⎥. Next, we observe
⎢1 − 1 − 1 1 ⎥
⎢ ⎥
⎣1 − 2 2 − 1 ⎦
⎡1 1 1 1 ⎤ ⎡1 2 1 1 ⎤ ⎡4 0 0 0 ⎤
G N G TN ⎢ − − ⎥ ⎢
= 1 −1 −1 1 1 −1 −1 − 2
2 1 1 2 1 1 − 1 − ⎥ ⎢0 10 0 0 ⎥
⎢ ⎥⎢ 2⎥ = ⎢0 0 4 0 ⎥ which shows that
⎢⎣1 − 2 2 − 1⎥⎦ ⎢⎣1 − 2 1 − 1⎥⎦ ⎢⎣0 0 0 10⎥⎦
the rows of G N are orthogonal but do not have the same L 2 -norms.

Not for sale. 131


5.63 (a) H 2 = ⎡1 1 ⎤. Now, H t2 H 2 = ⎡1
1 1 1 ⎤ ⎡1 1 ⎤ = ⎡1 0⎤ = I .
⎣⎢1 − 1⎥⎦ 2 2 ⎢⎣1 − 1⎦⎥ ⎢⎣1 − 1⎦⎥ ⎢⎣0 1 ⎥⎦ 2

⎡H H2 ⎤
H4 = ⎢ 2 . Thus,
⎣H 2 − H 2 ⎥⎦
⎡1 0 0 0⎤
1 ⎡H 2 H t2 ⎤ ⎡H 2 H 2 ⎤ 1 ⎡4I 2 4I 2 ⎤ ⎢0
t
1 t
H H = ⎢ t = = 1 0 0⎥ = I .
4 4 4 t ⎥ ⎢H − H 2 ⎥⎦ 4 ⎢⎣4I 2 4I 2 ⎥⎦ ⎢0 0 1 0⎥ 4
⎣ 2 − H 2 ⎦⎥ ⎣ 2
4 ⎢H
⎢⎣0 0 0 1⎥⎦
1 1 ⎡H t H tN / 2 ⎤ ⎡H N / 2 H N / 2 ⎤ 1 ⎡ NI N / 2 NI N / 2 ⎤
H tN H N = ⎢ tN / 2 ⎥ = = IN .
N N ⎢⎣H N / 2 − H tN / 2 ⎥⎦ ⎢⎣H N / 2 − H N / 2 ⎥⎦ N ⎢⎣ NI N / 2 NI N / 2 ⎥⎦
N −1 t
(b) From Eq. (5.172), ∑ x[ n] = x t x = ⎛⎜ H tN X Haar ⎞⎟ ⎛⎜ H tN X Haar ⎞⎟
2 1 1
n=0 ⎝N ⎠ ⎝N ⎠
1 1 1 N −1 2
= X tHaar H N H tN X Haar = X tHaar X Haar = ∑ X Haar [ k ] as from Eq.
N2 N N k =0

(5.171) H N H tN + N .

N −1
5.64 X DHT [ k ] = ∑ x[ n] ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + sin⎛⎜ ⎟ ⎟. Now,
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠

X DHT [ k ]⎛⎜ cos⎛⎜


2 πmk ⎞ 2 πmk ⎞ ⎞
⎟ + sin⎛⎜ ⎟⎟
⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1
= ∑ x[ n] ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞⎛ 2 πmk ⎞ 2 πmk ⎞ ⎞
⎟ + sin⎛⎜ ⎟ ⎟⎜ cos⎛⎜ ⎟ + sin⎛⎜ ⎟ ⎟. Therefore,
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠ ⎠⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1
∑ X DHT [ k ]⎛⎜ cos⎛⎜
2 πmk ⎞ 2 πmk ⎞ ⎞
⎟ + sin⎛⎜ ⎟⎟
k =0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1 N −1
= ∑ x[ n] ∑ ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞⎛ 2 πmk ⎞ 2 πmk ⎞ ⎞
⎟ + sin⎛⎜ ⎟ ⎟⎜ cos⎛⎜ ⎟ + sin⎛⎜ ⎟ ⎟.
n=0 k =0 ⎝ ⎝ N ⎠ ⎝ N ⎠ ⎠⎝ ⎝ N ⎠ ⎝ N ⎠⎠
⎧ N , if m = n = 0,
N −1 2 πnk ⎞ ⎪ N / 2, if m = n ≠ 0,
2 πmk ⎞
It can be shown that ∑ cos⎛⎜ ⎟ ⋅ cos⎛⎜ =⎨ ⎟
⎝ N ⎠ ⎝ N ⎠ N / 2, if m = N − n,
k =0 ⎪
⎩ 0, otherwise,
⎧ N , if m = n = 0,
N −1
∑ sin⎛⎜
2 πnk ⎞⎟ ⋅ sin⎛⎜ 2 πmk ⎞⎟ = ⎪ N / 2, if m = n ≠ 0,

k =0 ⎝ N ⎠ ⎝ N ⎠ ⎪− N / 2, if m = N − n,
⎩ 0, otherwise,
N −1 2 πnk ⎞ 2 πmk ⎞ N −1 2 πnk ⎞ 2 πmk ⎞
∑ sin⎛⎜ ⎟ ⋅ cos⎛⎜ ⎟ = ∑ cos⎛⎜ ⎟ ⋅ sin⎛⎜ ⎟ = 0.
k =0 ⎝ N ⎠ ⎝ N ⎠ k =0 ⎝ N ⎠ ⎝ N ⎠
1 N −1
∑ X DHT [ n] ⎛⎜ cos⎛⎜
2 πmk ⎞ 2 πmk ⎞ ⎞
Hence, x[ m] = ⎟ + sin⎛⎜ ⎟ ⎟.
N n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠

Not for sale. 132


⎧ x[ n − no + N ], 0 ≤ n ≤ no − 1,
5.65 (a) y[ n] = x[〈 n − no 〉 N ] = ⎨
⎩ x[ n − no ], n o ≤ n ≤ N − 1.
N −1
YDHT [ k ] = ∑ y[ n] ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + sin⎛⎜ ⎟⎟
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
n −1
2 πnk ⎞ ⎞ N −1
= ∑ x[ n − no + N ] ⎛⎜ cos⎛⎜ ⎟ ⎟ + ∑ x[ n − no ] ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + sin⎛⎜ ⎟ + sin⎛⎜
o
⎟⎟ .
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠ n=n ⎝ ⎝ N ⎠
o
⎝ N ⎠⎠
Replacing n − no + N by n in the first sum and n − no by n in the second sum we get
N −1
x[ n] ⎛⎜ cos⎛⎜
2 π( n + n o )k ⎞ 2 π( n + n o )k ⎞ ⎞
YDHT [ k ] = ∑ ⎟ + sin⎛⎜ ⎟⎟
n = N − no ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
n −1
+ ∑ x[ n] ⎛⎜ cos⎛⎜
2 π( n + n o ) k ⎞ 2 π( n + n o ) k ⎞ ⎞
⎟ + sin⎛⎜
o
⎟⎟
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1
= ∑ x[ n] ⎛⎜ cos⎛⎜
2 π( n + n o ) k ⎞ 2 π( n + n o ) k ⎞ ⎞
⎟ + sin⎛⎜ ⎟⎟
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
2 πn o k ⎞ N −1 ⎛ 2 πnk ⎞ ⎞
= cos⎛⎜
2 πnk ⎞
⎟ ∑ x[ n] ⎜ cos⎛⎜ ⎟ + sin⎛⎜ ⎟⎟
⎝ N ⎠n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
2 πn o k ⎞ N −1 ⎛ 2 πnk ⎞ ⎞
+ sin⎛⎜
2 πnk ⎞
⎟ ∑ x[ n] ⎜ cos⎛⎜ ⎟ − sin⎛⎜ ⎟⎟
⎝ N ⎠n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
2 πn o k ⎞ 2 πn o k ⎞
= cos⎛⎜ ⎟ X DHT [ k ] + sin⎛⎜ ⎟X [ −k ].
⎝ N ⎠ ⎝ N ⎠ DHT

(b) The N –point DHT of x[〈− n〉 N ] is X DHT[ −k ] .

N −1 1 N-1 N −1
2
(c) ∑ x [ n] = ∑ ∑ X DHT [ k ]X DHT [l] ×
n=0 N 2 k =0 l=0
⎛ N −1⎛ ⎛ 2 πnk ⎞ 2 πnk ⎞ ⎞⎛ 2 πnl ⎞ 2 πnl ⎞ ⎞ ⎞
⎜⎜ ∑ ⎜ cos⎜ ⎟ + sin⎛⎜ ⎟ ⎟⎜ cos⎛⎜ ⎟ + sin⎛⎜ ⎟ ⎟ ⎟.
⎝ n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠ ⎠⎝ ⎝ N ⎠ ⎝ N ⎠ ⎠ ⎟⎠
Using the orthogonality property, we observe that the above product is equal to N if
N −1 1 N −1
∑ (X DHT [ k ]) .
2
k = l and is equal to zero if k ≠ l. Hence, ∑ x 2 [ n] =
n=0 N k =0

5.66 cos⎛⎜
2 πnk ⎞ 1
(
⎟ = W − nk + WNnk and sin⎛⎜
⎝ N ⎠ 2 N
)
2 πnk ⎞
⎟=
⎝ N ⎠ 2j N
1
(
W − nk − WNnk . Therefore, )
X DHT [ k ] =
1 N −1 − nk
( nk − nk
∑ x[ n] WN + WN − j WN + j WN
2 n=0
nk
)
1
(
= X[ N − k ] + X[ k ] − j X [ N − k ] + j X[ k ] .
2
)

Not for sale. 133


N −1
5.67 y[ n] = x[ n] O ⎛ ⎛ 2 πnk ⎞⎟ + sin⎛⎜ 2 πnk ⎞⎟ ⎞
N g[ n]. Thus, YDHT [ k ] = ∑ y[ n] ⎜ cos⎜ ⎟
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1 N −1
= ∑ x[r ] ∑ g[〈 n − r 〉 N ] ⎛⎜ cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + sin⎛⎜ ⎟ ⎟.
r =0 n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠

From the results of Problem 5.65 we have


N −1
YDHT [ k ] = ∑ x[l]⎛⎜ G DHT [ k ] cos⎛⎜
2 πlk ⎞ 2 πlk ⎞ ⎞
⎟ + G DHT [〈− k 〉 N ] sin⎛⎜ ⎟⎟
l=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
N −1 2 πlk ⎞ N −1 2 πlk ⎞
= G DHT [ k ] ∑ x[l] cos⎛⎜ ⎟ + G DHT [〈− k 〉 N ] ∑ x[l] sin⎛⎜ ⎟
l=0 ⎝ N ⎠ l =0 ⎝ N ⎠
= G DHT [ k ] (X DHT [ k ] + X DHT [〈− k 〉 N ]) + G DHT [〈− k 〉 N ] (X DHT [ k ] − X DHT [〈− k 〉 N ])
1 1
2 2
=
1
X
2 DHT
[k] (GDHT [k ] + GDHT [〈− k〉 N ]) + 1
X
2 DHT
[〈− k 〉 N ] (GDHT [k ] − GDHT [〈− k〉 N ]) .

N −1
5.68 (a) y[ n] = ∑ (β1WN− nk + β 2WNnk ) X DCFT [ k ]
k =0
N −1 N −1
= ∑ x[ m] ∑ (α1β1WN( m − n)k + α 2 β 2WN− ( m + n)k + α1β 2WN( m + n)k + α1β 2WN− ( m − n)k )
m =0 k =0
N −1
= ∑ x[ m]N ((α1β1 + α 2 β 2 )δ[ m − n] + (α 2 β1 + α1β 2 )(δ[ m + n] + δ[ m + n − N ]))
m =0
= N [(α1β1 + α 2 β 2 ) x[ n] + (α 2 β1 + α1β 2 )(x[ n]δ[ n] + x[ N − n](1 − δ[ n])].
If we require
y[ n] = x[ n], 0 ≤ n ≤ N − 1,
then the following conditions must be satisfied:
α 2 β1 + α1β 2 = 0, (5-1)
and
N (α1β1 + α 2 β 2 ) = 1. (5-2)

(b) Let α12 − α 22 ≠ 0. Solving for β1 and β2 in Eqs. (5-1) and (5-2) we arrive at
α1 − α2
β1 = , β2 = .
N (α12 − α 22 ) N (α12 − α 22 )
Then, the inverse DCFT is given by
1 N −1
− nk nk
x[ n] = ∑ (α1WN − α 2WN ) X DCFT [ k ], 0 ≤ n ≤ N − 1.
2 2
N (α 1 − α 2 ) k = 0
(c) If α1 = α *2 = α re + jα im with α re ≠ 0 and α im ≠ 0, the expression for
X DCFT [ k ] reduces to

Not for sale. 134


N −1
X DCFT [ k ] = ∑ ⎛⎜ 2α re cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + 2α im sin⎛⎜ ⎟ ⎟x[ n]
n=0 ⎝ ⎝ N ⎠ ⎝ N ⎠⎠
which is real. The inverse DCFT is then given by
N −1
∑ ⎛⎜ 2α im cos⎛⎜
2 πnk ⎞ 2 πnk ⎞ ⎞
⎟ + 2α re sin⎛⎜
1
x[ n] = ⎟ ⎟X [ k ].
4 Nα1α 2 k = 0 ⎝ ⎝ N ⎠ ⎝ N ⎠ ⎠ DCFT

(d) It can be easily shown that the discrete Hartley transform (DHT) of Eq. (5.192) is a
1
special case of the real DCFT with α re = α im = .
2N
⎡1 1 1 1⎤
5.69 (a) H 2 = ⎡ 1 1 ⎤ 1 − 1 1 −
, H 4 = 1 1 − 1 − 11⎥, and

⎢⎣1 − 1⎥⎦ ⎢ ⎥
⎢⎣1 − 1 − 1 1 ⎥⎦
⎡1 1 1 1 1 1 1 1 ⎤
⎢1 − 1 1 − 1 1 − 1 1 − 1 ⎥
⎢1 1 − 1 − 1 1 1 − 1 − 1 ⎥
1 −1 −1 1 1 −1 −1 1 ⎥
H8 = ⎢ .
⎢1 1 1 1 − 1 − 1 − 1 − 1⎥
⎢1 − 1 1 − 1 − 1 1 − 1 1 ⎥
⎢1 1 − 1 − 1 − 1 − 1 1 1⎥
⎢⎣1 − 1 − 1 1 − 1 1 1 − 1⎥⎦

⎡H H2 ⎤
(b) From the structure of H 2 , H 4 , and H 8 , it can be seen that H 4 = ⎢ 2 ,
⎣H 2 − H 2 ⎥⎦
⎡H H4 ⎤
and H 8 = ⎢ 4 .
⎣ 4
H − H 4 ⎥⎦

(c) X HT = H N x. Therefore, x = H −N1X HT = N ⋅ H TN X HT = N ⋅ H *N X HT . Hence,


l −1
N −1 ∑ bi ( n ) bi ( k )
x[ n] = ∑ X HT [ k ](−1) i =0 , where bi (r ) is the i –th bit in the binary
k =0
representation of r.

M5.1 (a) N = input('The value of N = ');


k = -N:N;
y = ones(1,2*N+1);
w = 0:2*pi/255:2*pi;
Y = freqz(y, 1, w);
Ydft = fft(y);
n = 0:1:2*N;
plot(w/pi,abs(Y),n*2/(2*N+1),abs(Ydft),'o');
xlabel('\omega/\pi'),ylabel('Amplitude');

Not for sale. 135


(b) Replace the statement k = -N:N; with k = 0:N;, y = ones(1,2*N+1);
with y = ones(1,N+1); the statement n = 0:1:2*N; with n = 0:N;, and
the statement plot(w/pi,abs(Y),n*2/(2*N+1),abs(Ydft),'o');
with plot(w/pi,abs(Y),n*2/(N+1),abs(Ydft),'o');,in the program of
Part (a).

(c) Add the statement y = y – abs(k)/N; below the statement y =


ones([1,2*N+1]); in the program of Part (a).

(d) Replace the statement y = ones(1,2*N+1); with y = N +


ones(1,2*N+1) – abs(k); in the program of Part (a).

(e) Replace the statement y = ones(1,2*N+1); with y = cos(pi*k/(2*N));


in the program of Part (a).

The plots generated for N = 4 are shown below where the circles denote the DFT
samples.
(a) (b)
5
10
4
8
Amplitude

3
Amplitude

4 2

2 1

0 0
0 0.5 1 1.5 2 0 0.5 1 1.5 2
ω/ π ω/ π
(c) (d)
4 25

3 20
Amplitude

Amplitude

15
2
10
1
5

0 0
0 0.5 1 1.5 2 0 0.5 1 1.5 2
ω/π ω/π
(e)

Not for sale. 136


6

4
Amplitude
3

0
0 0.5 1 1.5 2
ω/ π

M5.2 The code fragments to be used are as follows:

Y = fft(g).*fft(h);
y = iift(Y);

(a) y[ n] = g[ n] O
6 h[ n]. The output generated using the above code fragments is

y =
-6 9 -16 20 -4 45
(b) w[ n] = x[ n] O
5 v[ n]. The output generated using the above code fragments is

w =
Columns 1 through 3
11.0000 +25.0000i -9.0000 +48.0000i 3.0000 +17.0000i

Columns 4 through 5
29.0000 + 0.0000i -10.0000 +12.0000i

(c) u[ n] = x[ n] O
5 y[ n]. The output generated using the above code fragments is

u =
-23.0000 -69.0000 35.0000 105.0000 73.0000

M5.3 N = 8; % sequence length


gamma = 0.5;
k = 0:N-1;
x = exp(-gamma*k);
X = fft(x);

% Property 1
X1 = fft(conj(x));
G1 = conj([X(1) X(N:-1:2)]);
% Verify X1 = G1

% Property 2
x2 = conj([x(1) x(N:-1:2)]);
X2 = fft(x2);

Not for sale. 137


% Verify X2 = conj(X)

% Property 3
x3 = real(x);
X3 = fft(x3);
G3 = 0.5*(X+conj([X(1) X(N:-1:2)]));
% Verify X3 = G3

% Property 4
x4 = j*imag(x);
X4 = fft(x4);
G4 = 0.5*(X-conj([X(1) X(N:-1:2)]));
% Verify X4 = G4

% Property 5
x5 = 0.5*(x+conj([x(1) x(N:-1:2)]));
X5 = fft(x5);
% Verify X5 = real(X)

% Property 6
x6 = 0.5*(x-conj([x(1) x(N:-1:2)]));
X6 = fft(x6);
% Verify X6 = j*imag(X)

M5.4 N = 8;
k = 0:N-1;
gamma = 0.5;
x = exp(-gamma*k);
X = fft(x);

% Property 1
xpe = 0.5*(x+[x(1) x(N:-1:2)]);
xpo = 0.5*(x-[x(1) x(N:-1:2)]);
Xpe = fft(xpe);
Xpo = fft(xpo);
% Verify Xpe = real(X) and Xpo = j*imag(X)

% Property 2
X2 = [X(1) X(N:-1:2)];
% Verify X = conj(X2);
% real(X) = real(X2) and imag(X) = -imag(X2)
% abs(X)= abs(X2) and angle(X) = -angle(X2)

M5.5 N = 8; % N is length of the sequence(s)


gamma = 0.5;
k = 0:N-1;
g = exp(-gamma*k); h = cos(pi*k/N);
G = fft(g); H=fft(h);

% Property 1

Not for sale. 138


alpha=0.5; beta=0.25;
x1 = alpha*g+beta*h;
X1 = fft(x1);
% Verify X1=alpha*G+beta*H

% Property 2
n0 = N/2; % n0 is the amount of shift
x2 = [g(n0+1:N) g(1:n0)];
X2 = fft(x2);
% Verify X2(k)= exp(-j*k*n0)G(k)

% Property 3
k0 = N/2;
x3 = exp(-j*2*pi*k0*k/N).*g;
X3 = fft(x3);
G3 = [G(k0+1:N) G(1:k0)];
% Verify X3=G3

% Property 4
x4 = G;
X4 = fft(G);
G4 = N*[g(1) g(8:-1:2)]; % This forms N*(g mod(-k))
% Verify X4 = G4;

% Property 5
% To calculate circular convolution between
% g and h use eqn (3.67)
h1 = [h(1) h(N:-1:2)];
T = toeplitz(h',h1);
x5 = T*g';
X5 = fft(x5');
% Verify X5 = G.*H

% Property 6
x6 = g.*h;
X6 = fft(x6);
H1 = [H(1) H(N:-1:2)];
T = toeplitz(H.', H1); % .' is the nonconjugate transpose
G6 = (1/N)*T*G.';
% Verify G6 = X6.'

M5.6 g = input('Type in first sequence = ');


h = input('Type in second sequence = ');
x = g +i*h;
XF = fft(x);
XFconj = conj(XF);
N = length(g);
YF = zeros(N-1,1)';
for k = 1:N-1;
YF(k) = XFconj(mod(-k,N)+1);

Not for sale. 139


end
YF1 = [XFconj(1) YF];
GF = (XF + YF1)/2;
HF = (XF - YF1)/2;

M5.7 x = [-3 5 45 -15 -9 -19 -8 21 -10 23];


XF = fft(x);
k =0:9; YF = exp(-i*2*pi*k/5).*XF;
output = [XF(1) XF(6) sum(XF) sum(YF)];;
disp(output)
disp(sum(abs(XF).*abs(XF))

The output data generated by this program is


30 0 -30-0.0000i -100-0.0000i
38600

M5.8 X = [11 8-i*2 1-i*12 6+i*3 -3+i*2 2+i 15];


k = 8:12; XF(k)=conj(X(mod(-k+2,12)));
XF = [X XF(8:12)];
x = ifft(XF);
n = 0:11; y = exp(i*2*pi*n/3).*x;
output = [x(1) x(7) sum(x) sum(y)];
disp(output)
disp(x.*x)

The output data generated by this program is


4.5000 -0.8333 11.0000 -3.0000-2.0000i
74.8333

M5.9 n=0:255;
x = 0.1*n.*exp(-0.03*n);
plot(n,x);axis([0 255 0 1.3]);
xlabel('n');ylabel('Amplitude');
title('Original signal');
pause
z = [zeros(1,50) ones(1,156) zeros(1,50)];
y = 4*rand(1,256)-1;
YF = z.*fft(y);
yinv = ifft(YF);
s = x + yinv;
plot(n,s);axis([0 255 -2 4]);
xlabel('n');ylabel('Amplitude');
title('Noise corrupted signal');
pause
zc = [ones(1,50) zeros(1,156) ones(1,50)];
SF = zc.*fft(s);
xr = ifft(SF);
plot(n,xr);axis([0 255 0 1.3]);
xlabel('n');ylabel('Amplitude');

Not for sale. 140


title('Signal after Fourier-domain filtering');
Original signal Noise corrupted signal
4
1.2
3
1
2
Amplitude

Amplitude
0.8
1
0.6

0.4 0

0.2 -1

0 -2
0 50 100 150 200 250 0 50 100 150 200 250
Signal after Fourier-domain filtering

1.2

1
Amplitude

0.8

0.6

0.4

0.2

0
0 50 100 150 200 250

M5.10 function y = overlapsave(x,h)


X = length(x); %Length of longer sequence
M = length(h); %length of shorter sequence
flops(0);
if (M > X) %Error condition
disp('error');
end
%clear all
temp = ceil(log2(M)); %Find length of circular
convolution
N = 2^temp; %zero padding the shorter sequence
if(N > M)
for i = M+1:N
h(i) = 0;
end
end
m = ceil((-N/(N-M+1)));
while (m*(N-M+1) <= X)
if(((N+m*(N-M+1)) <= X)&((m*(N-M+1)) > 0))
for n = 1:N
x1(n) = x(n+m*(N-M+1));
end
end
if(((m*(N-M+1))<=0)&((N+m*(N-M+1))>=0))
%underflow adjustment

Not for sale. 141


for n = 1:N
x1(n) = 0;
end
for n = m*(N-M+1):N+m*(N-M+1)
if(n > 0)
x1(n-m*(N-M+1)) = x(n);
end
end
end
if((N+m*(N-M+1)) > X) %overflow adjustment
for n = 1:N
x1(n) = 0;
end
for n = 1:(X-m*(N-M+1))
x1(n) =x (m*(N-M+1)+n);
end
end

w1 = circonv1(h,x1); %circular convolution using DFT


for i = 1:M-1
y1(i) = 0;
end
for i = M:N
y1(i) = w1(i);
end
for j = M:N
if((j+m*(N-M+1)) < (X+M))
if((j+m*(N-M+1)) > 0)
yO(j+m*(N-M+1)) = y1(j);
end
end
end
m = m+1;
end
%disp('Convolution using Overlap Save:');
y = real(yO);

function y = circonv1(x1,x2)
L1 = length(x1); L2 = length(x2);
if L1 ~= L2,
error('Sequences of unequal lengths'),
end
X1 = fft(x1);
X2 = fft(x2);
X_RES = X1.*X2;
y = ifft(X_RES);

The MATLAB program for performing convolution using the overlap-save method is

h = [1 1 1]/3;
R = 50;

Not for sale. 142


Solutions Manual to accompany Digital Signal Processing: A Computer Based Approach 3rd editi

d = rand(1,R) - 0.5;
m = 0:1:R-1;
s = 2*m.*(0.9.^m);
x = s + d;
%x = [x x x x x x x];
y = overlapsave(x,h);
k = 0:R-1;
plot(k,x,'r-',k,y(1:R),'b--');
xlabel('Time index n');ylabel('Amplitude');
legend('r-', 's[n]','b--','y[n]');

The output plot generated by the above program is shown below:


8
s[n]
y[n]
6
Amplitude

0
0 10 20 30 40 50
Time index n

Not for sale. 143

Visit TestBankBell.com to get complete for all chapters

You might also like