DSPRelated.com
Forums

Noise Cancelling Possibilies for Bandpass Noise?

Started by westocl April 18, 2013
I have a signal that is the output of a real time system. The system
performs 'ok' but has a a problem of what i would reduce down to additive
band limited noise.  Since I know the source (but cant change it) i know
that it is bandpass noise of spectral bandwith approx .2Fs.

I am not the liberty to delay the signal AT ALL, so throwing a filter at
the output is out of the question.

My thoughts were that hopefully there could be a way for me to do some
noise cancelling using my knowlege of the bandlimited nature of the noise
and its statistics.

Any suggestions?

(I do not want to add much  unwanted noise into an other reigions when
trying to get mitigate this bandpass noise.)
On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote:

> I have a signal that is the output of a real time system. The system > performs 'ok' but has a a problem of what i would reduce down to > additive band limited noise. Since I know the source (but cant change > it) i know that it is bandpass noise of spectral bandwith approx .2Fs. > > I am not the liberty to delay the signal AT ALL, so throwing a filter at > the output is out of the question. > > My thoughts were that hopefully there could be a way for me to do some > noise cancelling using my knowlege of the bandlimited nature of the > noise and its statistics. > > Any suggestions? > > (I do not want to add much unwanted noise into an other reigions when > trying to get mitigate this bandpass noise.)
How random is this noise? If it's truly random, you're probably stuck. If it's at least partly stable, then it can be estimated and subtracted from the raw signal with no appreciable delay. If the noise is narrowband and considerably higher frequency than your signal of interest, a notch filter might add negligible delay.
>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: > >> I have a signal that is the output of a real time system. The system >> performs 'ok' but has a a problem of what i would reduce down to >> additive band limited noise. Since I know the source (but cant change >> it) i know that it is bandpass noise of spectral bandwith approx .2Fs. >> >> I am not the liberty to delay the signal AT ALL, so throwing a filter
at
>> the output is out of the question. >> >> My thoughts were that hopefully there could be a way for me to do some >> noise cancelling using my knowlege of the bandlimited nature of the >> noise and its statistics. >> >> Any suggestions? >> >> (I do not want to add much unwanted noise into an other reigions when >> trying to get mitigate this bandpass noise.) > >How random is this noise? If it's truly random, you're probably stuck. >If it's at least partly stable, then it can be estimated and subtracted >from the raw signal with no appreciable delay. > >If the noise is narrowband and considerably higher frequency than your >signal of interest, a notch filter might add negligible delay. >
-How random is this noise? I would say for all practical purposes, it could be considered to be the output of a bandpass filter driven by white noise. -If the noise is narrowband and considerably higher frequency than your signal of interest, a notch filter might add negligible delay. The noise has 'considerable bandwith' call it .2Fs so notch and any convolutional type filtering is out. Im thinking hit has to be some kind of statistical additive/cancelling filter?
On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote:

>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >> >>> I have a signal that is the output of a real time system. The system >>> performs 'ok' but has a a problem of what i would reduce down to >>> additive band limited noise. Since I know the source (but cant change >>> it) i know that it is bandpass noise of spectral bandwith approx .2Fs. >>> >>> I am not the liberty to delay the signal AT ALL, so throwing a filter > at >>> the output is out of the question. >>> >>> My thoughts were that hopefully there could be a way for me to do some >>> noise cancelling using my knowlege of the bandlimited nature of the >>> noise and its statistics. >>> >>> Any suggestions? >>> >>> (I do not want to add much unwanted noise into an other reigions when >>> trying to get mitigate this bandpass noise.) >> >>How random is this noise? If it's truly random, you're probably stuck. >>If it's at least partly stable, then it can be estimated and subtracted >>from the raw signal with no appreciable delay. >> >>If the noise is narrowband and considerably higher frequency than your >>signal of interest, a notch filter might add negligible delay. >> >> > -How random is this noise? > > I would say for all practical purposes, it could be considered to be the > output of a bandpass filter driven by white noise. > > -If the noise is narrowband and considerably higher frequency than your > signal of interest, a notch filter might add negligible delay. > > The noise has 'considerable bandwith' call it .2Fs so notch and any > convolutional type filtering is out. Im thinking hit has to be some kind > of statistical additive/cancelling filter?
Any kind of linear filter, no matter how hard you try to fool yourself with fancy terms, is going to add the same kind of delay. Basically, if you try you'll just invent an obfuscated bandstop filter. By "convolutional" filter do you mean FIR, or do you mean IIR as well? An IIR bandstop filter will only create delay at the edges of the stop- band, where your information is questionable anyway. _Any_ filter that you add in the one path is going to filter signal right along with noise -- you can't change that. If you have access to the process that's generating the noise then you may be able to filter it and subtract it out of your intended output in such a way that the result is much cleaner. Depending on how much information you have, how consistent the coupling is, and how much you need to attenuate the signal, doing so can range from easy-peasy to a hopeless attempt at black magic. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
>On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote: > >>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >>> >>>> I have a signal that is the output of a real time system. The system >>>> performs 'ok' but has a a problem of what i would reduce down to >>>> additive band limited noise. Since I know the source (but cant
change
>>>> it) i know that it is bandpass noise of spectral bandwith approx
.2Fs.
>>>> >>>> I am not the liberty to delay the signal AT ALL, so throwing a filter >> at >>>> the output is out of the question. >>>> >>>> My thoughts were that hopefully there could be a way for me to do
some
>>>> noise cancelling using my knowlege of the bandlimited nature of the >>>> noise and its statistics. >>>> >>>> Any suggestions? >>>> >>>> (I do not want to add much unwanted noise into an other reigions
when
>>>> trying to get mitigate this bandpass noise.) >>> >>>How random is this noise? If it's truly random, you're probably stuck. >>>If it's at least partly stable, then it can be estimated and subtracted >>>from the raw signal with no appreciable delay. >>> >>>If the noise is narrowband and considerably higher frequency than your >>>signal of interest, a notch filter might add negligible delay. >>> >>> >> -How random is this noise? >> >> I would say for all practical purposes, it could be considered to be
the
>> output of a bandpass filter driven by white noise. >> >> -If the noise is narrowband and considerably higher frequency than your >> signal of interest, a notch filter might add negligible delay. >> >> The noise has 'considerable bandwith' call it .2Fs so notch and any >> convolutional type filtering is out. Im thinking hit has to be some
kind
>> of statistical additive/cancelling filter? > >Any kind of linear filter, no matter how hard you try to fool yourself >with fancy terms, is going to add the same kind of delay. Basically, if >you try you'll just invent an obfuscated bandstop filter. > >By "convolutional" filter do you mean FIR, or do you mean IIR as well? >An IIR bandstop filter will only create delay at the edges of the stop- >band, where your information is questionable anyway. > >_Any_ filter that you add in the one path is going to filter signal right
>along with noise -- you can't change that. If you have access to the >process that's generating the noise then you may be able to filter it and
>subtract it out of your intended output in such a way that the result is >much cleaner. Depending on how much information you have, how consistent
>the coupling is, and how much you need to attenuate the signal, doing so >can range from easy-peasy to a hopeless attempt at black magic. > >-- >Tim Wescott >Control system and signal processing consulting >www.wescottdesign.com
>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >An IIR bandstop filter will only create delay at the edges of the stop- >band, where your information is questionable anyway.
I meant FIR. Would and IIR bandstop approach zero delay in the 'non-rejection band'?? Never had much use to try one until now.
>_Any_ filter that you add in the one path is going to filter signal right
>along with noise -- you can't change that.
I was thinking about setting up come kind of process that has the same statistacal properties as my known bandlimted noise and doing some substraction. Not putting any multiplicitive thing 'inline'... Maybe some kind of addaptive thing.. who knows, im fishing.
On Thu, 18 Apr 2013 11:50:53 -0500, westocl wrote:

>>On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote: >> >>>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >>>> >>>>> I have a signal that is the output of a real time system. The system >>>>> performs 'ok' but has a a problem of what i would reduce down to >>>>> additive band limited noise. Since I know the source (but cant > change >>>>> it) i know that it is bandpass noise of spectral bandwith approx > .2Fs. >>>>> >>>>> I am not the liberty to delay the signal AT ALL, so throwing a >>>>> filter >>> at >>>>> the output is out of the question. >>>>> >>>>> My thoughts were that hopefully there could be a way for me to do > some >>>>> noise cancelling using my knowlege of the bandlimited nature of the >>>>> noise and its statistics. >>>>> >>>>> Any suggestions? >>>>> >>>>> (I do not want to add much unwanted noise into an other reigions > when >>>>> trying to get mitigate this bandpass noise.) >>>> >>>>How random is this noise? If it's truly random, you're probably >>>>stuck. >>>>If it's at least partly stable, then it can be estimated and >>>>subtracted from the raw signal with no appreciable delay. >>>> >>>>If the noise is narrowband and considerably higher frequency than your >>>>signal of interest, a notch filter might add negligible delay. >>>> >>>> >>> -How random is this noise? >>> >>> I would say for all practical purposes, it could be considered to be > the >>> output of a bandpass filter driven by white noise. >>> >>> -If the noise is narrowband and considerably higher frequency than >>> your signal of interest, a notch filter might add negligible delay. >>> >>> The noise has 'considerable bandwith' call it .2Fs so notch and any >>> convolutional type filtering is out. Im thinking hit has to be some > kind >>> of statistical additive/cancelling filter? >> >>Any kind of linear filter, no matter how hard you try to fool yourself >>with fancy terms, is going to add the same kind of delay. Basically, if >>you try you'll just invent an obfuscated bandstop filter. >> >>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>An IIR bandstop filter will only create delay at the edges of the stop- >>band, where your information is questionable anyway. >> >>_Any_ filter that you add in the one path is going to filter signal >>right > >>along with noise -- you can't change that. If you have access to the >>process that's generating the noise then you may be able to filter it >>and > >>subtract it out of your intended output in such a way that the result is >>much cleaner. Depending on how much information you have, how >>consistent > >>the coupling is, and how much you need to attenuate the signal, doing so >>can range from easy-peasy to a hopeless attempt at black magic. >> >>-- >>Tim Wescott Control system and signal processing consulting >>www.wescottdesign.com > > >>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>An IIR bandstop filter will only create delay at the edges of the stop- >>band, where your information is questionable anyway. > > I meant FIR. Would and IIR bandstop approach zero delay in the > 'non-rejection band'?? Never had much use to try one until now.
Not automatically, but easily. The most direct (and safe) way to implement it would be as a bunch of resonant notch filters, cascaded as necessary for rejection and width. That'd guarantee your "no phase shift in the pass bands", and give you a solution that's a collection of cookbook answers.
>>_Any_ filter that you add in the one path is going to filter signal >>right > >>along with noise -- you can't change that. > > I was thinking about setting up come kind of process that has the same > statistacal properties as my known bandlimted noise and doing some > substraction. Not putting any multiplicitive thing 'inline'... Maybe > some kind of addaptive thing.. who knows, im fishing.
I'm not sure what you're thinking. If you just come up with a noise process with the same statistics and spectral density and add it in (or subtract it -- same thing) all you'll do is double your noise power. If you observe your output signal and make a best guess of the noise and subtract that out, all you'll do is take a very involved and difficult road to a plain old bandstop filter (assuming no adaptation). Making it adaptive might improve things somewhat, or it may just give you opportunities for your product to misbehave when you're not there to see it. If you have a way of observing your noise signal independently of the output, before it goes through its bandpass filter, then that's what I was talking about at the end of my note. It may be just the bees knees to knock the noise down, or it may be the good intentions paving the road to your own personal hell -- it all depends on how much you need to knock the noise down, and how much the coupling varies from the time you measure it to the time you ship product. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Why can't you have ANY delay?
>On Thu, 18 Apr 2013 11:50:53 -0500, westocl wrote: > >>>On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote: >>> >>>>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >>>>> >>>>>> I have a signal that is the output of a real time system. The
system
>>>>>> performs 'ok' but has a a problem of what i would reduce down to >>>>>> additive band limited noise. Since I know the source (but cant >> change >>>>>> it) i know that it is bandpass noise of spectral bandwith approx >> .2Fs. >>>>>> >>>>>> I am not the liberty to delay the signal AT ALL, so throwing a >>>>>> filter >>>> at >>>>>> the output is out of the question. >>>>>> >>>>>> My thoughts were that hopefully there could be a way for me to do >> some >>>>>> noise cancelling using my knowlege of the bandlimited nature of the >>>>>> noise and its statistics. >>>>>> >>>>>> Any suggestions? >>>>>> >>>>>> (I do not want to add much unwanted noise into an other reigions >> when >>>>>> trying to get mitigate this bandpass noise.) >>>>> >>>>>How random is this noise? If it's truly random, you're probably >>>>>stuck. >>>>>If it's at least partly stable, then it can be estimated and >>>>>subtracted from the raw signal with no appreciable delay. >>>>> >>>>>If the noise is narrowband and considerably higher frequency than
your
>>>>>signal of interest, a notch filter might add negligible delay. >>>>> >>>>> >>>> -How random is this noise? >>>> >>>> I would say for all practical purposes, it could be considered to be >> the >>>> output of a bandpass filter driven by white noise. >>>> >>>> -If the noise is narrowband and considerably higher frequency than >>>> your signal of interest, a notch filter might add negligible delay. >>>> >>>> The noise has 'considerable bandwith' call it .2Fs so notch and any >>>> convolutional type filtering is out. Im thinking hit has to be some >> kind >>>> of statistical additive/cancelling filter? >>> >>>Any kind of linear filter, no matter how hard you try to fool yourself >>>with fancy terms, is going to add the same kind of delay. Basically,
if
>>>you try you'll just invent an obfuscated bandstop filter. >>> >>>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>>An IIR bandstop filter will only create delay at the edges of the stop- >>>band, where your information is questionable anyway. >>> >>>_Any_ filter that you add in the one path is going to filter signal >>>right >> >>>along with noise -- you can't change that. If you have access to the >>>process that's generating the noise then you may be able to filter it >>>and >> >>>subtract it out of your intended output in such a way that the result
is
>>>much cleaner. Depending on how much information you have, how >>>consistent >> >>>the coupling is, and how much you need to attenuate the signal, doing
so
>>>can range from easy-peasy to a hopeless attempt at black magic. >>> >>>-- >>>Tim Wescott Control system and signal processing consulting >>>www.wescottdesign.com >> >> >>>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>>An IIR bandstop filter will only create delay at the edges of the stop- >>>band, where your information is questionable anyway. >> >> I meant FIR. Would and IIR bandstop approach zero delay in the >> 'non-rejection band'?? Never had much use to try one until now. > >Not automatically, but easily. The most direct (and safe) way to >implement it would be as a bunch of resonant notch filters, cascaded as >necessary for rejection and width. That'd guarantee your "no phase shift
>in the pass bands", and give you a solution that's a collection of >cookbook answers. > >>>_Any_ filter that you add in the one path is going to filter signal >>>right >> >>>along with noise -- you can't change that. >> >> I was thinking about setting up come kind of process that has the same >> statistacal properties as my known bandlimted noise and doing some >> substraction. Not putting any multiplicitive thing 'inline'... Maybe >> some kind of addaptive thing.. who knows, im fishing. > >I'm not sure what you're thinking. > >If you just come up with a noise process with the same statistics and >spectral density and add it in (or subtract it -- same thing) all you'll >do is double your noise power. > >If you observe your output signal and make a best guess of the noise and >subtract that out, all you'll do is take a very involved and difficult >road to a plain old bandstop filter (assuming no adaptation). Making it >adaptive might improve things somewhat, or it may just give you >opportunities for your product to misbehave when you're not there to see >it. > >If you have a way of observing your noise signal independently of the >output, before it goes through its bandpass filter, then that's what I >was talking about at the end of my note. It may be just the bees knees >to knock the noise down, or it may be the good intentions paving the road
>to your own personal hell -- it all depends on how much you need to knock
>the noise down, and how much the coupling varies from the time you >measure it to the time you ship product. > >-- >Tim Wescott >Control system and signal processing consulting >www.wescottdesign.com
Not automatically, but easily. The most direct (and safe) way to implement it would be as a bunch of resonant notch filters, cascaded as necessary for rejection and width. That'd guarantee your "no phase shift in the pass bands", and give you a solution that's a collection of cookbook answers. Can you elaborate on this a little for me?
>If you just come up with a noise process with the same statistics and >spectral density and add it in (or subtract it -- same thing) all you'll >do is double your noise power.
Agreed, I was just hoping for some adaptation type algoritm to have them statistically phase up. I guess thats the 'black magic' thing you spoke of that doesnt exist.
On Thu, 18 Apr 2013 12:18:33 -0500, westocl wrote:

>>On Thu, 18 Apr 2013 11:50:53 -0500, westocl wrote: >> >>>>On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote: >>>> >>>>>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >>>>>> >>>>>>> I have a signal that is the output of a real time system. The > system >>>>>>> performs 'ok' but has a a problem of what i would reduce down to >>>>>>> additive band limited noise. Since I know the source (but cant >>> change >>>>>>> it) i know that it is bandpass noise of spectral bandwith approx >>> .2Fs. >>>>>>> >>>>>>> I am not the liberty to delay the signal AT ALL, so throwing a >>>>>>> filter >>>>> at >>>>>>> the output is out of the question. >>>>>>> >>>>>>> My thoughts were that hopefully there could be a way for me to do >>> some >>>>>>> noise cancelling using my knowlege of the bandlimited nature of >>>>>>> the noise and its statistics. >>>>>>> >>>>>>> Any suggestions? >>>>>>> >>>>>>> (I do not want to add much unwanted noise into an other reigions >>> when >>>>>>> trying to get mitigate this bandpass noise.) >>>>>> >>>>>>How random is this noise? If it's truly random, you're probably >>>>>>stuck. >>>>>>If it's at least partly stable, then it can be estimated and >>>>>>subtracted from the raw signal with no appreciable delay. >>>>>> >>>>>>If the noise is narrowband and considerably higher frequency than > your >>>>>>signal of interest, a notch filter might add negligible delay. >>>>>> >>>>>> >>>>> -How random is this noise? >>>>> >>>>> I would say for all practical purposes, it could be considered to be >>> the >>>>> output of a bandpass filter driven by white noise. >>>>> >>>>> -If the noise is narrowband and considerably higher frequency than >>>>> your signal of interest, a notch filter might add negligible delay. >>>>> >>>>> The noise has 'considerable bandwith' call it .2Fs so notch and any >>>>> convolutional type filtering is out. Im thinking hit has to be some >>> kind >>>>> of statistical additive/cancelling filter? >>>> >>>>Any kind of linear filter, no matter how hard you try to fool yourself >>>>with fancy terms, is going to add the same kind of delay. Basically, > if >>>>you try you'll just invent an obfuscated bandstop filter. >>>> >>>>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>>>An IIR bandstop filter will only create delay at the edges of the >>>>stop- band, where your information is questionable anyway. >>>> >>>>_Any_ filter that you add in the one path is going to filter signal >>>>right >>> >>>>along with noise -- you can't change that. If you have access to the >>>>process that's generating the noise then you may be able to filter it >>>>and >>> >>>>subtract it out of your intended output in such a way that the result > is >>>>much cleaner. Depending on how much information you have, how >>>>consistent >>> >>>>the coupling is, and how much you need to attenuate the signal, doing > so >>>>can range from easy-peasy to a hopeless attempt at black magic. >>>> >>>>-- >>>>Tim Wescott Control system and signal processing consulting >>>>www.wescottdesign.com >>> >>> >>>>By "convolutional" filter do you mean FIR, or do you mean IIR as well? >>>>An IIR bandstop filter will only create delay at the edges of the >>>>stop- band, where your information is questionable anyway. >>> >>> I meant FIR. Would and IIR bandstop approach zero delay in the >>> 'non-rejection band'?? Never had much use to try one until now. >> >>Not automatically, but easily. The most direct (and safe) way to >>implement it would be as a bunch of resonant notch filters, cascaded as >>necessary for rejection and width. That'd guarantee your "no phase >>shift > >>in the pass bands", and give you a solution that's a collection of >>cookbook answers. >> >>>>_Any_ filter that you add in the one path is going to filter signal >>>>right >>> >>>>along with noise -- you can't change that. >>> >>> I was thinking about setting up come kind of process that has the same >>> statistacal properties as my known bandlimted noise and doing some >>> substraction. Not putting any multiplicitive thing 'inline'... Maybe >>> some kind of addaptive thing.. who knows, im fishing. >> >>I'm not sure what you're thinking. >> >>If you just come up with a noise process with the same statistics and >>spectral density and add it in (or subtract it -- same thing) all you'll >>do is double your noise power. >> >>If you observe your output signal and make a best guess of the noise and >>subtract that out, all you'll do is take a very involved and difficult >>road to a plain old bandstop filter (assuming no adaptation). Making it >>adaptive might improve things somewhat, or it may just give you >>opportunities for your product to misbehave when you're not there to see >>it. >> >>If you have a way of observing your noise signal independently of the >>output, before it goes through its bandpass filter, then that's what I >>was talking about at the end of my note. It may be just the bees knees >>to knock the noise down, or it may be the good intentions paving the >>road > >>to your own personal hell -- it all depends on how much you need to >>knock > >>the noise down, and how much the coupling varies from the time you >>measure it to the time you ship product. >> >>-- >>Tim Wescott >>Control system and signal processing consulting www.wescottdesign.com > > Not automatically, but easily. The most direct (and safe) way to > implement it would be as a bunch of resonant notch filters, cascaded as > necessary for rejection and width. That'd guarantee your "no phase > shift in the pass bands", and give you a solution that's a collection of > cookbook answers. > > Can you elaborate on this a little for me?
Damn. It's clear as a bell for me, so I don't know what's missing for you. Assuming that you're programming in C++, and you've got a notch filter class with an "update" function: // function: update // description: update the filter // input: the current iteration of the input signal // output: the current iteration of the output signal // modifies: the state of the filter double Update(double x); Then you'd configure a bunch of filters (or maybe one, if you can get away with it) with staggered frequencies: CNotchFilter notch1(centerFreq, width); CNotchFilter notch2(centerFreq + width/2, width); CNotchFilter notch3(centerFreq - width/2, width); (Note that this'll give you a pretty lumpy response in the stop band -- finding the right spacing for the notches is left as an exercise to the reader). Then in your code, at each sample you'd call: x = notch1.Update(noisy_output); x = notch2.Update(x); quiet_output = notch3.Update(x);
>>If you just come up with a noise process with the same statistics and >>spectral density and add it in (or subtract it -- same thing) all you'll >>do is double your noise power. > > Agreed, I was just hoping for some adaptation type algoritm to have them > statistically phase up. I guess thats the 'black magic' thing you spoke > of that doesn't exist.
Well, in your case the "some adaptation" would be to to figure out the state of the bandpass process that's filtering the noise. This would boil down to a Kalman filter (not really an "adaptive" filter as the term is usually used). If you simplified things by taking the steady state filter, then you would have a bandpass process that you'd then subtract from the output. This would give you -- wait for it -- a plain old shift- invariant IIR bandstop filter. Depending on what you're trying to do, instead of doing a series of cascaded notches, you may wish to cascade a low-pass with a high-pass. Either way, you'll still get the effect of no delay well outside of the stop band. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
>On Thu, 18 Apr 2013 12:18:33 -0500, westocl wrote: > >>>On Thu, 18 Apr 2013 11:50:53 -0500, westocl wrote: >>> >>>>>On Thu, 18 Apr 2013 11:02:03 -0500, westocl wrote: >>>>> >>>>>>>On Thu, 18 Apr 2013 06:28:58 -0500, westocl wrote: >>>>>>> >>>>>>>> I have a signal that is the output of a real time system. The >> system >>>>>>>> performs 'ok' but has a a problem of what i would reduce down to >>>>>>>> additive band limited noise. Since I know the source (but cant >>>> change >>>>>>>> it) i know that it is bandpass noise of spectral bandwith approx >>>> .2Fs. >>>>>>>> >>>>>>>> I am not the liberty to delay the signal AT ALL, so throwing a >>>>>>>> filter >>>>>> at >>>>>>>> the output is out of the question. >>>>>>>> >>>>>>>> My thoughts were that hopefully there could be a way for me to do >>>> some >>>>>>>> noise cancelling using my knowlege of the bandlimited nature of >>>>>>>> the noise and its statistics. >>>>>>>> >>>>>>>> Any suggestions? >>>>>>>> >>>>>>>> (I do not want to add much unwanted noise into an other reigions >>>> when >>>>>>>> trying to get mitigate this bandpass noise.) >>>>>>> >>>>>>>How random is this noise? If it's truly random, you're probably >>>>>>>stuck. >>>>>>>If it's at least partly stable, then it can be estimated and >>>>>>>subtracted from the raw signal with no appreciable delay. >>>>>>> >>>>>>>If the noise is narrowband and considerably higher frequency than >> your >>>>>>>signal of interest, a notch filter might add negligible delay. >>>>>>> >>>>>>> >>>>>> -How random is this noise? >>>>>> >>>>>> I would say for all practical purposes, it could be considered to
be
>>>> the >>>>>> output of a bandpass filter driven by white noise. >>>>>> >>>>>> -If the noise is narrowband and considerably higher frequency than >>>>>> your signal of interest, a notch filter might add negligible delay. >>>>>> >>>>>> The noise has 'considerable bandwith' call it .2Fs so notch and any >>>>>> convolutional type filtering is out. Im thinking hit has to be some >>>> kind >>>>>> of statistical additive/cancelling filter? >>>>> >>>>>Any kind of linear filter, no matter how hard you try to fool
yourself
>>>>>with fancy terms, is going to add the same kind of delay. Basically, >> if >>>>>you try you'll just invent an obfuscated bandstop filter. >>>>> >>>>>By "convolutional" filter do you mean FIR, or do you mean IIR as
well?
>>>>>An IIR bandstop filter will only create delay at the edges of the >>>>>stop- band, where your information is questionable anyway. >>>>> >>>>>_Any_ filter that you add in the one path is going to filter signal >>>>>right >>>> >>>>>along with noise -- you can't change that. If you have access to the >>>>>process that's generating the noise then you may be able to filter it >>>>>and >>>> >>>>>subtract it out of your intended output in such a way that the result >> is >>>>>much cleaner. Depending on how much information you have, how >>>>>consistent >>>> >>>>>the coupling is, and how much you need to attenuate the signal, doing >> so >>>>>can range from easy-peasy to a hopeless attempt at black magic. >>>>> >>>>>-- >>>>>Tim Wescott Control system and signal processing consulting >>>>>www.wescottdesign.com >>>> >>>> >>>>>By "convolutional" filter do you mean FIR, or do you mean IIR as
well?
>>>>>An IIR bandstop filter will only create delay at the edges of the >>>>>stop- band, where your information is questionable anyway. >>>> >>>> I meant FIR. Would and IIR bandstop approach zero delay in the >>>> 'non-rejection band'?? Never had much use to try one until now. >>> >>>Not automatically, but easily. The most direct (and safe) way to >>>implement it would be as a bunch of resonant notch filters, cascaded as >>>necessary for rejection and width. That'd guarantee your "no phase >>>shift >> >>>in the pass bands", and give you a solution that's a collection of >>>cookbook answers. >>> >>>>>_Any_ filter that you add in the one path is going to filter signal >>>>>right >>>> >>>>>along with noise -- you can't change that. >>>> >>>> I was thinking about setting up come kind of process that has the
same
>>>> statistacal properties as my known bandlimted noise and doing some >>>> substraction. Not putting any multiplicitive thing 'inline'... Maybe >>>> some kind of addaptive thing.. who knows, im fishing. >>> >>>I'm not sure what you're thinking. >>> >>>If you just come up with a noise process with the same statistics and >>>spectral density and add it in (or subtract it -- same thing) all
you'll
>>>do is double your noise power. >>> >>>If you observe your output signal and make a best guess of the noise
and
>>>subtract that out, all you'll do is take a very involved and difficult >>>road to a plain old bandstop filter (assuming no adaptation). Making
it
>>>adaptive might improve things somewhat, or it may just give you >>>opportunities for your product to misbehave when you're not there to
see
>>>it. >>> >>>If you have a way of observing your noise signal independently of the >>>output, before it goes through its bandpass filter, then that's what I >>>was talking about at the end of my note. It may be just the bees knees >>>to knock the noise down, or it may be the good intentions paving the >>>road >> >>>to your own personal hell -- it all depends on how much you need to >>>knock >> >>>the noise down, and how much the coupling varies from the time you >>>measure it to the time you ship product. >>> >>>-- >>>Tim Wescott >>>Control system and signal processing consulting www.wescottdesign.com >> >> Not automatically, but easily. The most direct (and safe) way to >> implement it would be as a bunch of resonant notch filters, cascaded as >> necessary for rejection and width. That'd guarantee your "no phase >> shift in the pass bands", and give you a solution that's a collection
of
>> cookbook answers. >> >> Can you elaborate on this a little for me? > >Damn. It's clear as a bell for me, so I don't know what's missing for >you. > >Assuming that you're programming in C++, and you've got a notch filter >class with an "update" function: > >// function: update >// description: update the filter >// input: the current iteration of the input signal >// output: the current iteration of the output signal >// modifies: the state of the filter >double Update(double x); > >Then you'd configure a bunch of filters (or maybe one, if you can get >away with it) with staggered frequencies: > >CNotchFilter notch1(centerFreq, width); >CNotchFilter notch2(centerFreq + width/2, width); >CNotchFilter notch3(centerFreq - width/2, width); > >(Note that this'll give you a pretty lumpy response in the stop band -- >finding the right spacing for the notches is left as an exercise to the >reader). > >Then in your code, at each sample you'd call: > >x = notch1.Update(noisy_output); >x = notch2.Update(x); >quiet_output = notch3.Update(x); > >>>If you just come up with a noise process with the same statistics and >>>spectral density and add it in (or subtract it -- same thing) all
you'll
>>>do is double your noise power. >> >> Agreed, I was just hoping for some adaptation type algoritm to have
them
>> statistically phase up. I guess thats the 'black magic' thing you spoke >> of that doesn't exist. > >Well, in your case the "some adaptation" would be to to figure out the >state of the bandpass process that's filtering the noise. This would >boil down to a Kalman filter (not really an "adaptive" filter as the term
>is usually used). If you simplified things by taking the steady state >filter, then you would have a bandpass process that you'd then subtract >from the output. This would give you -- wait for it -- a plain old
shift-
>invariant IIR bandstop filter. > >Depending on what you're trying to do, instead of doing a series of >cascaded notches, you may wish to cascade a low-pass with a high-pass. >Either way, you'll still get the effect of no delay well outside of the >stop band. > >-- >My liberal friends think I'm a conservative kook. >My conservative friends think I'm a liberal kook. >Why am I not happy that they have found common ground? > >Tim Wescott, Communications, Control, Circuits & Software >http://www.wescottdesign.com
Thanks. Ill give it a whirl.