1
\$\begingroup\$

I am trying to calculate the cutoff frequency of a second order passive RC filter with resistors in parallel in the second stage.

The standard formula is \$fc = 1 / (2 * PI * R1 * C1 * R2 * C2)\$

Source: https://www.electronics-tutorials.ws/filter/filter_2.html

For the attached image, this is my formula:

\$fc = 1 / (2 * PI * R1 * C1 * ((R2 * R3) / (R2 + R3)) * C2)\$

I am getting 5.278kHz as result if I calculate it that way.

Unfortunately the result from LTSpice is different.

Does anyone know what is the issue? I think there is an issue with my calculation of the parallel resistors.

Thank you very much in advance!

ltspice

\$\endgroup\$
4
  • 1
    \$\begingroup\$ You are mentioning a "standard formula". Where did you get this "standard" from? \$\endgroup\$
    – LvW
    Mar 22, 2022 at 10:22
  • \$\begingroup\$ I have attached the source and also reformatted the formulas. They came out differently than my initial post. \$\endgroup\$
    – electricar
    Mar 22, 2022 at 10:27
  • 2
    \$\begingroup\$ Sorry - but your formulas are wrong (even from the dimension point of view). Don`t overlook the fact that both RC sections are NOT decoupled - the 2nd stage loads the first one. \$\endgroup\$
    – LvW
    Mar 22, 2022 at 10:59
  • \$\begingroup\$ @LvW Now I see I thought one thing and I did another: I mean to write the denominator coefficient, instead I copied the numerator's. Jonk's answer is how it should have been but it's not, so I botched it (also deleted). Thank you for pointing out the mistake. \$\endgroup\$ Mar 23, 2022 at 9:46

3 Answers 3

8
\$\begingroup\$

Symbolic analysis with KCL

I'll add my own tidbit.

Using the freely available SymPy tool:

var('r1 r2 r3 c1 c2 vin vout vx s')
eq1 = Eq( vx/r1 + vx/(1/s/c1) + vx/r2, vin/r1 + vout/r2 )
eq2 = Eq( vout/r2 + vout/r3 + vout/(1/s/c2), vx/r2 )
tf2( solve( [ eq1, eq2 ], [ vx, vout ] )[vout]/vin )

    {omega: sqrt(r1 + r2 + r3)/(sqrt(c1)*sqrt(c2)*sqrt(r1)*sqrt(r2)*sqrt(r3)),
     zeta: (c1*r1*r2/2 + c1*r1*r3/2 + c2*r1*r3/2 + c2*r2*r3/2)/(sqrt(c1)*sqrt(c2)*sqrt(r1)*sqrt(r2)*sqrt(r3)*sqrt(r1 + r2 + r3)),
     P: [{A: r3/(r1 + r2 + r3), N: 0}]}

Or,

$$\begin{align*}A&=\frac{R_3}{R_1+R_2+R_3}=\frac{10}{111}\approx 0.0901\\\\\omega_{_0}&=\sqrt{\frac{R_1+R_2+R_3}{R_1 R_2 R_3 C_1 C_2}}=1000\sqrt{1110}\approx 33316.6625\\\\\alpha=\zeta\omega_{_0}&=\frac12\left(\frac1{R_1 C_1}+\frac1{R_2 C_1}+\frac1{R_2 C_2}+\frac1{R_3 C_2}\right)=56000\\\\\zeta&=\frac{R_1 R_2 C_1+R_1 R_3 C_1+R_1 R_3 C_2+R_2 R_3 C_2}{2\sqrt{\left(R_1+R_2+R_3\right)R_1 R_2 R_3 C_1 C_2}}=\frac{56}{\sqrt{1110}}\approx 1.681\\\\\frac{V_{_\text{OUT}}}{V_{_\text{IN}}} &= A\frac{\omega_{_0}^2}{s^2+2\zeta\omega_{_0}s+\omega_{_0}^2}\end{align*}$$

This is over-damped and the voltage gain near DC will be \$20\log_{10}\left(A\right)\approx -20.91\:\text{dB}\$. At \$\omega=\omega_{_0}\$, where the phase is \$-90^\circ\$, expect the voltage gain to be \$20\log_{10}\left(\frac{A}{2\,\zeta}\right)\approx -31.44\:\text{dB}\$.

Spice Validation

Now, let's use LTspice:

enter image description here

The bottom plot is for your schematic. The middle plot is for the Laplace transform, which we believe represents your schematic. The top plot layers both plots on top of each other so that you can see they match up, perfectly.

Let's check the values, now. First, jump right over to \$-90^\circ\$ and check the voltage gain there:

enter image description here

Next, check things close towards \$0^\circ\$:

enter image description here

Everything just as predicted.

KCL and algebraic manipulation works just fine for s-space and there's nothing wrong with LTspice, either.

-3 dB (Down) Point

If interested in specifically finding the point where it is \$-3\:\text{dB}\$, then solve for:

$$\begin{align*} \bigg|H(\omega)\bigg|&=\sqrt{H\left(s\rightarrow j\omega\right)\cdot H\left(s\rightarrow-j\omega\right)}=\frac{A}{\sqrt{2}} \\\\ \frac{A}{A\sqrt{2}\cdot\omega_{_0}^2} &=\frac1{\sqrt{\left[\left(j\omega\right)^2+2\zeta\omega_{_0}\left(j\omega\right)+\omega_{_0}^2\right]\cdot\left[\left(-j\omega\right)^2+2\zeta\omega_{_0}\left(-j\omega\right)+\omega_{_0}^2\right]}} \\\\ \sqrt{2}\cdot\omega_{_0}^2&=\sqrt{\left[\left(\omega_{_0}^2-\omega^2\right)+j\,2\zeta\omega_{_0}\omega\right]\cdot\left[\left(\omega_{_0}^2-\omega^2\right)-j\,2\zeta\omega_{_0}\omega\right]} \\\\ &=\sqrt{\left(\omega_{_0}^2-\omega^2\right)^2+\left(2\zeta\omega_{_0}\omega\right)^2} \end{align*}$$

I started out, above, with \$A\$ in the numerator. That's because we are looking for \$-3\:\text{dB}\$ down from the DC gain of \$A\$. Not an absolute number, but one that is relative to the DC starting point.

At this point, there are two important simplifications to consider before proceeding.

One is to normalize \$\omega\$ by creating a new unitless variable (always a good idea) by dividing it by \$\omega_{_0}\$ such that \$\stackrel{.}{\omega}=\frac{\omega}{\omega_{_0}}\therefore \omega = \omega_{_0} \stackrel{.}{\omega}\$. This will allow us to get rid of the annoying constant \$\omega_{_0}\$, as you'll see below.

The other one is to create yet another unitless variable, \$\stackrel{..}{\omega}=\stackrel{.}{\omega}^2\$. This change of variable allows us to use the quadratic solution formula to solve our equation more readily.

$$\begin{align*} \sqrt{2}\cdot\omega_{_0}^2&=\sqrt{\left(\omega_{_0}^2-\omega^2\right)^2+\left(2\zeta\omega_{_0}\omega\right)^2} \\\\&\text{square both sides},\\\\ 2\,\omega_{_0}^4&=\left(\omega_{_0}^2-\omega^2\right)^2+\left(2\zeta\omega_{_0}\omega\right)^2 \\\\ &=\omega^4 +2\left(2\zeta^2-1\right)\omega_{_0}^2 \omega^2 + \omega_{_0}^4 \\\\&\text{substitute }\omega = \omega_{_0} \stackrel{.}{\omega},\\\\ &=\left(\omega_{_0} \stackrel{.}{\omega}\right)^4 + 2\left(2\zeta^2-1\right)\omega_{_0}^2 \left(\omega_{_0} \stackrel{.}{\omega}\right)^2 + \omega_{_0}^4 \\\\ &=\omega_{_0}^4\, \stackrel{.}{\omega}^4 + 2\left(2\zeta^2-1\right)\omega_{_0}^4\, \stackrel{.}{\omega}^2 + \omega_{_0}^4 \\\\ 2\,\omega_{_0}^4&=\omega_{_0}^4\left( \stackrel{.}{\omega}^4 + 2\left(2\zeta^2-1\right) \stackrel{.}{\omega}^2 + 1\right) \\\\&\text{eliminate annoying }\omega_{_0},\\\\ 2&=\stackrel{.}{\omega}^4 + 2\left(2\zeta^2-1\right) \stackrel{.}{\omega}^2 + 1 \\\\&\text{substitute }\stackrel{..}{\omega}=\stackrel{.}{\omega}^2,\\\\ 2&=\stackrel{..}{\omega}^2 + 2\left(2\zeta^2-1\right) \stackrel{..}{\omega} + 1 \\\\&\therefore \\\\\stackrel{..}{\omega}^2 + 2\left(2\zeta^2-1\right) \stackrel{..}{\omega} -1 &= 0 \end{align*}$$

And that's solvable:

$$\begin{align*} \stackrel{..}{\omega}\:&=\frac{-2\left(2\zeta^2-1\right)\pm\sqrt{2^2\left(2\zeta^2-1\right)^2+4}}{2} \\\\ &=1-2\zeta^2\pm\sqrt{\left(2\zeta^2-1\right)^2+1} \end{align*}$$

Note that this solution effectively states that \$\zeta\$ is all that is needed to figure this out. \$\omega_{_0}\$ is nowhere to be seen! This makes sense, too, because the behavior of all 2nd order low-pass filters boil down to the behavior of this standardized critical equation: \$s^2+2\zeta s+1\$.

The only difference between a filter where \$\omega_{_0}=1\$ and where \$\omega_{_0}\$ is some other value is the frequency scale. The shape is entirely determined by \$\zeta\$ and only by \$\zeta\$. And it is only the shape that matters when determining these cross-over points. Not the frequency shift.

So, that solution equation only has one variable, \$\zeta\$. A result we should have expected since the shape depends solely upon \$\zeta\$. What other choice is possible?

With your value of \$\zeta\$ you would find that \$\stackrel{..}{\omega}\,\approx 0.1063\$. This means that \$\stackrel{.}{\omega}\,=\sqrt{\stackrel{..}{\omega}}\,\approx 0.3260\$ and therefore that \$\omega_{{-3\:\text{dB}}}=\omega_{_0}\stackrel{.}{\omega}\,\approx 10862.5\$ or about \$f_{{-3\:\text{dB}}}=1728.83\:\text{Hz}\$.

Spice Validation, -3 dB

Let's check with LTspice:

enter image description here

That also does look about right as \$-23.91\:\text{dB}\$ is \$-3\:\text{dB}\$ down from \$-20.91\:\text{dB}\$.

That's really all there is to it. It seems complicated, at first. But there are a lot of nice simplifications that can be applied. Once you gather up a few basics, the rest becomes much easier.

\$2\zeta^2-1\$

As a recap, if you set \$b=2\zeta^2-1\$ then the final equation is:

$$\begin{align*} \omega_{{-3\:\text{dB}}}\:&=\omega_{_0}\sqrt{-b+\sqrt{b^2+1}} \end{align*}$$

\$b\$ goes to zero when \$\zeta=\frac1{\sqrt{2}}\$. This is right at the point of the maximal flat amplitude! (b cannot get smaller than -1.)

Plotted against \$\zeta\$ on the x-axis, the square-root factor above has this shape:

enter image description here

From above, it's easy to see that as \$\zeta\to \infty\$ (very highly damped) \$\omega_{{-3\:\text{dB}}}\$ tends towards DC, which is to be expected. And as \$\zeta\to 0\$ (high-Q, no energy loss) that the factor reaches its highest value of \$1.553774\$ or slightly more than 55% beyond \$\omega_{_0}\$.

The inverse of the zoomed-up box above looks like this:

enter image description here

The following chart only applies when there is under-damped peaking. So it only covers the cases where \$0\le\zeta\le \frac1{\sqrt{2}}\$, or where \$-1\le b\le 0\$:

enter image description here

The green curve's x-axis is \$\stackrel{.}{\omega}\$. (A value of 1 means that \$\omega=\omega_{_0}\$.) You can enter in from the left, selecting the peaking in dB, and then go across to find where that value hits the green curve. The x-axis value below is then the % of \$\omega_{_0}\$ where that peaking occurs.

The red curve's x-axis is the % of the range, \$0\le\zeta\le \frac1{\sqrt{2}}\$, where that same peaking occurs.

So you can get both pieces of information, quickly.

For example, suppose you wanted \$3\:\text{dB}\$ peaking and you wanted the peak to occur right at \$f_{_\text{PK}}=1\:\text{kHz}\$. You'd enter at the left side at \$3\:\text{dB}\$ and find, from the green curve, that this occurs at about 84%. So, this means your design should specify \$f_{_0}=\frac1{84\%}\approx 1.190\:\text{kHz}\$. Also, from the red curve, find this occurs at 54.2%. This means the damping factor will be \$\zeta=\frac{54.2%}{\sqrt{2}}\approx 0.383\$.

Spice Validation, Yet Again

Let's run a validation of what we just computed:

enter image description here

Yup. Looks nail-on (I added a few digits of extra precision using the fuller formulas in order to help out Spice's math.)

\$b\$ and Peaking

It's good to stop for a moment and look back over the path of getting here.

If you look back and above here, you may observe that:

$$\begin{align*} \frac1{\big|H(\omega)\big|^2}&=\stackrel{..}{\omega}^2 + 2\left(2\zeta^2-1\right) \stackrel{..}{\omega} + 1 \\\\ &=\stackrel{..}{\omega}^2 + 2 \,b \stackrel{..}{\omega} + 1 \end{align*}$$

Suppose we want to find the peak. (Of course, this assumes that there is a peak.) Well, this just means taking the derivative with respect to \$\stackrel{..}{\omega}\$ and solving:

$$\begin{align*} \text{d}\left(\frac1{\big|H(\omega)\big|^2} \right.&=\left.\stackrel{..}{\omega}^2 + 2 \,b \stackrel{..}{\omega} + 1\vphantom{\frac1{\big|H(\stackrel{..}{\omega})\big|^2}}\right) \\\\ \text{d}\left(\frac1{\big|H(\omega)\big|^2} \right)&=\text{d}\left(\stackrel{..}{\omega}^2 + 2 \,b \stackrel{..}{\omega} + 1\right) \\\\&\therefore\\\\ 0&=2\,\stackrel{..}{\omega}_{_\text{PK}} + 2 \,b \\\\ \stackrel{..}{\omega}_{_\text{PK}}\:&=-b \end{align*}$$

So \$b\$ has some significance, doesn't it? It's not just made up as a replacement variable. It appears to carry some significance with respect to all 2nd order low-pass transfer functions, as I'll show a little later. But for now, in the case of pushing transfer functions, it indirectly tells us where the peak will be.

It follows that \$\stackrel{.}{\omega}_{_\text{PK}}\:=\sqrt{-b}\$ and that \$\omega_{_\text{PK}}=\omega_{_0}\stackrel{.}{\omega}_{_\text{PK}}=\omega_{_0}\sqrt{-b}\$.

Let's plug that back into our magnitude formula:

$$\begin{align*} \big|H\left(\omega_{_\text{PK}}\right)\big|^2&=\frac1{\stackrel{..}{\omega}_{_\text{PK}}^2 + 2 \,b \,\stackrel{..}{\omega}_{_\text{PK}} + 1} \\\\ &=\frac1{\left(-b\right)^2 + 2 \,b \,\left(-b\right) + 1} \\\\ &=\frac1{1-b^2} \end{align*}$$

That's very interesting! One can compute an under-damped peaking magnitude from such a simple formula??? Seriously?

Well, suppose \$\zeta\approx 0.383\$ (see above.) Then we'd compute \$\big|H\left(\omega_{_\text{PK}}\right)\big|^2=\frac1{1-\left(2\,\cdot\, 0.383^2-1\right)^2}\approx 2\$! (Remember, we'd gotten that value by using \$3\:\text{dB}\$ on the chart.) Just as we'd expect!

So yes, it's that easy. So long as, of course, \$\sqrt{-b}\$ isn't imaginary. In short, so long as \$-1\le b\le 0\$. This emphasizes the significance of that range for \$b\$, which is everything below the point of maximal flat amplitude!

\$b\$ represents a useful concept.

Bracketing the Peak and More

If,

$$\begin{align*} \big|H(\omega)\big|^2&=\frac1{\stackrel{..}{\omega}^2 + 2\,b \stackrel{..}{\omega} + 1} \end{align*}$$

Then from the quadratic formula:

$$\begin{align*} \stackrel{..}{\omega}&=-b\pm\sqrt{b^2+\frac1{\big|H(\omega)\big|^2}-1} \\\\ \stackrel{.}{\omega}&=\sqrt{-b\pm\sqrt{b^2+\frac1{\big|H(\omega)\big|^2}-1}} \\\\ \omega&=\omega_{_0}\sqrt{-b\pm\sqrt{b^2+\frac1{\big|H(\omega)\big|^2}-1}} \end{align*}$$

This works both for peaked and non-peaked cases. But let's look at our peaked case...

Given the earlier Spice run with \$\omega_{_0}=1.1899\:\text{kHz}\$ and \$\zeta=0.383252\$, we'd compute from the above that \$b=-0.70623581\$. Suppose we wanted to find the \$1\:\text{dB}\$ points that surround the \$3\:\text{dB}\$ peak at about 84.04% of \$\omega_{_0}\$ (or right at \$1\:\text{kHz}\$.)

The above formula suggests two values at \$\stackrel{..}{\omega}\,\approx 0.164851239\$ (\$\stackrel{.}{\omega}\,\approx 0.406018767\$ and \$\omega\approx 483.122\:\text{Hz}\$) and \$\stackrel{..}{\omega}\,\approx 1.24762038\$ (\$\stackrel{.}{\omega}\,\approx 1.11696928\$ and \$\omega\approx 1.3291\:\text{kHz}\$).

Let's check Spice again:

enter image description here

Looks like we hit the nail on the head, again. The numbers work out just fine.

Final Notes

Remember that a normalized angular frequency is very helpful in getting rid of nuisances like \$\omega_{_0}\$. For most any analysis, you want to get rid of as much mental noise as you can, so that you can focus better on the meat of the matter at hand. This is almost always a good thing to do, during analysis. You can always convert back when you are done in order to get hard numbers, later.

Also note that a great deal can be done with just a little bit of algebra. Most of the things you may want to know are available if you just sit down for a moment and work through the details.


Personal Note: Perhaps one of the better books to read, if you are new to all of this, is Don Lancaster's 1975 book, "Active Filter Cookbook". It's where I cut my eyeteeth on this subject. And looking backward, I still consider it an excellent segue for anyone new at these things. It uses dated terminology -- for example \$d\$ (which has units) instead of the much more modern \$\zeta\$ (which is unitless.) But the basics are all there... and more. Personally, my experience is that he can come across as surly in direct conversation. But his writing (mixed with artwork when he bothers) is unparalleled. He will always be one of my idols. What he has given to me is more than I can ever hope to repay.

\$\endgroup\$
26
  • 2
    \$\begingroup\$ Nice answer. Thanks for promoting FOSS. \$\endgroup\$ Mar 23, 2022 at 10:45
  • 1
    \$\begingroup\$ Hi jonk, your last plots - very interesting. I think there is a very interesting relation between the two extremas: Damping d=0 and d=1 (double root on the real axis). For d=0 the normalized frequency is w_3dB/wo=1.554 and for d=1 we have w_3dB/wo=0.643=1/1.554. That means: Equal "distance" between the 3dB-frequency and the pole frequency for both cases - however, in one case we have w_3dB>wo and in the other case w_3dB<wo. That means: Two functions (d close to 0, and d=1) with equal 3dB-frequencies will have the same shape (neglecting the steep peak for large d). \$\endgroup\$
    – LvW
    Mar 25, 2022 at 9:12
  • 1
    \$\begingroup\$ Let me say the following: Since more than 30 years I am involved in analog circuits like filters and oscillators. However, I must admit that I have not seen such a mathematical relationship between damping, pole frequency and cutoff frequency - as presented by you. \$\endgroup\$
    – LvW
    Mar 25, 2022 at 9:42
  • 1
    \$\begingroup\$ But b=(2d²-1) ----you have calculated with d only - not d² ! Or am I wrong? \$\endgroup\$
    – LvW
    Mar 25, 2022 at 18:18
  • 1
    \$\begingroup\$ Everything looks good - such things happen from time to time...I know such stupid mistakes... \$\endgroup\$
    – LvW
    Mar 25, 2022 at 20:43
2
\$\begingroup\$
  • Your simulator shows about 1700 Hz as the 3 dB point and this is clearly correct.

  • The first stage has a cut-off of 15.92 kHz and is way higher than the 2nd stage's cut-off (if you regard them as separate circuits).

  • Due to the 2nd stage having a net resistance of R2||R3, it has a cut-off of 1751 Hz and this is dominant over the 1st stage.

  • The 2nd stage barely loads the first stage so, unless you were dealing with minutia, you can ignore its effect and regard the 3 dB point of the whole network as being about 1.7 kHz.

Does anyone know what is the issue? I think there is an issue with my calculation of the parallel resistors.

Your calculation of parallel resistors is correct but your formula for the 3 dB point is incorrect. I have recognized that there is very little loading effect between stages and that one stage (the 2nd stage) is dominant over the other. If you want to go down a math route to calculate it precisely then that's something that you probably need to justify.

\$\endgroup\$
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Find the transfer function for the above network, then test it with real values..

If successful, then substitute R3 with 1/sC1 and R5 with 1/sC2 .

\$\endgroup\$

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.