Hi, I am a newbie trying to do real time adaptive filtering on an Analog Devices blackfin 21535. I'm not trying to do anything too complex, just a simple LMS algorithm (1 mic, 2 loudspeakers and a reference). Does anyone know of any good online reference sites w/ some example code or just information on this? Any help is appreciated. Zach
Adaptive Filtering in Real Time
Started by ●July 7, 2003
Reply by ●July 7, 20032003-07-07
"Zachary Rimkunas" <zrimkunas@verizon.net> wrote in message news:_rnOa.16264$Ha.5943@nwrdny02.gnilink.net...> Hi, > I am a newbie trying to do real time adaptive filtering on an Analog > Devices blackfin 21535. I'm not trying to do anything too complex, just a > simple LMS algorithm (1 mic, 2 loudspeakers and a reference). Does anyone > know of any good online reference sites w/ some example code or just > information on this? Any help is appreciated. >One might ask: "what do you consider "real time"? Adaptive filters take time to converge to new situations. Is that real time or do you simply mean that the data rate and computation rate is supporting real time streaming data? You didn't say what kind of adaptive filter you're implementing. A line canceller or a line enhancer. Where do you get the reference? What is the block diagram? What are the signal characteristics? LMS covers many. Fred
Reply by ●July 7, 20032003-07-07
That is very true. One of the most confusing parts of implementing this filter for me has been that I have been considering it real time. In the back of my mind I have thought that it just didn't make sense that it could be real time. You're right though. I just need to keep the data streaming through the DSP as close to real time as possible. Now, I have read that LMS was really designed for straight electrical systems e.g. cancelling signals on phone lines, but I am looking to set up a small experiment in acoustic cancellation. (Would this qualify as line canceller - even though it isn't a line?) Since this is just an experiment, my reference will just be the same as the signal I am trying to cancel. The signal that I am experimenting on is a few sentences of speech. I pretty much want to use the reference and the original signal along with the error (gathered from a mic) to adaptively change the coefficients of an FIR filter. I am still pretty wet behind the ears, especially w/ the LMS stuff so any help is greatly appreciated. Thanks. Zach "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:iUoOa.2475$Jk5.1477401@feed2.centurytel.net...> > "Zachary Rimkunas" <zrimkunas@verizon.net> wrote in message > news:_rnOa.16264$Ha.5943@nwrdny02.gnilink.net... > > Hi, > > I am a newbie trying to do real time adaptive filtering on an Analog > > Devices blackfin 21535. I'm not trying to do anything too complex, justa> > simple LMS algorithm (1 mic, 2 loudspeakers and a reference). Doesanyone> > know of any good online reference sites w/ some example code or just > > information on this? Any help is appreciated. > > > > One might ask: "what do you consider "real time"? > > Adaptive filters take time to converge to new situations. Is that realtime> or do you simply mean that the data rate and computation rate issupporting> real time streaming data? > > You didn't say what kind of adaptive filter you're implementing. A line > canceller or a line enhancer. Where do you get the reference? What isthe> block diagram? What are the signal characteristics? LMS covers many. > > Fred > >
Reply by ●July 8, 20032003-07-08
"Zachary Rimkunas" <zrimkunas@verizon.net> wrote in message news:1ypOa.34777$U23.689@nwrdny01.gnilink.net...> That is very true. One of the most confusing parts of implementingthis> filter for me has been that I have been considering it real time. In the > back of my mind I have thought that it just didn't make sense that itcould> be real time. You're right though. I just need to keep the datastreaming> through the DSP as close to real time as possible. > Now, I have read that LMS was really designed for straight electrical > systems e.g. cancelling signals on phone lines, but I am looking to set upa> small experiment in acoustic cancellation. (Would this qualify as line > canceller - even though it isn't a line?) Since this is just anexperiment,> my reference will just be the same as the signal I am trying to cancel.The> signal that I am experimenting on is a few sentences of speech. > I pretty much want to use the reference and the original signal along > with the error (gathered from a mic) to adaptively change the coefficients > of an FIR filter. > I am still pretty wet behind the ears, especially w/ the LMS stuff so > any help is greatly appreciated. Thanks. > > ZachYeah, well, I'd still like to see *your* block diagram. You only mention one microphone and I imagine there are two. Here's one that I've divined from your words: Sound Source Canceling /| Speaker / | Ref /| +-+ | Mic / | | | | O +-+ | Monitor +-+ | | +>| | | Mic \ | | | +-+ | O \| + | \ | | | | \| | +-----+ | + | | | | +-------------------------+ | | | | | | | +----->| LMS Adaptive Filter |>+ | | | | +-------------------------+ | ^ | | | | | +-----------------------------------+ This system block diagram works like this: The "Sound Source" is a sound source that is out of your control. The Ref Mic provides a reference of the sound source. The Canceling Speaker is driven to cancel the sound at the Monitor Mic The filter is adjusted to drive the Canceling Speaker to zero the output of the Monitor Mic. This would be a line canceler. Why a line canceler? Because generally there's enough delay between the canceling speaker output and the sound source such that noiselike components aren't correlated between the two. Therefore, the filter simply shuts off at frequencies with only noise - so that there isn't more noise added at the Monitor Mic. This can work reasonably well if the wavelengths aren't too short / frequencies too high. At high frequencies there is more patterning which makes the cancelation very sensitive to the location of the listener relative to the Monitor Mic. I have no idea how it will work for speech because the "interference" is moving around in frequency fairly rapidly and not in any regular manner. It will work pretty good in canceling certain cycling sweep generator outputs because the waveform can be broken up into sinusoidal components that can be canceled. Fred