DSPRelated.com
Forums

Which dsp for LMS?

Started by Country Loon October 5, 2004
If I want to do real-time LMS on an audio application,what DSP is best if I
need say 400 weights?

Thanks

Tom


"Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in
news:1096954317.444213@ftpsrv1: 

> If I want to do real-time LMS on an audio application,what DSP is best > if I need say 400 weights? > > Thanks > > Tom > > >
An LMS implementation on a DSP will take 3 or 4 instructions per tap. You can easily calculate the whether a DSP has enough MIPs by taking the DSP instruction clock and dividing it by the sampling rate (and number of channels). For example, DSP Clock: 50MHz or 50 MIPs Sample Rate: 8000 Instructions per sample = 50M/8000 = 6250 Assume LMS takes 4 instructions per tap => 400 * 4 = 1600. For a single channel and 8 kHz, you should have no problem with just about any contemporary DSP. My example is based on a very slow DSP in today's world. It could be implemented with our credit card sized DSP-8300 module which includes an audio codec and a ADSP-2186M. You can check out this product on our web site. You may also care about precision. A 32 bit DSP will be more precise than a 16 bit DSP. We manufacture DSP boards with SHARC DSPs as well. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
What is your intended audio sample rate?  That is a big factor in determining
how much processing power you need.

There are some Motorola DSPs that have a hardware coprocessor that helps with
adaptive filtering:
http://www.freescale.com/files/dsp/doc/app_note/APR39.pdf

"Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in message
news:1096954317.444213@ftpsrv1...
> If I want to do real-time LMS on an audio application,what DSP is best if I > need say 400 weights? > > Thanks > > Tom > >
"Jon Harris" <goldentully@hotmail.com> wrote in message
news:2sg32sF1jonb6U1@uni-berlin.de...
> What is your intended audio sample rate? That is a big factor in
determining
> how much processing power you need. > > There are some Motorola DSPs that have a hardware coprocessor that helps
with
> adaptive filtering: > http://www.freescale.com/files/dsp/doc/app_note/APR39.pdf > > "Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in message > news:1096954317.444213@ftpsrv1... > > If I want to do real-time LMS on an audio application,what DSP is best
if I
> > need say 400 weights? > > > > Thanks > > > > Tom > > > > > >
I need to sample at least at 22050Hz. Tom]
"Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in 
news:1097035363.919264@ftpsrv1:

> > "Jon Harris" <goldentully@hotmail.com> wrote in message > news:2sg32sF1jonb6U1@uni-berlin.de... >> What is your intended audio sample rate? That is a big factor in > determining >> how much processing power you need. >> >> There are some Motorola DSPs that have a hardware coprocessor that
helps
> with >> adaptive filtering: >> http://www.freescale.com/files/dsp/doc/app_note/APR39.pdf >> >> "Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in message >> news:1096954317.444213@ftpsrv1... >> > If I want to do real-time LMS on an audio application,what DSP is
best
> if I >> > need say 400 weights? >> > >> > Thanks >> > >> > Tom >> > >> > >> >> > I need to sample at least at 22050Hz. > > Tom] > > >
LMS is not hard to code. I'm not sure what kind of special support is in a Freescale DSP. You need 22050 * 3 * 400 = 26.46 MIPs (Instructions per second) plus a little for overhead. I mentioned 4 instructions per tap earlier because I think a NLMS might take one more cycle per tap. Either way, most DSPs will be able to calculate this filter. Analog Devices has example code for at least the 2100 family on their web site. We have a link on our web site. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Al Clark wrote:

>"Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in >news:1097035363.919264@ftpsrv1: > > > >>"Jon Harris" <goldentully@hotmail.com> wrote in message >>news:2sg32sF1jonb6U1@uni-berlin.de... >> >> >>>What is your intended audio sample rate? That is a big factor in >>> >>> >>determining >> >> >>>how much processing power you need. >>> >>>There are some Motorola DSPs that have a hardware coprocessor that >>> >>> >helps > > >>with >> >> >>>adaptive filtering: >>>http://www.freescale.com/files/dsp/doc/app_note/APR39.pdf >>> >>>"Country Loon" <fitlikemin@mearns.fairmers.co.uk> wrote in message >>>news:1096954317.444213@ftpsrv1... >>> >>> >>>>If I want to do real-time LMS on an audio application,what DSP is >>>> >>>> >best > > >>if I >> >> >>>>need say 400 weights? >>>> >>>>Thanks >>>> >>>>Tom >>>> >>>> >>>> >>>> >>> >>> >>I need to sample at least at 22050Hz. >> >>Tom] >> >> >> >> >> > >LMS is not hard to code. I'm not sure what kind of special support is in >a Freescale DSP. > >You need 22050 * 3 * 400 = 26.46 MIPs (Instructions per second) plus a >little for overhead. > >I mentioned 4 instructions per tap earlier because I think a NLMS might >take one more cycle per tap. Either way, most DSPs will be able to >calculate this filter. > >Analog Devices has example code for at least the 2100 family on their web >site. We have a link on our web site. > >
I think most DSPs have special support for LMS. The Motorola/Freescale ones certainly do. They have exactly that special combination of addressing you need, just for doing LMS well. However, the documentation for most devices fails to point that out clearly, and you grope around in the dark until you discover the magic formula for fast LMS :-) Although LMS is easy to program, implementing rock solid LMS solutions is usually rather more difficult. A lot of quirky stability issues tend to show up. This often leads to the need to leak, which can slow down the calculation badly. A lot of logic surrounding the LMS calculation is often needed too. For example, the difference between a simple demo echo canceller, and a fully G.168 compliant one is rather large. :-) Regards, Steve