Nesting Filter in OpAmp NFB Loop

Started by craftyjam, December 19, 2022, 12:26:40 AM

Previous topic - Next topic

craftyjam

Hello,

I was just wondering the proper way to nest a filter in the feedback loop of an op amp. I want to stick a mid notch filter into the NFB to get a mid boost on the output, a la tone leper.

Also if anyone had resources to better understand this sort of design, I would mighty appreciate it.

Here are images of the filter, way I have it set up now, and how the tone leper does it.






craftyjam

To further explain my issue, with the current arangement I'm using, there is serious oscilation when the pot is at max. The only way I can stop oscilation is by increasing R2 in the schematic and sacrificing the center frequency of the filter.

Is there a way to get around this issue without delving head-first into control theory?

amptramp

Is the op amp an LM353 or an LF353?  I only have information for an LF353.

You might benefit from a resistor of about 470 ohms to 1 K at the output of the second op amp in series with C4 in order to isolate the amp from the output cable capacitance.  The cable capacitance can cause oscillation when the volume control is turned all the way up.

R2 should not be necessary but this is one of those amplifiers where exceeding the common-mode input range can cause reversal of the output or the output to go high.

You might need a small capacitor across R5 to avoid having the capacitance of the boost control to ground cause an undesirable phase lag.  Also, switching the position of R4 and the boost pot may reduce the capacitance to ground sufficiently to avoid capacitance to ground from the pot track to ground.

Rob Strand

#3
QuoteTo further explain my issue, with the current arangement I'm using, there is serious oscilation when the pot is at max. The only way I can stop oscilation is by increasing R2 in the schematic and sacrificing the center frequency of the filter.

Is there a way to get around this issue without delving head-first into control theory?
There's no way to quantify the problem without analysing it.  However, the thing that causes oscillation is the loop gain.  That's the gain from the input of the network (the bottom of R2) through to the pot wiper, then through the opamp to the output.  The signal input (C2 + pot) is grounded for this loop; the oscillation issue is separate from the effect on teh signal.   The key point is the opamp gain is setting the loop gain and if that is too high it will oscillate.  So to stop it oscillating you have to reduce the gain of that opamp.

Beyond that you have to play with the part values of your network but whatever you do there will be a maximum gain beyond which the thing will oscillate.   The trick is playing with the part values and gain and getting the behaviour you want.

With doing a deep dive into theory,  start with your current part values, back off the opamp gain to stop oscillations, then see if it works OK.

If you get very high frequency oscillations try a small cap across R4; say 47pF or 100pF, it depends on the value of R4.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Ben N

#4
Please call this circuit by its correct name/creator.

And see: https://www.diystompboxes.com/smfforum/index.php?topic=129972.0;topicseen
  • SUPPORTER


Vivek



Vivek

Thank you for idea to do a Monte Carlo simulation of this circuit

Do you expect it to be very sensitive to component tolerances ?

I did not see very high Q or any other reason why this circuit will be more susceptible to component tolerances than other similar filters and tone controls.

What will we learn from the Monte Carlo simulation besides "There are small variations of amplitude and frequency due to component tolerances, but well within the design goals of this simple mid boost"

m4268588

I will explain beyond my English skills!
Don't worry if you don't understand what is written.

Quote from: Vivek on December 28, 2022, 04:19:28 AM
Do you expect it to be very sensitive to component tolerances ?
Yes, that's is.

Sallen-key (VCVS) has positive feedback, and is sensitive to component tolerances when narrow Q. I don't know if combination with bridged-T topology will be farther apparent of bad drawbacks.

If you don't turn "Boost" all the way, this drawback will not be apparent.

FSFX

Quote from: m4268588 on December 28, 2022, 08:07:53 AM

Sallen-key (VCVS) has positive feedback, and is sensitive to component tolerances when narrow Q. I don't know if combination with bridged-T topology will be farther apparent of bad drawbacks.


I believe that Sallen-Key topology becomes unstable with a gain over x3.
With a gains of over 3 it is susceptible to instability and oscillation and this stability can be affected by the value of the source impedance driving it.

Vivek

https://www.electronics-tutorials.ws/filter/sallen-key-filter.html

This site mentions that

Gain should be below 3

At high Q, the circuit is very sensitive to component tolerances

m4268588


ElectricDruid

Quote from: Vivek on December 28, 2022, 03:04:14 PM
https://www.electronics-tutorials.ws/filter/sallen-key-filter.html

This site mentions that

Gain should be below 3

At high Q, the circuit is very sensitive to component tolerances

While all this is true, I don't think it differentiates the Sallen-Key too much.

*Any* filter capable of high resonance is going to reach a point where it oscillates. Exactly what the required gain for oscillation is varies between filter types, but it's often not far from x3 (x4 for the Moog ladder filter, for example, and I can't remember the number for the SVF...).
Since oscillation frequency is dependent on the exact value of the components, it's true to say that the filter is "sensitive to component tolerances".

Rob Strand

#14
For stability can I suggest a new simulation (of the same circuit):

Make the following changes:
- ground INPUT
- break R7 from the output of the opamp
- Inject a 1V AC source into the free end of R7

Simulation:
- monitor the output
- find the point where the phase is 0, if the gain is > 1 (ie. > 0dB) then it will oscillate.

You need to scan over all values of the pot. [Notice with the above transformation the pot now directly modifies the gain, so worst case is likely to be when the pot is on full.]

In many circuits, the point where the EQ peak shoots up to infinity corresponds to oscillation condition.

FWIW, If you apply the above transformation to the Sallen and Key HPF circuits you will get a similar *shaped* circuit.
*However* the part values are chosen differently between the two circuits and that will mean the EQ will oscillate at  a different gain than the common Sallen and Key.  (In fact you can choose different part values for Sallen and Key circuits and get a different maximum gain that way as well.)

Quote from: Vivek on December 27, 2022, 02:10:49 PM



Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

m4268588

Not verified mathematically, results of transient analysis show that to be unstable in some case.

Version 4
SHEET 1 800 600
WIRE 224 -256 144 -256
WIRE 352 -256 288 -256
WIRE 400 -256 352 -256
WIRE 416 -256 400 -256
WIRE 352 -240 352 -256
WIRE 48 -224 32 -224
WIRE 144 -224 144 -256
WIRE 144 -224 128 -224
WIRE 160 -224 144 -224
WIRE 256 -224 240 -224
WIRE 304 -224 256 -224
WIRE 256 -208 256 -224
WIRE 304 -176 288 -176
WIRE 288 -112 288 -176
WIRE 304 -112 288 -112
WIRE 400 -112 400 -256
WIRE 400 -112 384 -112
WIRE 32 -96 32 -224
WIRE 288 -96 288 -112
WIRE 32 0 32 -16
WIRE 256 0 256 -144
WIRE 256 0 32 0
WIRE 288 0 288 -16
WIRE 288 0 256 0
WIRE 32 16 32 0
FLAG 32 16 0
FLAG 32 -224 Sig
FLAG 416 -256 Out
IOPIN 416 -256 Out
FLAG 352 -160 0
SYMBOL signal 32 -112 R0
WINDOW 123 2 104 Left 2
SYMATTR SpiceLine Rser=0
SYMATTR InstName V1
SYMATTR Value SINE({OFS} {Level} {Freq})
SYMBOL e 352 -256 R0
SYMATTR InstName E1
SYMATTR Value 100k
SYMBOL res 32 -208 R270
WINDOW 0 32 62 VLeft 2
WINDOW 3 0 34 VRight 2
SYMATTR InstName R1
SYMATTR Value {R1}
SYMBOL res 144 -208 R270
WINDOW 0 0 62 VLeft 2
WINDOW 3 -16 34 VRight 2
SYMATTR InstName R2
SYMATTR Value {R2}
SYMBOL cap 288 -272 R90
WINDOW 0 -16 18 VRight 2
WINDOW 3 0 46 VLeft 2
SYMATTR InstName C1
SYMATTR Value {C1}
SYMBOL cap 240 -208 R0
WINDOW 0 6 40 Right 2
WINDOW 3 14 56 Right 2
SYMATTR InstName C2
SYMATTR Value {C2}
SYMBOL res 400 -128 R90
WINDOW 0 0 50 VRight 2
WINDOW 3 32 62 VLeft 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 272 -112 R0
SYMATTR InstName R4
SYMATTR Value 10k
TEXT 0 56 Left 2 !.AC Oct 10 10Hz 100kHz\n*.TRAN 0 50m 40m 25u\n \n.Params OFS=0V Level=1V Freq=110Hz Rate=1\n+ R1=91k*(1.05**Rate/1.05)\n+ R2=5k6*(1.05**(2-Rate)/1.05)\n+ C1=6n8*(1.1**Rate/1.1)\n+ C2=6n8*(1.1**(2-Rate)/1.1)\n.STEP Param Rate 0 2
TEXT -104 16 Invisible 1 ;SINE({OFS} {Level} {Freq})\nPWL Repeat ForEver(0 {OFS} 1p {Level+OFS} {0.5/Freq-1p} {Level+OFS} {0.5/Freq+1p} {-Level+OFS} {1/Freq-1p} {-Level+OFS} {1/Freq} {OFS})EndRepeat


I didn't use random numbers because I know worst case. Results when R1 fluctuates 20% is interesting.

Version 4
SHEET 1 800 600
WIRE 176 -256 128 -256
WIRE 272 -256 256 -256
WIRE 320 -256 272 -256
WIRE 336 -256 320 -256
WIRE 272 -240 272 -256
WIRE 48 -224 32 -224
WIRE 128 -224 128 -256
WIRE 128 -224 112 -224
WIRE 144 -224 128 -224
WIRE 224 -224 208 -224
WIRE 32 -192 32 -224
WIRE 96 -192 32 -192
WIRE 208 -192 208 -224
WIRE 208 -192 176 -192
WIRE 224 -176 208 -176
WIRE 208 -112 208 -176
WIRE 224 -112 208 -112
WIRE 320 -112 320 -256
WIRE 320 -112 304 -112
WIRE 32 -96 32 -192
WIRE 208 -96 208 -112
WIRE 32 0 32 -16
WIRE 208 0 208 -16
WIRE 208 0 32 0
WIRE 32 16 32 0
FLAG 32 16 0
FLAG 32 -224 Sig
FLAG 336 -256 Out
IOPIN 336 -256 Out
FLAG 272 -160 0
SYMBOL signal 32 -112 R0
WINDOW 123 2 104 Left 2
SYMATTR SpiceLine Rser=0
SYMATTR InstName V1
SYMATTR Value SINE({OFS} {Level} {Freq})
SYMBOL e 272 -256 R0
SYMATTR InstName E1
SYMATTR Value 100k
SYMBOL res 80 -176 R270
WINDOW 0 0 62 VLeft 2
WINDOW 3 -16 34 VRight 2
SYMATTR InstName R1
SYMATTR Value {R1}
SYMBOL res 272 -272 R90
WINDOW 0 0 50 VRight 2
WINDOW 3 32 62 VLeft 2
SYMATTR InstName R2
SYMATTR Value {R2}
SYMBOL cap 48 -208 R270
WINDOW 0 32 46 VLeft 2
WINDOW 3 0 18 VRight 2
SYMATTR InstName C1
SYMATTR Value {C1}
SYMBOL cap 144 -208 R270
WINDOW 0 32 30 VLeft 2
WINDOW 3 0 18 VRight 2
SYMATTR InstName C2
SYMATTR Value {C2}
SYMBOL res 320 -128 R90
WINDOW 0 0 50 VRight 2
WINDOW 3 32 62 VLeft 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 192 -112 R0
SYMATTR InstName R4
SYMATTR Value 10k
TEXT 0 56 Left 2 !.AC Oct 10 10Hz 100kHz\n*.TRAN 0 50m 40m 25u\n \n.Param OFS=0V Level=1V Freq=110Hz CASE=0\n;+ R1=tbl(CASE, 0,10k, 1,8k, 2,12k)\n+ R1=tbl(CASE, 0,10k, 1,9k5, 2,10k5)\n+ R2=tbl(CASE, 0,6k8, 1,7k14, 2,6k46)\n+ C1=tbl(CASE, 0,22n, 1,24n2, 2,19n8)\n+ C2=tbl(CASE, 0,22n, 1,19n8, 2,24n2)\n.STEP Param CASE 0 2 1
TEXT -104 16 Invisible 1 ;SINE({OFS} {Level} {Freq})\nPWL Repeat ForEver(0 {OFS} 1p {Level+OFS} {0.5/Freq-1p} {Level+OFS} {0.5/Freq+1p} {-Level+OFS} {1/Freq-1p} {-Level+OFS} {1/Freq} {OFS})EndRepeat

If using LTspice, left-click on left end of the AC plot window. Select "Nyquist" in the drop-down list that is "Bode".

Solution is already written at beginning of this topic.

Rob Strand

#16
This is what I was suggesting.   Worst case is just failing.  The pot tolerance pushes it over the edge, +0.5dB @ zero phase.


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.