Академический Документы
Профессиональный Документы
Культура Документы
to accompany
Sanjit K. Mitra
Prepared by
Chowdary Adsumilli, John Berger, Marco Carli,
Hsin-Han Ho, Rajeev Gandhi, Martin Gawecki, Chin Kaye Koh,
Luca Lucchese, Mylene Queiroz de Farias, and Travis Smith
Chapter 5
5.52
(a) From the circular frequency-shifting property of the DFT given in Table 5.3:
IDFT{X[k m1 N } = W Nm1n x[n], IDFT{X[k m2 N } = W Nm 2 n x[n].
Hence: w[n] = IDFT{W [k]} = IDFT{X[k m1 N } + X[k m2 N }
1
2
1
2
Using the circular time-shifting property of the DFT given in Table 5.3:
1
N
2
2
(c) Using the modulation property of the DFT given in Table 5.3:
5.53
N 1
5.54
N 1
N 1
n=0
n=0
n=0
N 1
n o 1
N 1
N 1
(n+n o N )k
g[n ]W N
n=N n o
k o n
(n+n o )k
g[no ]W N
n=0
N n1
N 1
N 1
N 1
n=0
n=0
(kk )n
g[n]. Therefore: U[k] = u[n]W Nkn = g[n]W N o
N 1
(kk )n
g[n]W N o , if k ko ,
= N n=0
1
g[n]W (N +kko )n ,if k < k .
o
N
n=0
G[k ko ], if k k o,
= G[k ko N ].
Thus: U[k] =
G[N + k ko ], if k <k o,
N 1
N 1
n=0
(d) Given: h[n] = G[n]. Therefore: H[k] = h[n]W Nnk = G[n]W Nnk
N 1 N 1
N 1
n=0
N 1
n=0 r=0
r=0
n=0
Hence:
Ng[0], if k = 0,
H[k] =
= Ng[k N ].
Ng[N k], if k > 0,
N 1
N 1 N 1
N 1
N 1
n=0 m=0
N 1
m=0
n=0
5.55
Using the concept similar to Example 5.12, we first calculate the 4-point DFT X[k] of
x[n]:
X[0] 1
1
1
1 2 4
j 2 1+ j5
X[1] = 1 j 1
=
.
X[2] 1 1
1
1 1 2
j
1 j 3 1 j5
X[3] 1
Next, we use the relationship:
10, 7 j9}
= {5,
2, 1 j5}
2 j,
2 + j}.
5,
5.56
y[0]
y[1] =
y[2]
y[3]
1 1
4 1
1
j
1
j
1
1
1
1
j
1
5 1
2 j = 3 .
5 1
2 + j 2
Similarly to the solution of Problem 5.55, we first calculate the DFT X[k] of x[n]:
X[0] 1
1
1
1 1 2
j 1 3 + j
X[1] = 1 j 1
=
.
X[2] 1 1
1
1 2 4
j
1 j 2 3 j
X[3] 1
Next, we use the relationship:
8,
4,
6 + j8}
= {4,
3 j}
1 j3,
2,
1+ j3}.
y[0]
y[1] =
y[2]
y[3]
1 1
4 1
j
1
j
1
1
1
j
1
4 2
1 j3 = 2 .
2 1
1+ j3 1
5.57
5.58
5.59
N 1
N 1 N 1
=0
=0 n=0
N 1
N 1
N 1
N 1
n=0
N 1
N 1
n=0
Note X[k] is the MNpoint DFT of the sequence xe[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] = xe [n N MN ], 0 n MN 1.
=0
M 1 Nk
M 1 k
Taking the MN-DFT of both sides we get: Y[k] = W MN
X[k] = W N X[k].
=0
=0
5.60
(c)
(d)
k=0
9
9
2
2 = 10
x[n] = 4913.4.
(e) From Parsevals relation, X[k]
5.61
k=0
n=0
Using the properties of the DFT, we first determine the missing samples:
(a)
1 11
X[k] = 3.25,
12 k=0
1 11
x[6] =
(1) k X[k] = 4.9167,
12 k=0
x[0] =
(b)
11
(c)
n=0
(d)
11
n=0
12
2
x[n] 2 = 1 12
(e) From Parsevals relation,
X[k] = 426.75.
12 n=0
k=0
5.62
(b)
(c)
158
n=0
5.63
1 158
2
X[k] = 10.2512
158 k=0
X[87] = j3.78,
X[47] = X *[134 47] = X *[87] = j3.78
X[67] = X *[134 67] = X *[67] = 4.5 + j X[67] = 4.5 j,
X[55] = 3.6 + j,
X[26] = j7.56,
(a)
X[k2 ] = j3.78,
(b)
(c)
(d)
= 0, = 0, = 5.4,
The DC value is X[0] = 3.42
133
1 133
2
X[k] = 3.3765.
134 k=0
9k
Y[k] = W 43k X[k] = W12
X[k]. Therefore, y[n] = x[n 912 ].
Thus,
y[0] = x[3] = 4,
y[1] = x[4] = 6 j2,
y[2] = x[5] = 5,
y[3] = x[6] = j9,
y[4] = x[7] = 2 j4,
y[5] = x[8] = 10 j5
5.65
5.64
3.7.
y[6] = x[9] = 1+ j2
5n
g[n] = h [n 1712 ] = h [n 512 ] = W12 h[n].
Thus:
5.66 The minimum value of N must be the maximum of the lengths of the three sequences,
x[n], y[n], and w[n] : N = max(R, M, L).
xe [n] =
ye [n] =
R n N 1,
M n N 1,
0,
0,
w[n],
0 n L 1,
we [n] =
L n N 1.
0,
N ye [n] O
N we [n] are as follows:
The steps involved in determining v[n] = xe [n] O
(1) Form the N-point DFTs, X e [k], Ye [k], and We [k] of the sequences xe [n], ye [n],
and we [n], respectively,
(2) Form the product V[k] = X e [k]Ye [k]We [k], and
N
Given: y[n]
= x[5n], 0 n 1.
5
5.67
N
1
5
N
1
5
n=0
n=0
1 N 1
1 N 1
We can write: x[n] =
X[m]W N5mn =
X[m]W Nmn
/5 .
N
N
m=0
m=0
Hence:
Y[k] =
N
1
5 N 1
N 1
N
1
5
1
1
nk
.
X[m]W Nmn
X[m] W N(km)n
/ 5 WN / 5 =
/5
N n=0 m=0
N m=0
n=0
Since:
N
1
5
N
,
=
5
W N(km)n
/5
n=0
0,
m = k, k +
N
,
5
k+
2N
3N
4N
,k +
,k +
,
5
5
5
k + N,
elsewhere.
Therefore:
1
N
2N
3N
4N
5
5
5
5
5
5.68
9,
13,
8,
1}, 0 n 4.
For v[n] = x[n] + jy[n], we can write the DFTs of x[n] and y[n] as follows:
5.69
1
2
1
{V[k] V
2j
*[k 8 ]}.
where:
V[k] = [2 + j6,
6 + j4,
3 + j5,
V *[k 8 ] = [2 j6,
4 + j7,
1+ j8,
j8,
7 j3,
2 + j3,
2 j3
7 + j3,
j8,
1 j8,
4 j7],
6 j4,
3 j5].
X[k] =
1
{V[k] + V
2
= [2,
Y[k] =
3.5 + j6,
1
{V[k] V
2j
= [6,
*[k 8 ]}
4 + j6,
3 + j2.5,
2,
3 j2.5,
3 j6,
3,
5.5 j4,
2 + j3,
3.5 j6],
*[k 8 ]}
1+ j0.5,
2 j3,
5.5 + j4,
1 j0.5].
-2.9142 - 0.8195i
-2.1250 + 2.5000i
Columns 5 through 8
-1.3750 - 0.5000i
3.0910 - 0.7286i
-0.0858 + 3.0695i
-0.3750 + 0.7500i
Its real and imaginary parts obtained using MATLAB are given by
x =
1.8750
0.3750
-2.9142
3.0910
-2.1250
-0.0910
-1.3750
-0.0858
-0.8195
-0.7286
2.5000
-0.0214
-0.5000
3.0695
y =
1.7500
0.7500
3.5000 + 6.0000i
3.0000 + 6.0000i
3.0000 - 2.5000i
3.0000 - 6.0000i
Columns 5 through 8
-2.0000
3.5000 - 6.0000i
Y =
Columns 1 through 4
6.0000
5.5000 + 4.0000i
-1.0000 + 0.5000i
-2.0000 - 3.0000i
Columns 5 through 8
3.0000
5.5000 - 4.0000i
-1.0000 - 0.5000i
-2.0000 + 3.0000i
2 + j7,
5 j3,
4 + j8}.
Therefore:
10
V[0] 1
V[1] = 1
V[2] 1
V[3] 1
1
j
1
j
1
1
1
1
1 3 + j5 2 + j17
j 2 + j7 1+ j10
=
15 j3 14 j13
j 4 + j8 3 + j6
G[k] =
(b) Define:
u[n] = x[n] + j y[n] = {4 + j6, 3 j4,
The 4-point DFT U[k] of u[n] is thus given by
U[0] 1
U[1] = 1
U[2] 1
U[3] 1
1
j
1
j
1
1
1
1
2 + j2,
14,
2 j2},
8 + j,
13,
8 j}.
5 + j5}.
1+ j2,
1 4 + j6 11+ j9
j 3 j4 4 + 6 j
=
,
11+ j2 5 + j7
j 5 + j5 14 + j2
Thus:
1
X[k] = (U[k] + U *[k 4 ]) = {11,
5 + j2,
5,
4 + j9,
7,
Y[k] =
2
1
2j
5.71
U[0] 1
U[1] = 1
U[2] 1
U[3] 1
j
1
j
1
1
1
2 + j4,
1+ j2,
5 j2},
4 j9}.
4 j5}.
1 3 j 6
j 2 + j4 11+ j3
=
,
1 1+ j2 2 + j2
j 4 j5 7 j9
Thus:
11
H[k] =
1
U[k] + U *[k 4 ] = {6,
2
1
U[k] U *[k 4 ] = {0,
2j
2 + j6,
2 j6},
2,
3 j9,
2,
3 + j9}.
5.72 This computation can be done by splitting X[k] and y[n] into their real even, real odd,
imaginary even, and imaginary odd parts, as shown in the solution of Problem 5.38:
(
) (
)
ev
od
ev
od
X[k] = ( X re
[k] + X re
[k]) + j ( X im
[k] + X im
[k]).
od
ev
od
y[n] = y ev
re [n] + y re [n] + j yim [n] + yim [n] ,
ev
od
From the fact that x[n] is real, we know that: yim
[n] = yim
[n] = 0.
Also, from the repeated application of a DFT, we know that DFT{ X[k]} = N x[n N ].
od
Thus we can define: u[n] = jy ev
re [n] + y re [n] + X[n].
5.73
From these, x[n] and Y[k] can be directly recovered by taking the real and imaginary
parts of U[k].
For this problem, x[n] and X[k] are length N, while v[n] and V[k] are length 2N.
2N 1
N 1
2N 1
n=0
n=0
n=N 1
nk
nk
V[k] = v[n]W 2N
= x[n]W 2N
+
nk
.
x[n 1 N ]W 2N
N 1
N 1
n=0
N 1
m=0
N 1
n=0
m=0
12
N 1
k N 1
n=0
m=0
nk
mk
= x[n]W 2N
+ (1) x[m 1 N ]W 2N
.
From here, the computation proceeds on the even part and the odd part of V[k], for the
indices 0 N 1:
2N 1
2n
V[2] = x[n]W 2N
+ (1)
n=0
N 1
k 2N 1
2n
x[n 1 N ]W 2N
n=0
N
k 1
n=0
N 1
k N 1
n=0
N 1
n=0
k N 1
n
2n
n
2n
= x[n]W 2N
W 2N
+ (1) x[n 1 N ]W 2N
W 2N
n
n
= x[n]W 2N
W Nn + (1) x[n 1 N ]W 2N
W Nn .
n=0
n=0
We first write the DFT of X e [k] and then look separately at it's odd and even
components. Now
5.74
2N 1
nk
X e [k] = x[n]W 2N
.
n=0
2N 1
N 1
2n
X e [2] = x[n]W 2N
= x[n]W Nn = X[]
n=0
n=0
2N 1
N 1
n=0
n=0
(2+1)n
n
X e [2 + 1] = x[n]W 2N
= x[n]W 2N
W Nn .
5.75
13
Y[0] 1
Y[1] = 1
Y[2] 1
Y[3] 1
Thus
1
j
1
j
1
1
1
1
1 2 + j4 14 + j22
j 6 + j8 2
=
.
11+ j3 8 j8
j5 + j7 j2
2}.
G[k] =
2N 1
N 1
N 1
2nk
(2n+1)k
X[k] = x[n]W 2N nk = x[2n]W 2N
+ x[2n + 1]W 2N
n=0
N 1
n=0
N 1
n=0
N 1
N 1
k
k
= g[n]W Nnk + h[n]W NnkW 2N
= g[n]W Nnk + W 2N
h[n]W Nnk
n=0
n=0
n=0
k
= G[k N ] + W 2N H[k N ] = G[k 4 ] + W8k H[k 4 ],
n=0
0 k 7.
Thus:
(a)
y L [0] = g[0]h[0] = 8,
y L [1] = g[0]h[1] + g[1]h[0] = 16,
+ g[2]h[0] = 12,
y L [2] = g[0]h[2] + g[1]h[1]
y L [3] = g[0]h[3] + g[1]h[2] + g[2]h[1] = 1
y L [5] = g[2]h[3] = 20
14
(b)
calculate the circular convolution, we first compute the DFTs and form their
(c) To
products samplewise:
Ge [0] 1 1 1 1 2 6
Ge [1] = 1 j 1 j 1 = 7 j3,
Ge [2] 1 1 1 1 3 0
Ge [3] 1 j 1 j 0 7 + j3
H[0] 1 1 1 1 2 1
H[1] = 1 j 1 j 4 = 3 j2.
H[2] 1 1 1 1 2 1
H[3] 1 j 1 j 1 3 + j2
YC [0] Ge [0]H[0] 6
YC [3] Ge [3]H[3] 27 j5
yC [0]
y
[1]
C
=
yC [2]
yC [3]
1 1 1 1 6 15
1 1 j 1 j27 + j5 4
=
.
4 1 1 1 1 0 12
1 j 1 j 27 j5 1
15
yC [1] = ge [0]he [1] + ge [1]he [0] + ge [2]h e [5] + ge [3]he [6] + ge [4]he [3] + ge [5]he [2]
= g[0]h[1] + g[1]h[0] = 16 = y L [1],
5.77
yC [2] = ge [0]he [2] + ge [1]he [1] + ge [2]h e [0] + ge [3]he [5] + ge [4]he [4] + ge [5]he [3]
= g[0]h[2] + g[1]h[1] + g[2]h[0] = 12 = y L [2],
yC [3] = ge [0]he [3] + ge [1]he [2] + ge [2]h e [1] + ge [3]he [0] + ge [4]he [5] + ge [5]he [4]
= g[0]h[3] + g[1]h[2] + g[2]h[1] = 1 = y L [3],
yC [4] = ge [0]he [4] + ge [1]he [3] + ge [2]h e [2] + ge [3]he [1] + ge [4]he [0] + ge [5]he [5]
= g[1]h[3] + g[2]h[2] = 7 = y L [4],
yC [5] = ge [0]he [5] + ge [1]he [4] + ge [2]h e [3] + ge [3]he [2] + ge [4]he [1] + ge [5]he [0]
= g[2]h[3] = 20 = y L [5].
x[n], 0 n R 1,
y[n], 0 n M 1,
xe [n] =
ye [n] =
R n N 1,
M n N 1,
0,
0,
w[n], 0 n L 1,
we [n] =
L n N 1.
0,
(2) Compute the N-point DFTs of the above three extended sequences:
X e [k] = DFT{ xe [n]}, Ye [k] = DFT{ ye [n]}, We [k] = DFT{we [n]}.
(3) Multiply the three DFTs together, forming U[k] = X e [k]Ye [k]We [k].
(4) The inverse DFT u[n] of U[k] yields the result, i.e., u[n] = x[n] O
* y[n] O
* w[n].
Since the length of x[n] is 3 and the length of w[n] is 4, the length of y[n] is 2. Extend
the length of the sequence x[n] to 4 by zero-padding: xe [n] = {2, 1, 2, 0}.
5.78
X e [0] 1 1 1 1 2 5
X
[1]
1
j
1
j
e =
1 = j,
X e [2] 1 1 1 12 3
X e [3] 1 j 1 j 0 j
16
W [0] 1 1 1 1 4 5
W [1] = 1 j 1 j 0 = 1+ j2.
W [2] 1 1 1 13 9
W [3] 1 j 1 j 2 1 j2
The 4-point DFT Ye [k] of the extended sequence ye [n] = { y[0], y[1], 0, 0}
Is then given by
5, 1+ j2, 9, 1 j2}
Y3[k] = {
= {1, 2 j, 3, 2 + j}.
{5, j, 3, j}
y[0]
=
y[1]
y[2]
y[3]
5.79
1 1 1 1 1
1 1 j 1 j2
4 1 1 1 1 3
1 j 1 j 2 +
2
j 1
=
y[n] = {2, 1}, 0 n 1.
0
j 0
For this problem, we use the definitions of the overlap-add and overlap-save methods,
each defined in Section 5.10.3:
(a) Overlap-add method: Since the impulse response is of length 110 and the DFT size
to be used is 128, 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
19 = 69.
Also, the DFT of the impulse response needs to be computed once. Hence, the total
number of DFTs used are 69 + 1 = 70. The total number of IDFTs is 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 values. Thus the total number of DFTs
required for the data is:
1409
19 = 75.
Again, 1 DFT is required for the impulse response. The total number of DFTs used is
75 + 1 = 76. The total number of IDFTs used is 75.
5.80
N 1
2 (n+a)(k+b)
N
.
n=0
17
2 (n+a)(k+b)
N
j
1 N 1 N 1
=
x[r] e
N k=0 r=0
5.81
N 1 j
1 N 1
=
x[r] e
N r=0
k=0
N 1
j
1 N 1 N 1
=
x[r] e
N k=0 r=0
2 (n+ara)(k+b)
N
2 (nr)(k+b)
N
2 (nr)(k+b)
N
k=0
2 (r+a)k+b)
2 (n+a)k+b)
j
N
N
e
j
1 N 1 N 1
=
x[r] e
N k=0 r=0
2 (nr)(k+b)
N
1
x[n] N = x[n],
N
N, if n = r,
=
0, otherwise.
xWSWA [n] = { , 0, d, c, b, a, b, c, d, 0, d, c, b, a, b, c, d,
0,
d, c, b, a, b, c, d, 0, d, c, b, a, b, c, d, }.
5.82
Given the sequence: x[n] = {a, b, c, d}. The half-sample anti-symmetric extension
is given by:
x HSHA [n] = {, d, c, b, a, a, b, c, d, d, c, b, a, a, b, c, d,
d, c, b, a, a, b, c, d, d, c, b, a, a, b, c, d, }.
5.83
DCT
N 1
n=0
N 1
k(2n+1)
k (2n+1)
= 2( g[n] + h[n]) cos
2N
2N
n=0
18
N 1
= 2 g[n]cos
n=0
N 1
k (2n+1)
k (2n+1)
+ 2 h[n]cos
2N
2N
n=0
N 1
k (2n+1)
k (2n+1)
G*DCT [k] = g *[n]cos
.
2N
2N
n=0
DCT
(c)
Note that:
N,
N 1
k (2n+1)
m(2n+1)
cos
= N/2,
cos
2N
2N
n=0
) (
if k = m = 0,
if k = m and k 0,
, otherwise.
Thus:
g[n]g *[n] =
1 N 1 N 1
N
*
[m]cos
[k][m]GDCT [k]GDCT
k=0 m=0
) (
(2n+1)k
(2n+1)k
cos
.
2N
2N
Therefore:
N 1
g[n] =
n=0
1 N 1 N 1 N 1
*
[m]cos
[k][m]GDCT [k]GDCT
) (
(2n+1)k
(2n+1)k
cos
.
2N
2N
N 1
g[n] =
n=0
5.84
2
1 N 1
[k] GDCT [k] .
2N
k=0
13 13 13 13
17
7
7
17
.
HN =
13 13 13 13
7 17 17 7
19
13 13 13 13 13 17 13
7 676 0
0
0
17 7
7 1713 7 13 17 0 676 0
0
T
HN HN =
=
.
13 13 13 13 13 7 13 17 0
0 676 0
0
0 676
7 17 17 7 13 17 13 7 0
Hence, the matrix is orthogonal and all its rows have the same L -norm.
(b)
2
G N =
1
1 1 1
1 1 2
.
1 1 1
2 2 1
Next, we observe:
1 1 1 1 1 2 1 1 4 0 0 0
2 1 1 21 1 1 2 0 10 0 0
t
GN GN =
=
1 1 1 1 1 1 1 2 0 0 4 0
1 2 2 11 2 1 1 0 0 0 10
This shows that the rows of G N are orthogonal but do not have equal L -norms.
5.85
1 1
(a) H 2 =
.
1 1
We know that:
1 t
1 1 1 1 1 1
H 2H 2 =
=
2
2 1 11 1 0
0
= I .
1 2
H
H 2
H 4 = 2
.
H 2 H 2
Thus:
t
1 t
1 H
H 4 H 4 = 2t
4
4 H
2
t
1 t
1 H /2
H N H N = N
N
N H t
N /2
H t2 H 2
H t2 H 2
H 2 1 4I2
=
H 2 4 4I2
4I2 0
=
4I2 0
1 NI N / 2
H N / 2
=
N NI N / 2
H N / 2
H tN / 2 H N / 2
H tN / 2 H N / 2
0 0 0
1 0 0
= I4 .
0 1 0
0 0 1
NIN / 2
= I .
NIN / 2 N
20
2
1
t 1
1
x[n] = x t x = H tN XHaar H tN XHaar = 2 XtHaar H N H tN XHaar
N
N
N
N 1
n=0
1
N
XtHaar XHaar =
as H N H tN = N.
5.86
1 N 1
2
X Haar [k] ,
N
k=0
N 1
2 nk
2 nk
.
X DHT [k] =
x[n] cos
+ sin
N
N
n=0
( ) ( )
2 mk
2 mk
N
N
N 1
2 nk
2 nk
cos 2 mk + sin 2 mk
= x[n] cos
+ sin
N
N
N
N
n=0
( ) ( )
( ) ( ) ( ) ( ).
N 1
2 mk
2 mk
+ sin
Therefore: X DHT [k] cos
N
N
k=0
( ) ( )
= x[n] cos(
+ sin(
cos(
+ sin(
.
)
)
)
)
N 1
N 1
n=0
k=0
2 nk
N
2 nk
N
2 mk
N
2 mk
N
N,
N 1
N /2,
2 nk
2 mk
cos
=
cos
N
N
N /2,
k=0
0,
( ) ( )
( ) ( )
k=0
Hence, x[m] =
N 1
2 nk
2 mk
2 nk
2 mk
cos
= cos
sin
= 0.
N
N
N
N
k=0
( ) ( )
sin
5.87
if m = N n,
otherwise,
N, if m = n = 0,
N 1
N /2, if m = n 0,
2 nk
2 mk
sin
=
sin
N
N
N /2, if m = N n,
k=0
0, otherwise,
N 1
if m = n = 0,
if m = n 0,
( ) ( )
1 N 1
2 mk
2 mk
.
+ sin
X DHT [n] cos
N
N
N n=0
( ) ( )
x[n no + N], 0 n no 1,
(a) Given that: y[n] = x[n no N ] =
no n N 1.
x[n no ],
21
N 1
2 nk
2 nk
N
N
n=0
( ) ( )
n o 1
2 nk
2 nk N 1
+ x[n no ]cos 2 nk + sin 2 nk .
= x[n no + N] cos
+ sin
N
N n=n
N
N
n=0
o
( ) ( )
( ) ( )
Replacing n no + N with n in the first sum and n no with n in the second sum we get:
N 1
2 (n+n o )k
2 (n+n o )k
YDHT [k] = x[n] cos
+ sin
N
N
n=N n
o
n o 1
2 (n+n o )k
+ x[n]cos
N
n=0
) (
)
(
) + sin(
)
= x[n] cos(
) + sin( )
= cos(
) x[n]cos( ) + sin( )
+ sin(
) x[n]cos( ) sin( )
= cos(
) X [k] + sin( ) X [k].
(
N 1
2 (n+n o )k
N
n=0
2 n o k N 1
N
n=0
2 n o k
N
(b) The
2 (n+n o )k
N
2 (n+n o )k
N
2 nk
N
2 nk
N
2 n o k N 1
N
n=0
2 n o k
DHT
N
DHT
2 nk
N
2 nk
N
N 1
1 N-1 N 1
(c) To prove Parseval's Equation: x 2 [n] = 2 X DHT [k]X DHT []
N k=0 =0
n=0
N 1
2 nk
2 nk
cos 2 n + sin 2 n .
+ sin
cos
N
N
N
N
n=0
( ) ( ) ( ) ( )
5.88
Using the orthogonality property, we observe that the above product is equal to N if
N 1
1 N 1
2
k = and is
equal to zero if k . Hence: x 2 [n] =
( X DHT [k]) .
N k=0
n=0
1
1
2 nk
2 nk
nk
nk
nk
nk
=
WN WN .
Note: cos
= W N + W N and sin
( ) (
N
( ) (
N
n=0
5.89
1
2
2j
1 N 1
Therefore: X DHT [k] = x[n] W Nnk + W Nnk jW Nnk + jW Nnk
2
22
N 1
2 nk
2 nk
+ sin
Thus: YDHT [k] = y[n] cos
N
N
n=0
( ) ( )
.
= x[r] g[n r ]cos(
+ sin(
)
)
N 1
N 1
r=0
n=0
2 nk
N
2 nk
N
N 1
2 k
2 k
N
N
=0
= GDHT
1
( )
[k] x[] cos(
)+G
N 1
=0
2 k
N
( )
N 1
2 k
DHT [k N ] x[] sin N
=0
( )
5.90
N 1
N 1
N 1
and
21 + 1 2 = 0,
(5-90-1)
N(11 + 2 2 ) = 1.
(5-90-2)
(b) Let 12 22 0. Solving for 1 and 2 in Eqns. (5-90-1) and (5-90-2) from above
we arrive at
1
2
,
=
.
1 = 2
2
N(1 22 )
N(12 22 )
23
N
N
n=0
( )
( )
x[n] =
N 1
1
2 nk
2 nk
X
+ 2 re sin
[k].
2 im cos
N
N DCFT
4N1 2 k=0
( )
( )
(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 .
5.91
1 1
H 2 =
, H 4
1 1
(a)
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
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
1 1
1 1
H
H 4
H 2
H 4 = 2
, and H8 =
H 2 H
H 4
H 4
.
H 4
24
T
*
x = H1
N X HT = N H N X HT = N H N X HT .
1
N 1
bi (n)bi (k)
M5.1 For each of the problems, code and results are shown below:
(a)
(b)
(c)
(d)
25
n = 0:1:2*N;
plot(w/pi,abs(Y),n*2/(2*N+1),abs(Ydft),'o');
xlabel('\omega/\pi'),ylabel('Amplitude');
(e)
The plots generated for N = 4 are shown below where the circles denote the DFT
samples.
(a)
(c)
(b)
(d)
(e)
26
y = -18
(b)
-14
19
22
w = -15+18i -15-23i
(c)
4+7i
29-3i
5+13i
u = -23
-69
35
105
73
27
% 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 The properties are verified as follows:
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 The properties are verified as follows:
N = 8; % N is length of the sequence(s)
28
gamma = 0.5;
k = 0:N-1;
g = exp(-gamma*k); h = cos(pi*k/N);
G = fft(g); H=fft(h);
% Property 1
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 The program is shown below:
29
y = x + j*h;
Yk = fft(y, length(y));
Xk = (1/2)*(Yk + conj([Yk(1) fliplr(Yk(2:end))]))
Hk = (1/(2j))*(Yk - conj([Yk(1) fliplr(Yk(2:end))]))
The result of the computation is:
(a) Xk = 0 2.5-2.5981i
2.5+2.5981i
Hk = 11 4.5+7.7942i
4.5-7.7942i
(b) Xk = 9 -1+8.6603i
-1-8.6603i
-13.5+2.5981i
-13.5-2.5981i
-8.5+4.3301i
-8.5-4.3301i
12+3.4641i
Hk = 6 0.5+0.8660i
0.5-0.8660i
-1
4.5+12.9904i
12-3.4641i
8
4.5-12.9904i
=
=
=
=
=
=
=
=
fft(y,N)
(1/2)*(Y + conj([Y(1) fliplr(Y(2:end))]))
(1/(2*j))*(Y - conj([Y(1) fliplr(Y(2:end))]))
[G G] + exp((-j*2*pi*[0:2*N-1])/(2*N)).*[H H]
30
-30.6600
62.9000
62.9000
4913.4
4.9167
12.0000
12.0000
426.7500
31
xlabel('n');ylabel('Amplitude');
title('Signal after Fourier-domain filtering');
M5.11 The code for the overlap save method is provided below:
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
Not for sale.
32
x1(n) = x(n+m*(N-M+1));
end
end
if(((m*(N-M+1))<=0)&((N+m*(N-M+1))>=0))
%underflow adjustment
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
33
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;
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:
34