2
\$\begingroup\$

hope y'all beings safe out here and doing well.

I am trying to create a single stage biquad (2nd Order) butter worth filter using MATLAB's filter designer tool.

Just to see, I tried plugging back the filter coefficients that MATLAB give out into a discrete transfer function and then converting that discrete transfer function to a continuous transfer function using the "D2C" command using tustin just to see what I would get (Hopefully something close to what I designed).

Behold, I get roughly the same, but with a huge DC gain? I am curious as to where this came from?

Filter Coefficients: enter image description here

Filter Designer Parameters: enter image description here

Bode Plot of D2C:

enter image description here

Transfer Function (DISCRETE):

enter image description here

Transfer Function (CONTINOUS USING TUSTIN from D2C command):

enter image description here

\$\endgroup\$
6
  • 1
    \$\begingroup\$ 12.3 dB is not a "huge" DC Gain. \$\endgroup\$
    – Ben
    May 13 at 0:24
  • 2
    \$\begingroup\$ Well, that helped a lot. What I was trying to get at, Butterworth filters for audio applications are suppose to be ~0dB, me seeing 12.3dB you would imagine. \$\endgroup\$
    – Leoc
    May 13 at 1:00
  • 1
    \$\begingroup\$ You forget to include your gain of 0.22... Your SOS section has a gain of 0.22. 1/.022 = 12 dB \$\endgroup\$
    – Ben
    May 13 at 1:15
  • \$\begingroup\$ Now we are talking. Can you further explain? I thought the gain of 0.22 was suppose to be multiplied out with just the denominator numbers. \$\endgroup\$
    – Leoc
    May 13 at 1:18
  • \$\begingroup\$ You should multiply the gain with the numerator coefficients \$\endgroup\$
    – Ben
    May 13 at 1:19
1
\$\begingroup\$

Your SOS transfer function has a gain of 0.2205. If you don't include this gain in your analysis, you will get a gain of roughly 12 dB.

\$\endgroup\$
3
  • \$\begingroup\$ Forgot to multiply the numerator by the gain. Thank you buddy! \$\endgroup\$
    – Leoc
    May 13 at 1:21
  • \$\begingroup\$ You don't need to multiply the denominator by the gain though... It's useless \$\endgroup\$
    – Ben
    May 13 at 1:22
  • \$\begingroup\$ You are correct! My bad \$\endgroup\$
    – Leoc
    May 13 at 1:23

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.