LMS and RLS assignment

This assignment consists of three parts:
  1. MSE and LMS (30 points)
    1. Let the persistent excitation \(\mathbf{x}(n)\) be a WGN \(\mathcal{N}(0,1)\) filtered through $$ \left[\frac{3}{5}, \, -\frac{4}{5}\right]^T $$
    2. The unknown system to be identified is a linear second order moving-average (FIR) with weights $$ \mathbf{w}^*=\left[\begin{array}{r}w^*_0 \\ w^*_1\end{array}\right] =\left[\begin{array}{r} 1 \\ 2\end{array}\right] $$
    3. Initialize the LMS filter weights to $$ \mathbf{w}_0=\left[\begin{array}{r}w_0(0) \\ w_1(0)\end{array}\right] = \left[\begin{array}{r} -2.8 \\ -2.8\end{array}\right] $$
    4. Use step size \(\mu = 0.05\)

      Use MATLAB to
    1. (20 points) Plot MSE surface in 3D and run LMS for 150 steps, showing the initial weights, and the progress towards the optimal weights.
    2. (10 points) Plot 150 runs of LMS (in gray), and the averaged path of those 150 runs in red.

    3. LMS MSE
      Your results should look like this.
    For this part turn in one file named
    LMS_MSE.m

  2. LMS and RLS (20 points)
  3. In this part you are asked to compare LMS with step size \(\mu=0.09\) to RLS with forgetting factor \(\lambda=0.98\).
    • Use the same initial and optimal weights for both LMS and RLS as in part 1 above.
    • Run LMS 30 times, with 45 steps each time. Draw each individual path in gray, and their average in red.
    • Run RLS 30 times, with 45 steps each time. Draw each individual path in gray, and their average in blue.
    • Plot both averaged paths, LMS in red and RLS in blue on the same contours plot for comparison.

    LMS RLS

    Your results should look like this.
    For this part turn in one file named
    LMS_RLS.m

  4. Tracking time varying system with LMS and RLS (50 points)
  5. In this part you are asked to investigate the tracking performance of both LMS and RLS (over the interval \(1\leq n \leq 255\)) of a linear moving-average system with time varying tap weights given by $$ \mathbf{w}(n)= \begin{cases} w_1 &= +8 \\ w_2 &= -4 \\ w_3 &= 8\sin\left( \frac{2\pi n}{255}\right) \\ w_4 &= +4 \\ w_5 &= -8 \end{cases} $$ This part of the assignment asks you to write explanations and comments, and run MATLAB simulations.
    • Use both LMS and RLS with 5 weights, both initialized to zero.
    • For LMS use step size \(\mu=\frac{1}{1+\mathbf{x}^T\mathbf{x}} \), where \( \mathbf{x}\) is tap-delay-line input.
    • (10 points) Explain what does LMS step size \(\mu=\frac{1}{\mathbf{x}^T\mathbf{x}}\) has to do with \(\text{Tr}(\mathbf{R})\).
    • Plot "unknown" coefficients vs time in green. LMS coefficients in red, and RLS coefficients in blue (for \(\lambda_1\)), and black (for \(\lambda_2\)).
    For this part you have to turn in 2 MATLAB files:
    Track_1.m
    • For persistent excitation \(\mathbf{x}(n)\) use WGN \(\mathcal{N}(0,1)\).
    • Compare LMS (red) to RLS with \(\lambda_1=0.95\) (blue) and RLS with \(\lambda_2=0.5\) (black). Comment on the difference in tracking behavior of the three algorithms.
    • (10 points) for working simulation. (10 points) for coherent, meaningful comments, not for a description of MATLAB results.
    Track_2.m
    1. For excitation use \(\mathbf{x}(n)=\begin{cases} 1 & \text{ if } \mod(n,10)=1 \\ 0 & \text{ otherwise} \end{cases} \)
    2. Use MATLAB to simulate LMS (red), and RLS with \(\lambda=0.88\) (blue).
    (10 points) for working simulation. (10 points) for coherent, meaningful comments and an explanation, not for a description of MATLAB results.

Tracking 1

A guide for organizing your results.