113_1_Quiz1

3
EE113: Digital Signal Processing Fall 2011 Prof. Abeer Alwan October 13, 2011 TA: Jianshu Chen and Sen Li Solution to Quiz 1 1. Solution: (a) From sampling theory, we have x(n)= x(t)| t=nTs , where T s is the sampling interval. We know that sampling rate is 180 samples/sec, so T s =1/180 sec. Thus, we get x(n) = cos(120πt) + sin(60πt) + 10| t=n/180 = cos( 2π 3 n) + sin( π 3 n) + 10 (b) Let x 1 (n) = cos( 2π 3 n) and x 2 (n) = sin( π 3 n), therefore, x(n)= x 1 (n)+ x 2 (n) + 10. ω 1 = 2π 3 ω 1 N 1 =2πk = N 1 =3k = N 1 =3 ω 2 = π 3 ω 2 N 2 =2πk = N 2 =6k = N 2 =6 the period N should be the least common multiple of N 1 and N 2 , which is 6. 2. Solution: (a) The system is linear . Assume x 1 (n) is an arbitrary input with corresponding output y 1 (n), and x 2 (n) is another arbitrary input with output y 2 (n). Then, y 1 (n) and y 2 (n) can be written as y 1 (n) = sin π 4 n x 1 (n - 1) + x 1 (n) y 2 (n) = sin π 4 n x 2 (n - 1) + x 2 (n) Then, the output corresponding to input x(n)= ax 1 (n)+ bx 2 (n) is y(n) = sin π 4 n [ax 1 (n - 1) + bx 2 (n - 1)] + [ax 1 (n)+ bx 2 (n)] = a h sin π 4 n x 1 (n - 1) + x 1 (n) i + b h sin π 4 n x 2 (n - 1) + x 2 (n) i = ay 1 (n)+ by 2 (n) (b) The system is causal , because the output y(n) at time n is only determined by the current and previous inputs: {x(n),x(n - 1)}. (c) The system is not time-invariant . Let us denote y 0 (n) as the response to input x 0 (n). Then, we have y 0 (n) = sin π 4 n x 0 (n - 1) + x 0 (n) EE113 - Fall 2011 1 of 3

description

Digital Signals and Systems QuizAlwan

Transcript of 113_1_Quiz1

Page 1: 113_1_Quiz1

EE113: Digital Signal Processing Fall 2011Prof. Abeer Alwan October 13, 2011TA: Jianshu Chen and Sen Li

Solution to Quiz 1

1. Solution:

(a) From sampling theory, we have x(n) = x(t)|t=nTs , where Ts is the sampling interval. Weknow that sampling rate is 180 samples/sec, so Ts = 1/180 sec. Thus, we get

x(n) = cos(120πt) + sin(60πt) + 10|t=n/180

= cos(2π

3n) + sin(

π

3n) + 10

(b) Let x1(n) = cos(2π3 n) and x2(n) = sin(π3n), therefore, x(n) = x1(n) + x2(n) + 10.

ω1 =2π

3ω1N1 = 2πk =⇒ N1 = 3k =⇒ N1 = 3

ω2 =π

3ω2N2 = 2πk =⇒ N2 = 6k =⇒ N2 = 6

the period N should be the least common multiple of N1 and N2, which is 6.

2. Solution:

(a) The system is linear. Assume x1(n) is an arbitrary input with corresponding outputy1(n), and x2(n) is another arbitrary input with output y2(n). Then, y1(n) and y2(n)can be written as

y1(n) = sin(π

4n)x1(n− 1) + x1(n)

y2(n) = sin(π

4n)x2(n− 1) + x2(n)

Then, the output corresponding to input x(n) = ax1(n) + bx2(n) is

y(n) = sin(π

4n)

[ax1(n− 1) + bx2(n− 1)] + [ax1(n) + bx2(n)]

= a[sin(π

4n)x1(n− 1) + x1(n)

]+ b

[sin(π

4n)x2(n− 1) + x2(n)

]= ay1(n) + by2(n)

(b) The system is causal, because the output y(n) at time n is only determined by thecurrent and previous inputs: {x(n), x(n− 1)}.

(c) The system is not time-invariant. Let us denote y0(n) as the response to input x0(n).Then, we have

y0(n) = sin(π

4n)x0(n− 1) + x0(n)

EE113 - Fall 2011 1 of 3

Page 2: 113_1_Quiz1

Then, the response to x(n) = x0(n− n0) can be written as

y(n) = sin(π

4n)x(n− 1) + x(n)

= sin(π

4n)x0(n− n0 − 1) + x0(n− n0)

6= y0(n− n0) = sin(π

4(n− n0)

)x0(n− n0 − 1) + x0(n− n0)

(d) The system is BIBO stable. Assume x(n) is an arbitrary bounded input, i.e.,

|x(n)| ≤ Bx, ∀n

Then, the corresponding output satisfies

|y(n)| =∣∣∣sin(π

4n)x(n− 1) + x(n)

∣∣∣≤∣∣∣sin(π

4n)x(n− 1)

∣∣∣+ |x(n)|

≤∣∣∣sin(π

4n)∣∣∣ · |x(n− 1)|+ |x(n)|

≤ 1×Bx +Bx ≤ 2Bx

3. Solution:

(a) According to the figure, we can write the system difference equation as

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

(b) With initial condition y(−1) = 0 and x(n) = δ(n), we need to solve the impulse responsefrom the following difference equation:

h(n) = −3h(n− 1) + δ(n) + 2δ(n− 1), h(−1) = y(−1) = 0

from which we can write:

h(0) = −3h(−1) + δ(0) + 2δ(−1) = 1

h(1) = −3h(0) + δ(1) + 2δ(0) = −3 + 2 = −1

h(2) = −3h(1) + δ(2) + 2δ(1) = −3× (−1)

h(3) = −3h(2) + δ(3) + 2δ(2) = (−3)2 × (−1)

...

h(n) = −(−3)n−1, n ≥ 1

In summary, the closed form expression for h(n) should be

h(n) = δ(n) +1

3(−3)nu(n− 1)

EE113 - Fall 2011 2 of 3

Page 3: 113_1_Quiz1

(c) Given that the input x(n) = u(n), the output of the system is

y(n) = h(n) ? u(n)

=

[δ(n) +

1

3(−3)nu(n− 1)

]? u(n)

= δ(n) ? u(n) +1

3(−3)nu(n− 1) ? u(n)

= u(n) +1

3

n∑k=1

(−3)ku(n− 1)

= u(n) +1

3

(−3)− (−3)n+1

1− (−3)u(n− 1)

= u(n)− 1

12

[3 + (−3)n+1

]u(n− 1)

EE113 - Fall 2011 3 of 3