 #### СЊЯЕЗНЪН

• QQЃК99515681
• гЪЯфЃК99515681@qq.com
• ЙЄзїЪБМфЃК8:00-23:00
• ЮЂаХЃКcodinghelp2 #### ФњЕБЧАЮЛжУЃКЪзвГ >> MatlabБрГЬMatlabБрГЬ

###### ШеЦкЃК2021-02-20 11:02

ECE 9203/9023 ЈC Random Signals, Adaptive and Kalman Filtering

Winter 2021, MATLAB Assignment #1

Due date & time: Friday, February 19, 2021, 11 PM EDT.

Upload to ЁАAssignmentsЁБ section. Email or DropBox submissions not accepted.

1. (10 marks) Generate the following random signals in MATLAB. Plot the estimated probability density

function (PDF) and power spectral density (PSD) for each. Comment on how close the estimated PDF and

PSD are to their theoretical values. (see ЁАwgn.mlxЁБ for guidance).

a. White Gaussian Noise, mean = 0, variance = 1

b. White Uniform Noise, mean = 0, variance = 1

c. Pink Gaussian Noise, mean = 0, variance = 1

2. (10 marks) In this exercise, we will apply AR modeling to speech samples. Download ЁАm01ae.wavЁБ,

ЁАw01ae.wavЁБ, ЁАw01ih.wavЁБ, and ЁАw01uw.wavЁБ from ЁАResources -> MATLABЁБ directory. Complete the

following:

a. For each speech sample, plot the estimated variance of the white noise input against the model order,

with the model order ranging from 1 to 25. See the documentation for ЁАaryuleЁБ command for

accessing the estimated variance. Comment on the results. What would be a good model order for

modelling these waveforms?

b. For each speech sample and the chosen model order, compute and plot the periodogram and AR

spectral estimates. See ЁАLinearPredictionExample.mlxЁБ for guidance. Comment on the results. In

particular, what is the AR spectral estimate trying to model? Are the AR spectral estimates the same

across the four speech samples?

3. (5 marks) The input to a Wiener filter of length two is described by the difference equation, u(n) = x(n) +

v2(n), where x(n) = 0.3x(n-1) + 0.64 x(n-2) + v1(n), and v1(n) and v2(n) are zero-mean white noise processes of

variances 0.4 and 0.2 respectively. The desired input is given by the difference equation, d(n) = 0.1x(n) +

0.52 x(n-1). We derived the equations for the error performance surface and the Wiener filter for this

example in class. Do the following in MATLAB (see ЁАWienerFilterExample1.mЁБ for guidance):

a. Plot the error performance surface as function of the weights.

b. Plot the contours of the error performance surface and indicate the Wiener solution on this plot.

c. Plot the gradient vectors and comment on their orientation.

4. (15 marks) Consider a one-step adaptive predictor for a generic second order real AR process defined by the

difference equation u(n) + a1 u(n-1) +a2 u(n-2) = v(n), where v(n) is a zero-mean white noise process with

variance,!".

a. Derive the equations for r(0), r(1), and r(2).

"=1, compute the eigenvalues, eigenvectors, and the eigenvalue spread. Using the LMS

algorithm with the convergence parameter, ІЬ = 0.003, plot the power spectral densities for e(n). Include these plots in your assignment, clearly labeling the axes. What observations

can you make from these plots?

d. Compute the ensemble-average learning curve of the LMS process by averaging the squared values of

the prediction error, e(n). Similarly, compute the ensemble-average learning curves for the NLMS

algorithm using d = 0.05. Include these plots with your assignment, along with your observations

comparing the NLMS and LMS results.