You are on page 1of 8

VHDL IMPLEMENTATION OF ADAPTIVE NOISE CANCELLER USING VECTORIZED LMS ALGORITHM

DUSHYANT KUMAR Assistant Professor Department of Electrical & Electronics Engineering H.C.T.M. Kaithal Haryana dushyant27seemar@gmail.com TARUN SINGHAL Department of Electrical and Electronics Engineering Haryana College of Technology and Management Kaithal tarun.sgl@gmail.com MANDEEP SINGH Design Engineer C-DAC Mohali (pb.) Cdac_mandeep@yahoo.co.in

ABSTRACT The main objective of this paper is to implement Adaptive Canceller Vectorized algorithm. Adaptive In the Noise using LMS the Noise

numbers of adders and multipliers for a same less conventional algorithm. hardware algorithm, number of then LMS In LMS the filter order used are

and relative phase of the two waves. If the original wave and the inverse of the original encounter time, cancellation at wave a total occur.

exactly,

then

extracting the speech is a trivial problem. All that is necessary is to simply subtract the known noise waveform from the speech-plus-noise waveform and be left with speech only. There are situations in which the noise waveform identified can be exactly.

junction at the same

Canceller, two LMS algorithms are used. One is conventional LMS algorithm and second is hardware LMS algorithm. In the conventional LMS algorithm, we use the conventional LMS multipliers delays. conventional same adders, number algorithm and The LMS of which uses adders,

numbers of adders and multipliers are fixed for any numbers of delays. So in hardware LMS algorithm, the filter order of the LMS algorithm delays increases increase then the number of respectively without increasing number of adders multipliers reduce computational of the algorithm. 1. Introductio n 1.1 Basic Concept of Noise the Noise Canceller cancellation makes use of the notion of destructive interference. superimpose, resulting depends on When the the two sinusoidal waves waveform and which the cost LMS

The challenges are to identify the original signal and generate the inverse without delay directions superimpose. in all where We

Consider the case of a single noise source in a typical room. It is possible to place a microphone at the location of the noise source so as to pick up noise only. A second room microphone in on the a (e.g., elsewhere

noises interact and will demonstrate the solutions later in the report.

algorithm uses the multipliers

hearing aid) will pick Figure 1. Signal Cancellation of two waves 180 out of phase 1.2 Adaptive Noise Canceller As more noise noted one in the the knows the introduction, up both speech and noise. In order to subtract the noise from the speech plus noise picked up by the necessary hearing-aid it to is take microphone,

and delays for given filter length or filter order increases computational of second algorithm hardware uses the is the algorithm. which the cost LMS The LMS the LMS adders, and LMS the

into account the fact that there will be reflections of the noise off the walls of the room; i.e., by the time the noise gets to the hearing-aid the microphone,

about the speech and signals, more effectively one can extract speech from noise. If, for example, the noise waveform is known

algorithm which also multipliers hardware algorithm

delays. But in the

frequency, amplitude

noise waveform will have changed. It is possible to process the noise waveform so as to correct for these reflections. A special-purpose filter can be used for this purpose. If the filter is designed properly, subtracting the filtered noise from the speech plus noise picked up by the hearing-aid microphone will effectively cancel the noise with only the speech remaining (40). A system of this type is shown in figure 2.4. Since people typically move around in a room, the pattern of reflections necessary filter method as to of for will the keep noise noise is the noise change, and so it is

simultaneously to the adaptive filter. The signal d(k) is the contaminated signal containing both the desired signal, s(k), and the noise n(k), assumed uncorrelated each other. of with The the

yk=XTkW(k)
2.9

output at out1 and out2. If input is 1 then noisy signal and noise out1 signal by and are the out2 Now generated respectively.

ek=dk-y(k)
.. 3.10 2. Adaptive Noise Canceller using Convention al LMS algorithm

the LMS block has four input ports for data input, desired, step_size and reset inputs. reset The the If reset LMS the input is used set or algorithm.

signal, x(k), is a measure contaminating signal which is correlated in sole way with n(k), processed digital x(k) by filter is the to

reset input is 1 then the output is shown on the output. And if the reset input is 0 then no output is Figure 3. Adaptive Noise Canceller using Conventional LMS algorithm Figure 3 shows the block diagram of the adaptive canceller conventional blocks environment and LMS noise using LMS. acoustic block conventional algorithm block noise noisy shown on the output. The LMS algorithm gives the error signal which is the difference signal of input signal and the desired signal. The output is stored using a unit delay and the output signal is also display on the oscilloscope. 3. Adaptive Noise Canceller using Vectorized LMS Algorithm

produce an estimate y(k), of n(k). An estimate then of the by the the desired signal, e(k) is obtained subtracting (k), from

digital filter output, y contaminated signal.

adjusting itself. This reduction is known adaptive cancellation [22]. Adaptive canceller. adaptive filter In widely used as noise Figure 2. Adaptive Filters as a Noise Canceller The filter output y (k) and the error e (k) [2] are given by equations (2) and (3).

Here, there two main

block. The acoustic environment generates signal and

canceller see figure 2.4 two input signals, d(k) and x(k), are applied

signal according to the Boolean input. If input is 0, then no

Figure 4.4 shows the block diagram of the adaptive noise

canceller using Vectorized LMS. Here, there two main blocks acoustic environment block and Vectorized LMS algorithm block. The acoustic environment block generates noise signal and noisy signal according to the Boolean input. If input is 0, then no output at out1 and out2. If input is 1 then noisy signal and noise signal are generated by the out1 and out2 respectively.

the error signal which is the difference signal of input signal and the desired signal. The output signal is also display on the oscilloscope.

LMS algorithms and one Here signals, second signal signal digital the one is filter. filter two is noisy (original +Noise

uses

the

adders, and LMS we

multipliers hardware algorithm,

delays. But in the

generates

Original signal and

reduced the adders and multipliers for a same number of the filter order. In this algorithm, numbers of adders and multipliers are fixed for any numbers of delays. So in this algorithm, if the filter order of the LMS algorithm is increases number then of the delay is increase but adders and multipliers are not increase, which reduced computational of both the the the cost LMS LMS to and LMS

4.

Combinati on al LMS Algorithm of and Convention Vectorized

signal). The output of the Filter is given to both the LMS algorithms simultaneously. Here both the LMS are One is LMS

The Below 4.5 noise showing vectorized

figure the adaptive canceller

algorithms different. software

algorithm and second is the hardware LMS algorithm. software conventional adders, and In the LMS LMS

which uses two Least Mean Square (LMS) algorithms and one block acoustic

algorithm, we use the algorithm which uses

environment block.

Figure 4. Adaptive Noise Canceller using Vectorized LMS Algorithm Now the LMS block has four input ports for data input, desired, step_size and reset inputs. The reset input is used set or reset the LMS algorithm. If the reset input is 1 then the output is shown on the output. And if the reset input is 0 then no output is shown on the output. The vectorized LMS algorithm also gives

multipliers delays. The LMS of

algorithm. So we use algorithms comparison both the

conventional same adders, number

algorithm uses the multipliers

given same inputs to algorithms. Then we get the same output error of both the LMS algorithms. 5. RTL of Adaptive Noise Canceller using Vectorized LMS Algorithm

and delays for given Figure 5. Block Diagram of Adaptive Noise Canceller using Vectorized LMS Algorithm The adaptive noise canceller vectorized using LMS filter length or filter order increases computational of second algorithm hardware is the algorithm. which the cost LMS The LMS the LMS

algorithm has two

algorithm which also

reset_weights the outputs

and are

rate of convergence, a larger mu leads to faster can divergence. convergence, produce The but too large a mu

coefficients, Squares was experimented

for

example Least Mean algorithm briefly with.

error_out and ce_out. After giving 16 bit input and a 16 bit desired signal, then same error will be obtained Figure 6. RTL of Adaptive Noise Canceller using Vectorized LMS Algorithm The figure 4.6 shows the RTL of the noise using LMS In this adaptive canceller vectorized algorithm. at the output of both, only if clk_enable signal is high.

The system gave an acceptable output for white reduction, performance but noise its could

order of the filter (filter length) also affects the distortion of the desired signal. Because adaptive updates coefficients of the filter its to

be greatly improved. This noise was much more exists difficult to little eliminate since there correlation between the reference noise and they Finally, customize real applications. the noise in both can our world primary, given that are we completely random.

minimize the error between the primary and reference signals, we get poor performance if the desired similar Figure 7. Simulation Result of Vectorized Adaptive Noise Canceller signal to is the

RTL, the inputs are 16 bit desired signal, 16 bit input signal, 16 bit step_size, clk, clk_enable, reset and reset_weights. And the outputs are 16 bit error_out and ce_out. 6. Simulation Result Adaptive Noise Canceller The simulation result of the Vectorized Noise Adaptive of Vectorized 7. Conclusion

reference signal. In this thesis, same type of algorithm is used. In this algorithm the numbers of adders and multipliers are reduced. method useful So of when this noise the

system for various

References [1] Wolfgang Fohn and Jrn Matthies, A FPGA-Based Adaptive Noise cancelling System Proc. of the 12th Int. Conference on Digital Audio Effects

Our implementation successfully achieved cancellation. Specifically, time varying noise was reduced. The effects of varying different parameters observed. in It the was algorithm were also found that the step size mu affects the noise

cancellation is most reference noise that we have access to be large or delayed relative to the noise that is actually in the primary signal. The next area to explore would algorithms updating be to for filter implement different

Canceller is shown in Figure 5.13. Here the inputs are clk, clk_enble, desired, input, step_size,

(DAFx-09), pp 1-9, Como, Italy, September 14, 2009. [2] Tian Lan, and Jinlin Zhang, FPGA Implementatio n of an Adaptive Noise Canceller, IEEE, International Symposiums on Information Processing, ISBN 978-07695-3151-9, pp 2008. [3] Rafid Ahmed Khalil, Adaptive Filter Application in Echo Cancellation System n FPGA, Electrical Engineering Department, Engineering College, University of and using Implementatio 553-558, [5] [4]

Mosul, Vol.16 pp21-32 Dec. 2008. S. S. Godbole, P. V.P. FPGA Implementatio n of Adaptive LMS Filter, Proceedings of SPIT-IEEE Colloquium and International Conference, Mumbai, India vol. 2, pp 2007. V. R. Vijay Kumar, P. T. Kanagaspabat hy, Modified Adaptive Filtering Algorithm for Noise Cancellation in Speech signals Electronics and Electrical engineering, Elektronika ir Elektrotechnik a, ISBN 13921215,pp 20, 2007. 17[8] r and A.Th. Schwarzbache J. Timoney, VLSI 226-229, [7] M. Echo Cancellation using DSP", The School of Information Technology And Electrical Engineering, the University of Queensland, November 2003. Hutson, "Acoustic M. Raut, Palsodkar and [6] Mohamed A. Abdulmagid, Dean Krusienski, Siddharth Pal and K. William Jenkins of J.

Implementatio n of an Adaptive Noise Canceller, 3rd International Symposium on Communicati on Systems, Networks and DSP, Stafford, Untied Kingdom, vol. pp 9-12, July 2002. [9] F. Gittel, T. D. Smith, A. Th. Schwarzbache r and E. Hilt, VLSI Implementatio n ofAdaptive Noise Canceller, 3rd International Symposium on Communicati on Systems, Networks and DSP, Stafford, Untied Kingdom, July 2002. [10] S. C. Douglas, Generalized Adaptive Step Sizes for

Principle Adaptive Noise Cancelling

NSF EE REU PENN STATE annual research journals Vol. II 2004. pp52-59,

Stochastic Gradient Adaptive Filters, International Conference on Acoustics, Speech Signal Processing (ICASSP95), vol. 1995. [11] Laura A ContinuousTime Adaptive Filters Structure International Conference on Acoustics, Speech Signal Processing (ICASSP95), vol. 2, pp1061 1064, 1995. [12] J. Bhasker, A VHDL Primer, Published by Dorling Kindersley (India) Ltd, of Pvt. License Pearson [16] [15] and Ortiz2, pp 1396-1399, and [13]

Education

in
th

Jervis, Digital Signal Processing a Practical Approach, published Pearson Education (Singapore) pte. Ltd., 2nd edition 2002. by

[19] and

A. Oppenheim

V. R.

South Asia, 8 edition 2008. Paulo Diniz, Adaptive Filtering: Algorithms

W.Schaffer, DiscreteTime Signal Processing, Prentice Hall, Englewood Cliffs, New Jersey, 1989. [20] http://

S.R.

and Practical Implementatio n, Universidade Fedral do Rio de


rd

[17] John G. Proakis, Charles Rader Ling, Chrysostomas M. Fayun

enel.ucalgary.ca/Peo ple/Mintchev/method s.htm [21] Brain Wangner and Michael Barr, Introduction

Janaeiro,

3 edition, pp 13-35, 2008. [14] I. Ravi Kumar, Digital Signal Processing, Published by Satya Prakashan, New 1st 2008. N Shaliwanan Digital Signal Processing, Tata McGraw Hill edition 2002. Emmanuel C. Ifeachor Barrie and W. Private 2nd Limited, Delhi, edition

Balbuena et al

L. Marc

Nikias

Maoonen, Lan Proudle, Algorithms for Statistical signal processing, Pearson Education inc., 1st edition 2002. [18] Simon Haykin, Adaptive Filter Theory Printice Cliffs, Jersey, 75, 1991. Hall New 2
nd

K.

to Digital

FIR

Filters, pp. 47-48, December 2002. http://www.n etrino.com/E mbeddedSystems/HowTo/DigitalFilters-FIRIIR [22] Harry Levitt Noise reduction in hearing aids: An overview Journal of

Englewood

edition, pp 1-

Rehabilitatio n and Development vol. 38, January/Febr uary 2001. Research

www.rehab.re search.va.gov/ .../38/1/levit38 1.htm

You might also like