Take Home Exam # 1

ECES 522, Take Home Midterm 1
Due at beginning of Lecture on January 29.
Name:
Student ID:
I declare that the contents of this exam are exclusively my own work, and I did not discuss in any manner the
contents of this exam with any other student.
Signature:
1
1. Suppose X[n] is a real valued random process, and consider the random process
!2
5
X
Y [n] =
X[n − `]
(1)
`=−5
(a) Suppose X[n] is a stationary random process. Is Y [n] also stationary random process? Prove your answer.
(b) Suppose we don’t know if X[n] is stationary or not. Give two conditions involving expectations of products of
X[n] at different time instants that must be satisfied for Y [n] to be a wide sense stationary random process.
2. You wish to generate a zero mean wide sense stationary Gaussian random process X[n] with an auto-correlation
function
RXX [k] = 3−|n| + 2(4)−|n|
(2)
(a) Describe how to do so using a white Gaussian noise generator and a stable causal and minimum phase discrete
time system. Be sure to specify the transfer function of the system.
(b) Write MATLAB code implementing this system, and compare (2) with the measured autocorrelation of its output.
Measure the autocorrelation of the output of your system using the ’unbiased’ option of xcorr. Be sure to only
compare with the middle of the output of xcorr, as the estimates as you approach either end of the vector are
lousy. Submit your code and a plot comparing the desired and measured ACF.
3. What is the power spectral density of the WSSRP with ACF given by (2)?
4. Determine the transfer function W (z) =
∞
X
w` z −` of a stable causal and minimum phase system capable of turning
`=0
the WSSRP X[n] with ACF given by (2) into white noise (i.e. when its input is X[n], its output is white noise).
(a) Specify W (z).
(b) Implement W (z) in MATLAB using the filter command on the X[n] you generated in Problem 2 in MATLAB.
Measure the autocorrelation of the output and compare it with the ideal ACF of white noise. Submit your code
and a plot comparing the desired and measured ACF for the output of the whitening filter.
5. Determine the transfer function P (z) =
∞
X
p` z −` of a stable causal and minimum phase system forming the (2 steps
`=2
∞
X
ˆ
into the future) linear predictions X[n]
=
p` X[n − `] for the zero mean WSSRP X[n] with ACF (2) that minimize
`=2
2
ˆ
the mean squared error E[X[n]
− X[n] ]. Also, determine the mean squared error (MSE) that this predictor achieves.
(a) Specify P (z).
(b) Specify the MSE achieved by this predictor.
(c) Implement this predictor on the signal you generated in Problem 2 in MATLAB. Measure the average squared
ˆ
error between your predictions X[n]
and the true values X[n] and report it along with submitting your code.
6. You get to observe the process
∞
X
h` X[n − `] + Z[n]
(3)
RZZ [k] = .2δ[k] + .02δ[|k| − 1]
(4)
Y [n] =
`=0
where X[n] has ACF (2), Z[n] has ACF,
2
and
H(z) =
∞
X
h` z −` = 1 − 7−1 z −1
(5)
`=0
ˆ
From your observations of Y [n], you would like to form causal linear estimates X[n]
=
∞
X
f` Y [n − `] of X[n] which
`=0
ˆ − X[n]|2 ].
minimize the mean squared error E[|X[n]
(a) Determine the transfer function F (z) =
∞
X
f` z −` of the filter providing these estimates when its input is Y [n].
`=0
ˆ − X[n]|2 ] that your filter F (z) will achieve.
(b) Calculate the MSE E[|X[n]
(c) Implement the system (3) operating on your signal from Problem 2 in MATLAB, including the generation of a
zero mean Gaussian WSSRP Z[n] with the specified autocorrelation. Implement your causal estimator F (z) in
MATLAB, and measure the average squared error between its estimates (when given Y [n] as its input) and X[n].
Compare this average squared error with your calculation from the previous problem. Submit your MATLAB
code along with the average squared error you observed.
3