ECE 438 Exam 2 Solutions, 11/08/2006

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

NAME:__________________________________

ECE 438
Exam 2 Solutions, 11/08/2006.

• This is a closed-book exam, but you are allowed one standard (8.5-by-11) sheet of notes. No
calculators are allowed.

• Total number of points: 50. This exam counts for 20% of your final grade.

• You have 75 minutes to complete SEVEN problems.

• Be sure to fully and clearly explain all your answers.

• There will not be any discussion of grades. All re-grade requests must be submitted in writing,
as stated in the course information handout.

Score Grader

1_______ _______

2_______ _______

3_______ _______

4_______ _______

5_______ _______

6_______ _______

7_______ _______

Total score:_______

1
Formula Sheet
Z-Transform

1. Definition.

X
X(z) = x(n)z −n
n=−∞

2. Some transform pairs.

x(n) = δ(n) ↔ X(z) = 1, ROC is the whole z-plane


1
an u(n), a 6= 0 ↔ X(z) = , ROC|z| > |a|
1 − az −1
1
−an u(−n − 1), a 6= 0 ↔ X(z) = , ROC|z| < |a|
1 − az −1

3. Some transform properties.

a1 x1 (n) + a2 x2 (n) ↔ a1 X1 (z) + a2 X2 (z)


x(n − n0 ) ↔ z −n0 X(z)
x ∗ y(n) ↔ X(z)Y (z)

If x(n) is a right-sided sequence, the ROC of X(z) is |z| > |p| where p is the outermost pole of X(z).
A system is BIBO stable if and only if the unit circle is contained in the ROC of its transfer function.

Random Variables and Random Processes

If X is a continuous random variable, uniformly distributed between a and b, then


 1
fX (x) = b−a , a ≤ x ≤ b
0, otherwise
b+a
E[X] =
2
(b − a)2
var(X) =
12

A random process X(n) is wide-sense stationary if E[X(n)] = E[X(0)] for any n and E[X(n)X(m)] =
E[X(0)X(m − n)] for any n and m.

2
Problem 1 (5 points). Find the Z-transform of the sequence 2n u(n − 100) where u(n) is the
discrete-time unit step. Specify the region of convergence.

Fully justify your answers.

Solution. The z-transform of 2n u(n) is 1−2z 1


−1 , with ROC |z| > 2. Shifting the signal by 100 results

in the time domain signal 2 n−100 u(n − 100) whose Z-transform, because of the time-shift property,
z −100 n u(n − 100) = 2100 2n−100 u(n − 100), its Z-transform, by the linearity property, is
is 1−2z −1 . Since 2
2100 z −100
1−2z −1
. The region of convergence is the same as the original transform, |z| > 2.

Problem 2 (10 points).

(a) Suppose X(n) is a discrete-time random process such that E[X(n)] = 3 for all integer n and
E[X(n)X(m)] = e−|n−m| for all integer n and m. Is this process wide-sense stationary?

(b) Suppose W (n) is a discrete-time random process such that W (0) is a continuous random variable,
uniformly distributed between -0.5 and 0.5, and W (5) is a continuous random variable, uniformly
distributed between -1 and 1. Could the random process W (n) be wide-sense stationary?

(c) Suppose Y (n) is a random process such that Y (0) is a uniform random variable, uniformly
distributed between -0.5 and 0.5, and Y (5) is a Gaussian random variable with mean 0 and
variance 1/12. Could the random process Y (n) be wide-sense stationary?

Fully justify your answers.

Solution.

(a) Yes, this process is WSS because both parts of the definition of the WSS are satisfied: first, the
mean sequence is constant, and second, since E[X(n)X(m)] = e−|n−m| and E[X(0)X(m − n)] =
e−|n−m| , we have E[X(n)X(m)] = E[X(0)X(m − n)] for any m and n.

(b) If W is a WSS process, then we must have E[W (n)W (m)] = E[W (0)W (m − n)] for all m and n.
Taking m = n = 5, this yields E[W (5)W (5)] = E[W (0)W (0)] which is not true. Indeed, W (5) is
a random variable which is uniform between -1 and 1, and therefore its variance E[W (5)W (5)] is
equal to 1/3 (as given on the formula sheet), whereas W (0) is a random variable which is uniform
between -0.5 and 0.5, and therefore its variance E[W (0)W (0)] is equal to 1/12. Therefore, this
process cannot be WSS.

(c) Y (0) has mean 0 and variance 1/12, and so does Y (5). This information is consistent with
Y being a WSS sequence. We have no further information about the mean function or the
autocorrelation function of Y . We therefore conclude that the process Y could be WSS. (But
based on the provided information alone, we cannot say that it is definitely WSS or definitely
not WSS.)

3
Problem 3 (10 points). Let W (n) be a sequence of independent zero-mean random variables with
var(W (n)) = 1 for all n. Let Y (n) = W (n)W (n − 1). Determine the mean sequence E[Y (n)] and the
autocorrelation function E[Y (m)Y (n)] of the process Y (n). Is this process wide-sense stationary?

Fully justify your answers.

Solution. Since W (n) and W (n − 1) are independent, they are uncorrelated, and the expected value
of their product is equal to the product of their expected values. Therefore,

E[Y (n)] = E[W (n)W (n − 1)] = E[W (n)]E[W (n − 1)] = 0.

The autocorrelation function is found using the same property:

rY Y (m, n) = E[Y (m)Y (n)] = E[W (m − 1)W (m)W (n − 1)W (n)]

When m < n − 1 and when m − 1 > n, we have:

rY Y (m, n) = E[W (m − 1)]E[W (m)]E[W (n − 1)]E[W (n)] = 0.

When m = n − 1, we have:

rY Y (m, n) = E[W (n − 2)W 2 (n − 1)W (n)] = E[W (n − 2)]E[W 2 (n − 1)]E[W (n)] = 0

When m = n + 1, we have:

rY Y (m, n) = E[W (n − 1)W 2 (n)W (n + 1)] = E[W (n − 1)]E[W 2 (n)]E[W (n + 1)] = 0

When m = n, we have:

rY Y (m, n) = E[W 2 (n − 1)W 2 (n)] = E[W 2 (n − 1)]E[W 2 (n)] = 1.

Thus, rY Y (m, n) = δ(n − m). Since the mean sequence is constant and since E[Y (m)Y (n)] =
E[Y (0)Y (n − m)], Y (n) is a wide-sense stationary process.

4
Problem 4 (10 points). Consider the z-transform

2 − 5z −1
X(z) =
1 − 5z −1 + 6z −2
Sketch the three different regions of convergence (ROC’s) that are possible for this z-transform. For
each ROC, find the corresponding inverse transform x(n).

Fully justify your answers.

Solution. The poles of X(z) are the roots of the denominator: z = 2 and z = 3, therefore

A B
X(z) = −1
+
1 − 2z 1 − 3z −1
where
2 − 5 · 2−1
X(z)(1 − 2z −1 ) z=2 =

A = =1
1 − 3 · 2−1
2 − 5 · 3−1
X(z)(1 − 3z −1 ) z=3 =

B = =1
1 − 2 · 3−1
Therefore,
1 1
X(z) = −1
+
1 − 2z 1 − 3z −1
Since the poles are z = 2 and z = 3, the three possible regions of convergence are:
Region 1: |z| > 3 which is the outside of the circle of radius 3 centered at the origin of the z-plane. In
this case, the ROC is outside of both poles which means both terms in X(z) correspond to right-sided
sequences:
x(n) = 2n u(n) + 3n u(n).
Region 2: 2 < |z| < 3 which is the ring between the circles of radii 2 and 3 centered at the origin of
the z-plane. In this case, the ROC is outside of the pole at 2 but inside the pole at 3 which means
that the first term in X(z) corresponds to a right-sided sequence and the second term corresponds to
a left-sided sequence:
x(n) = 2n u(n) − 3n u(−n − 1).
Region 3: |z| < 2 which is the inside the circle of radius 2 centered at the origin of the z-plane. In
this case, the ROC is inside of both poles which means both terms in X(z) correspond to left-sided
sequences:
x(n) = −2n u(−n − 1) − 3n u(−n − 1).

5
Problem 5 (5 points). When Al throws a dart, the probability density function of the distance
between the center of the target and the point where the dart lands is uniformly distributed between
0 and 1 foot. When Bob throws a dart, the probability density function of the distance between the
center of the target and the point where the dart lands is uniformly distributed between 0 and 2 feet.
They each throw a dart once and the one whose dart is closer to the center of the target wins. Al’s
throw and Bob’s throw are independent. What is the probability that Al wins?

Fully justify your answer.

Solution. Let the two random variables representing Al’s and Bob’s distance from the origin be A and
B, respectively. Since they are independent random variables which are uniform(0,1) and uniform(0,2)
respectively, their joint pdf is:
 1
fA,B (a, b) = 2 , 0 ≤ a ≤ 1 and 0 ≤ b ≤ 2
0, otherwise

The event that Al wins is the event that A < B, therefore, its probability is the integral of fA,B (a, b)
over the region a > b, which is simply (1/2) times the area of the [0, 1] × [0, 2] rectangle that intersects
the half-plane a > b. This is 3/4.

Problem 6 (5 points). A causal LTI system is described by the following input-output equation:
3
y(n) + Ay(n − 1) − A2 y(n − 2) = x(n),
4
where y(n) is the response to the input signal x(n), and where the coefficient A is a continuous real-
valued random variable, uniformly distributed between 0 and 2. What is the probability that this
system is BIBO stable?

Fully justify your answer.

Solution. Taking the Z-transform of both sides yields the following transfer function for this system:

Y (z) 1
H(z) = =
X(z) (3/4) + Az −1 − A2 z −2

The poles are the roots of the denominator:


p
−A ± A2 + 4(3/4)A2 −A ± 2A
z1,2 = = ,
2A2 2(3/4)

where we use the fact that A is nonnegative, and so A2 = A. Therefore, z1 = (2/3)A and z2 = −2A.
Since the system is causal, its impulse response is a right-sided sequence, which means that the ROC
of the transfer function is outside of the outermost pole, i.e., the ROC is |z| > 2A. In order for the
system to be BIBO stable, the ROC must include the unit circle: in other words, we must have 2A < 1,
or A < 1/2. Since A is uniform between 0 and 2, the probability of this event is 1/4.

6
Problem 7 (5 points). Determine the optimal quantization intervals [x0 , x1 ) and [x1 , x2 ] and cor-
responding quantization levels q1 and q2 for the 1-bit Max quantizer to quantize a random variable
which has the following probability density function:

2x, 0 ≤ x ≤ 1
f (x) =
0, otherwise

In other words, select the parameters x0 , x1 , x2 , q1 , q2 to minimize the mean-square error E[(X − Y )2 ]
where X is the random variable to be quantized and Y is the result of quantization.

Fully justify your answers.

Solution. Since the probability of all observations outside of the interval [0, 1] is zero, we can set
x0 = 1 and x2 = 1. As shown in class by differentiating E[(X − Y )2 ] with respect to the parameters
and setting the partial derivatives to zero, the following identities hold:
Z x1
xf (x)dx
0
q1 = Z x1
f (x)dx
0
Z 1
xf (x)dx
x1
q2 = Z 1
f (x)dx
x1
q1 + q2
x1 =
2
Using the expression for f (x) in the integrals above and simplifying, we get:
2
q1 = x1
3
2 1 + x1 + x21
q2 = ·
3 1 + x1
q1 + q2
x1 =
2
Substituting q1 and q2 from the first two equations into the third one and simplifying, leads to the
following quadratic equation for x1 :
x21 + x1 − 1 = 0.

This equation has two real roots only one of which is positive, x1 = (−1+ 5)/2. Substituting this√back
into the other two√equations leads to the following values for the quantization levels: q1 = (−1+ 5)/3
and q2 = (−2 + 2 5)/3.

You might also like