Get Instant Help From 5000+ Experts For

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
Implementing an Adaptive Noise Canceller with LMS and RLS Algorithms


In this lab, you will implement an adaptive noise canceller with the LMS and RLS algorithms. In the home directory on Canvas, there is a file named hw3data.mat that contains several audio files sampled at 22kHz. You can use any of these signals as the reference or the desired signal, but to make sure your code is working, for the first trial I suggest using noise as the noisy reference signal, and voice as the desired signal. As a first example, generate a filtered version of the reference (let’s call it fnoise) by convolving it with the following impulse response:

h = [0.78 − 0.55 0.24 − 0.16 0.08] .

As in class, you can listen to these files using the Matlab command sound, for example as follows:

>> sound(voice,22000)

To create the primary channel signal, simply add the filtered reference fnoise and voice with some appropriate scaling to determine how weak the voice signal is. For example (after reducing the length of fnoise

to account for the convolution):

>> primary = 100*fnoise+voice;

Here is the assignment:

1. Implement the LMS and RLS algorithms in Matlab and successfully recover the voice signal buried in the noise. You should implement your filter as a Matlab function with inputs for the primary and reference channels, the length of the adaptive filter M, the number of data samples L needed for computing the RLS filter, and the value of the stepsize µ for LMS. Your outputs should be the error signal for both the LMS and RLS filters. To verify your filter is working, begin by assuming a filter length of 5 (equal to the actual reference filter), initialize the LMS filter adaptation with h = [1 0 0 0 0], and to begin with, for the LMS algorithm use a small value of µ so you can more easily hear the convergence of the filter. For example, if you use a reference input of 100*noise and a noisy signal 100*fnoise + voice, a value of µ = 0.0000005 is a good choice. Note that if you change the scaling of the signal, you may need to adjust the value of µ.

2. Make sure your algorithm works by plotting and listening to the error resulting from both algorithms.

3. Increase the value of µ to show that LMS can achieve fast convergence. How big can you make µ before the filter goes unstable? How does the quality of the recovered voice signal change as µ increases? Can you explain this?

4. How important is the parameter L to the performance of the RLS algorithm? How small can you make L and still get good performance? Compare the performance of the RLS and LMS filters in terms of  the quality of the recovered voice signal and the amount of residual noise that is present.

5. For LMS, try different initializations for h. How sensitive is the LMS algorithm to the choice of the initial filter?

6. Compare the performance of the RLS and LMS filters when the voice signal is relatively weak (e.g., 100 times smaller than the filtered reference) and when it is a little stronger (e.g., only 5-10 times smaller) than the filtered reference. Are you surprised by the results? Can you explain this?

7. What happens when you use an LMS or RLS adaptive filter that is longer or shorter than the 5-tap filter that was used to filter the reference signal? How sensitive is the algorithm to this parameter?

8. Experiment with different filters (i.e., create a new fnoise signal with a different reference filter), filter lengths, signal-to-noise ratios, and values for µ and L, and discuss your results. One of the cases you should try is a reference filter whose largest coefficient is not in the first position (time zero). Can you get the LMS filter to converge with the same initial value of h = [1 0 0 0 0]

sales chat
sales chat