Active Noise Cancellation using Adaptive Filter Algorithms

DOI : 10.17577/IJERTV7IS020020

Download Full-Text PDF Cite this Publication

Text Only Version

Active Noise Cancellation using Adaptive Filter Algorithms

B A Sujathakumari

Associate Professor

Sri Jayachamarajendra College of Engineering

JSS Science &Technology University, Mysuru, India

Ravi S Barki

1st Sem M Tech

Sri Jayachamarajendra College of Engineering

JSS Science &Technology University, Mysuru, India

Lokesh A R

1st Sem M Tech

Sri Jayachamarajendra College of Engineering JSS Science &Technology University, Mysuru, India

Pavithra C M

1st Sem M Tech

Sri Jayachamarajendra College of Engineering JSS Science &Technology University, Mysuru, India

Abstract:- This paper describes a speech enhancement system based on TMS320C6713 digital signal processor (DSP) for active real-time noise cancellation. In conventional FIR and IIR digital filters, it is assumed that the process parameters to determine the filter characteristics are known. They may vary with time, but the nature of the variation is assumed to be known. In many practical problems, there may be a large uncertainty in some parameters because of inadequate prior test data about the process. Some parameters might be expected to change with time, but the exact nature of the change is not predictable. In such cases it is highly desirable to design the filter to be self-learning so that it can adapt itself to the situation at hand.

. In this paper the focus is on enhancement of speech audio signal from noise and will compare Least Mean-Square (LMS), Normalized Least Mean-Square (NLMS) and Recursive Least Square (RLS) algorithms using DSP processor with code composer studio (CCS)

Keywords: Adaptive noise cancellation (ANC), LMS algorithm, NLMS algorithm, RLS algorithm, adaptive filter

I. INTRODUCTION

Adaptive filters are best used in cases where signal conditions or system parameters are slowly changing and the filter is to be adjusted to compensate for this change. A very simple but powerful filter is called the linear adaptive combiner, which is nothing more than an adjustable FIR filter.

The LMS criterion is a search algorithm that can be used to provide the strategy for adjusting the filter coefficients.

In conventional FIR and IIR digital filters, it is assumed that the process parameters to determine the filter characteristics are known. They may vary with time, but the nature of the variation is assumed to be known. In many practical problems, the coefficients of an adaptive filter are adjusted to compensate for changes in input signal, output signal or system parameters. Instead of being rigid, an adaptive system can learn the signal characteristics and track slow changes. An adaptive filter can be very useful when there is uncertainty about the characteristics of a signal or when these characteristics change.

II NOISE CANCELLATION USING ADAPTIVE FILTER

The Single channel adaptive feedback Active Noise Cancellation (ANC) system works by processing the acoustical noise (the target noise) that would like to reduce, by producing an anti-noise which cancels out the noise component by the method of adaptive filtering. Therefore, the main aim of ANC system is to reduce the noise component from the signal of interest. Figure 1 shows schematic diagram of a single channel feedback ANC system

Fig1: Single channel feedback active noise cancellation

The anti-noise waveform is similar to that of the target noise, except its phase is reversed by 180 degrees. If these waveforms are combined together. It will result in a much weaker residual waveform (this waveform should be of zero amplitude if the anti-noise matches perfectly with the target noise).

The residual waveform is what is picked up by the microphone as shown in figure2. The feedback ANC system produces an anti-noise by predicting the incoming target noise

Fig 2: Description of active noise control

  1. NOISE CANCELLATION USING ADAPTIVE FILTER

    ALGORITHMS

    (i) LEAST MEAN SQUARE (LMS) ALGORITHM

    In the LMS algorithm, the coefficients are adjusted from sample to sample in such a way as to minimize the Mean Square Error (MSE).The LMS is based on the steepest descent algorithm where the weight vector is updated from sample to sample as follows

    Wk+1 = Wk – µk (1)

    Where Wk and µk are the weight and the true gradient vectors, respectively at the kth sampling instant. µ controls the stability and rate of convergence.

    1. Initially, set each weight to an arbitrary fixed value as 0. For each subsequent sampling instant, k, carryout steps from 2 to 4 below.

    2. Compute filter output

      nk= w (i) x k-i (2)

    3. Compute the error estimate

      ek = yk nk (3)

    4. Update the next filter weights

    wk+1(i) = wk(i) + 2µekx k-i (4)

    Because of its simplicity, the LMS algorithm is one of the popular adaptive algorithm. However, the LMS algorithm is very slow and data dependent convergence behaviour.

    One of the primary disadvantages of the LMS algorithm is having a fixed step size parameter for every iteration. This requires an understanding of the statistics of the input signal prior to commencing the adaptive filtering operation. In practice this is rarely achievable.

    Implementation of Least Mean Square Algorithm for noise reduction

    Fig 3: Flowchart of LMS algorithm

    Initially, the weight parameter (w) and also the loop variable

    1. are set to zero. Then obtained input signals from the microphone. In the next step the filter output is calculated and is further used to compute the error estimate signal.

      Then the filter weights are updated by fixing the step size value (µ) to be a constant. This procedure is repeated until the loop parameter becomes equal to the buffer size. This implementation is depicted in figure 3.

      Stability OF LMS:

      • Condition for stability is: 0< µ < ÷ 2 (input signal power)

      • Larger values for step size

      • Increases adaptation rate (faster adaptation)

      • Increases residual mean-squared error

    (II) RECURSIVE LEAST SQUARE (RLS) ALGORITHM RLS is relatively complex algorithm as compared to LMS and NLMS algorithm. Also performance of RLS in terms of convergence and Mean Square Error (MSE) is better when compare to LMS and NLMS.

    The Recursive least square (RLS) adaptive filter is an algorithm which recursively determines the filter coefficients that reduces a weighted linear least squares cost function relating to the input signals. The RLS algorithms are known for their excellent performance when working in time varying environments but at the cost of an increased computational complexity along with stability problems.

    1. RLS adaptation algorithm with input signals y(n) and x(n) is given below. Initial values for RLS algorithm is given by

      P (n) = I

      P (0) = (1) I w (0) = wI

    2. For m = 1,2, filter gain update vector is given by k(n)=1P(n1)y(n)+(1)yT(n)P(n1)y(n) (5)

    3. Error signal equation is given by

      e(n)=x(n) wT(n1)y(n) (6)

    4. Filter coefficient adaptation is given by

      w(n)=w(n1) k(n)e(n) (7)

    5. Inverse correlation matrix update is calculated using P(n)= 1[P(n1)(1)k(n)yT(P(n1)] (8)

    (iii) NORMALIZED LMS ALGORITHM (NLMS)

    The NLMS algorithm is equally simple, but more robust variant of the LMS algorithm and exhibits a better balance between simplicity and performance compared to LMS algorithm. Due to its better properties the NLMS has been largely used in real-time applicatons. The normalized least mean square algorithm (NLMS) is an extension of the LMS algorithm which bypasses this issue by computing maximum step size value. Step size value is computed by using the following formula.

    Step size=1/dot product (input vector, input vector)

    This step size is proportional to the inverse of the total expected energy of the instantaneous values of the coefficients of the input vector. NLMS algorithm is having the advantage over the LMS algorithm in case of Mean square error and Average attenuation

    IMPLEMENTATION OF NLMS ALGORITHM

    1. The NLMS algorithm is written as follows

      Wk+1 = Wk + 2µekXk (9)

      µk = / NP

      Where, µk : time varying step size factor normalised by N

      N : filter length

      : constant ( 0 < < 2 ) Pk: power estimate of xk

    2. Power estimation is upgraded by following equation,

      Pk+1 = (1-) Pk+ Nx2k-i (11)

      Where, : smoothing parameter

      Fig 4: Flowchart of NLMS algorithm

      Initially, the weight parameter (w) and the loop variable (i) are set to zero. The obtained input signals from the microphone. In the next step the filter output is calculated and is further used to calculate the error estimate signal. The filter weights are updated depending on the calculated step size value (µ). This procedure is repeated until the loop parameter becomes equal to the buffer size. This implementation is depicted in figure 4.

      REAL-TIME IMPLEMENTATION THROUGH CODE COMPOSER STUDIO

      CCS provides an IDE to incorporate the software tools. CCS includes tools for code generation, such as a C compiler, an assembler, and a linker. It has graphical capabilities and also supports real time debugging and provides an easy-to-use software tool to build and debug programs. The C compiler compiles a C source program with extension .c to produce an assembly source file with extension.asm. The assembler assembles an .asm source file to produce a machine language object file with extension.obj. The linker combines object files and also objects libraries as input to produce an executable file with extension.out

      Real-time analysis is performed using real-time data exchange (RTDX). RTDX allows for data exchange between the host PC and the target DSK, along with analysis in real time without stopping the target. Key statistics and performance can be monitored in real time. Through the joint team action group (JTAG), communication with on-chip emulation support occurs to control and monitor program execution. The C6713 DSK board includes a JTAG interface through the USB port.

      IMPLEMENTATION USING TMS320C6713 PROCESSOR IN REAL TIME

      Algorithm implementation is done on TMS320C6713 processor using Code Composer Studio (CCS) software which generates the executable code of the algorithm and burns the same to the DSK chip. The features of TMS320C6713 Processor are as explained below.

      • VLIW core is a processor architecture that allows 8 instructions to be issued in a single clock.

      • 192KB of high speed internal memory for maximum memory performance.

      • 64KB L2 cache/RAM four 16KB blocks of internal RAM that can be configured as RAM/cache.

      • 4KB separate caches for program and data.

      • On chip PLL generates processor clock rate from slow external clock reference.

      • Two timers generate periodic times events as a function of processor clock. Used by DSP/BIOS to create time slices for multi tasking.

      • Enhanced DMA (EDMA) controller that allows high speed data transfer without intervention from DSP.

  2. EXPERIMENTAL RESULTS

    • Output: Mean Square Error For LMS

      Fig5: Mean Square Error for LMS

      Fig6: Variation Of MSE With Respect To

      Fig7: Output: Mean Square Error for NLMS

      Fig8: Mean Square Error for RLS

      .Fig 9: Actual signal

      Fig 10: Input and noise signal

      Fig 10: LMS filter output

      Fig 11: NLMS filter output

  3. COMPARISON OF ALGORITHMS

    Table1: Comparison of Algorithms

  4. CONCLUSION

    • Active noise cancellation (ANC) scheme employs the adaptive digital filter to generate control signals. The adaptive filter updates its coefficients iteratively to track the best possible solutions using adaptive algorithms (LMS and NLMS)

    • LMS was the simplest and easiest to implement but it converges at the slowest rate RLS has rapid rate convergence, compared to LMS.

    • NLMS has a normalized step size making it converge faster than LMS but complexity also increases along with convergence rate

    • RLS is computationally more expensive than LMS.

    • The RLS algorithms are known for their excellent performance when working in time varying environments but at the cost of an increased computational complexity and some stability problems.

  5. REFERENCES

  1. Adaptive Filter Theory by Simen Haykin: 3rd edition, Pearson Education Asia.LPE.

  2. Adaptive Signal Processing by John G Proakis, 3rd edition, Perntice Hall of India.

  3. R. Chassaing, Digital Signal processing and applications with the C6713 and C6416 DSK, A John Wiley and Sons, Inc., Publications, 2005.

  4. (2010, May.) [Online]. Available: Texas instruments DSP developers village. World Wide Web, www.dspvillage.ti.com

  5. B. Widow, "Adaptive noise canceling: principles and applications", Proceedings of the IEEE, vol. 63, pp. 1692-1716, 1975. and Samuel D.Stearns; Pearson Education Asia, LPE

Leave a Reply