1 / 42

“Adaptive Noise Reduction"

“Adaptive Noise Reduction". Texas Instruments University Programme Teaching Materials. Adaptive Noise Reduction. Objectives. To develop a model of a noise reduction system using the Least Mean Squares (LMS) Algorithm To run the model on the Texas Instruments TMS320C5505 USB Stick.

tilden
Download Presentation

“Adaptive Noise Reduction"

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. “Adaptive Noise Reduction" Texas Instruments University Programme Teaching Materials

  2. Adaptive Noise Reduction

  3. Objectives • To develop a model of a noise reduction system using the Least Mean Squares (LMS) Algorithm • To run the model on the Texas Instruments TMS320C5505 USB Stick.

  4. Introduction • A simple question. What is “noise”? • In the audio sense, “noise” refers to any other signals besides those we want to listen to. • Click on the icon to hear noise:

  5. Adaptive Filter Block Diagram

  6. Graphic Equaliser Analogy • An adaptive filter can be thought of as a self-adjusting graphic equaliser: Input x(n) Output y(n) Slider adjustment using the Error e(n)

  7. Adaptive Filter Equation • The most common type of Adaptive Filter is a Finite Impulse Response Filter (FIR), with N variable coefficients w.

  8. The LMS Equation • The Least Mean Squares Algorithm (LMS) updates each coefficient on a sample-by-sample basis based on the error e(n). • This equation minimises the power in the error e(n).

  9. Why Error Squared? • Squaring the error has two useful effects: • It removes the sign of the error to give the magnitude • It makes the filter converge faster: • Suppose the error is 5. The square of the error is 25, which applies a much larger e(n) • When the filter is near its final value, the coefficients w(n) only change by a small amount.

  10. Choosing the value of variable µ • The value of µ (mu) is critical. • If µ is too small, the filter reacts slowly. • If µ is too large, the filter resolution is poor. • The selected value of µ is a compromise.

  11. Acoustic Noise Reduction: Two Microphones • A popular application of acoustic noise reduction is for headsets for pilots • This uses two microphones.

  12. Acoustic Noise Reduction: One Microphone • Scheme suitable for the TMS320C5505 USB Stick.

  13. Operation of Noise Reduction • Assumption: that speech s does not change quickly. In this case, s’ = s + phase shift • If the delay is longer than the size of the filter, then delayed version of the noise n’ is not the same as the noise n • The adaptive filter shapes the delayed speech s’ to make it as similar as possible to the reference speech s • Note that random noise cannot be shaped.

  14. Simulink Simulation

  15. The Simulink Model • Adaptive noise reduction can be modelled using Simulink.

  16. Setting the Step size (mu) • The rate of convergence of the LMS Algorithm is controlled by the “Step size (mu)”. • This is the critical variable. • Some textbooks use “BETA” for the Step size.

  17. Trace of Input to Model • “Input” = Signal + Noise.

  18. Trace of LMS Filter Output • “Output” starts at zero and grows.

  19. Trace of LMS Filter Error • “Error” contains the noise.

  20. Design Factors

  21. Implementation Variables • There are 3 variables that need to be carefully selected: • Filter length (typically 30) • Number of samples delay (typically 50) • Step size mu (~typically 0.002). The fixed point implementation uses the Q15 format value 560.

  22. Audio Signal: Filter Length 10 Input Distortion Filter Large Error Error

  23. Audio Signal: Filter Length 20 Input Filter Error

  24. Audio Signal: Delay 10 Samples Input Distortion Filter Delay Error

  25. Audio Signal: Delay 50 Samples Input Filter Delay Error

  26. Audio Signal: Delay 200 Samples Input Filter Delay Error

  27. Sine Wave: mu 5600 Input Filter Noise generated Error

  28. C Code Implementation

  29. Implementing the LMS Algorithm • The file adaptive_filter_asm.asm contains the C-callable function adaptive_filter_asm(); • There are two inputs (desired and input) • There are two outputs (filter and error) • DSPLIB also provides an implementation of the LMS algorithm.

  30. Introduction to Laboratory

  31. USB Stick Setup TMS320C5505 USB to PC Microphone Headphones

  32. Installing the Application • Copy the the code provided in Application 11 Adaptive Noise Reduction to the workspace • Follow the steps previously given in Chapter 1 to set up a new project.

  33. Create New Project

  34. Files in Project

  35. Console at 48000 Hz

  36. Setting up the TMS320C5505 USB Stick • Plug in a microphone and computer loudspeakers / headphones into the TMS320C5505 USB Stick • Put the microphone near to a source of audio noise e.g. an off-station radio, fan or hair dryer • Speak into the microphone • Listen to the output.

  37. Experiments

  38. Changing System Parameters • Change the number of filter elements from 30 to see how many elements you need • Change the step-size (mu or BETA) from 560 to see how the LMS algorithm converges.

  39. Change Sampling Frequency • Change the sampling frequency from 48000 Hz to 8000 Hz in main.c and LED_flasher.c • Is the noise reduction system more or less effective than before?

  40. Console at 8000 Hz

  41. Questions • Why is the Least Mean Squares (LMS) algorithm used for adaptive noise reduction? • What is the most critical variable when using the LMS algorithm? • Why has an assembly language version of the LMS algorithm been used, rather than a C code version?

  42. References • Digital Signal Processing, A Practical Approach by Emmanuel C. Ifeachor and Barrie W. Jervis. ISBN 0201-59619-9. • Digital Signal Processing with C and the TMS320C30 by Rulph Chassaing. ISBN 0-471-55780-3.

More Related