Design of Least Mean Square Algorithm for Adaptive Noise Canceller

Page 1

Mamta M. Mahajanet al. / (IJAEST) INTERNATIONAL JOURNAL OF ADVANCED ENGINEERING SCIENCES AND TECHNOLOGIES Vol No. 5, Issue No. 2, 172 - 176

Design of Least Mean Square Algorithm for Adaptive Noise Canceller S. S. Godbole2 (Assistant Professor2 )

Electronics & communication Engineering Department G. H. Raisoni College of Engineering Nagpur India 1 mmmmahajan@gmail.com

Electronics & ecommunication Engineering department G. H. Raisoni College of Engineering NagpurIndia 2 godbole_123@yahoo.com

requires little or no a priori knowledge of signal or noise characteristics. In this paper we have to used adaptive filter for noise cancellation. Noise cancelling is a variation of optimal filtering that is highly advantageous in many applications. It makes use of an reference input derived from one or more sensors located S at points in the noise field where the signal is weak or undetectable. This input is filtered and subtracted from a primary input containing both signal and noise. As a result the primary noise is attenuated or eliminated by cancellation.

ES

Abstract— This paper describes the concept of adaptive noise cancelling, an alternative method of estimating signals corrupted by additive noise or interference. The method uses a “primary” input containing the corrupted Signal and a “reference” input containing noise correlated in some unknown way with the primary noise. The reference input is adaptively filtered and subtracted from the primary input to obtain the signal estimate. A desired signal corrupted by additive noise can often be recovered by an adaptive noise canceller using the least mean squares (LMS) algorithm. Computer simulations with uncorrelated Gaussian noise and signals confirm the results of the analysis and demonstrate the effectiveness of the least mean squares (LMS) algorithms.This Adaptive Noise Canceller is then useful for enhancing the S/N ratio of data collected from sensors (or sensor arrays) working in noisy environment, or dealing with potentially weak signals.

T

Mamta M. Mahajan1 ( Research scholar1 )

A

II. CONCEPT OF ADAPTIVE NOISE CANCELLING

Keywords—LMS Algorithm,; Adaptive Noise Canceller;S/N ratio; error estimation; adaptive filter

IJ

I. INTRODUCTION

In numerous application areas, including biomedical engineering, radar, sonar and digital communications, the goal is to extract a useful signal corrupted by interferences and noises. Noise/interference removal is facilitated when multiple sensors on different locations record the biomedical phenomenon simultaneously. The usual method of estimating a signal corrupted by additive noise’ is to pass it through a filter that tends to suppress the noise while leaving the signal relatively unchanged. Filters used for the above purpose can be fixed or adaptive. The design of fixed filters is based on prior knowledge of both the signal and the noise. Adaptive filters, on the other hand, have the ability to adjust their own parameters automatically, and their design

ISSN: 2230-7818

Fig. 1 Adaptive Noise Canceller

As the name implies, ANC is a technique used to remove an unwanted noise from a received signal, the operation is controlled in an adaptive way in order to obtain an improved signal-to noise ratio (SNR) . As shown in ― Fig.1‖, an ANC is typically a dual-input, closed-loop adaptive feedback system. The two inputs are: the primary input signal d(n) (the

@ 2011 http://www.ijaest.iserp.org. All rights Reserved.

Page 172


Mamta M. Mahajanet al. / (IJAEST) INTERNATIONAL JOURNAL OF ADVANCED ENGINEERING SCIENCES AND TECHNOLOGIES Vol No. 5, Issue No. 2, 172 - 176

T

mine[z2]=E[s2]+mine[(no-y)2] (4) When the fiiter is adjusted so that E[z2] is minimized, E[(no -y)2 ] is, therefore, also minimized. The filter output y is then a best least squares estimate of the primary noise no. Moreover, when E[(no - y)2] is minimized[(z -s)2] is also minimized, since, from (I), (z - s) = (no - y). (5) Adjusting or adapting the filter to minimize the total output power is thus tantamount to causing the output z to be a best least squares estimate of the signal s for the given structure and adjustability of the adaptive filter and for the given reference input. The output z will contain the signal s plus noise. From (l),the output noise is given by (no -y). Since minimizing E[z2] minimizes E[(no - y)2] minimizing the total output power minimizes the output noise power. Since the signal in the output remains constant, minimizing the total output power maximizes the output signal-to-noise ratio. ANC technique has been successfully applied to many applications, such as acoustic noise reduction, adaptive speech enhancement and channel equalization. In these cases and other related high speed required applications, pure software implementation would bring about long processing time, thus cannot meet the requirement. An effective way can be represented by a hardware implementation on FPGA.

IJ

A

ES

desired signal corrupted by the noise) and the reference signal x(n) (an interfering noise supposed to be uncorrelated with the desired signal but correlated with the noise affecting the desired signal in an unknown way). Fig. 1 shows the basic problem and the adaptive noise Canceling solution to it. A signal s is transmitted over a channel to a sensor that also receives a noise no uncorrelated with the signal. The combined signal and noise s +no form the primary input to the canceller. A second sensor receives a noise nl uncorrelated with the signal but correlated in some unknown way with the noise no. This sensor provides the reference input to the canceller. The noise nl is filtered to produce an output y that is as close a replica as possible of no. This output is subtracted from the primary input s + no to produce the system output z = s + no - y . In the system shown in Fig. 1 the reference input is processed by an adaptive filter. An adaptive filter differs from a fixed filter in that it automatically adjusts its own impulse response. Thus with the proper algorithm, the filter can operate under changing conditions and can readjust itself continuously to minimize the error signal. The error signal used in an adaptive process depends on the nature of the application. In noise cancelling systems the practical objective is to produce a system output z = s + no – y that is a best fit in the least squares sense to the signal s.This objective is accomplished by feeding the system output back to the adaptive filter and adjusting the filter through an LMS adaptive algorithm to minimize total system output power. In an adaptive noise cancelling system, in other words, the system output serves as the error signal for the adaptive process. It might seem that some prior knowledge of the signal s or of the noises no and nl would be necessary before the filter could be designed, or before it could adapt, to produce the noise cancelling signal y. Assume that s, no, n 1, and y are statistically stationary and have zero means. Assume that s is uncorrelated with no and n l , and suppose that n1 is correlated with no. The output z is z=s+no-y. (1) Squaring, one obtains z2 = s2 +(no - y)2 + 2s(no - y). (2) Taking expectations of both sides of (2), and realizing that s is uncorrelated with no and with y, yields E[z2]=E[s2]+E[(n0-y)2]+2E[s(n0-y)] =E[s2]+E[(n0-y)2] (3) The signal power E [ s 2 ] will be unaffected as the filter is adjusted to minimize E[z2 ]. Accordingly, the minimum output power is

ISSN: 2230-7818

III. LMS ALGORITHM

The LMS algorithm is a widely used algorithm for adaptive filtering. The algorithm is described by the following equations: M-1 y(n) = Σ wi(n) * x(n-i); (1) i=0 e(n) = d(n) – y(n) (2) wi(n+1) = wi(n) + 2ue(n)x(n-i); (3) In these equations, the tap inputs x(n),x(n1),……,x(n-M+1) form the elements of the reference signal x(n), where M-1 is the number of delay elements. d(n) denotes the primary input signal, e(n) denotes the error signal and constitutes the overall system output. wi(n) denotes the tap weight at the nth iteration. In equation (3), the tap weights update in accordance with the estimation error. And the scaling factor u is the step-size parameter. u controls the stability and convergence speed of the LMS algorithm. The LMS algorithm is convergent in the mean square if and only if u satisfies the condition: 0 < u < 2 / tap-input power where tap-input power =

@ 2011 http://www.ijaest.iserp.org. All rights Reserved.

Page 173


Mamta M. Mahajanet al. / (IJAEST) INTERNATIONAL JOURNAL OF ADVANCED ENGINEERING SCIENCES AND TECHNOLOGIES Vol No. 5, Issue No. 2, 172 - 176

Fig. 1 Flowchart of the LMS algorithm

1] We programmed the delay block with VHDL under the platform of Xilinx ISE 9.1i.In this block we have to apply one reference input containing noise i.e x_in and one primary input containing the corrupted signal i.e. d_in and two enable signals en_x &en_d so that we get the delay output x_out. As shown in ― Fig 4‖ and ― Fig 5‖ when both the enable signal get 1 then input equals to output i.e x_in=x_out When both the enable signal get 0 then we have to produce one delay signal so that our reference input and primary input are not mixed. 2] In control block we have to apply four inputs clk,reset read & write which produces four enable signals: en_x,en_d,en_coee, en_err, which enable the Delay Block, the Weight Update Block and the Error Counting Block separately. We programmed control block in such a way that when clk=1 and read=1 then all the four enable signal get 1 that means we read the input and produce the output. As shown in ― Fig 6‖ and ― Fig 7‖ when clk=1 and write =1 then all the four enable signal get 0 that means we are reading any input just check the output. 3]in MAC block we have to apply two input one reference input x_out and weight input w..MAC block is basically multiple accumulator block.In this block we have to multiply reference input x_out with weight w separately, and add them together, then we get yn. While programming MAC block as shown in ― Fig 8‖ and ― Fig 9‖ when clk=1 and reset=1 then filter output=0 and when clk=0 and reset=0 then filter output is equal to reference input x_out multiply by weight w and add them with previous filter output.Initialy we have to consider filter output as a zero. 4]In weight update block we have to apply two input signal.One enable signal en_coee and one feedback signal xemu.In this block as shown in ― Fig 10‖ and ― Fig 11‖ when en_coee=1 then next weight is equal to current weight plus feedback signal. 5]In error counting block we have to apply four input yn,x_out,dn,en_err and produce two output e_out & xemu.While programming error counting block as

IJ

A

ES

IV. LMS CORE IMPLEMENTATION

3. The Multiply Accumulator (MAC) Block multiply the M_tap reference signal x_out with the M_tap weight w separately, and add them together, then we get yn. 4. The Error Counting Block subtract yn from dn and get the error signal e_out, which is also the output of the whole system. And it produces signal xemu as a feedback by multiplying e_out, x_out and the scaling factor u. 5. The Weight Update Block updates the weight vector w(n) to w(n+1) that will be used in the next iteration.

T

The flowchart of the signals of the LMS algorithm is shown in‖ Fig.2.‖

Fig.3. Block Diagram of the LMS Core

1) Block Diagram The block diagram of the LMS core is shown in Fig.3. The LMS core is divided into five blocks 1. The Control block arranges the timing of the whole system. It produces four enable signals: en_x,en_d,en_coee, en_err, which enable the Delay Block, the Weight Update Block and the Error Counting Block separately. 2. The Delay Block receives the reference signal x_in and the primary input signal d_in under control of the enable signal en_x and en_d. And it produces the M tap delay signal x_out.

ISSN: 2230-7818

@ 2011 http://www.ijaest.iserp.org. All rights Reserved.

Page 174


Mamta M. Mahajanet al. / (IJAEST) INTERNATIONAL JOURNAL OF ADVANCED ENGINEERING SCIENCES AND TECHNOLOGIES Vol No. 5, Issue No. 2, 172 - 176

shown in ― Fig12‖ we calculate error signal e_out by subtracting yn i.e filter output from dn i.e primary input signal which is the output of the whole system and also calculate xemu as a feedback signal by multiplying e_out,x_out and scaling factor u.

V Simulation result for LMS Algorithm

ES

T

Fig 7.Simulation result for control block.

Fig 8.Simulation result for MAC block

A

Fig 4.Simulation result for delay block.

IJ

Fig 5 Simulation result for delay block.

Fig 9.Simulation result for MAC block.

Fig 10 .Simulation result for weight update block.

Fig 6.Simulation result for control block.

ISSN: 2230-7818

@ 2011 http://www.ijaest.iserp.org. All rights Reserved.

Page 175


Mamta M. Mahajanet al. / (IJAEST) INTERNATIONAL JOURNAL OF ADVANCED ENGINEERING SCIENCES AND TECHNOLOGIES Vol No. 5, Issue No. 2, 172 - 176

pp. 1692-1716. D. Nicolae, R. Romulus, ― Noise canceling in Audio signal with adaptive filter‖, University of Oradea,Vol. 45, Number 6,2004, pp 599602 [3] A. Elhossini, S. Areibi and R. Dony,― An FPGA Implementation of the LMS Adaptive Filter for Audio Processing,‖ in Proc. IEEE International Conference on Reconfigurable Computing and FPGAs,Sept.2006, pp. 1-8. [4] S. Haykin, Adaptive Filter Theory, PrenticeHall, third edition, 2002. [5] Boo-Shik Ryu, Jae-Kyun Lee, ― The Performance of an adaptive noise canceller with DSP processor‖,40th Southeastern Symposium on System Theroy, New Orleans, USA, March 16-18, 2008, pp 42-45. [6] S. A. Hadei, ― A Family of Adaptive Filter Algorithms in Noise Cancellation for Speech Enhancement‖, International Journal of Computer and Electrical Engineering, Vol. 2, No. 2, April 2010, pp 307-315 [7] G. Long, F. Ling and J. G. Proakis, ― The LMS algorithm with delayed coefficient adaptation,‖ IEEE Trans. on ASSP, vol. 37, Sept. 1989, pp. 1397-1405. [8] L. K. Ting, R. F. Woods and C. F. N. Cowan, ― Virtex FPGA Implementation of a Pipelined AdaptiveLMSPredictorforElectronicsupport Measures Receivers,‖ IEEE Trans. VLSI Syst., vol. 13, Jan. 2005, pp. 86-95. [9] B. Widrow, ― Adaptive fdters 1: Fundamentals,‖ Stanford Electronics Lab., Stanford Univ., Rep. SUSEL-66-126, Dec. 1966 [10]Kim, J.,Poularikas, A.D.:‖Performance of noise canceller using adjusted step size LMS algorithm‖, System Theory, 2002.Proceedings of theThirtyFourth Southeastern Symposium on, 18-19 March 2002. [11] Xilinx Coproration ‖Spartan-IIE 1.8V FPGA Family: Functional Description‖,Nov. 2002. [2]

ES

T

Fig 11.Simulation result for weight update block.

Fig 12. Simulation result for error counting block. VI. CONCLUSION

A

Adaptive noise cancelling is a method of adaptive filtering that can be applied whenever a suitable 'reference input is available. The principal advantages of the method are its adaptive capability, its low output noise, and its low signal distortion. The adaptive capability allows the processing of inputs whose properties are unknown. Output noise and signal distortion are generally lower than can be achieved with conventional optimal filter configurations. In this paper, software implementation of LMS algorithm is presented to implement the ANC system.

IJ

REFERENCES

[1]

B. Widrow, J. R. Glover, J. M. McCool and et al.,‖Adaptive Noise Cancelling: Principles and Applications‖,Proc .IEEE, vol. 63, Dec. 1975,

ISSN: 2230-7818

@ 2011 http://www.ijaest.iserp.org. All rights Reserved.

Page 176


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.