DSPRelated.com
Forums

adding up coefficients

Started by Gert Baars September 4, 2005
Hello,

Recently I designed my first IIR filter from a 1st orde Butterworth.
After implementation it works as it should.
My second filter a 2nd order Butterworth is ready on paper.
What occured to me is when I add up the coefficients from the 1st
order filter the sum = 1. Surprisingly adding up the coefficients
of the second order IIR filter the sum is also = 1.

Spare me the Math but is this the case for every filter so I can use
this as a check method?


Gert Baars wrote:

> Hello, > > Recently I designed my first IIR filter from a 1st orde Butterworth. > After implementation it works as it should. > My second filter a 2nd order Butterworth is ready on paper. > What occured to me is when I add up the coefficients from the 1st > order filter the sum = 1. Surprisingly adding up the coefficients > of the second order IIR filter the sum is also = 1. > > Spare me the Math but is this the case for every filter so I can use > this as a check method? > >
Do you mean that the ratio of the sums of the numerator coefficients and the denominator coefficients adds to 1? Such as: 0.1 H(z) = --------- ? z - 0.9 If so then all that you're showing is that the filter has a DC gain of 1 (z = 1 corresponds to DC). This is the barest scratch on the surface of the frequency domain interpretation of the z transform -- take a look at http://www.wescottdesign.com/articles/zTransform/z-transforms.html for a slightly deeper scratch. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com

c(0).Z^0 + c(1).(Z^-1) + ... + c(m).(Z^-m)
-------------------------------------------
1 + (d(1).(Z^-1) + .... + d(n).(Z^-n)


IF Z=1 at W=0 which is DC

then H(Z=1) = C / (1 + D)       C is sum of all c's and D of all d's.

since d(n) is implemented negative then

If C-D = 1 then H(1) = (1+D)/(1+D) = 1

So indeed it shows the DC gain and that adding up all coefficients is a 
good method to check the Math.




Tim Wescott wrote:
> Gert Baars wrote: > >> Hello, >> >> Recently I designed my first IIR filter from a 1st orde Butterworth. >> After implementation it works as it should. >> My second filter a 2nd order Butterworth is ready on paper. >> What occured to me is when I add up the coefficients from the 1st >> order filter the sum = 1. Surprisingly adding up the coefficients >> of the second order IIR filter the sum is also = 1. >> >> Spare me the Math but is this the case for every filter so I can use >> this as a check method? >> >> > Do you mean that the ratio of the sums of the numerator coefficients and > the denominator coefficients adds to 1? Such as: > > 0.1 > H(z) = --------- ? > z - 0.9 > > If so then all that you're showing is that the filter has a DC gain of 1 > (z = 1 corresponds to DC). This is the barest scratch on the surface of > the frequency domain interpretation of the z transform -- take a look at > http://www.wescottdesign.com/articles/zTransform/z-transforms.html for a > slightly deeper scratch. >
"Gert Baars" <g.baars13@chello.nl> wrote in message
news:21317$431b2a6d$3ec23590$23823@news.chello.nl...
> > > c(0).Z^0 + c(1).(Z^-1) + ... + c(m).(Z^-m) > ------------------------------------------- > 1 + (d(1).(Z^-1) + .... + d(n).(Z^-n) > > > IF Z=1 at W=0 which is DC > > then H(Z=1) = C / (1 + D) C is sum of all c's and D of all d's. > > since d(n) is implemented negative then > > If C-D = 1 then H(1) = (1+D)/(1+D) = 1 > > So indeed it shows the DC gain and that adding up all coefficients is a > good method to check the Math. > > >
Or check the Maths. Shytot
On Sun, 04 Sep 2005 19:09:17 +0200, Gert Baars <g.baars13@chello.nl>
wrote:

> > >c(0).Z^0 + c(1).(Z^-1) + ... + c(m).(Z^-m) >------------------------------------------- >1 + (d(1).(Z^-1) + .... + d(n).(Z^-n) > > >IF Z=1 at W=0 which is DC > >then H(Z=1) = C / (1 + D) C is sum of all c's and D of all d's. > >since d(n) is implemented negative then > >If C-D = 1 then H(1) = (1+D)/(1+D) = 1 > >So indeed it shows the DC gain and that adding up all coefficients is a >good method to check the Math.
Hi Gert, Your post was interesting to me. I don't know if my memory has failed me, or maybe I never did know the simple rule (which you are developing here) that the DC gain of an IIR filter is Sum of feed forward coefficients DC gain = ---------------------------------------- One minus sum of feedback coefficients Looking into this situation a little further, and being more general by analyzing the following IIR network, x --->(+)---a0---->--------b0----->(+)---> y ^ | ^ | [z^-1] | | | | (+)<--a1------+-------b1---->(+) ^ | ^ | [z^-1] | | | | +-<--a2------+-------b2---->-+ I think the rule should be that the DC gain of an an IIR filter is: Sum of feed forward coefficients DC gain = ----------------------------------------- 1/a0 minus sum of feedback coefficients Of course this agrees with your "rule" so long as your a0 coefficient is unity. Thanks for teachin' me some DSP Gert. [-Rick-]