Reply by May 26, 20052005-05-26
Hi,

Isn't out there some "DC blocking filter" recipe from RBJ  - or another 
comp.dsp fellow whose name I don't recall at the moment -?

Maybe searching in the comp.dsp archive (www.deja.com, for example) could 
help.

Kindest regards

-- 
------------------------------
Jaime Andr�s Aranguren Cardona
jaac@sanjaac.com
SanJaaC Electronics
Soluciones en DSP
www.sanjaac.com


"Rune Allnor" <allnor@tele.ntnu.no> escribi&#4294967295; en el mensaje 
news:1117015249.064010.11070@f14g2000cwb.googlegroups.com...
> Hi all. > > I am making these bandpass filters to enhance some > low-frequency data. The pass band is specified as > [0.009, 0.015]*Fs. > > The filters are of order >400 and work reasonably well, > except for there being some non-zero gain at DC. > > Can I play with the filter order to remove the DC > component? I know I can remove a non-zero component > at Fs/2 by choosing an odd filter order (which, apparently, > I can't do in practice, since my filter was designed using > the matlab FIRPM function that is restricted to even filter > orders). Can something similar be done to remove the > DC component? > > Rune >
Reply by Matt Timmermans May 25, 20052005-05-25
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message 
news:1117015249.064010.11070@f14g2000cwb.googlegroups.com...
> Hi all. > > I am making these bandpass filters to enhance some > low-frequency data. The pass band is specified as > [0.009, 0.015]*Fs. > > The filters are of order >400 and work reasonably well, > except for there being some non-zero gain at DC.
You can design a low-pass of the same order, and subtract it from your bandpass in the correct proportion to cancel DC. It shouldn't take much. -- Matt
Reply by Tim Wescott May 25, 20052005-05-25
Rune Allnor wrote:
> Hi all. > > I am making these bandpass filters to enhance some > low-frequency data. The pass band is specified as > [0.009, 0.015]*Fs. > > The filters are of order >400 and work reasonably well, > except for there being some non-zero gain at DC. > > Can I play with the filter order to remove the DC > component? I know I can remove a non-zero component > at Fs/2 by choosing an odd filter order (which, apparently, > I can't do in practice, since my filter was designed using > the matlab FIRPM function that is restricted to even filter > orders). Can something similar be done to remove the > DC component? > > Rune >
If F is your filter matrix generated by MatLab you want to dink with it until mean(F) = 0. If you are using floating point just do: F = F - mean(F) / size(F, 2); If you are using fixed-point arithmatic you may have to dither the last bit of F to get the DC gain down. This does _not_ address the problem of having non-zero gain _close_ to DC; I suspect that you could use similar techniques to get rid of that residual, but that would warrant a paper, not a note. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by Bobby Mughal May 25, 20052005-05-25
Have you tried using the frequency sampling technique to design your filter?
Using this technique, you can specify exactly what the DC response should
be.


-- 
Bobby Mughal  BEng. MSc.
Director
DSP Creations Ltd
www.dspcreation.com

"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
news:1117015249.064010.11070@f14g2000cwb.googlegroups.com...
> Hi all. > > I am making these bandpass filters to enhance some > low-frequency data. The pass band is specified as > [0.009, 0.015]*Fs. > > The filters are of order >400 and work reasonably well, > except for there being some non-zero gain at DC. > > Can I play with the filter order to remove the DC > component? I know I can remove a non-zero component > at Fs/2 by choosing an odd filter order (which, apparently, > I can't do in practice, since my filter was designed using > the matlab FIRPM function that is restricted to even filter > orders). Can something similar be done to remove the > DC component? > > Rune >
Reply by May 25, 20052005-05-25
Use the discrete final value theorem and substitute z=1 in your
z-transform and/or difference equation.  Your filter coefficients
should sum to zero to washout DC.

On 25 May 2005 03:00:49 -0700, "Rune Allnor" <allnor@tele.ntnu.no>
wrote:
>Hi all. >I am making these bandpass filters to enhance some >low-frequency data. The pass band is specified as >[0.009, 0.015]*Fs. >The filters are of order >400 and work reasonably well, >except for there being some non-zero gain at DC. >Can I play with the filter order to remove the DC >component? I know I can remove a non-zero component >at Fs/2 by choosing an odd filter order (which, apparently, >I can't do in practice, since my filter was designed using >the matlab FIRPM function that is restricted to even filter >orders). Can something similar be done to remove the >DC component? Rune
Reply by Rune Allnor May 25, 20052005-05-25

Randy Yates wrote:
> "Rune Allnor" <allnor@tele.ntnu.no> writes: > > > Hi all. > > > > I am making these bandpass filters to enhance some > > low-frequency data. The pass band is specified as > > [0.009, 0.015]*Fs. > > > > The filters are of order >400 and work reasonably well, > > except for there being some non-zero gain at DC. > > > > Can I play with the filter order to remove the DC > > component? I know I can remove a non-zero component > > at Fs/2 by choosing an odd filter order (which, apparently, > > I can't do in practice, since my filter was designed using > > the matlab FIRPM function that is restricted to even filter > > orders). Can something similar be done to remove the > > DC component? > > Hi Rune, > > Is this in fixed-point or floating-point? If floating-point > then an easy fix would be to add the following filter stage at > the output: > > H(z) = ((1+p)/2) * (z - 1) / (z - p), > > where p is close to 1.
Hi Randy, It's floating point precision. I'll try this, although I would like to keep the filter in an FIR implementation, if possible. BTW, The email address I post from is obsolete, thanks to our friends the spambots. I don't read that account very often as is, and I won't read it at all after I get some new software that is expected to arrive in a week or so. I'm only in my old office every now and then to borrow access to that software, so please, don't mail me on the tele.ntnu.no address. To mail me, use "ieee.org" instead of "tele.ntnu.no". Rune
Reply by Randy Yates May 25, 20052005-05-25
"Rune Allnor" <allnor@tele.ntnu.no> writes:

> Hi all. > > I am making these bandpass filters to enhance some > low-frequency data. The pass band is specified as > [0.009, 0.015]*Fs. > > The filters are of order >400 and work reasonably well, > except for there being some non-zero gain at DC. > > Can I play with the filter order to remove the DC > component? I know I can remove a non-zero component > at Fs/2 by choosing an odd filter order (which, apparently, > I can't do in practice, since my filter was designed using > the matlab FIRPM function that is restricted to even filter > orders). Can something similar be done to remove the > DC component?
Hi Rune, Is this in fixed-point or floating-point? If floating-point then an easy fix would be to add the following filter stage at the output: H(z) = ((1+p)/2) * (z - 1) / (z - p), where p is close to 1. -- % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and %%% 919-577-9882 % Verdi's always creepin' from her room." %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO http://home.earthlink.net/~yatescr
Reply by Rune Allnor May 25, 20052005-05-25
Hi all.

I am making these bandpass filters to enhance some
low-frequency data. The pass band is specified as
[0.009, 0.015]*Fs.

The filters are of order >400 and work reasonably well,
except for there being some non-zero gain at DC.

Can I play with the filter order to remove the DC
component? I know I can remove a non-zero component
at Fs/2 by choosing an odd filter order (which, apparently,
I can't do in practice, since my filter was designed using
the matlab FIRPM function that is restricted to even filter
orders). Can something similar be done to remove the
DC component? 

Rune