ECE 438 Exam 2 Solutions, 11/08/2006
ECE 438 Exam 2 Solutions, 11/08/2006
ECE 438 Exam 2 Solutions, 11/08/2006
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.
• 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=−∞
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.
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.
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.
(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?
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?
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,
When m = n − 1, we have:
When m = n + 1, we have:
When m = n, we have:
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).
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?
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?
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
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.
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.