Operational Amplifier – How to Analyze a Bandstop Filter

active-filteroperational-amplifier

This is a Sallen-Key second order notch filter(bandstop filter) :
enter image description here

This filter attenuates the frequency at \$f_0=\frac{1}{2\pi RC}\$. But I don't get how. How should I analyze this kind of circuit?

What I only understand:

  • At very low frequencies the signal reaches the noninverting input due to caps being open
  • At very high frequencies the signal still reaches the noninverting input due to caps being shorted.
  • Lastly, the R/2 acts as positive feedback

Do analyzation of this circuit needs knowledge of transfer function? (since I haven't taken that subject, yet)

Best Answer

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}_\text{i}=\text{I}_1+\text{I}_2\\ \\ \text{I}_4=\text{I}_1+\text{I}_6\\ \\ \text{I}_2=\text{I}_3+\text{I}_5\\ \\ 0=\text{I}_3+\text{I}_4\\ \\ \text{I}_7=\text{I}_8\\ \\ \text{I}_\text{i}+\text{I}_\text{o}=\text{I}_6+\text{I}_8 \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}_\text{i}-\text{V}_2}{\text{R}_2}\\ \\ \text{I}_3=\frac{\text{V}_2-\text{V}_3}{\text{R}_3}\\ \\ \text{I}_4=\frac{\text{V}_1-\text{V}_3}{\text{R}_4}\\ \\ \text{I}_5=\frac{\text{V}_2}{\text{R}_5}\\ \\ \text{I}_6=\frac{\text{V}_5-\text{V}_1}{\text{R}_6}\\ \\ \text{I}_7=\frac{\text{V}_4}{\text{R}_7}\\ \\ \text{I}_8=\frac{\text{V}_5-\text{V}_4}{\text{R}_8} \end{cases}\tag2 $$

Substitute \$(2)\$ into \$(1)\$, in order to get:

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

Now, using an ideal opamp, we know that:

$$\text{V}_+=\text{V}_-=\text{V}_3=\text{V}_4:=\text{V}_x$$

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

$$ \begin{cases} \text{I}_\text{i}=\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}+\frac{\text{V}_\text{i}-\text{V}_2}{\text{R}_2}\\ \\ \frac{\text{V}_1-\text{V}_x}{\text{R}_4}=\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}+\frac{\text{V}_5-\text{V}_1}{\text{R}_6}\\ \\ \frac{\text{V}_\text{i}-\text{V}_2}{\text{R}_2}=\frac{\text{V}_2-\text{V}_x}{\text{R}_3}+\frac{\text{V}_2}{\text{R}_5}\\ \\ 0=\frac{\text{V}_2-\text{V}_x}{\text{R}_3}+\frac{\text{V}_1-\text{V}_x}{\text{R}_4}\\ \\ \frac{\text{V}_x}{\text{R}_7}=\frac{\text{V}_5-\text{V}_x}{\text{R}_8}\\ \\ \text{I}_\text{i}+\text{I}_\text{o}=\frac{\text{V}_5-\text{V}_1}{\text{R}_6}+\frac{\text{V}_5-\text{V}_x}{\text{R}_8} \end{cases}\tag4 $$

Now, we can solve for the transfer function:

$$\mathcal{H}:=\frac{\text{V}_5}{\text{V}_\text{i}}=\tag5$$

((R1 R4 R5 + R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) (R7 + 
     R8))/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
   R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8)

Where I used the following Mathematica-code:

In[1]:=V3 = Vx;
V4 = Vx;
FullSimplify[
 Solve[{Ii == I1 + I2, I4 == I1 + I6, I2 == I3 + I5, 0 == I3 + I4, 
   I7 == I8, Ii + Io == I6 + I8, I1 == (Vi - V1)/R1, 
   I2 == (Vi - V2)/R2, I3 == (V2 - V3)/R3, I4 == (V1 - V3)/R4, 
   I5 == V2/R5, I6 == (V5 - V1)/R6, I7 == V4/R7, 
   I8 == (V5 - V4)/R8}, {V1, V2, V3, V4, V5, Ii, Io, I1, I2, I3, I4, 
   I5, I6, I7, I8}]]

Out[1]={{V1 -> (((R1 R4 R5 + (R1 + R3 + R4) R5 R6 + 
           R2 (R3 + R4 + R5) R6) R7 + 
        R1 R4 R5 R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  V2 -> (R5 (R1 R4 R7 + (R1 + R2 + R3 + R4) R6 R7 - 
        R1 R3 R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  Vx -> ((R1 R4 R5 + 
        R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) R7 Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  V5 -> ((R1 R4 R5 + R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) (R7 + 
        R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  Ii -> ((((R1 + R2) R4 + (R1 + R2 + R3 + R4) R6) R7 - ((R1 + 
              R2) R3 + (R1 + R2 + R3 + R4) R5) R8) Vi)/(((R3 + 
            R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  Io -> ((R1 (R4 + R6) (R5 - R7) + 
        R1 (R3 + 2 R5) R8 + (R3 + R4) (R5 R6 - R6 R7 + 2 R5 R8) + 
        R2 (R6 (R3 + R5 - R7) - 2 R4 R7 + 
           2 (R3 + R5) R8)) Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I1 -> ((-R2 (R4 + R6) R7 + 
        R2 R3 R8 + (R2 + R3 + R4) R5 R8) Vi)/(-(R1 R4 (R2 + R5) + 
          R2 (R1 + R3 + R4) R6 + (R1 + R2 + R3 + R4) R5 R6) R7 + 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I2 -> ((R1 R4 R7 + (R1 + R3 + R4) R6 R7 - 
        R1 (R3 + R5) R8) Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I3 -> -(((R2 R6 R7 + 
          R1 R5 R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
        R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8)), 
  I4 -> ((R2 R6 R7 + 
        R1 R5 R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I5 -> ((R1 R4 R7 + (R1 + R2 + R3 + R4) R6 R7 - 
        R1 R3 R8) Vi)/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
      R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I6 -> ((-R2 R4 R7 + 
        R2 R3 R8 + (R1 + R2 + R3 + R4) R5 R8) Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I7 -> ((R1 R4 R5 + 
        R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8), 
  I8 -> ((R1 R4 R5 + 
        R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) Vi)/(((R3 + R4) R5 + 
         R2 (R3 + R4 + R5)) R6 R7 + R1 (R2 + R5) (R4 + R6) R7 - 
      R1 (R3 R5 + R2 (R3 + R5)) R8)}}

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}_1=\frac{1}{\text{sC}_1}\tag6$$
  • $$\text{R}_4=\frac{1}{\text{sC}_2}\tag7$$
  • $$\text{R}_5=\frac{1}{\text{sC}_3}\tag8$$

Now, when we look at your circuit, we can make a few more simplifications:

  • $$\text{R}_1=\text{R}_4=\frac{1}{\text{sC}}\tag9$$
  • $$\text{R}_5=\frac{1}{2\text{sC}}\tag{10}$$
  • $$\text{R}_2=\text{R}_3=\text{R}\tag{11}$$
  • $$\text{R}_6=\frac{\text{R}}{2}\tag{12}$$

So, we can rewrite the transfer function as:

$$\mathcal{h}\left(\text{s}\right)=\frac{\left(\text{R}_7+\text{R}_8\right)\left(1+\left(\text{CRs}\right)^2\right)}{\text{R}_7\left(1+\text{sCR}\right)^2-2\text{CR}\text{R}_8\text{s}}\tag{13}$$

Where I used the following Mathematica-code:

In[2]:=R1 = 1/(s*c);
R4 = 1/(s*c);
R5 = 1/(2*s*c);
R2 = R;
R3 = R;
R6 = R/2;
FullSimplify[((R1 R4 R5 + R2 R3 R6 + (R1 + R2 + R3 + R4) R5 R6) (R7 + 
      R8))/(((R3 + R4) R5 + R2 (R3 + R4 + R5)) R6 R7 + 
    R1 (R2 + R5) (R4 + R6) R7 - R1 (R3 R5 + R2 (R3 + R5)) R8)]

Out[2]=((R7 + R8) (1 + c^2 R^2 s^2))/(-2 c R R8 s + R7 (1 + c R s)^2)