7
Solutions of Chapter 3 Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution: (a) E x = n=|x[n]| 2 = 1 2 + 2 2 + 3 2 + 2 2 + 1 2 = 19 (b) E x = n=|x[n]| 2 = 1 2 + 2 2 + 3 2 + 2 2 + 1 2 = 19 (c) E x = n=|x[n]| 2 = |− 9| 2 + |− 6| 2 + |− 3| 2 + |− 9| 2 + |3| 2 + |6| 2 + |9| 2 = 252 (d) E x = n=|x[n]| 2 = 4 2 + 2 2 + 2 2 + 4 2 = 40 Page 1 of 7

Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Embed Size (px)

Citation preview

Page 1: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Solutions of Chapter 3

Part 1/2

Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1.

Figure 1: Fig3.1-1

Solution:

(a) Ex = ∑∞n=−∞ |x[n]|2 = 12 +22 +32 +22 +12 = 19

(b) Ex = ∑∞n=−∞ |x[n]|2 = 12 +22 +32 +22 +12 = 19

(c) Ex = ∑∞n=−∞ |x[n]|2 = |−9|2 + |−6|2 + |−3|2 + |−9|2 + |3|2 + |6|2 + |9|2 = 252

(d) Ex = ∑∞n=−∞ |x[n]|2 = 42 +22 +22 +42 = 40

Page 1 of 7

Page 2: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Problem 3.1-3 Show that a power of a signal De j(2π/N0)n is |D |2. Hence, show that a power of a signalx[n] = ∑N0−1

r=0 Dre jr(2π/N0)n is Px = ∑N0−1r=0 |Dr|2. Use the fact that

N0−1

∑k=0

e j(r−m)2πk/N0 =

{N0, r = m;0, otherwise.

Solution:

(1) Let x[n] = De j(2π/N0)n = D(cos(2π/N0)n+ j sin(2π/N0)n), we see that x[n] is periodic with N0 itsperiod. For a complex number |z|2 = Z∗Z∗, so we have |De j(2π/N0)n|2 =(De j(2π/N0)n)(D∗e j(2π/N0)n)= |D |2.Thus, its power is given by

Px =1

N0

N0−1

∑n=0

|De j(2π/N0)n|2 = 1N0

N0−1

∑n=0

|D |2 = |D |2.

(2) Clearly, the signal x[n] is periodic, its period is N0. Thus, the power can be written as

Px =1

N0

N0−1

∑n=0

|x[n]|2 = 1N0

N0−1

∑n=0

∣∣∣∣∣N0−1

∑r=0

Dre jr(2π/N0)n

∣∣∣∣∣2

.

Since ∣∣∣∣∣N0−1

∑r=0

Dre jr(2π/N0)n

∣∣∣∣∣2

=N0−1

∑r=0

Dre jr(2π/N0)nN0−1

∑m=0

D∗me− jm(2π/N0)n,

the above equation can be written as follows by interchanging the order of summation.

Px =1

N0

N0−1

∑r=0

N0−1

∑m=0

DrD∗m

[N0−1

∑n=0

e j(r−m)(2π/N0)n

].

The summation within square brackets is N0 when r = m and 0 otherwise. Therefore, we have

Px =N0−1

∑r=0

DrD∗r =

N0−1

∑r=0

|Dr|2.

Problem 3.2-1 If the energy of a signal x[n] is Ex, then find the energy of the following:(a) x[−n](b) x[n−m](c) x[m−n](d) Kx[n] (m integer and K constant)

Solution:

(a) The energy of x[−n] is given by

E1 =∞

∑n=−∞

|x[−n]|2.

Page 2 of 7

Page 3: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Let m =−n, we have

E1 =−∞

∑m=∞

|x[m]|2 =∞

∑m=−∞

|x[m]|2 = Ex.

(b) The energy of x[n−m] is given by

E2 =∞

∑n=−∞

|x[n−m]|2 =∞

∑r=−∞

|x[r]|2 = Ex.

(c) The energy of x[m−n] is given by

E3 =∞

∑n=−∞

|x[m−n]|2 =−∞

∑r=∞

|x[r]|2 =∞

∑r=−∞

|x[r]|2 = Ex.

(d) The energy of Kx[n] is given by

E4 =∞

∑n=−∞

|Kx[n]|2 = K2∞

∑n=−∞

|x[n]|2 = K2Ex.

Problem 3.2-3 and 3.2-4 For the signal depicted in Fig. P3.1-1 (a) and (c), sketch the following signals:(a) x[−n] (b) x[n+6] (c) x[n−6](d) x[3n] (e) x[n/3] (f) x[3−n]

Solution:

Figure 2: Fig3.2-4

Page 3 of 7

Page 4: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Problem 3.3-4 Describe each of the signals in Fig.P3.1-1 by a signal expression valid for all n.

Solution:

There are many different ways of viewing x[n]. Here is just one possible expression.(a) x[n] = x1[n]+ x2[n] = (n+3)(u[n+3]−u[n])+(−n+3)(u[n]−u[n−4])

Other possible solutions:x[n] = (n+3)(u[n+3]−u[n])+(−n+3)(u[n]−u[n−3])x[n] = (n+3)(u[n+2]−u[n])+(−n+3)(u[n]−u[n−3])x[n] = (n+3)(u[n+3]−u[n−1])+(−n+3)(u[n−1]−u[n−4])

(b) x[n] = n(u[n]−u[n−4])+(−n+6)(u[n−4]−u[n−7])(c) x[n] = n(u[n+3]−u[n−4])(d) x[n] =−2n(u[n+2]−u[n])+2n(u[n]−u[n−3])

Problem 3.4-3 A moving average is used to detect a trend of a rapidly fluctuating variable such as the stockmarket average. A variable may fluctuate (up and down) daily, masking its long-term (secular) trend. Wecan discern the long-term trend by smoothing or averaging the past N values of the variable. For the stockmarket average, we may consider a 5-day moving average y[n] to be the mean of the past 5 days’ marketclosing values x[n],x[n−1], · · · ,x[n−4].

(a) Write the difference equation relating y[n] to the input x[n].(b) Use time-delay elements to realize the 5-day moving-average filter.

Solution:

(a) y[n] = 15(x[n]+ x[n−1]+ x[n−2]+ x[n−3]+ x[n−4])

(b) Let ’D’ represent unit delay, the realization is as follows.

D D DD X[n] 1/5

Y[n]

Figure 3: Fig3.4-3

Page 4 of 7

Page 5: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Problem 3.4-5 Approximate the following second-order differential equation with a difference equation.

d2ydt2 +a1

dydt

+a0y(t) = x(t)

Solution:

Let x[n] and y[n] represent the samples T seconds apart of the signals x(t) and y(t), respectively. i.e.

x[n] = x(nT ), y[n] = y(nT )

Suppose T is small enough so that the assumption T → 0 may be made. Then, we have

y(t) = y[n]dydt

≃ y[n]− y[n−1]T

d2ydt2 ≃

y[n]−y[n−1]T − y[n−1]−y[n−2]

TT

=y[n]−2y[n−1]+ y[n−2]

T 2

Substituting the above expressions into the given differential equation, we can obtain the followingapproximated difference equation

A1y[n]+A2y[n−1]+A3y[n−2] = Bx[n]

where

A1 = 1+a1T +a0T 2

A2 = −(2+a1T )

A3 = 1

B = T 2

Page 5 of 7

Page 6: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Problem 3.4-8 A linear, time-invariant system produces output y1[n] in response to input x1[n], as shownin Fig.P3.4-8. Determine and sketch the output y2[n] that results when input x2[n] is applied to the samesystem.

Figure 4: Fig3.4-8

Solution:The output y1[n] can be expressed as y1[n] = −δ [n] + δ [n − 1] + 2δ [n − 2]. The input x2[n] can be

expressed as x2[n] = x1[n−1]−2x1[n−2].Since the system is LTI, from the property of superposition, we have

y2[n] = y1[n−1]−2y1[n−2] =−δ [n−1]+3δ [n−2]−4δ [n−4]

The output is sketched as follows.

-2 -1 0 1 2 3 4 5 6 7 8

-4

-2

0

2

4

n

y2[n]

Figure 5: Fig3.4-8a

Page 6 of 7

Page 7: Part 1/2 - University of Waterloojzelek/teaching/syde252/Solution_ch3a.pdf · Part 1/2 Problem 3.1-1 Find the energy of the signals depicted in Figs.P3.1-1. Figure 1: Fig3.1-1 Solution:

Problem 3.4-9 A system is described by

y[n] =12

∑k=−∞

x[k](δ [n− k]+δ [n+ k])

(a) Explain what this system does.(b) Is the system BIBO stable? Justify your answer.(c) Is the system linear? Justify your answer.(d) Is the system memoryless? Justify your answer.(e) Is the system causal? Justify your answer.(f) Is the system time invariant? Justify your answer.

Solution:

In the summation, n is a constant, the signal x[k] is sampled at k = n and k =−n. Thus, the system canbe rewriten as

y[n] =12(x[n]δ [n− k]+ x[−n]δ [n+ k]) =

12(x[n]+ x[−n])

(a) Each signal can be expressed as a sum of an even component and an odd component as

x[n] =12(x[n]+ x[−n])+

12(x[n]− x[−n]).

The system extracts the even portion of the input.

(b) The system is BIBO stable. If the input is bounded, then the output is necessarily bounded. Assumeinput x[n] is bounded as |x[n]| ≤ Mx < ∞, then its reverse x[−n] is also bounded and |x[−n]| ≤ Mx < ∞. Thus,|y[n]|= |1

2(x[n]+ x[−n])| ≤ 12(x[n]+ x[−n])≤ Mx < ∞.

(c) Yes. The system is linear. Let

y1[n] =12(x1[n]+ x1[−n]), y2[n] =

12(x2[n]+ x2[−n])

Applying x[n] = a1x1[n] + a2x2[n] to the system yields y[n] = 12(x[n] + x[−n]) = 1

2(a1x1[n] + a2x2[n] +(a1x1[−n]+a2x2[−n])) = a1y1[n]+a2y2[n].

(d) No, The system is not memoryless since the output does not only depend on its current input. Forexample, at time n = 2, the output y[2] = 1

2(x[2]+ x[−2]) depends on a past value of input x[−2].

(e) No, The system is not causal. For example, at time n = −1, the output y[−1] = 12(x[−1] + x[1])

depends on a future value of input x[1].

(f) No, The system is not time invariant. For example, let the input be x1[n] = u[n+10]−u[n−11]. Sincethe input is already even, the output equals to the input as y1[n] = x1[n] = u[n+10]−u[n−11]. Shifting bya non-zero integer N, then the signal x2[n] = x1[n−N] is not even; the output y2[n] ̸= y1[n−N] = x1[n−N].Therefore, the system is time varying.

Page 7 of 7