0
\$\begingroup\$

I designed a basic active band pass filter and used these equations to come up with a center frequency of 29.9 kHz:

$$f_0 = \frac{1}{2\pi\sqrt{(R_1||R_2)*R_2*R_3*C_1*C_2}}$$

In PSpice, it looks like the center frequency is almost 36 kHz.

Did I use the wrong equations to calculate the center frequency?

Per @Sphero's recommendation, this is what the waveform looks like:

\$\endgroup\$
8
  • 1
    \$\begingroup\$ I'm not going to check your calculations (at least right now) but maybe try simulating it with a better op-amp model and higher supply voltages. 30kHz is pretty high for a 741 (look at all that required gain!) and +/-5V is right at the minimum. Something like an AD8034 off +/-10V. And look at the output in a transient analysis at the center of the passband before trusting the AC analysis. \$\endgroup\$ Dec 8, 2021 at 1:52
  • \$\begingroup\$ @SpehroPefhany - huh, so it's just the operational amplifier causing the problem.. Interesting. What equation should I be looking at to see the required gain? \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 2:07
  • \$\begingroup\$ I'm just eyeballing the ratios of your R3 (and R1) to R2- it needs a lot of gain to just output the same as the input, let alone 2x. \$\endgroup\$ Dec 8, 2021 at 2:09
  • 1
    \$\begingroup\$ Oh that makes much more sense. I wonder why my university loves to use the archaic LM741 for everything.. @SpehroPefhany \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 2:13
  • \$\begingroup\$ Well, it shows you limitations of a real op-amp, which is valuable. The AD8034, of course, would also show similar issues, however at maybe 50x the frequency of this example. \$\endgroup\$ Dec 8, 2021 at 2:43

4 Answers 4

3
\$\begingroup\$

Here is the result if you follow my comment above:

I'm not going to check your calculations (at least right now) but maybe try simulating it with a better op-amp model and higher supply voltages. 30kHz is pretty high for a 741 (look at all that required gain!) and +/-5V is right at the minimum. Something like an AD8034 off +/-10V. And look at the output in a transient analysis at the center of the passband before trusting the AC analysis.

enter image description here

Pretty much bang-on.

\$\endgroup\$
3
  • \$\begingroup\$ Sorry, for the trivial question, but what is the second line representing? \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 2:14
  • \$\begingroup\$ @GenoC The second trace? Phase. \$\endgroup\$ Dec 8, 2021 at 2:16
  • 1
    \$\begingroup\$ Thank you very much. \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 2:20
2
\$\begingroup\$

However, in Pspice it looks like the center frequency is almost 36 KHz. Did I use the wrong equations to calculate the center frequency?

Your calculations assume an ideal op amp. In practice the center frequency should be lower due to the LM741's limited bandwidth.

However in your case it's higher because you have the inputs swapped around. In AC analysis this 'works' because Pspice calculates frequency response based on the initial operating point and doesn't consider transient effects. A transient analysis will show the operating point rapidly changing until the output hits a supply rail, due to the positive feedback through R3.

\$\endgroup\$
1
  • \$\begingroup\$ The datasheet for a 53 years old 741 opamp shows that it has trouble above 9KHz. \$\endgroup\$
    – Audioguru
    Dec 8, 2021 at 17:25
1
\$\begingroup\$

Try doing a transient analysis. You'll probably find your output slammed in to one of the rails since the opamp inputs are flipped (positive input goes to ground).

\$\endgroup\$
4
  • \$\begingroup\$ That's not a transient analysis. If you're referring to the numbers on the schematic then they are simply the operating point, as calculated prior to the .AC analysis. \$\endgroup\$ Dec 8, 2021 at 8:43
  • \$\begingroup\$ @aconcernedcitizen - they are bias voltage and current points. \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 8:53
  • \$\begingroup\$ @GenoC Yes, and they're part of the operating point calculations. \$\endgroup\$ Dec 8, 2021 at 8:54
  • \$\begingroup\$ Yes, I was just trying to point that out, @aconcernedcitizen. \$\endgroup\$
    – Geno C
    Dec 8, 2021 at 8:55
-1
\$\begingroup\$

First, I will present a method that uses Mathematica to solve this problem. When I was studying this stuff I used the method all the time (without using Mathematica of course).

Well, we are trying to analyze the following opamp-circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

When we use and apply KCL, we can write the following set of equations:

$$ \begin{cases} \text{I}_1=\text{I}_2+\text{I}_3+\text{I}_4\\ \\ 0=\text{I}_3+\text{I}_4+\text{I}_5 \end{cases}\tag1 $$

When we use and apply Ohm's law, we can write the following set of equations:

$$ \begin{cases} \text{I}_1=\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}\\ \\ \text{I}_2=\frac{\text{V}_1}{\text{R}_2}\\ \\ \text{I}_3=\frac{\text{V}_1-\text{V}_2}{\text{R}_3}\\ \\ \text{I}_4=\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ \text{I}_3=\frac{\text{V}_2-\text{V}_3}{\text{R}_5} \end{cases}\tag2 $$

Now, we can put equations \$(1)\$ into \$(2)\$ to get:

$$ \begin{cases} \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{R}_2}+\frac{\text{V}_1-\text{V}_2}{\text{R}_3}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ 0=\frac{\text{V}_1-\text{V}_2}{\text{R}_3}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}+\text{I}_5\\ \\ \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{R}_2}+\frac{\text{V}_2-\text{V}_3}{\text{R}_5}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ 0=\frac{\text{V}_2-\text{V}_3}{\text{R}_5}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}+\text{I}_5 \end{cases}\tag3 $$

Now, using an ideal opamp, we know that:

$$\text{V}_+=\text{V}_-=\text{V}_2=0\space\text{V}\tag4$$

So, we can rewrite \$(3)\$ as follows:

$$ \begin{cases} \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{R}_2}+\frac{\text{V}_1}{\text{R}_3}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ 0=\frac{\text{V}_1}{\text{R}_3}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}+\text{I}_5\\ \\ \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{R}_2}-\frac{\text{V}_3}{\text{R}_5}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ 0=\text{I}_5-\frac{\text{V}_3}{\text{R}_5}+\frac{\text{V}_1-\text{V}_3}{\text{R}_4} \end{cases}\tag5 $$

Hence, we can solve for the transfer function:

$$\mathcal{H}:=\frac{\text{V}_3}{\text{V}_\text{i}}=-\frac{\text{R}_2\text{R}_4\text{R}_5}{\text{R}_1\text{R}_2\left(\text{R}_3+\text{R}_4+\text{R}_5\right)+\text{R}_3\text{R}_4\left(\text{R}_1+\text{R}_2\right)}\tag6$$

Where I used the following Mathematica-code:

In[1]:=Clear["Global`*"];
V2 = 0;
FullSimplify[
 Solve[{I1 == I2 + I3 + I4, 0 == I3 + I4 + I5, I1 == (Vi - V1)/R1, 
   I2 == V1/R2, I3 == (V1 - V2)/R3, I4 == (V1 - V3)/R4, 
   I3 == (V2 - V3)/R5}, {I1, I2, I3, I4, I5, V1, V3}]]

Out[1]={{I1 -> ((R3 R4 + R2 (R3 + R4 + R5)) Vi)/(
   R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)), 
  I2 -> (R3 R4 Vi)/(R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)), 
  I3 -> (R2 R4 Vi)/(R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)), 
  I4 -> (R2 (R3 + R5) Vi)/(
   R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)), 
  I5 -> -((R2 (R3 + R4 + R5) Vi)/(
    R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5))), 
  V1 -> (R2 R3 R4 Vi)/(R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)), 
  V3 -> -((R2 R4 R5 Vi)/(
    R1 R3 R4 + R2 R3 R4 + R1 R2 (R3 + R4 + R5)))}}

My equation was also confirmed using LTspice.


When we want to apply the derivation from above to your circuit we need to use Laplace transform (I will use lower case function names for the functions that are in the (complex) s-domain, so \$\text{y}\left(\text{s}\right)\$ is the Laplace transform of the function \$\text{Y}\left(t\right)\$):

  • $$\text{R}_3=\frac{1}{\text{sC}_1}\tag7$$`
  • $$\text{R}_4=\frac{1}{\text{sC}_2}\tag8$$

So, we can rewrite the transfer function as:

$$\mathscr{H}\left(\text{s}\right)=-\frac{\text{R}_2\cdot\frac{1}{\text{sC}_2}\cdot\text{R}_5}{\text{R}_1\text{R}_2\left(\frac{1}{\text{sC}_1}+\frac{1}{\text{sC}_2}+\text{R}_5\right)+\frac{1}{\text{sC}_1}\cdot\frac{1}{\text{sC}_2}\cdot\left(\text{R}_1+\text{R}_2\right)}=$$ $$-\frac{\text{C}_1\text{R}_2\text{R}_5\text{s}}{\text{C}_1\text{C}_2\text{R}_1\text{R}_2\text{R}_5\text{s}^2+\text{R}_1\text{R}_2\left(\text{C}_1+\text{C}_2\right)\text{s}+\text{R}_1+\text{R}_2}\tag9$$

Now, when working with sinusoidal signals we can use \$\text{s}:=\text{j}\omega\$ (where \$\text{j}^2=-1\$ and \$\omega=2\pi\text{f}\$ with \$\text{f}\$ is the frequency of the input signal in Hertz). So, we get:

$$\underline{\mathscr{H}}\left(\text{j}\omega\right)=-\frac{\text{C}_1\text{R}_2\text{R}_5\text{j}\omega}{\text{C}_1\text{C}_2\text{R}_1\text{R}_2\text{R}_5\left(\text{j}\omega\right)^2+\text{R}_1\text{R}_2\left(\text{C}_1+\text{C}_2\right)\text{j}\omega+\text{R}_1+\text{R}_2}=$$ $$-\frac{\text{C}_1\text{R}_2\text{R}_5\omega\text{j}}{\text{R}_1+\text{R}_2-\text{C}_1\text{C}_2\text{R}_1\text{R}_2\text{R}_5\omega^2+\text{R}_1\text{R}_2\left(\text{C}_1+\text{C}_2\right)\omega\text{j}}\tag{10}$$

So, the absolute value if given by:

$$\left|\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{\text{C}_1\text{R}_2\text{R}_5\omega}{\sqrt{\left(\text{R}_1+\text{R}_2-\text{C}_1\text{C}_2\text{R}_1\text{R}_2\text{R}_5\omega^2\right)^2+\left(\text{R}_1\text{R}_2\left(\text{C}_1+\text{C}_2\right)\omega\right)^2}}\tag{11}$$

We can solve for the maximum using:

$$\frac{\partial\left|\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|}{\partial\omega}=0\space\Longrightarrow\space\hat{\omega}:=\omega=\sqrt{\frac{\text{R}_1+\text{R}_2}{\text{C}_1\text{C}_2\text{R}_1\text{R}_2\text{R}_5}}\tag{12}$$

Now, we can find the cut-off frequencies using:

$$\left|\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{\left|\underline{\mathscr{H}}\left(\text{j}\hat{\omega}\right)\right|}{\sqrt{2}}\space\Longrightarrow\space$$ $$\omega_\pm:=\omega=\frac{\sqrt{\left(\text{C}_1+\text{C}_2\right)^2+\frac{4\text{C}_1\text{C}_2\text{R}_5\left(\text{R}_1+\text{R}_2\right)}{\text{R}_1+\text{R}_2}}\pm\left(\text{C}_1+\text{C}_2\right)}{2\text{C}_1\text{C}_2\text{R}_5}\tag{13}$$

And the bandwidth is given by:

$$\mathcal{B}=\left|\omega_--\omega_+\right|=\frac{\text{C}_1+\text{C}_2}{\text{C}_1\text{C}_2\text{R}_5}\tag{14}$$

And the quality factor of the filter is given by:

$$\mathcal{Q}:=\frac{\hat{\omega}}{\mathcal{B}}=\frac{1}{\text{C}_1+\text{C}_2}\cdot\sqrt{\frac{\text{C}_1\text{C}_2\text{R}_5\left(\text{R}_1+\text{R}_2\right)}{\text{R}_1\text{R}_2}}\tag{15}$$

\$\endgroup\$
2
  • \$\begingroup\$ The OP wants to know why their simulation does not agree with their calculated frequency response, they did not ask for someone to calculate the transfer function, much less the bandwidth or Q. \$\endgroup\$ Dec 13, 2021 at 18:02
  • \$\begingroup\$ @ElliotAlderson So? You're now able to plot the transfer function using my derivation in a mathematical program like Mathematica or Matlab and compare it to the result found by the simulation. \$\endgroup\$ Dec 13, 2021 at 19:32

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.