# Incorrect cutoff frequency using two Sallen-Key filters to build a bandstop filter

I'm currently having trouble troubleshooting my answer. I have to make a bandstop filter that has a cutoff frequency of 100 rad/s, and 10^6 rad/s using two Sallen-Key filters. I made the low and high pass filters parallel and connected them to a summing amplifier. After setting up the equation, I plotted it in MATLAB and got the right trend, but the cut off frequency is wrong by a slim margin. At -3dB, the cut off frequencies are not 100 and 10^6 rad/s, but it's only at -6dB that they are. I don't know if it's my code, or if I'm on the wrong track.

syms Va Vb Vc Vd Ve s Vin Vo

eqn1 = Va-Vin+Va-Vb+((Va-Vb)/(1/(10^(-2)*s)))==0;
eqn2 = (Vb/(1/(10^(-2)*s)))+Vb-Va==0;
eqn3 = ((Vc-Vd)/(1/(10^(-6)*s)))+((Vc-Vin)/(1/(10^(-6)*s)))+Vc-Vd==0;
eqn4 = Vd+((Vd-Vc)/(1/(10^(-6)*s)))==0;
eqn5 = -Vb-Vd-Vo==0;
Va2 = solve(eqn1, Va)
Vb2 = solve(subs(eqn2, Va, Va2), Vb)
Vc2 = solve(eqn3, Vc)
Vd2 = solve(subs(eqn4, Vc, Vc2), Vd)
Vo2 = solve(subs(eqn5, [Vb Vd], [Vb2 Vd2]), Vo)

H = collect(Vo2, Vin)
H = H/Vin
H = collect(H) % (- s^4 - 200*s^3 - 20000*s^2 - 20000000000*s - 10000000000000000)/(s^4 + 2000200*s^3 + 1000400010000*s^2 + 200020000000000*s + 10000000000000000)
num = [-1 -200 -20000 -2000000000 -10000000000000000]
den = [1 2000200 1000400010000 200020000000000 10000000000000000]
H = tf(num, den)
figure(1)
bode(H)$$$$
`
• Are you really using some resistors with 1 Ohm only? I can´t believe it. This cannot work!
– LvW
Nov 7, 2023 at 11:03
• @LvW Probably should have mentioned that the circuit won't really be built. 1 Ohm was used to make the calculations easier. Nov 7, 2023 at 11:24
• OK - I see.....Another point: The last summing opamp has positive feedback only!
– LvW
Nov 7, 2023 at 12:19
• @LvW Is that bad because it makes the system unstable? Nov 7, 2023 at 12:49
• Yes - of course. Each oscillator needs positive feedback - however, each amplifier needs negative feedback.
– LvW
Nov 7, 2023 at 13:16