DSPRelated.com
Forums

Simple high pass filters>

Started by DigitalSignal October 7, 2008
If the data is sampled at 48kHz or 96kHz, what would be an easy way to
create an efficient high-pass filter with fixed cutoff frequency at
2Hz? The characteristics of filter does not matter. The goal is to
remove the DC or near DC term.

I was thinking that I can first create a moving averaging mean-value
estimator which has an averaging time at 0.5 seconds, then substract
the mean estimate from each data point.

Any better idea?

James
www.go-ci.com
I think a comb filter followed by LPF should help.

Can IIR be used??

Rgds
Bharat Pathak

Arithos Designs
www.Arithos.com



	Arithos Designs is conducting 2 day workshop on "Fundamentals of 
        DSP using Matlab/Octave" on 18th and 19th October at Pune. For
        more details send mail to bharat@arithos.com
>If the data is sampled at 48kHz or 96kHz, what would be an easy way to >create an efficient high-pass filter with fixed cutoff frequency at >2Hz? The characteristics of filter does not matter. The goal is to >remove the DC or near DC term. > >I was thinking that I can first create a moving averaging mean-value >estimator which has an averaging time at 0.5 seconds, then substract >the mean estimate from each data point. > >Any better idea?
For a wide variety of DC blocking applications, especially those requiring a pretty low cutoff frequency, the technique described at http://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htm is very simple and very effective. Steve
On 8 Okt., 05:08, "steveu" <ste...@coppice.org> wrote:
> >If the data is sampled at 48kHz or 96kHz, what would be an easy way to > >create an efficient high-pass filter with fixed cutoff frequency at > >2Hz? The characteristics of filter does not matter. The goal is to > >remove the DC or near DC term. > > >I was thinking that I can first create a moving averaging mean-value > >estimator which has an averaging time at 0.5 seconds, then substract > >the mean estimate from each data point. > > >Any better idea? > > For a wide variety of DC blocking applications, especially those requiring > a pretty low cutoff frequency, the technique described athttp://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htmis very simple and > very effective.
Another neat DC blocker, however with linear-phase response, is described by Rick on his blog: http://www.dsprelated.com/showarticle/58.php This is just an efficient implementation of the method described by the OP. It requires little computation but lots of memory. Regards, Andor
>On 8 Okt., 05:08, "steveu" <ste...@coppice.org> wrote: >> >If the data is sampled at 48kHz or 96kHz, what would be an easy way
to
>> >create an efficient high-pass filter with fixed cutoff frequency at >> >2Hz? The characteristics of filter does not matter. The goal is to >> >remove the DC or near DC term. >> >> >I was thinking that I can first create a moving averaging mean-value >> >estimator which has an averaging time at 0.5 seconds, then substract >> >the mean estimate from each data point. >> >> >Any better idea? >> >> For a wide variety of DC blocking applications, especially those
requiring
>> a pretty low cutoff frequency, the technique described
athttp://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htmis very simple and
>> very effective. > >Another neat DC blocker, however with linear-phase response, is >described by Rick on his blog: > >http://www.dsprelated.com/showarticle/58.php > >This is just an efficient implementation of the method described by >the OP. It requires little computation but lots of memory. > >Regards, >Andor
That doesn't seem such a great way to meet the original poster's requirement for response down to 2Hz with a 48kHz sampling rate. However, the "noise shaped LPF turned into an HPF by subtraction" that is in the dspguru article can be made to do such a thing pretty well. With such a very narrow bandwidth for the LPF section, its phase response is such that its almost irrelevant that is it not strictly linear-phase. Steve
Andor <andor.bariska@gmail.com> writes:

> On 8 Okt., 05:08, "steveu" <ste...@coppice.org> wrote: >> >If the data is sampled at 48kHz or 96kHz, what would be an easy way to >> >create an efficient high-pass filter with fixed cutoff frequency at >> >2Hz? The characteristics of filter does not matter. The goal is to >> >remove the DC or near DC term. >> >> >I was thinking that I can first create a moving averaging mean-value >> >estimator which has an averaging time at 0.5 seconds, then substract >> >the mean estimate from each data point. >> >> >Any better idea? >> >> For a wide variety of DC blocking applications, especially those requiring >> a pretty low cutoff frequency, the technique described athttp://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htmis very simple and >> very effective. > > Another neat DC blocker, however with linear-phase response, is > described by Rick on his blog: > > http://www.dsprelated.com/showarticle/58.php > > This is just an efficient implementation of the method described by > the OP. It requires little computation but lots of memory.
Hi Andor, So you mean it is "computationally efficient"? -- % Randy Yates % "Rollin' and riding and slippin' and %% Fuquay-Varina, NC % sliding, it's magic." %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Living' Thing', *A New World Record*, ELO http://www.digitalsignallabs.com
On 8 Okt., 12:16, "steveu" <ste...@coppice.org> wrote:
> >On 8 Okt., 05:08, "steveu" <ste...@coppice.org> wrote: > >> >If the data is sampled at 48kHz or 96kHz, what would be an easy way > to > >> >create an efficient high-pass filter with fixed cutoff frequency at > >> >2Hz? The characteristics of filter does not matter. The goal is to > >> >remove the DC or near DC term. > > >> >I was thinking that I can first create a moving averaging mean-value > >> >estimator which has an averaging time at 0.5 seconds, then substract > >> >the mean estimate from each data point. > > >> >Any better idea? > > >> For a wide variety of DC blocking applications, especially those > requiring > >> a pretty low cutoff frequency, the technique described > > athttp://www.dspguru.com/comp.dsp/tricks/alg/dc_block.htmisvery simple > and > > >> very effective. > > >Another neat DC blocker, however with linear-phase response, is > >described by Rick on his blog: > > >http://www.dsprelated.com/showarticle/58.php > > >This is just an efficient implementation of the method described by > >the OP. It requires little computation but lots of memory. > > >Regards, > >Andor > > That doesn't seem such a great way to meet the original poster's > requirement for response down to 2Hz with a 48kHz sampling rate. However, > the "noise shaped LPF turned into an HPF by subtraction" that is in the > dspguru article can be made to do such a thing pretty well. With such a > very narrow bandwidth for the LPF section, its phase response is such that > its almost irrelevant that is it not strictly linear-phase. > > Steve
It's all a question of how large one choses the "D" parameter ... And, yes, Randy, "computationally efficient".
DigitalSignal wrote:
> If the data is sampled at 48kHz or 96kHz, what would be an easy way to > create an efficient high-pass filter with fixed cutoff frequency at > 2Hz? The characteristics of filter does not matter. The goal is to > remove the DC or near DC term. > > I was thinking that I can first create a moving averaging mean-value > estimator which has an averaging time at 0.5 seconds, then substract > the mean estimate from each data point. > > Any better idea? > > James > www.go-ci.com
Search for "DC blocker." A simple IIR with fraction saving to suppress limit cycles works well for most uses. What do you mean, "The characteristics of filter does [sic] not matter"? Don't you want it to be reasonably flat in the passband? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; ** Posted from http://www.teranews.com **
Hi Jerry,

"What do you mean, "The characteristics of filter does [sic] not
matter"?
Don't you want it to be reasonably flat in the passband? "

Yes I should say that the flatness of the passband is important. What
do not matter are the accuracy of the cut-off frequency, the degree of
attenuation in the stopband, and the phase characteristics.

After the DC removal, we want to do the time domain integration. If DC
drift was not removed well, the integration will generate a huge
error.

Thanks,

James
www.go-ci.com

DigitalSignal wrote:
> Hi Jerry, > > "What do you mean, "The characteristics of filter does [sic] not > matter"? > Don't you want it to be reasonably flat in the passband? " > > Yes I should say that the flatness of the passband is important. What > do not matter are the accuracy of the cut-off frequency, the degree of > attenuation in the stopband, and the phase characteristics. > > After the DC removal, we want to do the time domain integration. If DC > drift was not removed well, the integration will generate a huge > error.
Well, you were pointed to several good DC blocker references. To those who are tempted to simply put a capacitor in front of the A-to-D: remember converter offsets. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; ** Posted from http://www.teranews.com **