# Analysing a band pass sallen key filter

I'm trying to understand the transfer function of the band pass sallen key filter, which looks like:

With the following circuit:

How can I analyse it to get the transfer function? Thanks for any help.

• How good at algebra are you? Where did you fall-down in your analysis? Commented Mar 8, 2018 at 10:30
• @Andyaka My algebra is pretty good. But I do not understand the way to proceed to end up with the transfer function.
– jopi
Commented Mar 8, 2018 at 10:37
• Have you thought about something simpler to dirty your hands on i.e. just making the circuit unity gain and solving for Rs and Cs? Maybe even just a cascade of two RC filters? In other words hone your skills on something simpler. Nobody here is going to deliver this proof because of the work involved and the scant return of an upvote or two. Commented Mar 8, 2018 at 10:41
• @Andyaka No, in order to proceed in my work I need to know how the transfer function is find.
– jopi
Commented Mar 8, 2018 at 10:42
• @jopi: Do you know nodal analysis? The circuit has 5 nodes so you can write 5 equations and one more equation that V+ = V- and then solve that. Commented Mar 8, 2018 at 11:49

You can use modified nodal analysis to solve for all unknown node voltages and unknown currents. Once you get the node voltage, you can find the transfer function. For the analysis, I denote node and current as in the picture below.

Now you can write KCL for every node and a constraint by OpAmp.

You can get 7 equations:

Then you can solve 7 equations to get all unknown voltages and unknown currents. Finally transfer function is just V5/V1.

• What is I_oa????
– jopi
Commented Mar 8, 2018 at 12:53
• Ioa is current flowing into terminal 5 of OpAmp as I denoted it the picture. Commented Mar 8, 2018 at 12:56
• Is that zero in this case?
– jopi
Commented Mar 8, 2018 at 12:57
• No, input current of OpAmp is zero but not the output Ioa. Commented Mar 8, 2018 at 13:01
• Did you see my equation for node 5 above? Solve it yourself. I can not afford my time more. Commented Mar 8, 2018 at 13:06

General hints (works not only for this particular configuration):

Do following steps in $s$-domain:

• set up equation vor $v_+$ (pos. input of OpAmp) as expression of $v_{in}$ and $v_{out}$.
• set up equation vor $v_-$ (neg. input of OpAmp) as expression of $v_{out}$.
• solve the equation $v_+ = v_-$ for $v_{out}$ (e.g. by nodal analysis or by network transformations)
• plug in the resulting expression in definition of $H(s)$:
$H(s) = \frac{v_{out}}{v_{in}}$
The resulting expression won't contain $v_{in}$ (or $v_{out}$ or $v_{aux}$) any more but will be just an expression of the parameters $R_1$, $R_2$, $R_f$, .., $C_1$, .. and the independent variable $s$.

You can use symbolical math tools, e.g. sympy package for Python, Maple, Mathematica...

Here is a python script doing the algebra (using sympy); not sure though if correct:

# deriving the transfer function of a Sallen-Key band pass filter

from sympy import Symbol, symbols, solve, collect

s = Symbol('s')

def Xc(C): global s; return 1 / (s * C)

Vin, Vout, Vaux = symbols('Vin Vout Vaux')
R1, R2, C1, C2, Rf, Ra, Rb = symbols('R1 R2 C1 C2 Rf Ra Rb')
X1, X2 = Xc(C1), Xc(C2)

# get expression for Vaux by solving KCL in node_aux:
Vaux_expression = solve(    (Vin  - Vaux) / R1
+ (Vout - Vaux) / Rf
- Vaux  / X1
- Vaux  / (X2 + R2),
Vaux)[0]

Vpos = Vaux_expression * R2 / (X2 + R2) # voltage at pos. input of OpAmp
Vneg = Vout * Ra / (Ra + Rb)            # voltage at neg. input of OpAmp

# get expression for Vout by solving equation Vneg = Vpos for Vout
Vout_expression = solve(Vpos - Vneg, Vout)[0]

# get transfer function H(s) by defining formula:
H = Vout_expression / Vin
H = collect(H, s)
print H


Result: C2*R2*Rf*s*(Ra + Rb)/(C1*C2*R1*R2*Ra*Rf*s**2 + R1*Ra + Ra*Rf + s*(C1*R1*Ra*Rf - C2*R1*R2*Rb + C2*R1*Ra*Rf + C2*R2*Ra*Rf))

• Thanks for your answer, but the downside is I know these steps but I do not know how to derive the equations for $v_+$ and $v_-$ :(
– jopi
Commented Mar 8, 2018 at 11:33
• Well at least for $v_{-}$ it is very easy: $v_{-} = v_{out} \frac{R_a}{R_a + R_b}$. For $v_{+}$ it is much more complicated but it can be done. It's "just" combination of series/parallel and voltage divider circuits and using $X_C=\frac{1}{sC}$.
– Curd
Commented Mar 8, 2018 at 11:37
• For $v_-$ it is indeed simple. But can you help me with $v_+$?
– jopi
Commented Mar 8, 2018 at 11:42
• Try to model the node feed via $R_1$, $C_1$, $R_f$ as a Thevenin voltage source. What would be its Thevenin voltage (as expression of $v_{in}$ and $v_{out}$) and its Thevenin resistance (actually impedance in s-domain)? If you got that it's one more (but simple) step to find an expression for $v_{+}$.
– Curd
Commented Mar 8, 2018 at 11:47
• I think that I can write (for the most left node): $$i_{node}=i_{R1}+i_{C1}+i_{C2}+i_{Rf}$$
– jopi
Commented Mar 8, 2018 at 11:51

This filter can be analyzed using the fast analytical circuits techniques or FACTs. The principle is to determine the time constants of the circuit in two different configurations: when the excitation is reduced to 0 V and with a nulled output when the excitation is back.

Reducing the excitation to 0 V, means replacing the input source $V_{in}$ by a short circuit. Then, "look" at the resistance $R$ offered by the energy-storing elements (the caps) to form time constants, $\tau_1=RC_1$ and $\tau_2=RC_2$. The below drawings illustrate this principle:

Using these two drawings, you determine the following time constants:

$\tau_1=C_1(R_1||R_f)$

$\tau_2=C_2(\frac{k_1(R_1R_2+R_1R_f+R_2R_f)-R_1R_2}{k_1(R_1+R_f)})$

$b_1=\tau_1+\tau_2$

Then, you set capacitor 1 in its high-frequency state (a short circuit) and determine the resistance $R$ looking into $C_2$'s terminals:

You have $\tau_{12}=C_2R_2$ and $b_2=\tau_1\tau_{12}$

Finally, you determine the gain $H^2$ when capacitor $C_2$ is a short circuit:

The complete transfer function is determined according to $H(s)=\frac{sH^2\tau_2}{1+sb_1+s^2b_2}$

However, even if this expression is mathematically correct, you have zero insight on the plateau gain $H_{MB}$ and the tuning frequency which are truly the design goals. You need to rework the formula according to the following low-entropy format: $H(s)=H_{MB}\frac{1}{1+(\frac{\omega_0}{s}+\frac{s}{\omega_0})Q}$. This is what the following Mathcad sheets show and compare the various responses:

So the point is not just write a transfer function linking $V_{out}$ to $V_{in}$ but more rearranging the result in a meaningful form from which you gain insight and can design for a certain goal in tuning frequency and quality factor: this is all what FACTs are all about.

There are really only two nodes that need exercising. All others are defined by node b. The input node node is defined by the input voltage source.

simulate this circuit – Schematic created using CircuitLab

From a comment:>My algebra is pretty good. But I do not understand the way to proceed to end up with the transfer function.

Node a: Apply KCL.

$$\left(\frac{1}{R_{1}}+\frac{1}{R_{f}}+C_{1}s+C_{2}s\right)V_{a}(s)-\frac{1}{R_{f}}V_{o}(s)-C_{2}sV_{b}(s)=\frac{1}{R_{1}}V_{i}(s)\tag{1}$$

Node b: Apply KCL.

$$\left(\frac{1}{R_{2}}+C_{2}s\right)V_{b}(s)=C_{2}sV_{a}(s)$$

Solve for $$\V_{a}\$$

$$\left(\frac{1}{R_{2}C_{2}s}+1\right)V_{b}(s)=V_{a}(s)\tag{2}$$

Substitute (2) into (1)

$$\left(\frac{1}{R_{1}}+\frac{1}{R_{f}}+C_{1}s+C_{2}s\right)\left(\frac{1}{R_{2}C_{2}s}+1\right)V_{b}(s)-\frac{1}{R_{f}}V_{o}(s)-C_{2}sV_{b}(s)=\frac{1}{R_{1}}V_{i}(s)\tag{3}$$

From a comment:>but I do not know how to derive the equations for v+ and v−

Let $$\K=1+\frac{R_{b}}{R_{a}}\$$. Then, $$\V_{o}(s)=KV_{b}(s)\$$. Substitute into (3).

Notice that $$\v-=v+=v_{b}\$$

$$\left(\frac{1}{R_{1}}+\frac{1}{R_{f}}+C_{1}s+C_{2}s\right)\left(\frac{1}{R_{2}C_{2}s}+1\right)V_{o}(s)-\frac{K}{R_{f}}V_{o}(s)-C_{2}sV_{o}(s)=\frac{K}{R_{1}}V_{i}(s)\tag{4}$$

I leave the algebra to you to simplify into the form shown in the OP.