# How would I calculate the DC Gain for a Chebyshev Type 2 filter?

I'm currently working on an implementation of a Chebyshev Type 2 filter but the gain is all over the place when playing around with the order and ripple. I haven't found anything online but (as far as I understand) I need to calculate the DC gain to compensate for gain differences. How would I go about doing that?

I've tried to do s = 0 for my analog prototype which leaves me with just the coefficients b1 / a2 for every biquad. I multiplied all the fractions of the individual biquads together but the result did not help at all, it seems just as random as the gain itself.

Can anyone point me in the right direction?

• This is really a bit of an off-topic comment, but: Whenever a student asks me about Chebyshev or Butterworths filters (and the situation here is actually worse), chances are roughly 80% that they really shouldn't be designing a Chebyshev filter, but be using a design approach meant for digital filter design to a spectrum mask specification to begin with. Oct 5 '19 at 18:49
• So, if the answer to the question "Why are you designing a Chebyshev type II filter?" isn't "Because I'm trying to design an analog filter with a defined stop-band behaviour at the expense of passband ripple and I'm fully aware of the effects of the bilinear transform or alternatives if I need this design for digital purposes.", then you probably shouldn't be designing a Chebyshev filter Oct 5 '19 at 18:49
• I get where you're coming from. It's for educational purposes. I learn a lot from this and find it interesting. Oct 5 '19 at 18:52
• Then that's fine :) Oct 5 '19 at 18:52
• Input all ones in the filter (DC) as long as it’s impulse response; and the output is the DC gain assuming it converges. Oct 5 '19 at 20:41

$$H(z)=\frac{b_0+b_1z^{-1}+\ldots +b_Nz^{-N}}{1+a_1z^{-1}+\ldots +a_Nz^{-N}}\tag{1}$$
From that transfer function you compute the coefficients of the second-order sections. Before doing that, you can make sure that the DC gain of $$(1)$$ equals $$1$$ (which of course only makes sense for a low pass or a band stop filter).
The DC gain of $$(1)$$ simply equals
$$H(1)=\frac{b_0+b_1+\ldots +b_N}{1+a_1+\dots +a_N}$$