Acoustic Noise Canceller

The Signal Processing Blockset can simulate the behavior of complex signal processing systems, such as an acoustic noise canceller. In this demo, we'll show how to create an acoustic environment that simulates both white noise and colored noise added to an input signal. We'll use the LMS algorithm to subtract noise from an input signal.

In the model, the signal output at the upper port of the Acoustic Environment subsystem is white noise. The signal output at the lower port is composed of colored noise and a signal from a .wav file. This demo model uses an adaptive filter to remove the noise from the signal output at the lower port. When you run the simulation, you hear both noise and a person playing the drums. Over time, the adaptive filter in the model filters out the noise so you only hear the drums.

Contents

Acoustic Noise Canceller Model

The floating-point version of the model, built with Simulink and the Signal Processing Blockset, is shown below. The Signal Processing Blockset also supports the fixed-point data type.

Listening to the Signals

From our model, we can listen to the original signal, noisy signal, or the filtered signal by double clicking on the corresponding block.

Watch the video in which we listen to the signals. (25 seconds)

Windows-Specific Features

By running the Signal Processing Blockset on Windows, we can take advantage of Windows Media features, such as the ability to listen to the audio signal in real time while running the simulation. In this version of the demo, the stop time is set to infinity. This allows us to interact with the demo while it is running. For example, we can change the filter select or alternate from slow adaptation to fast adaptation (and vice versa), and get a sense of the real-time audio processing behavior under these conditions.

Watch the video in which we change the parameters while the simulation is running. (25 seconds)

Color Codes of the Blocks

Notice the colors of the blocks in the model. These are sample time colors that indicate how fast a block executes. Here, the fastest discrete sample time (e.g., the 8 kHz audio signal processing portion) is red, and the second fastest discrete sample time is green. You can see that the color changes from red to green after down-sampling by 32 (in the Downsample block before the Waterfall Scope block). See a complete list of color codes.

Acoustic Environment Subsystem

You can see the details of the Acoustic Environment subsystem by double clicking on that block. Gaussian noise is used to create the signal sent to the Exterior Mic output port. If the input to the Filter port changes from 0 to 1, the Digital Filter block changes from a lowpass filter to a bandpass filter. The filtered noise output from the Digital Filter block is added to the signal coming from a .wav-file to produce the signal sent to the Pilot's Mic output port.

dspanc/Waterfall Scope

The dspanc/Waterfall scope window displays the behavior of the adaptive filter's filter coefficients. It displays multiple vectors of data at one time. These vectors represent the values of the filter's coefficients of a normalized LMS adaptive filter, and are the input data at consecutive sample times. The data is displayed in a three-dimensional axis in the Waterfall window. By default, the x-axis represents amplitude, the y-axis represents samples, and the z-axis represents time. The Waterfall window has toolbar buttons that enable you to zoom in on displayed data, suspend data capture, freeze the scope's display, save the scope position, and export data to the workspace.

Watch the video of the Waterfall scope, including toolbar buttons and functions. (43 seconds)

Video of the Frame Changes in the Waterfall Scope

When the simulation runs, each frame represents the values of the filter coefficients of a normalized LMS adaptive filter. The following videos show the scope window, with the values initialized to zero. Also notice that the color of the plots fades from red to yellow as the filter coefficients change.

As the videos run, you can hear the output signal.

Watch the video of the Waterfall Scope for slow adaptation. (10 seconds)

Watch the video of the Waterfall Scope for fast adaptation. (12 seconds)

Additional Information

Learn more about the products used in this demonstration.