DSPRelated.com
Forums

LMS algorithm for noise cancellation in speech

Started by radha_r November 29, 2005
hi all,
i am trying to implement the LMS algorithm that cancells the background
noise from the input signal needed.i have tried it for sin wave it is
working fine.But when i have tried to give noise mixed input signal(wav
file) it was not working properly..

the scenario i followed is
first i took a wav file as the input signal and then created the noise
input with rand() fn/. in matlab.Then i mixed both and took it as the
primary signal.The delayed input signal was taken as the reference
signal.
.

 i am new to ANC .. can anyone help me in proceeding this work? 

thanks and regards,
Radha 
radha_r wrote:
> hi all, > i am trying to implement the LMS algorithm that cancells the background > noise from the input signal needed.i have tried it for sin wave it is > working fine.But when i have tried to give noise mixed input signal(wav > file) it was not working properly.. > > the scenario i followed is > first i took a wav file as the input signal and then created the noise > input with rand() fn/. in matlab.Then i mixed both and took it as the > primary signal.The delayed input signal was taken as the reference > signal. > . > > i am new to ANC .. can anyone help me in proceeding this work? > > thanks and regards, > Radha
How to you expect to adapt to a random signal? Do you believe it is possible for DSP to use premonitions about what the noise will do next? :-) Steve
He might be using it in predictive mode to predict the non-noise
component (input signal without noise added).

Dirk


Steve Underwood wrote:
> radha_r wrote: > > hi all, > > i am trying to implement the LMS algorithm that cancells the background > > noise from the input signal needed.i have tried it for sin wave it is > > working fine.But when i have tried to give noise mixed input signal(wav > > file) it was not working properly.. > > > > the scenario i followed is > > first i took a wav file as the input signal and then created the noise > > input with rand() fn/. in matlab.Then i mixed both and took it as the > > primary signal.The delayed input signal was taken as the reference > > signal. > > . > > > > i am new to ANC .. can anyone help me in proceeding this work? > > > > thanks and regards, > > Radha > > How to you expect to adapt to a random signal? Do you believe it is > possible for DSP to use premonitions about what the noise will do next? :-) > > Steve
Steve Underwood wrote:

   ...

> How to you expect to adapt to a random signal? Do you believe it is > possible for DSP to use premonitions about what the noise will do next? :-)
Don't you believe in magic? "These tech guys, they can do anything." Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Did you check the signal to noise ratio in your input values? Maybe you
have a high noise power....

Raja

We are TOO good for our own good.  If we keep delivering
miracles then the PHB will expect them on a more or less
ongoing basis.  When I presented all the stuff my team did
with little support and little budget to a new incoming
boss, he replied " If you can do all that on very little,
just think what you can do on nothing".  We have to be
careful about how many miracles we do a week.

-- 
Chip Wood

"Jerry Avins" <jya@ieee.org> wrote in message
news:NIGdnb1qasyp6hHeRVn-sA@rcn.net...
> > Don't you believe in magic? "These tech guys, they can do
anything."
On Tue, 29 Nov 2005 08:04:13 -0600, "radha_r"
<radha_sudha63@yahoo.com> wrote:
>i am trying to implement the LMS algorithm that cancells the background >noise from the input signal needed.i have tried it for sin wave it is >working fine.But when i have tried to give noise mixed input signal(wav >file) it was not working properly.. >the scenario i followed is >first i took a wav file as the input signal and then created the noise >input with rand() fn/. in matlab.Then i mixed both and took it as the >primary signal.The delayed input signal was taken as the reference >signal. > i am new to ANC .. can anyone help me in proceeding this work? >thanks and regards, Radha
I presume you are attempting to do adaptive filtering, possibly by using the Kalman Adaptive Filter block in the signal processing toolbox: 1) did you resize the filter length for the new signal. It's not likely to be the same as the sinusoid; 2) If you have the reference signal, (input) you don't need to cancel anything from it. You already have the signal? Normally, you don't have the "true" signal. You'll have your "mixed" signal and you'll have some signal that is correlated with your "noise", (a filtered version of the noise). You input these two signal into your LMS routine to obtain an approximate/estimate the "input" signal. See the documentation on the Mathworks website on the Kalman Adaptive Filter block for the filter I/O configuration.
>On Tue, 29 Nov 2005 08:04:13 -0600, "radha_r" ><radha_sudha63@yahoo.com> wrote: >>i am trying to implement the LMS algorithm that cancells the background >>noise from the input signal needed.i have tried it for sin wave it is >>working fine.But when i have tried to give noise mixed input signal(wav >>file) it was not working properly.. >>the scenario i followed is >>first i took a wav file as the input signal and then created the noise >>input with rand() fn/. in matlab.Then i mixed both and took it as the >>primary signal.The delayed input signal was taken as the reference >>signal. >> i am new to ANC .. can anyone help me in proceeding this work? >>thanks and regards, Radha > >I presume you are attempting to do adaptive filtering, possibly by >using the Kalman Adaptive Filter block in the signal processing >toolbox: > >1) did you resize the filter length for the new signal. It's not >likely to be the same as the sinusoid; > >2) If you have the reference signal, (input) you don't need to cancel >anything from it. You already have the signal? > >Normally, you don't have the "true" signal. You'll have your "mixed" >signal and you'll have some signal that is correlated with your >"noise", (a filtered version of the noise). You input these two >signal into your LMS routine to obtain an approximate/estimate the >"input" signal. > >See the documentation on the Mathworks website on the Kalman Adaptive >Filter block for the filter I/O configuration. > > >
hi.. thanks for your reply.. I am trying to do the simulation in matlab.First i have generated a sinusoidal waveform in matlab.Then i have generated the noise by using the rand() funtion. i have simulated the LMS algorithm with various step size values.At last i took the step size value : 0.05 and have run the algorithm.i got the noise cancelled output.Then i took a speech signal(wav file) .since i dont have any noise signal, i just created the noise by means of the rand()/ fn.i was trying to adapt the algorithm to cancel out the noise.The output was not good.i got some amount of noise supressed.still i got more amount noise present in the output.i also have tried with jet engine's sound as the noise signal.The output contains the as it was int he input signal.. for the sinusoidal signal i took 30 as the filter size.is the size less? what could be the range? thanks and regards, Radha