Projects:2014S1-23 Real-Time Adaptive Filters

From Projects
Jump to: navigation, search

The aim of this project is to build Real-Time Adaptive Filters to realize noise cancellation by running the Freescale i.mx53 quick start board.The delivered product will be dealing with the noise that occurred during the propagation but not the noise from the original sound signal. This technology can be used in the factories to reduce the noise caused by running large machines or it can be used to enhance the sound effects in the concert or cinema. B.png

Project information


Sound is a pressure wave, which consists of a compression phase and a rarefaction phase. The noise-cancellation speaker emits a sound wave with the same amplitude but with inverted phase to the contaminated sound signal. The waves combine to form a new wave, in a process called interference, and effectively cancel each other out - an effect which is called phase cancellation.

The hardware used in this project is the i.MX53 Quick Start Board from FreeScale Semiconductor. The board has a 1 GHz ARM-Cortex A8 process, 1 Gb of DDR3 RAM and a dedicated sound codec (SGTL5000).

The operation system of the i.MX53 quick start board is Ubuntu 10.04. The quick start board will receive both original sound signal and contaminated signal to produce an anti-noise to realize the noise cancellation. The simulation of the noise cancellation will be completed through using Matlab-Simulink. The delivered product can be used in the factories to reduce the noise caused by running large machines or it can be used to enhance the sound effects in the concert or cinema. It can enhance the sound effects through realizing noise cancellation without affecting the original sound. With the application of this technology, the unexpected noise that occurred during the propagation can be perfectly dealt with. For small devices, this technology can also be used on noise-cancelling headphones

Software Environment

The i.MX53 board used in our project runs a modified kernel of Linux that can run on an ARM processor. The choice of what audio Application Programming Interface (API) was between two different API's; JACK (JACK Audio Connection Kit) and ALSA (Advanced Linux Sound Architecture).

We choose JACK because it is a much higher level API, as well as specializing in low latency operations, which is very important for our project. JACK allows us to change various parameters of the i.MX53's audio codec, such as sampling frequency and frames per period, allowing us greater control over the basic audio operations.


This is the approach of the project. The general approach is to develop C code (for real-time adaptive filters) on the developed JACK programming environment under Linux Ubuntu 10.04 operation system (using Freescale i.mx53 quick start board).


The C code to implement the adaptive algorithm will be based on the MATLAB-SIMULINK simulation


By analysing the mean square error to optimize the C code for the real-time adaptive filters.



R=E[(𝑒[𝑛] 𝑒[𝑛]𝑇)2]


MSE (mean square error) =E[𝑒[𝑛]2]

MSE (mean square error) = E[𝑑(𝑛))2]+ 𝑀[𝑛]𝑇×𝑅×𝑀[𝑛]βˆ’2×𝑝𝑇×w[n]]

Simple as aπ‘₯^2+𝑏π‘₯+𝑐

Graphic User Interface

As the C code used in this project was being continuously updated, it was not possible to create a stand alone application for it, hence the code had to executed in the Linux terminal. However, this is not a user friendly environment, as any commands must be typed in etc. As a result, we decided to design and build a simple Graphic User Interface to interact with the code.

This was designed specifically using the "ncurses" library available under the GNU licencse. It is a library specifically tailered for designing GUI's in the Linux terminal itself, greatly simplifying the design.

The image below shows the GUI in operation.

GUIclientMain.png GUIclientFilter.png GUIclientNoise.png

The GUI can adjust the various parameters of the filters; such as run time, enabling or disabling noise and (for static filter mode) the type of filter. The GUI can operate with a standard FIR filter or with our adaptive FIR filter.

High-Level Plan

Aim1. Hardware construction

     Milestone1.Basic functional test of the board.
     Milestone2.Simple sound signal test.
     Milestone3.Running noise cancellation c code.

Aim2. Software construction

     Milestone1.Doing research on algorithms of the real-time adaptive filters.
     Milestone2.Build simulation in Matlab-Simulink to perform the noise cancellation.
     Milestone3.Generate c code using Simulink and use a cross compiler to compile the code.

Aim3. Interface

     Milestone1.Based on the compiled code and the board to perform basic noise cancellation.
     Milestone2.Litereature research on Advanced Linux Sound Architecture, Jack Audio and Gstreamer.
     Milestone3.Running C code on the board.
     Milestone4.Parameters adjusting and performance testing.
     Milestone5.Build GUI.
     Milestone6.Use the board and GUI to perform real-time noise cancellation.


Group members

  • Mr Lian Wang
  • Mr David Homley
  • Mr Peng Fei


  • Dr Andrew Allison
  • Dr Braden Phillips


  • Bench 2 in lab EM418
  • Matlab-Simulink
  • Freescale i.mx53 quick start board
  • 2 microphones
  • Standard mixer
  • Standard PC