1
\$\begingroup\$

I tried to find a solution in other threads, and I did find similar topics but nothing really helped me answer my question. I have a circuit, see here:

schematic

simulate this circuit – Schematic created using CircuitLab

A pretty standard inverting active high pass filter I would say. Now, the issue I face is that I'm trying to derive the transfer function and subsequently the gain and match that to my simulation. Most sources I find propose \$H = -\frac{R2}{R1}\$ which obviously doesn't account for the capacitor and makes the whole thing less filtery. My guess is that these sources only refer to the portion of the transfer function where \$Z_c\$ is significantly less than \$Z_{R1}\$, let's say about a factor of 10. Which tracks in my head, but now we get to the tricky part. When I try to get to a transfer function that describes the whole frequency spectrum I run into some trouble. Here's my math:

\begin{eqnarray*} \frac{V_i}{Z_{in}} &=& -\frac{V_o}{Z_{out}} \\ \frac{V_i}{\frac{1}{jwC}+R_1} &=& -\frac{V_o}{R_2} \\ \frac{V_o}{V_i} &=& -\frac{R_2}{\frac{1}{jwC}+R_1} \\ \frac{V_o}{V_i} &=& -\frac{R_2\cdot jwC}{1+R_1 \cdot jwC} \\ \left| \frac{V_o}{V_i} \right| &=& -\frac{R_2 \cdot wC}{\sqrt{1+(R_1 \cdot wC)^2}} \\ \end{eqnarray*}

If I evaluate this at \$150 kHz\$ I get \$ |H| = 0,846 = -1.452 dB \$. Now, when I simulate that I get something a little different at 150 kHz: \$ 0.548 dB\$, see below.

It's also pretty far from the gain only dependent on \$ R_1 \$ and \$R_2\$, which would be \$ |H| = \frac{R_2}{R_1} = 1.181 = 1.445 dB \$. This I can explain though, I think. In the flat frequency response section the simulation DOES show the expected \$1.44dB\$, so I would assume this means that the rolloff just "starts" quite early - since it's only a first order filter - to hit the cutoff of \$ \thicksim 72kHz\$ which would explain why the gain is already lower at \$150 kHz\$.

Anyway, my calculated gain does not match what I see in the simulation so clearly I'm making some kind of mistake here that I'm not realizing. Maybe it's just a stupid math error and when you point it out I'll slap my forehead and say "Duh!". I would be grateful for any input or explanation.

Fig.1 - Bode plot of above filter circuit

EDIT: I figured out my mistake. I somehow mixed up the variables in my calculator and switched the resistor values around. When I plug the correct values into the equation I get the correct result (go figure). Palm > Face

\$\endgroup\$

3 Answers 3

1
\$\begingroup\$

Well, the reactance of the 100 pF input capacitor at 150 kHz is 10.61 kΩ and, this needs to be added to the input resistor (22.1 kΩ) using Pythagoras: -

$$Z_{INPUT} = \sqrt{10.61^2 + 22.1^2}\text{ kohm} = 24.515\text{ kohm}$$

Hence the gain magnitude of the circuit is \$\frac{26.1}{24.515}\$ = 1.0647 = 0.544 dB.

In other words, pretty much what the simulator said.

Anyway, my calculated gain does not match what I see in the simulation so clearly I'm making some kind of mistake here that I'm not realizing.

Maybe you forgot about the input capacitor's reactance?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Well, I thought I did consider C's reactance, see the \$ \frac{1}{jwC} \$ term in my equations. Is that not accurate? Thank you, however, as your comment confirmed my base assumptions were right. I also found my mistake, I bongled the variables in my calculator and used \$ R_1 \$'s value for \$ R_2 \$ and vice versa. Once I fixed that, I got the correct gain. \$\endgroup\$ May 19, 2023 at 11:36
  • \$\begingroup\$ @ElectroBadger ah yes. I read down and saw the formula for H and thought you'd missed the cap \$\endgroup\$
    – Andy aka
    May 19, 2023 at 11:45
  • 1
    \$\begingroup\$ Yeah sorry, now that I read my question again with more critical eyes I did realize it's phrased a bit misleading with the different equations from different sources. \$\endgroup\$ May 19, 2023 at 11:50
1
\$\begingroup\$

If I evaluate this at 150kHz I get |H|=0,846=−1.452dB. Now, when I simulate that I get something a little different at 150 kHz: 0.548dB, see below.

I haven't checked your analysis fully, but just from the statement above I can say that your analysis is wrong.

At 150 kHz C1's impedance will be \$\mathrm{-j/(\omega C)=-j \ 10.61 \ k\Omega}\$, so the total impedance with R1 will be \$\mathrm{|Z_1|=\sqrt{(-j \ 10.61k)^2+(22.1k)^2}=24.5 \ k\Omega}\$. So the gain at 150 kHz is

$$ \mathrm{A_{V-150k}=-\frac{R2}{Z1}=-\frac{26.1k}{24.5k}=-1.0653 \ \frac{V}{V}=0.549 \ dB} $$

So the simulation is correct.

Most sources I find propose H=−R2/R1 which obviously doesn't account for the capacitor and makes the whole thing less filtery. My guess is that these sources only refer to the portion of the transfer function where Zc is significantly less than ZR1, let's say about a factor of 10.

At pass band (i.e. frequencies above or below the cut-off, depending on whether the filter is high-pass or low-pass) the gain will be determined by the resistors only. So, \$\mathrm{A_V=-R2/R1}\$ is valid for frequencies above the cut-off which is set by R1-C1 pair.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, I did consider \$C\$'s reactance, I just mixed up the values for the variables in my calculator and for some reason did not check that first. Your answer did however, clarify some things and helped me to solidify/slightly correct my knowledge. Unfortunately I can't mark two answers as the solution (maybe I can and just don't know how) so Andy gets the vote since he was two minutes faster. \$\endgroup\$ May 19, 2023 at 11:39
0
\$\begingroup\$

It's just an arithmetic error, but don't beat yourself up about it; it took me three goes before I entered it correctly into my calculator. I agree that:

$$ \left| H \right| = \frac{\omega CR_2}{\sqrt{1+(\omega CR_1)^2}} $$

I don't agree with your result of 0.846. Given

$$ \begin{aligned} \omega &= 2 \pi f = 2 \pi \cdot 150kHz = 942 \times 10^3 rad \cdot s^{-1} \\ \\ C &= 100pF \\ \\ R_1 &= 22.1k\Omega \\ \\ R_2 &= 26.1k\Omega \\ \\ \end{aligned} $$

When I plug those values into that equation, I get:

$$ \begin{aligned} \left| H \right| &= 1.065 \\ \\ &= 0.547dB \end{aligned} $$

\$\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.