3
$\begingroup$

For which filters, does the resulting signal have the same integral (/average) as the original? Obviously this is true for a moving average, but is it also mathematically true for e.g. a Butterworth filter?

I am trying to build a lowpass filter for a signal of measurement samples. While there is a lot of noise, the average (over a sizable number of samples) is correct. I need to filter it retaining that property, regardless of the input frequency spectrum.

$\endgroup$
8
$\begingroup$

You need a filter whose transfer function evaluated at 0 (DC component) is 1, or equivalently, whose impulse response sums to 1.

$\endgroup$
  • 1
    $\begingroup$ Also, you can make that the case for any low-pass filter by dividing the filter's coefficients by the sum of the coefficients. $\endgroup$ – Jim Clay Aug 28 '12 at 12:55
  • $\begingroup$ In general it seems to look like this holds for Butterworth filters considering their Gain definition. But I guess it actually depends on the actual filter design (approximation)? So lets say I create a Butterworth 4th. with sample rate 1Hz, corner 0.0225 Hz using this page: www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html. Now the coefficients add up to 1, the picture looks good, but it says "gain at dc : mag = 4.787085439e+04", shouldn't this be 1? $\endgroup$ – Zulan Aug 28 '12 at 13:14
  • 1
    $\begingroup$ Sorry- I should have said in my comment above that you can do that for any FIR filter. You can also set the gain of an IIR filter to 1, but it's a little more tricky. For an IIR filter I would break it up into the various stages and set each of their gains to 1. $\endgroup$ – Jim Clay Aug 28 '12 at 13:51
  • $\begingroup$ @Jim Clay: I'm afraid that I don't design the filter myself, so breaking up in stages is beyond my current abilities. However it would be sufficient for me to confirm in a mathematical solid sense that a filter from a library/toolbox/the page i mentioned has this property. $\endgroup$ – Zulan Aug 29 '12 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.