


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Department of Electrical and Computer Engineering
Optimal and Adaptive Filtering
Spring 2008
Carry out the following MATLAB problems. Hand in the various hard copies you have generated. Please arrange them in order and annotate them to make it easy for the reader to understand your work.
One approach for estimating the frequency of a sinusoid in noise is to use a constrained lattice filter. Specifically, consider the sinusoidal signal
X(t) = Acos(21Tfot + <1» (1)
where A is constant, and <1>is a random phase uniformly distributed over [0, 21T). We observe
Y(t) = X(t) + V(t) , (2)
denotes the length of the observation interval. Consider the constrained second-order lattice filter shown in the figure below, where the second reflection coefficient has been set equal to one.
a) Find the location of the zeros of the lattice filter A2(z) as a function of T
b) Assume that the sinusoid amplitude A and noise variance r are known, and let E(t; 2) be the estimation residual obtained at the output of the lattice filter. Select the reflection coefficient 'Y to minimize the mean-square error E[E2(t; 2)], and evaluate the corresponding mean-square error MSE. Indicate how 'Y can be used to estimate fo, and explain the effect of the signal to noise ratio A2/2r on the estimate fo and on the MSE.
c) Unfortunately in most situations, A and r are not known a priori, so that the statistics of Y (t) cannot be evaluated. In such cases, instead of selecting 'Y so as to minimize the mean-square error E[ E2 (t; 2)], we can employ a deterministic least-squares approach, where 'Y minimizes the time-averaged squared residuals
J = T-1 LE2(t;2).t=
on the observations Y(-). Explain how 'Y can be used to estimate fo.
d) To test the frequency estimation procedure developed in c), write a MATLAB function
[X,Y] = noisin(A,fO,phi,r,T)
which generates the sinusoidal waveform X (t) and noisy observations Y (t) for a ::; t ::; T. The function outputs are two row vectors X and Y of length T + 1, where the t + 1-th elements of X and Yare X(t) and Y(t), respectively. Write also a function
[gamma,E,l] =conlat(Y,T)
which evaluates the reflection coefficient 'Y, as well as the residual vector E and J from
E has only length T - 1. Its t - lth entry is E(t; 2). Write a plotting function which generates: (i) a plot showing both X(t) and Y(t) for a ::; t ::; T; (ii) a plot of E(t)
the same page by using the subplot MATLAB command. Print the M-files of noisin, conlat, and of your plotting function.
e) in this part, we use the functions developed in part d) to test the effect of the data length record T, signal to noise ratio A2/2r, and frequency fo on the performance of the frequency estimation technique of part c). For all experiments, we select <P = a and r = 1.
(i) Set A = 10 and fo = 0.25. Generate observation records with T = 10,20,50 and
(ii) Set fo = 0.05 and T = 100. Generate observation records wit? A = 1, A = 4, A = 10 and A = 20, and evaluate the corresponding 'Y, J and fo. (iii) Set A = 10 and T = 100. Generate observation records with fo = 0.01, 0.05, 0.1, 0.25 and 0.5, and evaluate the corresponding 'Y, J and 10.
What conclusions can you draw from (i)-(iii)?
Let X(t) be an AR(l) WSS process with autocorrelation
Rx(k) = a1kl ,
of Problem Set 2 to evaluate the exact cross- and auto- correlations ofYdt) and Y2(t). Then employ the MATLAB program of part b) to design and implement optimum noise cancellation filters of order M = 2,4 and 6 for the data generated in a). Let
denote respectively the noise estimate and the error of the noise-cancellation filter. For M = 2,4 and 6, evaluate the mean-square error PM = E[Nf M(t)]. Plot together Nf,M(t) and its standard deviation p~2 against t. Plot together X(t) and its estimate
d) One unrealistic aspect of the simulations of part c) is that they assume that the
q were given. A more realistic approach consists in using the sampled cross- and auto correlations
(3)
with 0 ::; k ::; M - 1, where T denotes the length of the length of the available data record (here T = 200). Write a MATLAB program which evaluates the sampled cross and auto correlations of Ydt) and Y2(t), and design noise cancellation filters of orders M = 2,4 and 6 based on these sampled statistics. Compare the filters you obtain with those of part c), and plot together X (t) and X M (t) against t. Plot separately the error -N1,M(t) = X(t) - XM(t) as a function of t.
e) In some situations, the desired signal may leak into the secondary sensor. In this case, the performance of the noise cancellation filter may be severely compromised. To evaluate the effect of such a leakage, assume that
For b = 0.1 and 0.2, (i) generate 200 samples of the observations Y2(t), (ii) evaluate the sampled satistics Ry1yZ and Ryz, and (iii) design noise cancellation filters of orders M = 2, 4 and 6. Compare the performance of these filters to the case b = 0 examined in part d). Draw some conclusions.
the textbook. For this last problem, you may also wish to consult pp. 583-584 of the book.