Reference no: EM132398410
Assignment: Linear Prediction
1 Objectives
You are uniquely given a random signal generated from the following auto-regressive (AR) model
xn + ΣPi=1 aixn-i = wn (1)
where wn is a zero-mean white noise. The order of the above AR model is also unknown but is an integer between 6 to 10, inclusive. You are given the sequence xn and your objective is to estimate the coefficients ai's, the noise power and make comments on the order of the model. This assignment is based on Lecturer 5 (Power Spectrum Estimation - Parametric Methods).
Task
1. Download the file ‘generateSignal.p'.
2. In Matlab, run the command generateSignal(yourstudentID,N) to generate the random signal (i.e. xn in (1) above) that is unique to you, where N is the number of samples that you want to create. For example, if you student ID is 1234567 then the command generateSignal(1234567,1000) will generate a vector of 1000 samples of the sequence xn.
3. For a given p (e.g., p = 6) and N, and do the following
(a) Use the biased estimator (i.e. Equation (10) in Lecture 5) to estimate the auto- correlation function r(k) of the sequence for k = 0, 1, 2, ..., p.
(b) Compare your results with the built-in xcorr function in Matlab. Note that the xcorr function cannot be part of your method.
(c) From the estimated autocorrelation functions, compute the estimated coefficients ai's and the noise power (cf. Equations (6) and (7) in Lecture 5). You are allowed to use the toeplitz function to create the autocorrelation matrix. Compare the three following methods of calculating the estimated coefficients ai's:
i. Use the command A\b to solve the system Ax=b where A is the autocorrela- tion matrix and b is the cross-correlation vector.
ii. Use the built-in levinson function.
iii. Write your own implementation of the Levinson-Durbin algorithm.
After verifying all three methods produce the same results, you can choose one of them for the rest of the assignment.
(d) Compare your obtained result in Task 3(c) with that return by the built-in lpc function in Matlab. Again the lpc function cannot be part of your method.
(e) From the estimated coefficients ai's and the noise power, compute and plot the power spectral density of the signal. Compare your results with the built-in pwelch function and make your comments.
4. Repeat Tasks 3(a),3(c), and 3(e) for different p and N, and comment on the obtained results.
5. Run the following piece of code:
Use your method developed 3(a) to estimate the autocorrelation function of x and compare the result with r. Explain why the above piece of code can be used to estimate the autocorrelation function of a given signal, using supporting equations (Include the scanned pdf file with your workings in the report). From this, suggest an efficient way to estimate the autocorrelation function of a very long sequence. A bonus of 2 grade points is given if you can demonstrate your suggestion by a correct implementation.
Attachment:- Linear Prediction.rar