Hi, I have implemented a simple LMS algorithm w/ a 10th order filter. My goal is to completely cancel my reference signal. I can get it to work with a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all I get is an unstable response. Ultimately I would like to be able to do a decent job of cancelling a voice signal. My main question is: Is it even possible for a LMS algorithm to cancel a quickly changing signal such as voice or is it limited only to relatively simple signals? Another related question is: To increase stability would bringing the filter order down work? Thanks for any help, Zach
LMS limitations?
Started by ●July 22, 2003
Reply by ●July 22, 20032003-07-22
"Zach R." <zrimkunas@verizon.net> wrote in message news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net...> Hi, > I have implemented a simple LMS algorithm w/ a 10th order filter. My > goal is to completely cancel my reference signal. I can get it to workwith> a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all Iget> is an unstable response. Ultimately I would like to be able to do adecent> job of cancelling a voice signal. > My main question is: Is it even possible for a LMS algorithm to cancela> quickly changing signal such as voice or is it limited only to relatively > simple signals? > > Another related question is: To increase stability would bringing the > filter order down work?You need to provide more information. What is the sample rate? That will determine the temporal length of the filter and other things. A length 10 filter is pretty short! Fred
Reply by ●July 22, 20032003-07-22
Hi, The sample rate is 7040 Hz (the lowest that my ADC will go). As far as the order goes, I would like it to be longer but the program takes too long to run when I use a larger order (such as 32). Should I make a point to get a higher order? How high? Thanks again, Zach "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:oWjTa.3386$Jk5.2356531@feed2.centurytel.net...> > "Zach R." <zrimkunas@verizon.net> wrote in message > news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net... > > Hi, > > I have implemented a simple LMS algorithm w/ a 10th order filter.My> > goal is to completely cancel my reference signal. I can get it to work > with > > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all I > get > > is an unstable response. Ultimately I would like to be able to do a > decent > > job of cancelling a voice signal. > > My main question is: Is it even possible for a LMS algorithm tocancel> a > > quickly changing signal such as voice or is it limited only torelatively> > simple signals? > > > > Another related question is: To increase stability would bringingthe> > filter order down work? > > You need to provide more information. What is the sample rate? That will > determine the temporal length of the filter and other things. > > A length 10 filter is pretty short! > > Fred > >
Reply by ●July 23, 20032003-07-23
"Zach R." <zrimkunas@verizon.net> wrote in message news:ZzkTa.61434$kI5.13224@nwrddc02.gnilink.net...> Hi, > The sample rate is 7040 Hz (the lowest that my ADC will go). As faras> the order goes, I would like it to be longer but the program takes toolong> to run when I use a larger order (such as 32). Should I make a point toget> a higher order? How high? > > Thanks again, > Zach > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:oWjTa.3386$Jk5.2356531@feed2.centurytel.net... > > > > "Zach R." <zrimkunas@verizon.net> wrote in message > > news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net... > > > Hi, > > > I have implemented a simple LMS algorithm w/ a 10th order filter. > My > > > goal is to completely cancel my reference signal. I can get it towork> > with > > > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal allI> > get > > > is an unstable response. Ultimately I would like to be able to do a > > decent > > > job of cancelling a voice signal. > > > My main question is: Is it even possible for a LMS algorithm to > cancel > > a > > > quickly changing signal such as voice or is it limited only to > relatively > > > simple signals? > > > > > > Another related question is: To increase stability would bringing > the > > > filter order down work? > > > > You need to provide more information. What is the sample rate? Thatwill> > determine the temporal length of the filter and other things. > > > > A length 10 filter is pretty short! > > > > FredZach, (As a matter of etiquette, most people don't "top post", i.e. replies go at the bottom) I can provide no real advice about why your initial experiment would be OK at 75Hz and not at 150Hz - that issue raises all sorts of questions about actual signal structure, the algorithm being used, the block diagram, bugs in the code, etc. I also wonder if the implementation is under-constrained by only trying to cancel a single sinusoid? It seems to be an overdetermined situation - that is, there are lots of filters that happen to have amplitude and phase fixed at a single frequency. You might inject some noise into the input of the filter and see what happens. It's probably best to analyze your way into the answer about length. First, let me say that I have assumed that you're using a FIR filter structure of length 10. So, all of these comments apply to a FIR filter. If you have an IIR LMS filter, which I'm not familiar with, then you might get better resolution / change with frequency. That said: With a sample rate of 7040Hz and a filter of length 10, the temporal length of the impulse response of the filter is (1/7040)*10 = 1.42 milliseconds. The reciprocal of the temporal length is a good estimate of the frequency resolution that is possible. Or, if you like, the minimum width of a transition band from passband to stopband or from stopband to passband. So, a length 10 filter at this sample rate can change value substantially in a frequency span of 1/0.00142 = 704Hz. Assuming that the filter has a dc response of "x" and the next response value you want is "y", then you will substantially achieve "y" at around 700Hz. Since you're trying to cancel 75Hz or 150Hz, I assume you're trying to make a bandpass filter at one of those frequencies so you can add or subtract the filter output from the "main channel" and, thus, cancel the specified sinusoid. With a length 10 filter, about the best you can hope for is to adjust amplitude and phase at exactly 75Hz or at exactly 150Hz and cancel that one frequency. Because 75 and 150 are close to zero compared to 700Hz, there won't be much attenuation at 0Hz and there will only be substantial attenuation at 700Hz and up to 3520Hz, which is the fs/2 frequency limit. This means that the filter will pass energy over a few hundred Hz in order to cancel at 75Hz or 150Hz. Energy at other frequencies below 700Hz will be of "arbitrary" phase and substantial amplitude relative to what you want - b ecause there's really no control over them with such a short filter. If the input were a sum of a 75Hz sinusoid and a 150Hz sinusoid and you wanted to cancel one but not both, and you wanted to not enhance anything, then you would need a filter that would be able to transition from pass band to stop band in (150-75) = 75Hz. To get 75Hz resolution, you need 1/75 = 13 milliseconds of filter length which is 13/1.42 = 9.15 times longer than the length 10 filter or length 92 or so. (Again, these are just arm-waving numbers - I'm not trying to be exact and could be off by a factor of 2) You could use one of the many filter design programs to try this to see what happens. All the adaptive algorithm can do is to move things around - the fundamental relationship between temporal length and frequency resolution can't be overcome in general. One should also suggest another aspect of this: The assumption is that there is substantial time delay between the input and the output - in some sense the filter inserts a delay itself. You might consider the following as an alternate method if the delay is short: 1) have a broadband amplifier/attenuator instead of a filter that is followed by a variable delay. 2) Adjust the amplitude so cancellation can occur. 3) Adjust the delay so that cancellation does occur. I don't know what your block diagram really is. So, the delay here may have to be in the "main channel" instead of in the cancellation channel for this to work. Maybe you can do that and maybe you can't. The idea is to simply match up the two channels in time and in amplitude for perfect cancellation. Another way to look at this is it's just an adaptive filter with all coefficients zero except one. .... but it does require that the delays can be matched. If this can work, it can cancel noiselike signals as well as sinusoids. This is all a prelude to your real objective which is to cancel speech. That implies a couple of issues: 1) Speech has noiselike components. A typical adaptive filter will shut off at frequencies where there's noise (unless there is temporal matching and, thus, correlated noise). 2) Speech moves all over the place in frequency and I don't think you can guarantee a phase relationship between frequencies that will remain. So, the adaptive filter would have to adapt very quickly in order to adjust for the new signal. Also, the adaptive filter would have to have pretty fine resolution - be a long filter. I don't know that this can work. But then, I don't understand the block diagram of what you're needing / wanting to implement. Here's the block diagram I've had in mind in the discussion above: .---------<----------. | | | | v ^ input ----.---->--------[adaptive filter]---->(+)----+---->output | ^ | | | | '------->------------------->--------' "main channel" Fred
Reply by ●July 23, 20032003-07-23
"Zach R." <zrimkunas@verizon.net> wrote in message news:<ZzkTa.61434$kI5.13224@nwrddc02.gnilink.net>...> Hi, > The sample rate is 7040 Hz (the lowest that my ADC will go). As far as > the order goes, I would like it to be longer but the program takes too long > to run when I use a larger order (such as 32). Should I make a point to get > a higher order? How high? > > Thanks again, > Zach > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:oWjTa.3386$Jk5.2356531@feed2.centurytel.net... > > > > "Zach R." <zrimkunas@verizon.net> wrote in message > > news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net... > > > Hi, > > > I have implemented a simple LMS algorithm w/ a 10th order filter. > My > > > goal is to completely cancel my reference signal. I can get it to work > with > > > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all I > get > > > is an unstable response. Ultimately I would like to be able to do a > decent > > > job of cancelling a voice signal. > > > My main question is: Is it even possible for a LMS algorithm to > cancel > a > > > quickly changing signal such as voice or is it limited only to > relatively > > > simple signals? > > > > > > Another related question is: To increase stability would bringing > the > > > filter order down work? > > > > You need to provide more information. What is the sample rate? That will > > determine the temporal length of the filter and other things. > > > > A length 10 filter is pretty short! > > > > Fred > > > >If this is straight Widrow et al noise cancellation of real speech in a real room then the chances of success are slim. There are many factors but the most prominant is reverberations. You can get better results at extra cost by using subbands and using many LMS algorithms in parallel. Probably a method with better chance of success is beamforming using an array of microphones. (spacial filtering) The best you can expect in a real environment is a few dB improvement with a straight LMS noise canceller.Simulation will of course give you any result you wish! Tom
Reply by ●July 24, 20032003-07-24
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:AMzTa.3404$Jk5.2403331@feed2.centurytel.net...> > "Zach R." <zrimkunas@verizon.net> wrote in message > news:ZzkTa.61434$kI5.13224@nwrddc02.gnilink.net... > > Hi, > > The sample rate is 7040 Hz (the lowest that my ADC will go). As far > as > > the order goes, I would like it to be longer but the program takes too > long > > to run when I use a larger order (such as 32). Should I make a point to > get > > a higher order? How high? > > > > Thanks again, > > Zach > > > > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > news:oWjTa.3386$Jk5.2356531@feed2.centurytel.net... > > > > > > "Zach R." <zrimkunas@verizon.net> wrote in message > > > news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net... > > > > Hi, > > > > I have implemented a simple LMS algorithm w/ a 10th orderfilter.> > My > > > > goal is to completely cancel my reference signal. I can get it to > work > > > with > > > > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signalall> I > > > get > > > > is an unstable response. Ultimately I would like to be able to do a > > > decent > > > > job of cancelling a voice signal. > > > > My main question is: Is it even possible for a LMS algorithm to > > cancel > > > a > > > > quickly changing signal such as voice or is it limited only to > > relatively > > > > simple signals? > > > > > > > > Another related question is: To increase stability wouldbringing> > the > > > > filter order down work? > > > > > > You need to provide more information. What is the sample rate? That > will > > > determine the temporal length of the filter and other things. > > > > > > A length 10 filter is pretty short! > > > > > > Fred > > Zach, > > (As a matter of etiquette, most people don't "top post", i.e. replies goat> the bottom) > > I can provide no real advice about why your initial experiment would be OK > at 75Hz and not at 150Hz - that issue raises all sorts of questions about > actual signal structure, the algorithm being used, the block diagram, bugs > in the code, etc. I also wonder if the implementation isunder-constrained> by only trying to cancel a single sinusoid? It seems to be an > overdetermined situation - that is, there are lots of filters that happento> have amplitude and phase fixed at a single frequency. You might injectsome> noise into the input of the filter and see what happens. > > It's probably best to analyze your way into the answer about length. > > First, let me say that I have assumed that you're using a FIR filter > structure of length 10. So, all of these comments apply to a FIR filter. > If you have an IIR LMS filter, which I'm not familiar with, then you might > get better resolution / change with frequency. That said: > > With a sample rate of 7040Hz and a filter of length 10, the temporallength> of the impulse response of the filter is (1/7040)*10 = 1.42 milliseconds. > The reciprocal of the temporal length is a good estimate of the frequency > resolution that is possible. Or, if you like, the minimum width of a > transition band from passband to stopband or from stopband to passband. > So, a length 10 filter at this sample rate can change value substantiallyin> a frequency span of 1/0.00142 = 704Hz. > Assuming that the filter has a dc response of "x" and the next response > value you want is "y", then you will substantially achieve "y" at around > 700Hz. > > Since you're trying to cancel 75Hz or 150Hz, I assume you're trying tomake> a bandpass filter at one of those frequencies so you can add or subtractthe> filter output from the "main channel" and, thus, cancel the specified > sinusoid. > > With a length 10 filter, about the best you can hope for is to adjust > amplitude and phase at exactly 75Hz or at exactly 150Hz and cancel thatone> frequency. > Because 75 and 150 are close to zero compared to 700Hz, there won't bemuch> attenuation at 0Hz and there will only be substantial attenuation at 700Hz > and up to 3520Hz, which is the fs/2 frequency limit. > This means that the filter will pass energy over a few hundred Hz in order > to cancel at 75Hz or 150Hz. Energy at other frequencies below 700Hz willbe> of "arbitrary" phase and substantial amplitude relative to what you want -b> ecause there's really no control over them with such a short filter. > > If the input were a sum of a 75Hz sinusoid and a 150Hz sinusoid and you > wanted to cancel one but not both, and you wanted to not enhance anything, > then you would need a filter that would be able to transition from passband> to stop band in (150-75) = 75Hz. > To get 75Hz resolution, you need 1/75 = 13 milliseconds of filter length > which is 13/1.42 = 9.15 times longer than the length 10 filter or length92> or so. > (Again, these are just arm-waving numbers - I'm not trying to be exact and > could be off by a factor of 2) > You could use one of the many filter design programs to try this to seewhat> happens. > > All the adaptive algorithm can do is to move things around - thefundamental> relationship between temporal length and frequency resolution can't be > overcome in general. > > One should also suggest another aspect of this: > > The assumption is that there is substantial time delay between the inputand> the output - in some sense the filter inserts a delay itself. You might > consider the following as an alternate method if the delay is short: > > 1) have a broadband amplifier/attenuator instead of a filter that is > followed by a variable delay. > > 2) Adjust the amplitude so cancellation can occur. > > 3) Adjust the delay so that cancellation does occur. > > I don't know what your block diagram really is. So, the delay here mayhave> to be in the "main channel" instead of in the cancellation channel forthis> to work. Maybe you can do that and maybe you can't. The idea is tosimply> match up the two channels in time and in amplitude for perfectcancellation.> > Another way to look at this is it's just an adaptive filter with all > coefficients zero except one. .... but it does require that the delays can > be matched. If this can work, it can cancel noiselike signals as well as > sinusoids. > > This is all a prelude to your real objective which is to cancel speech. > That implies a couple of issues: > > 1) Speech has noiselike components. A typical adaptive filter will shut > off at frequencies where there's noise (unless there is temporal matching > and, thus, correlated noise). > > 2) Speech moves all over the place in frequency and I don't think you can > guarantee a phase relationship between frequencies that will remain. > So, the adaptive filter would have to adapt very quickly in order toadjust> for the new signal. > Also, the adaptive filter would have to have pretty fine resolution - be a > long filter. > > I don't know that this can work. But then, I don't understand the block > diagram of what you're needing / wanting to implement. > > Here's the block diagram I've had in mind in the discussion above: > > > .---------<----------. > | | > | | > v ^ > input ----.---->--------[adaptive filter]---->(+)----+---->output > | ^ > | | > | | > '------->------------------->--------' > "main channel" > > Fred > > > >Fred, Thanks for the information it has definitely helped me in the understanding of the LMS. As a clarification, are you saying that I will most likely be able to see attenuation at frequencies above 704 Hz and below fs/2 Hz? By any means I'll try some of those frequencies out (as sin waves) and see what I get. I guess what my main goal should be is to extend this filter length. From what you have written it seems that having a longer filter definitely makes life easier. Thanks again, Zach
Reply by ●July 24, 20032003-07-24
"Zach R." <zrimkunas@verizon.net> wrote in message news:wvQTa.12084$634.8067@nwrdny03.gnilink.net...> > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:AMzTa.3404$Jk5.2403331@feed2.centurytel.net... > > > > "Zach R." <zrimkunas@verizon.net> wrote in message > > news:ZzkTa.61434$kI5.13224@nwrddc02.gnilink.net... > > > Hi, > > > The sample rate is 7040 Hz (the lowest that my ADC will go). Asfar> > as > > > the order goes, I would like it to be longer but the program takes too > > long > > > to run when I use a larger order (such as 32). Should I make a pointto> > get > > > a higher order? How high? > > > > > > Thanks again, > > > Zach > > > > > > > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > > news:oWjTa.3386$Jk5.2356531@feed2.centurytel.net... > > > > > > > > "Zach R." <zrimkunas@verizon.net> wrote in message > > > > news:7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net... > > > > > Hi, > > > > > I have implemented a simple LMS algorithm w/ a 10th order > filter. > > > My > > > > > goal is to completely cancel my reference signal. I can get it to > > work > > > > with > > > > > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal > all > > I > > > > get > > > > > is an unstable response. Ultimately I would like to be able to doa> > > > decent > > > > > job of cancelling a voice signal. > > > > > My main question is: Is it even possible for a LMS algorithmto> > > cancel > > > > a > > > > > quickly changing signal such as voice or is it limited only to > > > relatively > > > > > simple signals? > > > > > > > > > > Another related question is: To increase stability would > bringing > > > the > > > > > filter order down work? > > > > > > > > You need to provide more information. What is the sample rate?That> > will > > > > determine the temporal length of the filter and other things. > > > > > > > > A length 10 filter is pretty short! > > > > > > > > Fred > > > > Zach, > > > > (As a matter of etiquette, most people don't "top post", i.e. replies go > at > > the bottom) > > > > I can provide no real advice about why your initial experiment would beOK> > at 75Hz and not at 150Hz - that issue raises all sorts of questionsabout> > actual signal structure, the algorithm being used, the block diagram,bugs> > in the code, etc. I also wonder if the implementation is > under-constrained > > by only trying to cancel a single sinusoid? It seems to be an > > overdetermined situation - that is, there are lots of filters thathappen> to > > have amplitude and phase fixed at a single frequency. You might inject > some > > noise into the input of the filter and see what happens. > > > > It's probably best to analyze your way into the answer about length. > > > > First, let me say that I have assumed that you're using a FIR filter > > structure of length 10. So, all of these comments apply to a FIRfilter.> > If you have an IIR LMS filter, which I'm not familiar with, then youmight> > get better resolution / change with frequency. That said: > > > > With a sample rate of 7040Hz and a filter of length 10, the temporal > length > > of the impulse response of the filter is (1/7040)*10 = 1.42milliseconds.> > The reciprocal of the temporal length is a good estimate of thefrequency> > resolution that is possible. Or, if you like, the minimum width of a > > transition band from passband to stopband or from stopband to passband. > > So, a length 10 filter at this sample rate can change valuesubstantially> in > > a frequency span of 1/0.00142 = 704Hz. > > Assuming that the filter has a dc response of "x" and the next response > > value you want is "y", then you will substantially achieve "y" at around > > 700Hz. > > > > Since you're trying to cancel 75Hz or 150Hz, I assume you're trying to > make > > a bandpass filter at one of those frequencies so you can add or subtract > the > > filter output from the "main channel" and, thus, cancel the specified > > sinusoid. > > > > With a length 10 filter, about the best you can hope for is to adjust > > amplitude and phase at exactly 75Hz or at exactly 150Hz and cancel that > one > > frequency. > > Because 75 and 150 are close to zero compared to 700Hz, there won't be > much > > attenuation at 0Hz and there will only be substantial attenuation at700Hz> > and up to 3520Hz, which is the fs/2 frequency limit. > > This means that the filter will pass energy over a few hundred Hz inorder> > to cancel at 75Hz or 150Hz. Energy at other frequencies below 700Hzwill> be > > of "arbitrary" phase and substantial amplitude relative to what youwant -> b > > ecause there's really no control over them with such a short filter. > > > > If the input were a sum of a 75Hz sinusoid and a 150Hz sinusoid and you > > wanted to cancel one but not both, and you wanted to not enhanceanything,> > then you would need a filter that would be able to transition from pass > band > > to stop band in (150-75) = 75Hz. > > To get 75Hz resolution, you need 1/75 = 13 milliseconds of filter length > > which is 13/1.42 = 9.15 times longer than the length 10 filter or length > 92 > > or so. > > (Again, these are just arm-waving numbers - I'm not trying to be exactand> > could be off by a factor of 2) > > You could use one of the many filter design programs to try this to see > what > > happens. > > > > All the adaptive algorithm can do is to move things around - the > fundamental > > relationship between temporal length and frequency resolution can't be > > overcome in general. > > > > One should also suggest another aspect of this: > > > > The assumption is that there is substantial time delay between the input > and > > the output - in some sense the filter inserts a delay itself. You might > > consider the following as an alternate method if the delay is short: > > > > 1) have a broadband amplifier/attenuator instead of a filter that is > > followed by a variable delay. > > > > 2) Adjust the amplitude so cancellation can occur. > > > > 3) Adjust the delay so that cancellation does occur. > > > > I don't know what your block diagram really is. So, the delay here may > have > > to be in the "main channel" instead of in the cancellation channel for > this > > to work. Maybe you can do that and maybe you can't. The idea is to > simply > > match up the two channels in time and in amplitude for perfect > cancellation. > > > > Another way to look at this is it's just an adaptive filter with all > > coefficients zero except one. .... but it does require that the delayscan> > be matched. If this can work, it can cancel noiselike signals as wellas> > sinusoids. > > > > This is all a prelude to your real objective which is to cancel speech. > > That implies a couple of issues: > > > > 1) Speech has noiselike components. A typical adaptive filter willshut> > off at frequencies where there's noise (unless there is temporalmatching> > and, thus, correlated noise). > > > > 2) Speech moves all over the place in frequency and I don't think youcan> > guarantee a phase relationship between frequencies that will remain. > > So, the adaptive filter would have to adapt very quickly in order to > adjust > > for the new signal. > > Also, the adaptive filter would have to have pretty fine resolution - bea> > long filter. > > > > I don't know that this can work. But then, I don't understand the block > > diagram of what you're needing / wanting to implement. > > > > Here's the block diagram I've had in mind in the discussion above: > > > > > > .---------<----------. > > | | > > | | > > v ^ > > input ----.---->--------[adaptive filter]---->(+)----+---->output > > | ^ > > | | > > | | > > '------->------------------->--------' > > "main channel" > > > > Fred > > > > > > > > > > Fred, > Thanks for the information it has definitely helped me in the > understanding of the LMS. As a clarification, are you saying that I will > most likely be able to see attenuation at frequencies above 704 Hz andbelow> fs/2 Hz? By any means I'll try some of those frequencies out (as sinwaves)> and see what I get. > I guess what my main goal should be is to extend this filter length. > From what you have written it seems that having a longer filter definitely > makes life easier. Thanks again, > ZachZach, A qualified yes. What I was trying to convey was this: A length 10 filter with sample rate of 7040kHz will be *capable* of being designed with this response. It all depends on the filter coefficients / design that you evaluate. So,if your particular algorithm converges to a filter like the one you describe above, then it will have the attenuation you describe - by definition really. Remember, I said these are arm-waving rules of thumb! If you go to: http://www.nauticom.net/www/jdtaft/fir.htm you can design lowpass filters of length 10. Here frequency "0.5" corresponds to your 3520kHz or fs/2 So 704Hz would be 0.1. If you design a lowpass with cutoff at 0.1, the attenuation will be about what the filter is capable of doing. If you gradually reduce the bandwidth in steps of .01, you will see the attenuation get worse. If you design a bandpass with center frequency of 0.25, the attenuation will also be about what the filter is capable of doing. It will have 3dB down points at roughly 0.2 and 0.3 which is 0.1 - the "resolution" or transition width that a length 10 filter will provide. As the bandwidth for a bandpass approaches 0.2 or as the band limit for a lowpass approaches 0.1, then the attenuation will become "reasonable" - more like 15dB. For bandwidth specifications less than this the attenuation will be not as good. All an adaptive filter can do is get close to these same responses - depending on what you give it to work with and the algorithm you're using. The adaptive filter can't do better in absolute terms. However, this point confuses some folks. The adaptive filter *can* do better than a specifically-designed filter *at any moment* because it does adapt - whereas a hard-designed filter only does one thing. Knowing what the hard-designed filters can do give you insight into what an adaptive filter can also do in a stylized "best case" context. I hope this helps. Fred
Reply by ●July 25, 20032003-07-25
Zach, If you have a configuration of the type> > > .---------<----------. > | | > | | > v ^ > input ----.---->--------[adaptive filter]---->(+)----+---->output > | ^ > | | > | | > '------->------------------->--------' > "main channel" >this is a form a system identification, not a bandpass-type filter (or highpass or lowpass). In this configuration, the adaptive filter will attempt to estimate the impulse response of the "main channel". If the impulse response of the "main channel" is highpass, then that's what the adap. filt. will model. Likewise lowpass or bandpass. All the adap. filt. knows how to do is minimize the squared error (if it's LMS. I also assume you are using the normalized LMS, not the straight LMS). If the length of the filter is such that the adap. filt. can not estimate the impulse response of the "main channel", then the coefficients will go toward zero, and the error will be the input signal itself. For more information about this type of configuration, look at adaptive system identification. "Zach R." <zrimkunas@verizon.net> wrote in message news:<7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net>...> Hi, > I have implemented a simple LMS algorithm w/ a 10th order filter. My > goal is to completely cancel my reference signal. I can get it to work with > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all I get > is an unstable response. Ultimately I would like to be able to do a decent > job of cancelling a voice signal. > My main question is: Is it even possible for a LMS algorithm to cancel a > quickly changing signal such as voice or is it limited only to relatively > simple signals? > > Another related question is: To increase stability would bringing the > filter order down work? > > Thanks for any help, > Zach
Reply by ●July 25, 20032003-07-25
Zach, You might want to give us a diagram of what you have. For instance, if the configuration is> > > .---------<----------. > | | > | | > v ^ > input ----.---->--------[adaptive filter]---->(+)----+---->output > | ^ > | | > | | > '------->------------------->--------' > "main channel" >as was given before, and the "main channel" is a wire (i.e. the input goes to the adap. filt. input, and directly to the summer), then everything you put into the adap. filt. will be cancelled (the adap. filt. will just be an impulse at t=0). If you indeed are trying to cancel the output of an unknown system, then as long as the system impulse response is linear, the adap. filt. won't care what signal you put into it (theoritically, of course. There are some signals, depending on implementation, that can cause the filter to become unstable). You also need to be aware of the problem with signals that have poorly conditioned autocorrleation matrices, such as sinusoids. "Zach R." <zrimkunas@verizon.net> wrote in message news:<7BjTa.54036$EZ2.3409@nwrddc01.gnilink.net>...> Hi, > I have implemented a simple LMS algorithm w/ a 10th order filter. My > goal is to completely cancel my reference signal. I can get it to work with > a sine wave at about 75 Hz. When I try to cancel a 150 Hz signal all I get > is an unstable response. Ultimately I would like to be able to do a decent > job of cancelling a voice signal. > My main question is: Is it even possible for a LMS algorithm to cancel a > quickly changing signal such as voice or is it limited only to relatively > simple signals? > > Another related question is: To increase stability would bringing the > filter order down work? > > Thanks for any help, > Zach
Reply by ●July 25, 20032003-07-25
"Maurice Givens" <maurice.givens@ieee.org> wrote in message news:eb93cce8.0307251151.1a4d1cfc@posting.google.com...> Zach, > You might want to give us a diagram of what you have. For instance, > if the configuration is > > > > > > .---------<----------. > > | | > > | | > > v ^ > > input ----.---->--------[adaptive filter]---->(+)----+---->output > > | ^ > > | | > > | | > > '------->------------------->--------' > > "main channel" > > > > as was given before, and the "main channel" is a wire (i.e. the input > goes to the adap. filt. input, and directly to the summer), then > everything you put into the adap. filt. will be cancelled (the adap. > filt. will just be an impulse at t=0). > > If you indeed are trying to cancel the output of an unknown system, > then as long as the system impulse response is linear, the adap. filt. > won't care what signal you put into it (theoritically, of course. > There are some signals, depending on implementation, that can cause > the filter to become unstable). You also need to be aware of the > problem with signals that have poorly conditioned autocorrleation > matrices, such as sinusoids.Maurice, We can't really be sure this is the right block diagram because Zach hasn't told us. If he wants to cancel from a reference signal, we don't know where that signal comes from. So, this diagram was just a stylized starting point for discussion. Your comments provide good insight! I guess for noiselike inputs or arbitrary inputs, right? Fred