3
\$\begingroup\$

I have a low-pass filter of second order.

enter image description here

The transfer function is:

$$\small G(s) = \frac{1}{R^2C^2s^2+(3CR - CR)s + 1}$$

And the amplitude function is:

$$\small A(s) = \frac{1}{\sqrt{(R^2C^2s^2)^2 + ((3CR - CR)s)^2 + 1}}$$

If I say that A(s) = 0.25 at s = 2·π·90 rad/s, I can select C = 2.7160e-06 F and R = 1000 Ω to achieve A(s) = 0.25 at s = 2·π·90 rad/s.

My transfer function will look like this then:

$$\small G(2) = \frac{1}{7.3767\cdot 10^{-6}s^2 + 0.005432s + 1}$$

But when I analyse with a Bode diagram, I get -10.526 dB, which is about 0.29.

Is the transfer function of this model correct? This question is an extenstion to this question: Transfer function of second-order Butterworth filter

enter image description here

\$\endgroup\$
13
  • \$\begingroup\$ What is 3*C*R - C*R? \$\endgroup\$
    – Andy aka
    Sep 9, 2022 at 14:06
  • \$\begingroup\$ @Andyaka It will become a value? \$\endgroup\$
    – euraad
    Sep 9, 2022 at 14:07
  • \$\begingroup\$ What is 3x - x? \$\endgroup\$
    – Andy aka
    Sep 9, 2022 at 14:07
  • \$\begingroup\$ In other words, either there is an error somewhere in your formula or, you are not simplifying things. \$\endgroup\$
    – Andy aka
    Sep 9, 2022 at 14:08
  • \$\begingroup\$ Oh, it will be 2CR. I'm using symbolic math \$\endgroup\$
    – euraad
    Sep 9, 2022 at 14:09

3 Answers 3

3
\$\begingroup\$

With the two Rs equal to each other and the two Cs equal to each other (and unity gain) that filter is not a Butterworth filter. It is what Horowitz and Hill refer to as a "benign" filter.

That filter has 2 identical real poles placed at the same place (coincident poles) on the S-plane's real axis.

Q = 0.5, damping ratio (zeta) = 1 giving critical damping.

The magnitude response will be down 6 dB at angular frequency, w = 1/(RC).

There are two ways to convert that filter into a Butterworth filter:-

  1. Make the feedback capacitor twice the value of the other capacitor (let's now call the feedback capacitor 2C) in which case the cut-off frequency (-3 dB frequency) becomes

Equation

  1. Keep the two Rs equal to each other and the two Cs equal to each other and add a couple of resistors around the op amp to give the filter a gain of 1.586. In this configuration the cut-off frequency (-3 dB frequency) becomes

Equation

This configuration is known as an equal value filter.

In either case the poles have become a complex conjugate pair with the damping ratio equal to the Q which is equal to 1/(sqrt(2)) = 0.7071

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Very nicely said!! See bottom of my earlier post here that says the same thing to the OP. +1!! \$\endgroup\$
    – jonk
    Sep 10, 2022 at 8:51
2
\$\begingroup\$

Using SymPy, you can find the following for your schematic:

var('r r1 r2 c1 c2 s v1 v2 iout vout vin')
eq1 = Eq( v1/r1 + v1/r2 + v1/(1/s/c2), vin/r1 + v2/r2 + vout/(1/s/c2) )  # KCL v1
eq2 = Eq( v2/(1/s/c1) + v2/r2, v1/r2 )                                   # KCL v2
eq3 = Eq( vout/(1/s/c2), iout + v1/(1/s/c2) )                            # KCL Vout
eq4 = Eq( vout, v2 )                                                # opamp (-)=(+)
ans = tf2( solve( [ eq1, eq2, eq3, eq4 ], [ iout, v1, v2, vout ] )
eq5 = Eq( ans[zeta]*2, sqrt(2) )                          # Butterworth requirement
solve( eq5, [ c1, c2 ] )[0][0].subs( { r1:r, r2:r } )     # find c1 in terms of c2
c2/2

That tells me that \$C_2=2\,C_1\$ for a Butterworth given that \$R_1=R_2=R\$ and with a gain \$K=1\$.

The code for tf2 can be found here.

I highly recommend becoming proficient in Python and SymPy.

\$\endgroup\$
6
  • \$\begingroup\$ By the way. It works very well to say that both C1 and C2 is equal. Even if it's not a butterworth filter. For me, I'm intrested in pressing down the amplitude of the noise. \$\endgroup\$
    – euraad
    Sep 10, 2022 at 9:30
  • \$\begingroup\$ @Heretic You want to be very precise about what you want to achieve. "Pressing down the noise" isn't precise. There's \$\frac1{f}\$ (pink) noise near the DC region for any opamp (choppers are another thing altogether, though.) There's white noise beyond that. Sources include shot noise, Johnson noise, kT/C (same as Johnson noise but for caps), ... What you design should be tailored carefully for what noise you are accepting at the first stage. And the first stage itself should be carefully crafted for the sensor. There's a lot of art here. \$\endgroup\$
    – jonk
    Sep 10, 2022 at 9:35
  • \$\begingroup\$ @Heretic After the 1st stage, once you have let the S/N sensor situation arrive electronically, mostly all you can do later on is trade off bandwidth for S/N. All the important stuff happens before the sensor and at the sensor transducer stage, itself. For example, using optical filters to limit the wavelengths of light that arrive at an optical sensor before it generates an electronic signal. Stuff like that. \$\endgroup\$
    – jonk
    Sep 10, 2022 at 9:36
  • \$\begingroup\$ What I want to achieve is that at some frequency, I want that amplitude to be X as small e.g 0.25 smaller than before. That's my goal. And I don't care if the filter is a bessel, butterworth or chebychev. It's still a second order filter. \$\endgroup\$
    – euraad
    Sep 10, 2022 at 9:41
  • \$\begingroup\$ @Heretic That's probably a different question where we'd (I'd) need a lot more detail about the circumstances and the goals. Not just a comment. In any case, I've provided what you asked -- SymPy code. (No, I don't expect to be selected for that little bit. I'm just saying I've answered your question in comments above.) \$\endgroup\$
    – jonk
    Sep 10, 2022 at 9:43
0
\$\begingroup\$

Well, working from this answer we can see that your transfer function leads to:

\begin{equation} \begin{split} \mathscr{H}\left(\text{s}\right)&=\lim_{\substack{\text{R}_4\space\to\space0\\\text{R}_6\space\to\space\infty}}\frac{\text{R}_4+\text{R}_6}{\text{C}\text{C}\text{R}\text{R}\text{R}_6\text{s}^2+\left(\text{C}\text{R}_6\left(\text{R}+\text{R}\right)-\text{C}\text{R}\text{R}_4\right)\text{s}+\text{R}_6}\\ \\ &=\frac{1}{\left(\text{CRs}\right)^2+2\text{CRs}+1} \end{split}\tag1 \end{equation}

So, we get:

$$\left|\space\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{1}{\sqrt{\left(1-\left(\text{CR}\omega\right)^2\right)^2+\left(2\text{CR}\omega\right)^2}}\tag2$$

And if you want \$\left|\space\underline{\mathscr{H}}\left(\text{j}\cdot2\pi\cdot90\right)\right|=\frac{1}{4}\$ you can choose \$\text{R}\$ and solve for \$\text{C}\$:

$$\frac{1}{4}=\frac{1}{\sqrt{\left(1-\left(\text{CR}\cdot2\pi\cdot90\right)^2\right)^2+\left(2\text{CR}\cdot2\pi\cdot90\right)^2}}\space\implies\space\text{C}=\frac{1}{60\pi\sqrt{3}\text{R}}\tag3$$

Substituting \$(3)\$ into \$(2)\$ gives:

$$\left|\space\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{10800\pi^2}{10800\pi^2+\omega^2}\tag4$$

So at \$\omega=2\pi\cdot90\space\text{rad/sec}\$ we get:

$$20\log_{10}\left(\frac{10800\pi^2}{10800\pi^2+\left(2\pi\cdot90\right)^2}\right)=-20\log_{10}\left(4\right)\approx-12.0412\space\text{dB}\tag5$$


In general \$0<\text{n}<1\$:

$$\text{n}=\frac{1}{\sqrt{\left(1-\left(\text{CR}\omega_0\right)^2\right)^2+\left(2\text{CR}\omega_0\right)^2}}\space\implies\space\text{C}=\frac{1}{\text{R}\omega_0}\cdot\sqrt{\frac{1}{\text{n}}-1}\tag6$$

So, we get:

$$\left|\space\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{\text{n}\omega_0^2}{\left(1-\text{n}\right)\omega^2+\text{n}\omega_0^2}\tag7$$

\$\endgroup\$
8
  • 1
    \$\begingroup\$ I like your answer. I will study it. \$\endgroup\$
    – euraad
    Sep 9, 2022 at 14:25
  • \$\begingroup\$ Jan your answer is based on a sallen key filter with gain (a different circuit). That is not what the question asks for. \$\endgroup\$
    – Andy aka
    Sep 9, 2022 at 14:30
  • \$\begingroup\$ @Heretic thanks! Take a look at my edit. \$\endgroup\$ Sep 9, 2022 at 14:31
  • 2
    \$\begingroup\$ Jan! Your math is correct, but why does my bodediagram not show the correct db Gain? \$\endgroup\$
    – euraad
    Sep 9, 2022 at 14:39
  • \$\begingroup\$ @Heretic have you plot \$20\log_{10}\left(\text{transfer function}\right)\$? \$\endgroup\$ Sep 9, 2022 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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