1
\$\begingroup\$

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.

enter image description here

The max magnitude is 0. At -3 dB, the frequency is not 100 rad/s

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)```
\$\endgroup\$
6
  • \$\begingroup\$ Are you really using some resistors with 1 Ohm only? I can´t believe it. This cannot work! \$\endgroup\$
    – LvW
    Nov 7, 2023 at 11:03
  • \$\begingroup\$ @LvW Probably should have mentioned that the circuit won't really be built. 1 Ohm was used to make the calculations easier. \$\endgroup\$
    – doedoe
    Nov 7, 2023 at 11:24
  • \$\begingroup\$ OK - I see.....Another point: The last summing opamp has positive feedback only! \$\endgroup\$
    – LvW
    Nov 7, 2023 at 12:19
  • \$\begingroup\$ @LvW Is that bad because it makes the system unstable? \$\endgroup\$
    – doedoe
    Nov 7, 2023 at 12:49
  • \$\begingroup\$ Yes - of course. Each oscillator needs positive feedback - however, each amplifier needs negative feedback. \$\endgroup\$
    – LvW
    Nov 7, 2023 at 13:16

1 Answer 1

0
\$\begingroup\$

My analysis of the filter is as follows (see photo): enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for your work, and I apologize for the confusion. I was wondering why the cut-off frequencies did not match my calculation when I graphed it in MATLAB. I removed the circuit analysis tag. Sorry \$\endgroup\$
    – doedoe
    Nov 7, 2023 at 11:36

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.