I have modelled a band-pass filter, but when I calculate the cut off-frequencies and amplitude it does not match with the bode-plot. I am not able to find out what is wrong, hope that someone might help me out:



simulate this circuit – Schematic created using CircuitLab

(It has am opposite filter on the other side)

  • R1 = 1000

  • C1 = 100e-9

  • R2 = 22000

  • C2 = 33e-12

  • fc_low = 1/(2*np.pi*R1*C1)

  • fc_high = 1/(2*np.pi*R2*C2)

  • mag = -R2/R1

Fc_low = 1,6kHz, Fc_high = 219kHz, Magnitude= -22dB

When I plot the bode-diagram (using python control.bode, see code below) the cut-off frequencies and the magnitude becomes slightly higher than the calculated ones:

  • tau_1 = R1*C1
  • tau_2 = R2*C2
  • tau_3 = R2*C1

G = control.tf([tau_3, 0],[tau_1*tau_2, (tau_1+tau_2),  1])

           0.0022 s
7.26e-11 s^2 + 0.0001007 s + 1

mag, phase, omega = control.bode(G, dB=True, Hz=True, deg=True)

Bode-plot attached, but approx values are as follows: fc_low = 1,05 kHz, fc_high = 250 kHz, magnitude = 28 dB

Why does this not match? Code and bode-plot


2 Answers 2


The gain is 22000/1000 = 22

Gain in dB = 20 log(22) = 26.8 dB

For the frequency cutoffs on the graph, you aren't reading them carefully. Drawing intersecting lines with the correct slope and using the phase where the shift is half (45 deg in this case), is often more accurate.

enter image description here


@Mattman944 Is already correct, I'll just thrown in the numbers that you could have used to verify, yourself, without the error-prone visual inspection:

$$\begin{align} H(s)&=\dfrac{0.0022s}{7.26\cdot 10^{-11}s^2+1.00726\cdot 10^{-4}s+1} \\ {}&=\dfrac{3.03030303030303\cdot 10^7s}{s^2+1387410.468319559s+1.377410468319559\cdot 10^{10}} \\ {}&=K\dfrac{\dfrac{\omega_0}{Q}s}{s^2+\dfrac{\omega_0}{Q}s+\omega_0^2} \\ {}&=K\dfrac{a_1s}{s^2+b_1s+b_0} \\ \Rightarrow \\ \omega_0&=\sqrt{b_0}=117363.132\;\text{kHz} \\ f_0&=\dfrac{\omega_0}{2\pi}=18678.923\;\text{Hz} \\ Q&=\dfrac{\omega_0}{b_1}=0.08459 \\ BW&=\dfrac{b_1}{2\pi}=220813.234\;\text{Hz} \\ K&=\dfrac{a_1}{b_1}=21.841 \\ K_{dB}&=20log_{10}(K)=26.786\;\text{dB} \\ \Rightarrow \\ f_{H,L}&=\dfrac12\left(\sqrt{4f_0^2+BW^2}\pm BW\right)=[22382.165,\;1568.93]\;\text{Hz} \end{align}$$

It's easier to do it when you convert the transfer function into its standard format (there's also the \$\zeta\$ version, but here \$Q\$ works better). Also, the numbers imply an ideal opamp, which is never the case in real life (also tolerances, temperature, parasitic capacitances, especially for that 33 pF, etc).

  • \$\begingroup\$ Thank you! I guess I am reading it wrong then. For me it looks like the magnitude on the plot are about 28, and I thought that on the logaritmic scale you should count 100, 1000 more etc for each line. So this is not how I am supposed to read it then? \$\endgroup\$
    – rawonith
    Jul 8, 2022 at 11:15
  • 1
    \$\begingroup\$ @rawonith A log Y means for each 20 dB (voltage or current, not power, then it's 10 dB) you multiply with 10: 20 dB = 10, 40 dB = 100, 60 dB = 1000, etc. Since you're between 20 and 40 dB, it makes sense that your gain is between 10 and 100. To calculate the linear gain from dB you use \$10^{\text{dB}/20}\$. Try it with the numbers above. \$\endgroup\$ Jul 8, 2022 at 11:23
  • \$\begingroup\$ Now I finally got it. Thank you! :) \$\endgroup\$
    – rawonith
    Jul 8, 2022 at 11:30

Your Answer

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

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