DSPRelated.com
Forums

LMS algorithm implementation

Started by sivadasankottayi July 1, 2008
  I am currently doing research in Active Noise Control.  I am quite new in
this field.  I have acquired some knowledge in Adaptive filtering.  I also
read about a few daptive algorithms.  To start with I am interested to
simulate a feed forward Active Noise Control System incorporating simple
LMS algorithm.   Anybody who has experience in this field may  please help
me  how to simulate an adaptive active noise control system by considering
random noise with some periodicity (less than 500Hz) as signal source
(Primary signal) and adaptive system incorporating LMS algorithm to
generate secondary noise through the speaker such that destructive
interference takes place and resultant signal at the monitoring mic may be
minimized.
I have some knowledge in matlab and I can write simple matlab program, but
 I do not have any experience in simulating an adaptive system using
matlab.  If anybody know how to simulate a system like this, kindly help me
by providing adequate matlab  sample programe and other details to
proceed.
Thanking you
Regards
Sivadasan Kottayi




On Jul 1, 10:25 am, "sivadasankottayi" <sivadasan.kott...@gmail.com>
wrote:
> I am currently doing research in Active Noise Control. I am quite new in > this field. I have acquired some knowledge in Adaptive filtering. I also > read about a few daptive algorithms. To start with I am interested to > simulate a feed forward Active Noise Control System incorporating simple > LMS algorithm. Anybody who has experience in this field may please help > me how to simulate an adaptive active noise control system by considering > random noise with some periodicity (less than 500Hz) as signal source > (Primary signal) and adaptive system incorporating LMS algorithm to > generate secondary noise through the speaker such that destructive > interference takes place and resultant signal at the monitoring mic may be > minimized. > I have some knowledge in matlab and I can write simple matlab program, but > I do not have any experience in simulating an adaptive system using > matlab. If anybody know how to simulate a system like this, kindly help me > by providing adequate matlab sample programe and other details to > proceed. > Thanking you > Regards > Sivadasan Kottayi
Sivadasan, What kind of help are you looking for? Are you looking for example code, or tutorial, or all of the above? Are you looking for help in the theory, the algorithm, the programming? Julius
>On Jul 1, 10:25 am, "sivadasankottayi" <sivadasan.kott...@gmail.com> >wrote: >> I am currently doing research in Active Noise Control. I am quite
new in
>> this field. I have acquired some knowledge in Adaptive filtering. I
also
>> read about a few daptive algorithms. To start with I am interested to >> simulate a feed forward Active Noise Control System incorporating
simple
>> LMS algorithm. Anybody who has experience in this field may please
help
>> me how to simulate an adaptive active noise control system by
considering
>> random noise with some periodicity (less than 500Hz) as signal source >> (Primary signal) and adaptive system incorporating LMS algorithm to >> generate secondary noise through the speaker such that destructive >> interference takes place and resultant signal at the monitoring mic may
be
>> minimized. >> I have some knowledge in matlab and I can write simple matlab program,
but
>> I do not have any experience in simulating an adaptive system using >> matlab. If anybody know how to simulate a system like this, kindly
help me
>> by providing adequate matlab sample programe and other details to >> proceed. >> Thanking you >> Regards >> Sivadasan Kottayi > >Sivadasan, > >What kind of help are you looking for? Are you looking for example >code, or tutorial, or all of the above? Are you looking for help in >the >theory, the algorithm, the programming? > >Julius >Dear Julius, I am looking for example code. I request you to help me.
Thanking you Regards Sivadasan
On Jul 1, 10:25 am, "sivadasankottayi" <sivadasan.kott...@gmail.com>
>wrote: >> I am currently doing research in Active Noise Control. I am quite
new in
>> this field. I have acquired some knowledge in Adaptive filtering. I
also
>> read about a few daptive algorithms. To start with I am interested to >> simulate a feed forward Active Noise Control System incorporating
simple
>> LMS algorithm. Anybody who has experience in this field may please
help
>> me how to simulate an adaptive active noise control system by
considering
>> random noise with some periodicity (less than 500Hz) as signal source >> (Primary signal) and adaptive system incorporating LMS algorithm to >> generate secondary noise through the speaker such that destructive >> interference takes place and resultant signal at the monitoring mic may
be
>> minimized. >> I have some knowledge in matlab and I can write simple matlab program,
but
>> I do not have any experience in simulating an adaptive system using >> matlab. If anybody know how to simulate a system like this, kindly
help me
>> by providing adequate matlab sample programe and other details to >> proceed. >> Thanking you >> Regards >> Sivadasan Kottayi > >Sivadasan, > >What kind of help are you looking for? Are you looking for example >code, or tutorial, or all of the above? Are you looking for help in >the >theory, the algorithm, the programming? > >Julius >>Dear Julius
I am looking for example code. Let me clear. I know the theory. The same way as you have mentioned I need help in algorithm and programing.If I get relevant tutorial, that also will be helpful to me. Regards Sivadasan
On Jul 6, 8:33&#4294967295;am, "sivadasankottayi" <sivadasan.kott...@gmail.com>
wrote:
> > I am looking for example code. &#4294967295;Let me clear. &#4294967295;I know the theory. &#4294967295;The > same way as you have mentioned I need help in algorithm and programing.If I > get relevant tutorial, that also will be helpful to me. > Regards > Sivadasan
If you already know the theory, what have you tried? Where are you stuck? Where have you started?
>On Jul 6, 8:33=A0am, "sivadasankottayi" <sivadasan.kott...@gmail.com> >wrote: >> >> I am looking for example code. =A0Let me clear. =A0I know the theory.
=A0=
>The >> same way as you have mentioned I need help in algorithm and
programing.If=
> I >> get relevant tutorial, that also will be helpful to me. >> Regards >> Sivadasan > >If you already know the theory, what have you tried? Where are you >stuck? >Where have you started? >I have to start writing program in matlab to simulate. How do I do it is
my difficulty.
>>On Jul 6, 8:33=A0am, "sivadasankottayi" <sivadasan.kott...@gmail.com> >>wrote: >>> >>> I am looking for example code. =A0Let me clear. =A0I know the theory. >=A0= >>The >>> same way as you have mentioned I need help in algorithm and >programing.If= >> I >>> get relevant tutorial, that also will be helpful to me. >>> Regards >>> Sivadasan >> >>If you already know the theory, what have you tried? Where are you >>stuck? >>Where have you started? >>I have to start writing program in matlab to simulate. How do I do it
is
>my difficulty. >
%%%%% Well it is very easy to implement LMS in matlab once u know the theory. lets say u define one filter w=zeros(1,15); Now u have got a received noisy sequence of 2000 bits long. Now assume that u already know what you should receive (noise free). In technical terms, this known sequence is called training sequence. so the steps are: w=zeros(15,1); y_pad=[r zeros(1,15)]; for n=1:2000 u=y_pad(15+n:-1:n); Ik(n)=w'*u.'; error=ts(n)-Ik(n); w=w+mu*conj(error)*u.'; end where r is ur received signal, ts is known training sequence hope this will help u... Chintan
>>>On Jul 6, 8:33=A0am, "sivadasankottayi" <sivadasan.kott...@gmail.com> >>>wrote: >>>> >>>> I am looking for example code. =A0Let me clear. =A0I know the
theory.
>>=A0= >>>The >>>> same way as you have mentioned I need help in algorithm and >>programing.If= >>> I >>>> get relevant tutorial, that also will be helpful to me. >>>> Regards >>>> Sivadasan >>> >>>If you already know the theory, what have you tried? Where are you >>>stuck? >>>Where have you started? >>>I have to start writing program in matlab to simulate. How do I do it >is >>my difficulty. >> > >%%%%% > >Well it is very easy to implement LMS in matlab once u know the theory. > >lets say u define one filter w=zeros(1,15); > >Now u have got a received noisy sequence of 2000 bits long. Now assume >that u already know what you should receive (noise free). In technical >terms, this known sequence is called training sequence. > >so the steps are: > >w=zeros(15,1); >y_pad=[r zeros(1,15)]; > >for n=1:2000 > u=y_pad(15+n:-1:n); > Ik(n)=w'*u.'; > error=ts(n)-Ik(n); > w=w+mu*conj(error)*u.'; >end > >where r is ur received signal, ts is known training sequence > >hope this will help u... > >Chintan >Dear chentan,
Thank you very much. Let me try and let you know Bye Sivadasan