Projects:2014S1-23 Real-Time Adaptive Filters
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.
Contents
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 2.6.35.3 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.
Approach
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.
e[n]=d[n]-y[n]
R=E[(π’[π] π’[π]π)2]
p=E[u[n]Γd[n]]
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.
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.
Team
Group members
- Mr Lian Wang
- Mr David Homley
- Mr Peng Fei
Supervisors
- Dr Andrew Allison
- Dr Braden Phillips
Resources
- Bench 2 in lab EM418
- Matlab-Simulink
- Freescale i.mx53 quick start board
- 2 microphones
- Standard mixer
- Standard PC