to accompany Digital Signal Processing: A …...Digital Signal Processing: A Computer-Based Approach Fourth Edition Sanjit K. Mitra Prepared by Chowdary Adsumilli, John Berger, Marco
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Not for sale. 1
SOLUTIONS MANUAL to accompany
Digital Signal Processing: A Computer-Based Approach
Fourth Edition
Sanjit K. Mitra
Prepared by
Chowdary Adsumilli, John Berger, Marco Carli, Hsin-Han Ho, Rajeev Gandhi, Martin Gawecki, Chin Kaye Koh,
Luca Lucchese, Mylene Queiroz de Farias, and Travis Smith
x2 1 = 4.8, x2 2 =18.2557, x2 ∞ =12.01 2.2 To show this, we start with the definitions from Eq. (2.9) and square them:
€
x 22 = x[n] 2
n=−∞
∞
∑ ≤ x[n]n=−∞
∞
∑⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
2
= x 12.
The middle inequality is a generalization of the triangle inequality. We can take square roots of both sides of this result, because everything within the equations is positive, getting:
r[n] = 3.9 × y[n] = {−7.8 −3.9 0 3.9 7.8 11.7 15.6}, − 5 ≤ n ≤1. 2.4 (a) The structure of Figure P2.1(a) is a cascade connection of two second-order structures.
Reversing their order we arrive at the equivalent representation shown below:
y[n]x[n] +
+d_ 1
d_ 2
z 1_
z 1_
+
+
p0
p1
p2
z 1_
z 1_
v[n]
Not for sale. 3
Analyzing the first section we obtain
€
v[n] = p0x[n]+ p1x[n −1]+ p0x[n − 2]. Analyzing the second section we arrive at
v[n] = y[n]+ d1y[n −1]+ d2y[n − 2]. Substituting the expression for v[n] derived from the analysis of the first section we arrive at the input-output relation of the structure of Figure 2.1(a):
€
y[n]+ d1y[n −1]+ d2y[n − 2] = p0x[n]+ p1x[n −1]+ p2x[n − 2]. (b) The structure of Figure 2.1(b) is precisely the figure shown in the solution of Part (a)
given above. Hence, the input-output relation of the structure of Figure 2.1(b) is also:
+ (β13β22 + β23β12)u[n − 3] + β23β22u[n − 4]. Finally, substituting the expression for u[n] from the first equation in the above equation and after some algebra we arrive at the input-output relation of the structure of Figure 2.1(c):
(b) Again, if we let s[n] be the signal in the middle of the structure, then:
€
s[n] = p0x[n]+ p1x[n −1]+ p2x[n − 2].
z 1_
+
h[0] h[1] h[2] h[3]
z 1_ z 1_ z 1_
z 1_z 1_
+
+ ++
+x[n]
y[n]b[n]a[n] c[n] d[n]
Not for sale. 5
We can see that:
€
y[n] = s[n] − d1y[n −1] − d2y[n − 2]. Combining the above two equations we get:
€
y[n] = p0x[n]+ p1x[n −1]+ p2x[n − 2] − d1y[n −1] − d2y[n − 2]. (c) If we let s[n] and t[n] represent the signals past each feed-forward component, then:
€
s[n] = h[0] x[n]+ β11x[n −1]+ β21x[n − 2]( ),
€
t[n] = s[n]+ β12s[n −1]+ β22s[n − 2],
€
y[n] = t[n]+ β13t[n −1]+ β23t[n − 2]. Substituting the top two equations into the last equation, we get:
2.11 Using the same steps as in the solution of Problem 2.10, we first express g[n] as a
convolution and then reevaluate h[n] in terms of these convolution sums:
€
g[n] = x1[n]O* x2[n]O* x3[n] = y[n]O* x3[n] where
€
y[n] = x1[n]O* x2[n].
Now:
€
v[n] = x1[n − N1]O* x2[n − N2].
Define
€
h[n] = v[n]O* x3[n − N3]. Then from the solution of Problem 2.10,
€
v[n] = y[n − N1 − N2]. Hence:
€
h[n] = y[n − N1 − N2]O* x3[n − N3].
Therefore, making use of the solution of Problem 2.10 again we get:
€
h[n] = y[n − N1 − N2 − N3]. 2.12 Two results are needed for this problem:
Length of Sequence = Max – Min + 1 Length of Convolution =
€
L1 +L2−1. (a) The sequence
€
y1[n], formed from the convolution of h[n] with itself, will have a length
€
(N + M +1) + (N + M +1) −1, or
€
2N + 2M +1. To find the range of indices over which the convolution will have nonzero values, it is necessary to think about the nature of the convolved signals. Both of them, since they are the same, have nonzero values on either side of the origin, which will still be true after one of them is time reversed within the convolution sum formula. Thus, if the original has values in the range
€
[−M,N], then the time reversed version will have values in the range
€
[−N,M]. The first left-shift at which point these two overlap will occur at (–2M), since the time-reversed version must be shifted left M points to have the negative portions overlap, and then again by M points to be outside of the range of overlap. A similar principle applies to the right-most region of overlap. The time-reversed signal must be shifted by N twice to the right to be just outside of the region of overlap, so that the right-most boundary of the resulting convolution is (2N). Therefore the convolution is nonzero in the range [–2M, 2N]. Note that these boundaries also give the correct length of the resulting signal: (2N) – (–2M) + 1 = 2N + 2M + 1.
Not for sale. 8
(b) The sequence y2[n], formed from the convolution of g[n] with itself, will have length
Although the signal is no longer on both sides of the origin, when the time-reversed version is generated, there will be one copy whose values are in the range [K,N] and another whose values are in the range [–N, –K]. In order to get the first point of overlap, the time-reversed version must be shifted to the right by 2K points, giving the left-most boundary of the convolution sum. The right-most boundary is similarly calculated by noting that the signal must be shifted by 2N points. Thus, the convolution will be nonzero in the range [2K, 2N].
Note, again, that these boundaries also give the correct length: 2N – ( –2K) + 1 = 2N – 2K + 1. (c) The sequence y3[n], formed from the convolution of w[n] with itself, will have length
(L – R) + (L – R) + 1, or 2L – 2R + 1. This situation is similar to that in part (b), except that we are dealing with the mirror image of the signal – so that the time reversed part will be in the range [R,L]. Because of the symmetry of the convolution operation, we will end up with inverted boundaries but the same length computation – the convolution will be nonzero in the range [– 2L, – 2R].
Also, these boundaries will give the correct length: (– 2R) – ( – 2L) + 1 = 2L – 2R + 1. (d) The sequence y4[n], formed from the convolution of h[n] with g[n], will have length
(N + M + 1) + (N – K + 1) – 1, or 2N + M – K + 1. To find the range of indexes, it is again instructive to think of the time-reversed version of g[n], and the points at which it stops and starts overlapping with h[n]. The left-most boundary will occur at – (M – K), while the right-most boundary will occur at 2N, so that the convolution will be nonzero in the range [– M + K, 2N].
Again, these boundaries can be used to confirm the length: 2N – (–M + K) + 1 = 2N + M – K + 1. (e) The sequence y5[n], formed from the convolution of h[n] with w[n], will have length
(N + M + 1) + (L – R + 1) – 1, or N + M + L – R + 1. The range of nonzero indexes can be found similarly to that in (d), by checking the left-most and right-most points of overlap. The resulting convolution will be nonzero in the range [–L – M, N – R].
And again, this confirms the length calculation: N – R – (–L – M) + 1 = N + M + L – R + 1. 2.13
€
{x[n]} = 2, −3, 4, 1[ ], −1≤ n ≤ 2 and
€
{h[n]} = −3, 5, −6, 4[ ], − 2 ≤ n ≤1.
Not for sale. 9
Thus,
€
y[−1] = x[−1]h[0]+ x[0]h[−1]+ x[1]h[−2]
€
= 2 × (−6) + (−3) × 5 + 4 × (−3) = −39. 2.14 Tthe maximum value will occur with the largest overlap during the convolution operation.
Since one sequence is 2 samples shorter than the other, there will be three possible points where all terms of the shorter sequence overlap with terms of the longer sequence. Thus, the maximum of y[n] will be at the locations
€
n = N − 3,N − 2,N −1 and the maximum value is
€
N − 2. 2.15 The convolution of a sequence of length N and a sequence of length M will produce a sequence
of length L = N + M – 1. Thus, the length of x[n] can be computed by rearranging the equation and evaluating for N = L – M + 1. Rearranging the terms of the convolution formula, we can recursively compute x[n] because successive samples of y[n] are based purely on successive coefficients of x[n]. For example, since y[0] = x[0]h[0], we can find x[0] = y[0]/h[0]. From here, we can use the following formula to compute all other terms within x[n]:
€
x[n] =1h[0]
y[n] − h[k]x[n − k]k=0
n−1∑
⎡
⎣ ⎢ ⎢
⎤
⎦ ⎥ ⎥ .
(a) Using the formula for the length of x[n], we get N = 8 – 4 + 1 = 4. Using the above
recursive formula for deconvolution, we arrive at
€
x[n] = {1 4 3 1}, 0 ≤ n ≤ 3. (b) Using the formula for the length of x[n], we get N = 5 – 3 + 1 = 3. The length of y[n] in
this problem is effectively 5, because the first term is 0. Using the above recursive formula for deconvolution, we arrive at
€
x[n] = {0 −3 2 2}, 0 ≤ n ≤ 3.
(c) Using the formula for the length of x[n], we get N = 9 – 5 + 1 = 5. Using the above recursive formula for deconvolution, we arrive at
€
x[n] = {−2 −4 0 1 −6}, 0 ≤ n ≤ 4 . The above results can be derived using the function deconv in MATLAB. 2.16 We make use of the circular shifting operation given by Eqn. (2.25). The length of {x[n]}
{w[n]} = {g[〈n + 4〉8]} = 9, 2, 0, −2, 5, −3, 0, 4{ }, − 4 ≤ n ≤ 3. 2.18 Using the definition of average power (Eqn. (2.37)), the average power of the odd and
even portions of x[n] are thus given by:
P
€
x,even= limK→∞
12K +1
12x[n]+ 1
2x[−n]
2
n=−K
K∑ and
P
€
x,odd = limK→∞
12K +1
12x[n] − 1
2x[−n]
2
n=−K
K∑ . Combining the two, we get:
P P
€
= limK→∞
12K +1
12x[n]+ 1
2x[−n]
2+
n=−K
K∑ lim
K→∞
12K +1
12x[n] − 1
2x[−n]
2
n=−K
K∑
€
= limK→∞
12K +1
12x[n]+ 1
2x[−n]
2+
n=−K
K∑
12x[n] − 1
2x[−n]
2
n=−K
K∑
⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟ .
The quantity inside the parentheses is given by
€
12x[n]+ 1
2x[−n]
2+
n=−K
K∑
12x[n] − 1
2x[−n]
2
n=−K
K∑
=
€
14x2[n]+ 1
4x2[−n]+ 1
2x[n]x[−n]+ 1
2x[−n]x[n]
⎛
⎝ ⎜
⎞
⎠ ⎟
n=−K
K∑
+
€
14x2[n]+ 1
4x2[−n] − 1
2x[n]x[−n] − 1
2x[−n]x[n]
⎛
⎝ ⎜
⎞
⎠ ⎟
n=−K
K∑
=
€
14x2[n]+ 1
4x2[−n]+ 1
4x2[n]+ 1
4x2[−n]
⎛
⎝ ⎜
⎞
⎠ ⎟
n=−K
K∑ =
€
12x2[n]+ 1
2x2[−n]
⎛
⎝ ⎜
⎞
⎠ ⎟
n=−K
K∑
€
= x2[n]( )n=−K
K∑ = P
€
x .
2.19 The given signal is
€
x[n] = sin(2πkn /N), 0 ≤ n ≤ N −1.The formula for energy is given by Eqn. (2.34):
E
€
x= x[n] 2
n=0
N−1∑ = sin2
n=0
N−1∑ (2πkn /N)
€
=12 1− cos(4πkn /N)( )n=0
N−1∑ =
N2 −
12 cos(4πkn /N)n=0
N−1∑ .
Let
€
C = cos(4πkn /N)n=0
N−1∑ and
€
S = sin(4πkn /N)n=0
N−1∑ .
Then
€
C + jS = e− j4πkn /N
n=0
N−1∑ =
1− e− j4πkn
1− e− j4πk /N= 0. This implies C = 0
Hence E
€
x=N2 .
Not for sale. 11
2.20 Using Eqn. (2.30), the odd and even parts are determined as follows:
x1,ca[n] = 1+ k −1− j −5 j 1− j −1+ j{ }, − 2 ≤ n ≤ 2.
(b) From the formulas for sine and cosine, we have:
€
x2,cs[n] =12
e j2πn / 5 + e jπn / 3( ) + e j2πn / 5 − e jπn / 3( )⎡ ⎣ ⎢
⎤ ⎦ ⎥ = cos
2πn5
⎛
⎝ ⎜
⎞
⎠ ⎟ + cos
πn3
⎛
⎝ ⎜
⎞
⎠ ⎟ ,
€
x2,ca[n] =12
e j2πn / 5 + e jπn / 3( ) − e j2πn / 5 − e jπn / 3( )⎡ ⎣ ⎢
⎤ ⎦ ⎥ = j sin 2πn
5⎛
⎝ ⎜
⎞
⎠ ⎟ + j sin πn
3⎛
⎝ ⎜
⎞
⎠ ⎟ .
(c) From the properties and formulas for sine and cosine:
€
x3,cs[n] =12
j cos 2πn7
⎛
⎝ ⎜
⎞
⎠ ⎟ − sin
2πn4
⎛
⎝ ⎜
⎞
⎠ ⎟
⎛
⎝ ⎜
⎞
⎠ ⎟ + − j cos 2πn
7⎛
⎝ ⎜
⎞
⎠ ⎟ + sin
2πn4
⎛
⎝ ⎜
⎞
⎠ ⎟
⎛
⎝ ⎜
⎞
⎠ ⎟
⎡
⎣ ⎢
⎤
⎦ ⎥ = 0,
€
x3,ca[n] =12
j cos 2πn7
⎛
⎝ ⎜
⎞
⎠ ⎟ − sin 2πn
4⎛
⎝ ⎜
⎞
⎠ ⎟
⎛
⎝ ⎜
⎞
⎠ ⎟ − − j cos 2πn
7⎛
⎝ ⎜
⎞
⎠ ⎟ + sin 2πn
4⎛
⎝ ⎜
⎞
⎠ ⎟
⎛
⎝ ⎜
⎞
⎠ ⎟
⎡
⎣ ⎢
⎤
⎦ ⎥
=12
j cos 2πn7
⎛
⎝ ⎜
⎞
⎠ ⎟ − sin 2πn
4⎛
⎝ ⎜
⎞
⎠ ⎟ + j cos 2πn
7⎛
⎝ ⎜
⎞
⎠ ⎟ − sin 2πn
4⎛
⎝ ⎜
⎞
⎠ ⎟
⎡
⎣ ⎢
⎤
⎦ ⎥ = j cos 2πn
7⎛
⎝ ⎜
⎞
⎠ ⎟ − sin 2πn
4⎛
⎝ ⎜
⎞
⎠ ⎟ .
2.22 Since x[n] is conjugate symmetric it satisfies the condition
€
x[n] = x *[−n] and since y[n] is conjugate antisymmetric it satisfies the condition
€
y[n] = −y *[−n].
(a)
€
g*[−n] = x *[−n]x *[−n] = x[n]x[n] = g[n]. Thus, g[n] is conjugate symmetric. (b)
€
u*[−n] = x *[−n]y *[−n] = x[n](−y[n]) = −u[n]. Thus, u[n] is conjugate antisymmetric.
Not for sale. 12
(c)
€
v *[−n] = y *[−n]y *[−n] = (−y[n])(−y[n]) = v[n]. Thus, u[n] is conjugate symmetric.
2.23 An absolutely summable sequence {x[n]} satisfies the condition
€
| x[n] |n=−∞
∞
∑ < ∞ .
This implies that for each value of the index n, the sample value x[n] is a finite number. Hence, the absolute value of each sample is bounded by a finite positive number, which means that the sequence is bounded.
2.24 (a) Since is causal,
€
x[n] = 0, n < 0. Also,
€
x[−n] = 0, n > 0. From the definition of
an even sequence, we can see that xev[0] = x[0] and
€
xev[n] =12 x[n], n > 0.
Therefore,
Likewise, from the definition for the odd sequence, we have x[0] = 0 and
€
xod [n] =12 x[n], n > 0. Therefore,
€
x[n] =2xev[n], n > 0,0, n ≤ 0.
⎧ ⎨ ⎩
(b) Since is causal,
€
y[n] = 0, n < 0. Also,
€
y[−n] = 0, n > 0. We can express y[n] in terms of its real and imaginary parts and , which are and causal sequences, as follows:
€
y[n] = yre[n]+ jyim[n],
From the definition of an conjugate anti-symmetric sequence:
€
yca[n] =12 (y[n] − y
∗[−n]).
Hence,
€
yca[0] =12 (y[0] − y
∗[0]) = jyim[0] and
€
yca[n] =12 y[n], n > 0.
Since
€
yre[0] is not known,
€
y[n] cannot be fully recovered from
€
yca[n].
Likewise, from the definition of a conjugate symmetric sequence:
€
ycs[n] =12 (y[n]+ y
∗[−n]).
Hence:
€
ycs[0] =12 (y[0]+ y
∗[0]) = yre[0] and
€
ycs[n] =12 y[n], n > 0.
Since is not known, cannot be fully recovered from . 2.25 From Eqn. (2.44), an N-periodic extension of a signal x[n] is obtained as follows:
Therefore:
€
˜ y [n + N] = x[n + kN + N]k=−∞
∞∑ .
Substituting we get:
€
˜ y [n + N] = x[n + rN]r=−∞
∞∑ = ˜ y [n]. Hence, is a periodic
sequence with a period
2.26 (a) Consider the sequence defined by
Not for sale. 13
If n < 0, then k = 0 is not included in the sum and hence, x[n] = 0 for n < 0. On the other hand, for k = 0 is included in the sum, and as a result, x[n] =1 for Thus:
€
x[n] = δ[k]k=−∞
n∑ = 1, n ≥ 0,
0, n < 0,⎧ ⎨ ⎩
= µ[n].
(b) Since it follows that
Hence,
€
µ[n] − µ[n −1] = 1, n = 0,0, n ≠ 0,⎧ ⎨ ⎩
= δ[n].
2.27 (a)
€
x1[n] = µ[n − 3]. Hence,
€
x1[−n] = µ[−n − 3]. Therefore,
€
x1,ev[n] =12 (µ[n − 3]+ µ[−n − 3]) =
1/2, n ≥ 3,0, −2 ≤ n ≤ 2,1/2, −3 ≤ n,
⎧
⎨ ⎪
⎩ ⎪
€
x1,od [n] =12 (µ[n − 3] − µ[−n − 3]) =
1/2, n ≥ 3,0, −2 ≤ n ≤ 2,
−1/2, −3 ≤ n.
⎧
⎨ ⎪
⎩ ⎪
(b)
€
x2[n] = αnµ[n −1]. Hence,
€
x2[−n] = α−nµ[−n −1]. Therefore,
€
x2,ev[n] =12 αnµ[n −1]+α−nµ[−n −1]( ) =
12α
n , n ≥ 2,0, −1≤ n ≤1,
12α
−n , −2 ≤ n,
⎧
⎨ ⎪ ⎪
⎩ ⎪ ⎪
€
x2,od [n] =12 αnµ[n −1] −α−nµ[−n −1]( ) =
12α
n, n ≥ 2,0, −1≤ n ≤1,
−12α
−n, −2 ≤ n.
⎧
⎨ ⎪ ⎪
⎩ ⎪ ⎪
(c)
€
x3[n] = nαnµ[n +1]. Hence,
€
x3[−n] = −nα−nµ[−n +1]. Therefore,
€
x3,ev[n] =12 nαnµ[n +1]+ (−n)α−nµ[−n +1]( ) =
12nαn, n ≥ 2,
12a − 1
a⎛
⎝ ⎜
⎞
⎠ ⎟ , n =1
0, n = 0
⎧
⎨
⎪ ⎪ ⎪
⎩
⎪ ⎪ ⎪
€
x3,od [n] =12 nαnµ[n +1] − (−n)α−nµ[−n +1]( ) =
12nαn , n ≥ 2,
12a +
1a
⎛
⎝ ⎜
⎞
⎠ ⎟ , n =1
0, n = 0
⎧
⎨
⎪ ⎪ ⎪
⎩
⎪ ⎪ ⎪
Not for sale. 14
(d)
€
x4[n] = α n . Hence,
€
x4[−n] = α −n = α n = x4[n]. Therefore,
€
x4,ev[n] =12 (x4[n]+ x4[−n]) =
12 (x4[n]+ x4[n]) = x4[n] = α n
€
x4,od [n] =12 (x4[n] − x4[−n]) =
12 (x4[n] − x4[n]) = 0.
2.28 (a)
€
x[n] = Aα |n| where A and α are complex numbers with
€
α <1. Because
€
n is always a positive number and
€
α <1, any positive exponential power of α will be smaller than 1. Hence, x[n] is a bounded sequence.
(b)
€
h[n] =12n
µ[n] is a causal sequence starting with a value h[0] = 1, and for all n > 0,
the amplitude of the sample values is less than 1. Hence, h[n] is a bounded sequence.
(c)
€
y[n] = αnµ[n −1], α <1 is a causal sequence starting with a value y[0] = 0, and for all n > 0, the amplitude of the sample values is less than 1. Hence, y[n] is a bounded sequence.
(d)
€
g[n] = 4ne jωonµ[n] is a causal complex-valued sequence. Its amplitude for all n> 0 is 4n and as
€
n→∞ , the amplitude approaches
€
∞ . Thus g[n] is not bounded.
(e)
€
w[n] = 3cos((ωo)2n) is a two-sided sequence. As
€
cos((ωo)2n) is a sinusoidal
sequence with values between
€
−1 and
€
+1 for all values of n, w[n] is a bounded sequence (f)
€
v[n] = (1− 1n2)µ[n −1] is a causal sequence starting with a value v[0] = 0, and for all n
> 0, the amplitude of the sample values is less than 1. Hence, v[n] is a bounded sequence.
xb[n] is absolutely summable. 2.32 First, we show that an absolutely summable sequence has finite energy. A sequence x[n]
is absolutely summable if
€
x[n]n=−∞
∞
∑ < ∞. Using the Schwartz inequality we can write:
€
x[n] 2
n=−∞
∞
∑ ≤ x[n]n=−∞
∞
∑⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟ x[n]n=−∞
∞
∑⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟ < ∞.
Hence, an absolutely summable sequence is square summable and has thus finite energy. To show that a finite energy sequence may not be absolutely summable, we need to find
only one example of where this is the case. Consider the sequence:
€
x[n] =1n
µ[n −1].
Not for sale. 16
We will demonstrate that this sequence has finite energy, but does not converge. Finite
energy is analogous to being square summable, and we will use the integral test of sequence convergence to prove both that x[n] is square summable but not absolutely summable.
The integral test for convergence can be stated as follows: let
€
an = f (x) be a continuous,
positive and decreasing function for all x ≥ 1. Then the series
€
ann=1∞∑ and the integral
€
f (x)dx1
∞
∫ either both converge or both diverge.
First, to show that x[n] is square summable, we let
€
an =1/n2, and determine the
convergence of the integral:
€
1x21
∞
∫ dx = −1x
⎛
⎝ ⎜
⎞
⎠ ⎟ 1
∞
= −1∞
+1 =1.
Hence,
€
1n2n=1
∞∑ also converges, and
€
x[n] =1n
µ[n −1] is square-summable.
Second, to show that x[n] is not absolutely summable, we let
€
an =1/n and determine the
divergence of the integral:
€
1x
1
∞
∫ dx = (ln x)1∞ = ∞ − 0 = ∞ .
As a result,
€
x[n] =1n
µ[n −1] is not absolutely summable. 2.33 The integral test for convergenece is usde to show the divergence of the absolute
summation of
€
x1[n]. Let
€
an =1/n and determine the divergence of the integral:
€
1x
1
∞
∫ dx = (ln x)1∞ = ∞ − 0 = ∞ . This implies that the absolute summation:
€
x[n]n=−∞
∞
∑ = 1n
n=1
∞
∑ = ∞ . Therefore,
€
x1[n] is not absolutely summable.
2.34 To show square-summability, we evaluate
€
x2[n]2
n=−∞
∞
∑ =cosωcnπn
⎛
⎝ ⎜
⎞
⎠ ⎟ 2
n=1
∞
∑ ≤1
π 2n2n=1
∞
∑ .
Since
€
1n2
n=1
∞
∑ =π2
6 ,
€
cosωcnπn
⎛
⎝ ⎜
⎞
⎠ ⎟ 2
n=1
∞
∑ ≤16
. Therefore
€
x2[n] is square-summable.
Using the integral test for convergence, we can show
€
x2[n] is not absolutely summable. The integral test relates the convergence or divergence of
€
an = f (x) , which is defined to be a continuous, positive and decreasing function for all x ≥ 1. Since
€
x2[n] meets these criterian, we can substitute f(x) into an integral and check for convergence or divergence:
Not for sale. 17
€
cosωc xπx1
∞
∫ dx =1π⋅
cosωc xπx
cosωc x⋅
cos(t)dtt
ωc x
∞
∫
1
∞
which diverges implying the divergence of
€
cosωcnπnn=1
∞
∑ . Hence,
€
x2[n] is not absolutely summable.
2.35 (a)
€
xa[n] = Aαµ[n]. Here, E
€
xa = xa[n]2
n=−∞
∞
∑ = A2 α2n
n=0
∞
∑ =A2
1−α2.
(b)
€
xb[n] =1n2
µ[n −1]. Here, E
€
xb xb[n]2
n=−∞
∞
∑ = 1n2n=1
∞
∑ =1n4
n=1
∞
∑
€
=π4
90.
2.36 (a) E
€
x1= x1[n]2
n=−∞
∞
∑ = 1n=−∞
∞
∑ = ∞.
P
€
x1= limK→∞
12K+1 x1[n]
2
n=−K
K∑ = lim
K→∞
12K +1
(2K +1) =1.
(b) E
€
x2 = x2[n]2
n=−∞
∞
∑ = 1n=0
∞
∑ = ∞.
P
€
x2 = limK→∞
12K +1
x2[n]2
n=−K
K∑ = lim
K→∞
12K +1
1n=0
K∑ = lim
K→∞
K +12K +1
=12.
(c) E
€
x3= x3[n]2
n=−∞
∞
∑ = n2
n=0
∞
∑ = ∞.
P
€
x3= limK→∞
12K +1
x3[n]2
n=−K
K∑ = lim
K→∞
12K +1
n2
n=1
K∑
€
= limK→∞
K(K +1)(2K +1)6
= ∞.
(d) E
€
x4 = x4[n]2
n=−∞
∞
∑ = A0ejω0n
2
n=−∞
∞
∑ = A02
n=−∞
∞
∑ = ∞.
P
€
x4 = limK→∞
12K +1
x4[n]2
= limK→∞
12K +1
A0ejω0n
2
n=−K
K∑
n=−K
K∑
€
= limK→∞
12K +1
A02
n=−K
K∑ = lim
K→∞
12K +1
⋅ A02(2K +1) = A0
2.
(e) E
€
x5= x5[n]2
n=−∞
∞
∑ = Acos 2πnM
+ φ⎛
⎝ ⎜
⎞
⎠ ⎟ 2
n=−∞
∞
∑ = ∞.
Not for sale. 18
P
€
x5=1M
x5[n]2
n=0
M −1∑ =
1M
Acos 2πnM
+ φ⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
n=0
M −1∑ =
1M⋅A2
2cos 4πn
M+2φ
⎛ ⎝ ⎜ ⎞
⎠ ⎟ +1
⎛ ⎝ ⎜
⎞ ⎠ ⎟
n=0
M −1∑ .
Let
€
C = cos 4πnM
+ 2φ⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
M −1∑ and
€
S = sin 4πnM
+ 2φ⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
M −1∑ .
Then
€
C + jS = ej 4πn
M+2φ( )
n=0
M −1∑ = e j2φ e j4πn /M
n=0
M −1∑ = e j2φ ⋅ 1− e j4π
1− e j4π /M= 0.
Therefore P
€
x5 =1M⋅A2
21
n=0
M −1∑ =
A2
2.
2.37 In general, for an N-periodic extension of a sequence, we use Eq. (2.44) to generate the
sequence and then determine the period of the new sequence based on the length of the original and N. If the length is smaller than N, then the sequence has period N. If the length of the original is greater than N, then the repetitions will force periodicity with a period of N. Thus any N-periodic extension will be periodic with period N. To find a sample period of the new sequence, we simply add up neighboring overlapping components and look at the range of one period.
(a) N = 6, and for each of the sequences, we can write the periodic extension as follows:
˜ x [n] = {0, 0.5878, −0.9511, 0.9511, −0.5878}. Hence
€
ωo =1.25π ,
(d)
€
˜ x [n] = {2, 0, −2, 0}. Hence
€
A = 2, ωo = π /4, φ = π /2. 2.39 The fundamental period of a periodic sequence with an angular frequency ω0 satisfies
Equation (2.53a) with the smallest value of and .
Not for sale. 20
(a) Here, ω0 = 0.25π, so that the equation for fundamental period reduces to 0.25πN = 2πr, which is satisfied with N = 8, r = 1.
(b) Here, ω0 = 0.6π, so that the equation for fundamental period reduces to 0.6πN = 2πr, which is satisfied with N = 10, r = 3. (c) We first determine the fundamental period
€
N1 of
€
Re{e jπn /8} = cos(πn /8). In this case, the equation reduces to
€
0.125πN1 = 2πr1, which is satisfied with
€
N1 =16 and
€
r1 =1. Next, we determine the fundamental period
€
N2 of
€
Im{e jπn / 5 = j sin(0.2πn). In this case, the equation reduces to
€
0.2πN2 = 2πr2, which is satisfied with
€
N2 =10 and
€
r2 =1. Hence the fundamental period is given by
€
LCM(N1,N2) = LCM(10,16) = 80. (d) We first determine the fundamental period
€
N1 of
€
sin(0.15πn) In this case, the equation reduces to
€
0.15πN1 = 2πr1, which is satisfied with
€
N1 = 40 N1 = 40 and
€
r1 = 3. Next, we determine the fundamental period
€
N2 of
€
cos(0.12πn − 0.1π) . In this case, the equation reduces to
€
0.12πN2 = 2πr2, which is satisfied with
€
N2 = 50 and
€
r2 = 3. Hence the fundamental period is given by
€
LCM(N1,N2) = LCM(50,40) = 200. (e) Again, we start by finding the fundamental period of each sinusoidal component and then find the least common multiple of the three to determine the overall fundamental period. The fundamental period
€
N1 of
€
sin(0.1πn + 0.75π) In this case, the equation reduces to
€
0.1πN1 = 2πr1, which is satisfied with
€
N1 = 20 and
€
r1 =1. Next, we determine the fundamental period
€
N2 of
€
cos(0.8πn + 0.2π). The equation reduces to
€
0.8πN2 = 2πr2, which is satisfied with
€
N2 = 5 and
€
r2 = 2. Lastly, we determine the fundamental period
€
N3 of
€
cos(1.3πn) . The equation reduces to
€
1.3πN3 = 2πr3, which is satisfied with
€
N3 = 20 and
€
r3 =13. Hence the fundamental period is given by
€
LCM(N1,N2,N3) = LCM(20,5,20) = 20. 2.40 The fundamental period N of a periodic sequence with an angular frequency ω0 satisfies
Eq. (2.53a) with the smallest value of N and r.
(a) For this problem, ω0 = 0.3π, so the equation reduces to 0.3πN = 2πr, which is satisfied with N = 20, r = 3.
(b) For this problem, ω0 = 0.48π, so the equation reduces to 0.48πN = 2πr, which is satisfied with N = 25, r = 6.
(c) For this problem, ω0 = 0.525π, so the equation reduces to 0.525πN = 2πr, which is
satisfied with N = 80, r = 21. (d) For this problem, ω0 = 0.7π, so the equation reduces to 0.7πN = 2πr, which is satisfied
with N = 20, r = 7.
Not for sale. 21
(e) For this problem, ω0 = 0.75π, so the equation reduces to 0.75πN = 2πr, which is satisfied with N = 8, r = 3.
2.41 Here ω0 = 0.06π, so that Eq. (2.53a) reduces to 0.06πN = 2πr which is satisfied with N = 100 and r = 3. Other sequences
€
x[n] = sin(ωk ) with the same fundamental period will satisfy
€
100ωk = 2πr. Choosing r = 1 and r = 2, two possible sequences with the same fundamental period would have ω2 = 0.02π and ω3 = 0.01π, respectively, resulting in:
€
x2[n] = sin(0.01πn) and
€
x3[n] = sin(0.02πn). 2.42 In each of the following parts, N is the fundamental period and r is a positive integer. Eqs.
(2.53a) and (2.39) are used the compute the fundamental period and the average power of the periodic sequences.
(a) For
€
x1[n] = 5cos(πn /3), N and r must satisfy the relation (π/3)N = 2πr, which is satisfied by N = 6 and r = 1, which are the smallest values of N and r. The average power can be calculated as follows:
P
€
x1=1N
x1[n]2
n=0
N−1∑ =
16
5cos πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
5∑
2
=256
cos πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
=252n=0
5∑ .
(b) For
€
x2[n] = 2cos(2πn /5), N and r must satisfy the relation (2π/5)N = 2πr, which is satisfied by N = 5 and r = 1, which are the smallest values of N and r. The average power can be calculated as follows:
P
€
x2=1N
x1[n]2
n=0
N−1∑ =
15
2cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
5∑
2
=45
cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
= 2n=0
5∑ .
(c) For
€
x3[n] = 2cos(2πn /7), N and r must satisfy the relation (2π/7)N = 2πr, which is satisfied by N = 7 and r = 1, which are the smallest values of N and r. The average power can be calculated as follows:
P
€
x3=1N
x1[n]2
n=0
N−1∑ =
17
2cos 2πn7
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
6∑
2
=47
cos 2πn7
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
= 2n=0
6∑ .
(d) For
€
x4[n] = 3cos(5πn /7), N and r must satisfy the relation (5π/7)N = 2πr, which is satisfied by N = 14 and r = 5, which are the smallest values of N and r. The average power can be calculated as follows:
P
€
x4 =1N
x1[n]2
n=0
N−1∑ =
114
3cos 5πn7
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
13∑
2
=914
cos 5πn7
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
= 4.5n=0
6∑ .
(e) For
€
x5[n] = 4cos(2πn /5) + 3cos(3πn /5), the fundamental period will be the least common multiple of the fundamental periods of each component function. For the
Not for sale. 22
sequence
€
4cos(2πn /5),
€
N1 and
€
r1 must satisfy the relation
€
(2π /5)N1 = 2πr1, which is satisfied by
€
N1 = 5 and
€
r1 =1. For the sequence
€
3cos(3πn /5),
€
N2 and
€
r2 must satisfy the relation
€
(3π /5)N2 = 2πr2, which is satisfied by
€
N2 =10 and
€
r2 = 3. The LCM of these two number is 10, which is the fundamental period of the joint signal. The average power can be calculated as follows:
P
€
x5=1N
x1[n]2
n=0
N−1∑ =
110
4cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ + 3cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
9∑
2
€
=110
4cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
9∑
2
+12cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟ + 3cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
=1610
cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
9∑
2
+1210
cos 2πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
9∑ +
910
cos 3πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
n=0
9∑
≅ 8 + 4.5 =12.5.
(f) For
€
x6[n] = 4cos(5πn /3) + 3cos(3πn /5), the fundamental period will be the least common multiple of the fundamental periods of each component function. For the sequence
€
cos(5πn /3),
€
N1 and
€
r1 must satisfy the relation
€
(5π /3)N1 = 2πr1, which is satisfied by
€
N1 = 6 and
€
r1 = 5.
€
r1 =1. For the sequence
€
3cos(3πn /5),
€
N2 and
€
r2 must satisfy the relation
€
(3π /5)N2 = 2πr2, which is satisfied by
€
N2 =10 and
€
r2 = 3. The LCM of these two number is 30, which is the fundamental period of the joint signal. The average power can be calculated as follows:
P
€
x6=1N
x1[n]2
n=0
N−1∑ =
130
4cos 5πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟ + 3cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
29∑
2
€
=130
4cos 5πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
29∑
2
+12cos 5πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟ cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟ + 3cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
€
=1630
cos 5πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
29∑
2
+1230
cos 5πn3
⎛ ⎝ ⎜ ⎞
⎠ ⎟ cos 3πn
5⎛ ⎝ ⎜ ⎞
⎠ ⎟
n=0
29∑ +
930
cos 3πn5
⎛ ⎝ ⎜ ⎞
⎠ ⎟ 2
n=0
29∑
≅ 8 + 4.5 =12.5.
2.43 The impulse function and unit step functions are defined by Eqs. (2.45) and (2.46):
(a) Each of the sequences can be expressed as follows:
Not for sale. 23
(b) Each of the sequences can be expressed as shown below. Note that each sequence constructed in this manner must end with a unit step function after the end of the signal that renormalizes the remainder of the interval to zero.
2.44 Using the definition of Eq. (2.46), we can express this sequence as follows:
€
x[n] = 2.1µ[n +1] − 5.3µ[n]+1.6µ[n −1]+ 6.9µ[n − 2] − 5.2µ[n − 3]. 2.45 Using the definition of Eq. (2.46), we can express this sequence as follows: .
2.48 The sequences x[n], h[n], g[n] and w[n] are all fine-length rectangular sequences with
sample values 1 in the ranges of n shown below:
€
x[n] = µ[n]−µ[n − N] =
0, n < 0,1 0 ≤ n ≤ N −1,0, n ≥ N .
⎧
⎨ ⎪
⎩ ⎪
€
h[n] = µ[n]−µ[n −M] =
0, n < 0,1 0 ≤ n ≤ M −1,0, n ≥ M .
⎧
⎨ ⎪
⎩ ⎪
€
g[n] = µ[n −M]−µ[n − N] =
0, n < M,1 M ≤ n ≤ N −1,0, n ≥ N .
⎧
⎨ ⎪
⎩ ⎪
€
w[n] = µ[n + M]−µ[n − N] =
0, n < −M,1 −M ≤ n ≤ N −1,0, n ≥ N.
⎧
⎨ ⎪
⎩ ⎪
Not for sale. 25
The location of the largest sample(s) will depend on the peak of the overlap between the corresponding functions. The convolution sum of two such sequences will be a triangular or trapezoidal pulse with the maximum(s) determined by the lengths of the rectangular sequences. If both sequences are of equal length K, then the maximum value will be also K and its location will depend on the location of first non-zero value of the sequence.
If the two sequences being convolved are of unequal lengths K and L with K > L, then the maximum value will be L and there will be
€
K − L samples with the maximum value. In the answers below, the location of the first such maximal value is listed.
(a) The maximum of
€
y1[n] will occur at
€
n = N −1 with a maximum value N. (b) The maximum of
€
y2[n] will occur at
€
n = M −1 with a maximum value M. (c) The maximum of
€
y3[n] will occur at
€
n = M + N −1 with a maximum value
€
N −M. (d) The maximum of will occur at with a value of (e) The maximum of will occur at with a maximum value (f) The maximum of will occur at with a value of (g) The maximum of will occur at with a maximum value
2.49 Each of these uses the definitions of conjugate symmetry and conjugate anti-symmetry
2.53 The autocorrelation sequence is defined by Eq. (2.69):
€
rxx[l] = x[k]x[k − l]k=−∞
∞
∑ .
Not for sale. 28
(a) The autocorrelations can be computed as follows:
€
rx1x1[] = x1[n]n=−∞
∞∑ x1[n − ] = αnn=−∞
∞∑ µ[n]αn−µ[n − ]
€
= α2n−n=0∞∑ µ[n − ] =
α2n−n=0∞∑ , < 0,
α2n−n=∞∑ , ≥ 0,
⎧
⎨ ⎪
⎩ ⎪
€
=
α−
1−α2, < 0,
α
1−α2, ≥ 0.
⎧
⎨ ⎪
⎩ ⎪
Note that for
€
≥ 0,rx1x1[] =α
1−α2, and for
€
< 0,rx1x1[] =α−
1−α2.
Replacing
€
with
€
− in the second expression we get:
€
rx1x1[−] =α−(−)
1−α2=
α
1−α2= rx1x1[].
Hence,
€
rx1x1[] is an even function of
€
. The maximum value of
€
rx1x1[] occurs at
€
= 0 since
€
α is a decaying function for increasing n when
(b) The autocorrelations can be computed as follows:
€
rx2x2 [] = x2[n − ]n=0N−1∑ .
Since:
€
x2[n − ] =1, ≤ n ≤ N −1+ ,0, otherwise.⎧ ⎨ ⎩
Therefore:
€
rx2x2 [] =
0, for < −(N −1),N + , for − (N −1) ≤ ≤ 0,N, for = 0,
N − , for 0 < N − ≤ N −1,0, for > N −1.
⎧
⎨
⎪ ⎪ ⎪
⎩
⎪ ⎪ ⎪
It follows from the above that
€
rx2x2 [] is a triangular function of , and hence is an even function with a maximum value of at
€
= 0. M2.1 The sample program is listed below, with cs and ca corresponding to the conjugate
symmetric and conjugate anti-symmetric components, respectively: cs = 0.5*(x + conj(fliplr(x))); ca = 0.5*(x - conj(fliplr(x))); Given the sample input from Example 2.8: g[n] = {0 1+4j -2+3j 4-2j -5-6j -2j 3} We get:
Not for sale. 29
cs = {1.5, 0.5 + 3j, -3.5 + 4.5j, 4, -3.5-4.5j, 0.5 - 3j, 1.5} ca = {-1.5, 0.5 + j, 1.5 – 1.5j, -2j, -1.5 – 1.5j, -0.5 + 1.5j} This verifies the results in Example 2.8. M2.2 (a) The input data entered during the execution of Program 2_2.m are:
For Figure 2.23 Type in real exponent = -1/12 Type in imaginary exponent = pi/6 Type in gain constant = 1
Type in length of sequence = 41
For Figure 2.24 (a) Type in real exponent = log(1.2) Type in imaginary exponent = 0 Type in gain constant = 0.2
Type in length of sequence = 31
For Figure 2.24 (b) Type in real exponent = log(0.9) Type in imaginary exponent = 0 Type in gain constant = 20
Type in length of sequence = 31 (b) The input data entered during the execution of Program 2_2.m are:
Type in real exponent = -0.4 Type in imaginary exponent = pi/6 Type in gain constant = -2.7
Type in length of sequence = 8
M2.2 (a)
€
˜ x a[n] = e j0.25πn . The plots generated using Program 2_2.m are shown below:
Not for sale. 30
(b) The code fragment used to generate
€
˜ x b[n] = cos(0.6πn + 0.3π) is: x = cos(0.6*pi*[0:40] + 0.3*pi);
(c) The code fragment used to generate
€
˜ x c[n] = Re e jπn /8( ) + Im e jπn / 5( ) is: x = real(exp(i*pi*[0:40]/8))+imag(exp(i*pi*[0:40]/5));
(d) The code used to generate
€
˜ x d [n] = 6sin(0.15πn) − cos(0.12πn + 0.1π) is:
Not for sale. 31
x = 6*cos(0.15*pi*[0:40])-cos(0.12*pi*[0:40]+0.1*pi);
(e) The code for
€
˜ x e[n] =sin(0.1πn + 0.75π) − 3cos(0.8πn + 0.2π) − cos(1.3πn) is:
x = sin(1.5*pi*n+0.75*pi)-3*cos(0.8*pi*[0:40]+0.2*pi)-cos(1.3*pi*[0:40]);
M2.4 (a) L = input('Desired length = '); A = input('Amplitude = '); omega = input('Angular frequency = '); phi = input('Phase = '); n = 0:L-1; x = A*cos(omega*n + phi); stem(n,x); xlabel('Time Index'); ylabel('Amplitude'); title(['\omega_{o} = ',num2str(omega/pi),'\pi']);
(b)
Not for sale. 32
M2.5 The code is given below: n = [0:0.001:1]; g1 = cos(6*pi*n); g2 = cos(14*pi*n); g3 = cos(26*pi*n); gpoints = cos(6*pi*[0:0.1:1]); plot(n,g1,'k-')
Not for sale. 33
hold on; plot(n,g2,'k--') plot(n,g3,'k-.') plot([0:0.1:1],gpoints,'bo') hold off;
M2.6 Code for plotting sinusoids is given below: t = 0:0.001:1;
fo = input('Frequency of sinusoid in Hz = '); FT = input('Sampling frequency in Hz = '); g1 = cos(2*pi*fo*t); plot(t,g1,'-'); xlabel('time'); ylabel('Amplitude'); hold n = 0:1:FT; gs = cos(2*pi*fo*n/FT);
plot(n/FT,gs,'o'); hold off M2.7 Sample code to verify the validity of the expeirment is shown below: t = 0:0.001:0.85;
n = 0:1:8; gs = cos(0.6*pi*n); plot(n/8.5,gs,'o'); hold off M2.8 Sample code for autocorrelation and cross correlation is shown below: rxx = conv(x,fliplr(x)) Given the sequences in Problem 2.52, the autocorrelations and cross correlations are
N = input('Length of sequence = '); n = 0:N-1; x = exp(-0.8*n); y = rand(1,N)-0.5+x; n1 = length(x)-1; r = conv(y,fliplr(y)); k = (-n1):n1; stem(k,r); xlabel('Lag_index'); ylabel('Amplitude');