State Variable Filter LPF noise

Started by MrStab, December 29, 2016, 08:34:57 PM

Previous topic - Next topic

MrStab

no improvement with 100uF caps connected to R12 and R13. it's getting kinda annoying now, maybe there's absolutely no way to fix it. FWIW noise increases in the Cut position. i think you might've mentioned something like that a while back, Rob. i'll re-read.
Recovered guitar player.
Electronics manufacturer.

MrStab

#41
i've made a list of side-by-side voltages of the quad op-amp the SVF uses. screenshotted it so i didn't have to mess with tables.
(edited because i got the amp labels wrong. wish i'd saved the original spreadsheet file!! lol)



U2B's output seems to be misbehaving. didn't notice that before. this is with a 1uF cap between BC wiper and R4, which seems to solve the U1B+ offset quite a lot.
Recovered guitar player.
Electronics manufacturer.

MrStab

i'll need to go over this again tomorrow, my head's in a mess. though i'm 90% sure the above is correct apart from pin 6, which goes down to about 4.4V in full Cut. i've been taking readings from either side of the board as some of the kludges i've put in through these experiments made it hard to access pins, which confused me more.

certain conclusions from today are that caps to ground from the Frequency pots don't fix the issue, and neither does a cap before R8 (which went against your similar advice with R5, Rob, but i thought i'd give it a go as it wasn't R5. lol)

*shrug* not a clue. i'm tempted to test it in BP mode to see if these conditions are normal but somehow don't play nice with the shelving outputs, but that'd take some re-soldering.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

#43
QuoteU2B's output seems to be misbehaving. didn't notice that before. this is with a 1uF cap between BC wiper and R4, which seems to solve the U1B+ offset quite a lot.

At this point the symptoms to me look  oscillation rather than DC issue.

Here some of the key points why:
- higher than expected DC shifts
- No success on frequency pot caps  =>  no change in DC offset
- Cap on R4   =>  no change in DC offset

Finally:
- DC offset changes on an AC coupled circuit ie. the boost/cut pot + cap =>  strong suspicion of oscillation.
- cut case is worse.

The reason cut is worse than boost is the cut configuration puts the SVF in a inside a loop containing U1A.  The boost config essentially connects the input of the SVF to the signal input, it's not in a loop as such.  Partial boosts are in a loop but the gain around the loop is lower which makes is less susceptible to oscillation.

The problem with oscillation is you can't always hear it as a tone.  It could be at frequencies anywhere in the 10kHz to 10MHz region.   What you do see is indirect symptoms like distortion, things heating-up, DC offsets, changes in behaviour with minor layout and pot settings.  A whole heap of stuff that doesn't make sense by looking at the schematic with "normal eyes".

If you have an oscilloscope you can see the oscillation.

So what to do?
I would be going back to putting small caps on things starting with a 100pF to 150pF cap across R2.

Once you get rid of the oscillation you will probably need to try the caps on the frequency pots again.

How the DC outputs settle is a little confusing.  I don't know if this helps but I'll try to show the interactions:  In order that integrator U2B doesn't ramp U2A must provide an offset to match U2B.  The output of U2A then adds to the offset at U1B.  In order that U2A doesn't ramp U1B must provide an offset to match U2B.  Now the only way it can do this is via the output of U2B.  So U2B ends-up taking up the slack and must provide the final DC offset that keeps everyone happy.  Because of the divider formed by R8 and R6 the offset at U2B needs to be high in order that the output of the divider can provide the small corrective offset.  Without a cap in series with R4 the offset from U2B might need to be more.

Anyway if it's oscillating the DC conditions might struggle to find an equilibrium and you see the large offsets you are seeing now.





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

MrStab

wrote out a whole reply but it got buried in tabs and i closed the browser. damnit. apologies if this reply is less detailed.

i put 120pF caps in parallel with R2, R7, R8 and R15, individually and altogether. no luck. i could try higher caps once i find them!! i have a small margin until i hit the audible range.

your description of the DC changes going on, compared with my readings, has led me to this idea - not in the oscillation ballpark afaik, but nonetheless: from what i've read on integrators, a high-value resistor can be used to stabilise the DC while being large enough to avoid affecting the RC network's response (if i got that right-ish?). maybe worth a shot? seems the resistors would have to be pretty high to get the same gain from the SVF, though. unless maybe R16 could compensate. i know it's not in the oscillation ballpark, but just not to rule anything out.

cheers!
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quotewrote out a whole reply but it got buried in tabs and i closed the browser. damnit. apologies if this reply is less detailed.
Don't worry it's happened to me too, always on long posts, and usually followed by expletives.

Quotei put 120pF caps in parallel with R2, R7, R8 and R15, individually and altogether. no luck. i could try higher caps once i find them!! i have a small margin until i hit the audible range.
I'm extremely surprised one of those combinations didn't fix it.  It's also a bit weird to have a such fine margin before you actually hear it oscillating. It's not normal!  For things like this circuit once you have couple of stabilizing caps in there (even remotely in the ball-park) it's usually pretty tough.  BTW: I was assuming you had a largish cap across R7.   

Quote
your description of the DC changes going on, compared with my readings, has led me to this idea - not in the oscillation ballpark afaik, but nonetheless: from what i've read on integrators, a high-value resistor can be used to stabilise the DC while being large enough to avoid affecting the RC network's response (if i got that right-ish?). maybe worth a shot? seems the resistors would have to be pretty high to get the same gain from the SVF, though. unless maybe R16 could compensate. i know it's not in the oscillation ballpark, but just not to rule anything out.
You can try it but I'm not expecting that to fix it, well not because of the DC aspect.  Yes they will be quite large resistors.   I've build quite a few SVF's and never had to do that.  There's a circuit called the Tow -Thomas biquad, a filter similar to the SVF, which adds a resistors.  IIRC it does this in order to tune some aspect of the performance.  Using your simulator, check out the frequency response before and after the mods.   Err on the lowest resistor value you can get away with as that will help the DC issue.   The caps on the frequency pots should help more.

One thing you can try is to lift the ground side of the frequency pots completely.  This way the pots are in series with R9 and R10.   This is a perfectly valid alternative connection for frequency pots and the SFV.  It has the advantage of reducing DC issues to a minimum.

Swapping out the opamp might shed some light on things as well.

Other things to try would be bypass caps on the power rails:  100nF, 10uF, 100uF.


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

MrStab

ah - i meant the audible spectrum that i'd rather not cut, not the oscillation. R7 was the one that caused oscillation with a cap across it, but doesn't seem to be oscillating with 120pF this time as the Q's set fairly low. R6 is currently a 20k hooked up to U1B's + input (i wonder if switching that round and still having the issue is some clue.

is that also called a "Fleischer-Tow Biquad"? Google suggested it for Thomas-Tow and it came up with more results. cheers for that info, i'll read up properly on it soon. at the very least it could teach me more about the effects of a cap on U1B and a resistor on U2B. did they have a falling-out with Thomas?

say it isn't oscillation - is it at all a known thing for some kind of noise when DC bias on op-amp inputs reaches equilibrium?

Spice alleges the resistors shouldn't affect corner frequency, with 100k bringing down the 15dB maximum gain to about half that (including the BP stage, had to check both modes would work). the frequency response stays the same, as far as i can tell. i'll give it a go tomorrow before i have to leave for the weekend and report back. i have a feeling the trade-off there would be Johnson noise in those feedback loops vs. amplifying the noise floor with R16.

cheers again!
Recovered guitar player.
Electronics manufacturer.

MrStab

sorry missed the last few things you said. 100nF bypass caps on the power rails didn't help unfortunately. i'll try lifting the end of the Frequency pots if the integrator resistors don't help. i've tried 4558s and TL072s in the inverter positions, and TL074 and TLC274 for  U1 & U2
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quoteis that also called a "Fleischer-Tow Biquad"? Google suggested it for Thomas-Tow and it came up with more results. cheers for that info, i'll read up properly on it soon. at the very least it could teach me more about the effects of a cap on U1B and a resistor on U2B. did they have a falling-out with Thomas?
You should find it with "Thomas-Tow"
https://www.ece.uic.edu/~vahe/spring2012/ece412/biquad.pdf

Fleischer is another famous filter dude. 
http://convexoptimization.com/TOOLS/FleischerTow.pdf

FYI: look at the refs at bottom of the first page of the first link.  It predates the second link.  Second link is a more general form and has design equations.

You are probably better just tweaking your integrators.

QuoteR7 was the one that caused oscillation with a cap across it, but doesn't seem to be oscillating with 120pF this
time as the Q's set fairly low
Without a CRO it's hard to know.

Quote- is it at all a known thing for some kind of noise when DC bias on op-amp inputs reaches equilibrium?
Once you know the opamp offsets it is a know thing.  Opamp offsets a like transistor gains they vary from unit to unit.
If the opamps have no offset everything should settle at 0V.   If you want to play with your simulator just add a DC voltage source (maybe 10mV) in series with the opamp + input.  Do it one at a time.  Look at how the DC levels change from 0V. The voltages see doing that will be indicative of what you see in the real circuit.    You can also see the effect of adding caps on the freq. pots etc.   If the simulator complains add a 100MEG resistor in parallel with the voltage source, or to ground.

QuoteSpice alleges the resistors shouldn't affect corner frequency, with 100k bringing down the 15dB maximum gain to about half that (including the BP stage, had to check both modes would work). the frequency response stays the same, as far as i can tell. i'll give it a go tomorrow before i have to leave for the weekend and report back. i have a feeling the trade-off there would be Johnson noise in those feedback loops vs. amplifying the noise floor with R16.
Try to find a point which looks pretty much the same.   You will find the added resistors shouldn't effect the noise much. 

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

Rob Strand

Quote
sorry missed the last few things you said. 100nF bypass caps on the power rails didn't help unfortunately. i'll try lifting the end of the Frequency pots if the integrator resistors don't help. i've tried 4558s and TL072s in the inverter positions, and TL074 and TLC274 for  U1 & U2
Hmmm, the options are thinning out a bit!
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

Thanks for the links and for clearing that up. On a train right now but will give them a try later. Those sim tips should help better than the idealised situation I have at the moment.

The integrator resistors idea didn't remove the centre click at 500k or 100k across both U2A and B. Using the frequency pot as variable resistors didn't help either. I also tried a 1uF cap between U1A output and BC pot for fun, nothing.

If it's inevitable i can live with it as audio-wise it works quite well, but the switch pop caused by it needs addressing. Can you delay CMOS switch turn-on time with 2 resistors and a cap...?

Sent from my Vodafone Smart ultra 6 using Tapatalk

Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quotethere's a DC offset when the Boost/Cut pot is turned. when fully cut (U1A output side shorted), the DC at U1B+ is roughly 300mV lower than Vref, which approaches 4.5V as the pot is turned. At the centre there's a small click, and the whole other half of the pot (boost) is a firm 4.5V. this problem also seems to extend into the switching, creating a big pop when that pot is rolled back.

I've been pondering thinking what could be wrong.    When I see that I can't help but think oscillation.

QuoteIf it's inevitable i can live with it as audio-wise it works quite well, but the switch pop caused by it needs addressing. Can you delay CMOS switch turn-on time with 2 resistors and a cap...?
You should need t delay it.
In order to prevent switch pop you normally have to ensure the DC conditions before and after do not change.  A bit like the 1M resistor at the input of an effect.  I can't suggest a changes as I'm not 100% sure how the switching is done.  When I look back at your switch connections (in the post with "Happy new year" in the top).  So I'm not sure how R1 in that schematic and R6 in your original schematic are equivalent.   Also one of the switch configurations leaves R1 floating.

One thing to realize is you might be able to  leave RV connected across +in and -in of the opamp then connect R1 (R6) to ground, and disconnect R2 from ground.   This greatly simplifies the switching and the change in DC condition issue.  Further you could add caps in series with R2 and R1 and put say 2.2M across each of those switches in order that the DC voltage across the caps doesn't change.   To me this would be a normal way to ensure pop-free switching.

A couple of other things I realized is when the pot is disconnected from  +in and -in of the opamp  it has a minor effect on the conditions that cause oscillation.    So leaving RV connected in both might help change the way it is oscillating , possibly for the better.

Regarding detecting oscillation you might be able to build something like this:
http://s1232.photobucket.com/user/mikeyb3649/media/DVA.png.html
Use say C= 100nF, D = 1N4148 or 1N914.  You might try adding 100ohm in series with the diode as well.

You connect it to the output of each opamp.   You would expect to see Vref-Vdiode.  But if oscillation is there it is likely you will see a *higher voltage* than this a it grabs the peaks.   It's not 100% guaranteed as some oscillation is low level and hard to see with this simple set-up.    It's especially useful to do this fr the cases where pots change the behaviour.

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

MrStab

Dropbox has disabled my original schem, here it is: https://www.dropbox.com/s/41nzj1aic5yyg0n/svfhinoize.png?dl=0

i've had the 4053 work well mid-circuit without being coupled & rebiased, so long as the biases are close, so i figured i could save space here too. as far as i can tell it's just a tiny, harmless click when the offset isn't "engaged".

basically, R1 in the switching schematic is the "real" R6 in the original. with the switch bypassing the Q pot, R6 was rendered useless, so i decided to bypass it with a fixed resistor in "shelf mode" for testing purposes. it later turned out i'd got the poles wrong on the + side of the op-amp, meaning the resistance to Vref was jammed at the >150R On resistance. so i've bypassed that, too. clearly i'll need to rework the switching a bit, just thought i'd try to figure out the other issue first. although...

that switching alternative you suggested is genius! that's the first thing i'm trying when i get back on Monday. a DPDT was as high as as i was willing to go for the physical switch, so this could save me the CMOS altogether. i'll sim it before then if i have the time. simplification + stability benefit = win. it'd mean my maximum Q setting for peaking mode is the same as that in shelving mode but that's fine.

in a past version i remember lowering R16 made a lot of difference in lowering the BC click effect, but it took far too much reduction in gain to do so. i didn't take much notes around the time, though. i'll give that region a bit more thought. at the time i was testing & debugging other stuff so didn't really take notes.

thanks a lot! i have a good feeling about that new switching approach. i'll move onto oscillation-hunting beyond that.
Recovered guitar player.
Electronics manufacturer.

MrStab

...and i wonder what effect that fixed 10k across U1B's inputs would have generally...
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quoteit'd mean my maximum Q setting for peaking mode is the same as that in shelving mode but that's fine.
.
I suspect I've missed something if that's the case.  We should aim at keeping all the features. When I look at your switching circuit above one of cases connects both sides of the pot to Vref, effectively disabling it.   
Is that how it is?

Quote
in a past version i remember lowering R16 made a lot of difference in lowering the BC click effect, but it took far too much reduction in gain to do so. i didn't take much notes around the time, though. i'll give that region a bit more thought. at the time i was testing & debugging other stuff so didn't really take notes.
Hmmm, R16 affects the loop-gain and cause a marginally stable circuit to oscillate or not.   There's many symptoms that look like oscillation to me.  That doesn't mean it is but I have trouble reasoning out all the behaviours due to other causes.

Quote...and i wonder what effect that fixed 10k across U1B's inputs would have generally...
There's no primary effects but there's quite a few secondary effects.  For example it could increase the DC offset a small amount but it is better to have a fixed DC offset than one that varies with the circuit configuration (as that is the cause of the pops).    It can also increase noise.  It can affect stability, usually for the better.    I should emphasized these effects are normally very small.    It's not until you put 10 or 30 pots in parallel on a graphic equalizer before you start to worry.   It is one of those things where the benefits are great and the detrimental effects are small.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

that's pretty much how the switching is done, Rob. both outer lugs of the Q pot are at the Common of one SPDT each. for now, i've completely removed the CMOS again. so i can re-confirm the problem's definitely there without it. so right now it's wired as per the OP.

probably not much help, but i made a quick phone recording of me turning the BC pot. it's a bit on the quiet side. every click you'll hear is the centre point being passed. https://www.dropbox.com/s/m174uang78o1by4/clicky.m4a?dl=0
as you can hear, it's not that intrusive, but might concern some people.

i just tried completely surrounding each BC lug with caps and rebiasing as necessary, no change. though at one point the click disappeared but the circuit oscillated and distorted at the far ends of the pot. i think that was with caps on all lugs, but before i'd remembered to re-bias the wiper afterwards (100k to Vref before R4). i wonder if that's a clue... you can't really hear it on the recording, but there's that characteristic "DC on pot" scratch going on just before the centre. so i figured i'd try a blanket-cap approach.

i've only been home for a few hours so i'll do some more thinking later. if putting all focus on the inverter as the culprit makes no difference, i may move on and try to silence the switching.
Recovered guitar player.
Electronics manufacturer.

MrStab

progress! i think!

i tried changing R15 to ~2k for a ridiculous gain of -0.1 AND lowering R6 to 1k to compensate for the loss (now back on the inverting input of U1B). the click is gone. ofc, this restricts control over the Q, but it still does the job. i wonder if R16 could be changed instead.

all this is with the coupling around the BC pot, so i'll need to roll all that back before i can confirm this is the fix. if it is, wouldn't that 10:1 attenuation be really bad for noise? it's too late to test that tbh.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

#57
Quoteprobably not much help, but i made a quick phone recording of me turning the BC pot

Thanks for that.  It's *very* pronounced,  to the point where I was thinking it might be a faulty pot.  Then I read your second post and now I'm thinking oscillation.

Quotei just tried completely surrounding each BC lug with caps and rebiasing as necessary, no change. though at one point the click disappeared but the circuit oscillated and distorted at the far ends of the pot. i think that was with caps on all lugs,
The fact you have removed all DC paths and there is still an issue pretty much writes-off any DC causes.  The other suspicious symptom is you changed DC related components and got oscillation.  To me that just the circuit is riding close to the cusp of oscillation so small changes just push it over the edge.  FYI: The circuit doesn't need to have the Vref connection before R4 because the opamp +input pin gets DC via R5.

Quoteprogress! i think!

i tried changing R15 to ~2k for a ridiculous gain of -0.1 AND lowering R6 to 1k to compensate for the loss (now back on the inverting input of U1B). the click is gone. ofc, this restricts control over the Q, but it still does the job. i wonder if R16 could be changed instead.

Yes, definitely progress.    When you reduce the gain via R5 it reduces the entire gain around the loop of
U3 ->  U1 -> BC pot -> SVF (back to U3).    The gain around the loop is what causes oscillation.  If you reduce the gain at one point in the loop then push is back-up an another point, then, to first order you, are back to where you started.   When you compensate with R6 it widens the bandwidth (Is what how you see it?) but from what I can see doesn't change the gain.  [Edit: sorry I was thinking band-pass, R6 affects the HPF and LPF gains - I need to think about this.] If you compensate with R16, the gain around the loop increased again and, in theory, you are back where you were.  If R15 + R16 did fix the issue it would be a very marginal fix.

What your test has revealed is we are within a factor of around two in gain between good and bad (ie. the amount you reduced the gain).   I'm fairly convinced we are dealing with oscillation.  One idea is: split R15 into a series combination of 2k + 2.7k.   Then bridge-out the 2.7k with a cap.    You will need to find the smallest cap value that works, then give your self some safety mark by using a bigger cap.   After that evaluate if the audio is affected/filtered.   The idea is that at high frequencies, where the oscillation is,  it looks like the 2k that works but at low frequencies, where the audio is, it is like 4.7k (ie. no change to your original design).

When you changed R15 to 2k, was the circuit free from oscillation with R6 = 3.3k?

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

Rob Strand

BTW, I realized your C7 is around the wrong way.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

okay, i think i get what you're going for with the R5 thing. i'll give that a go tomorrow.

with inverter gain lowered, am i right in thinking that a lowered R6 is limiting the problem at-source, whereas compensating with R16 is bad because it puts us right on the edge again? having a super-tight slope isn't essential so long as it's useful. a guess as to why only shelving mode shows this behaviour is because of the abundance of frequency content beyond the cut-off point, like how too many lows cause strong oscillation in a phaser feedback loop.

i've tried as high as 10k for R6 with the inverter gain lowered, and that's click-free, too.

with the amount of ugly spaghetti i have to roll back, there's a chance i might completely break the circuit a few times before i try anything new, but hopefully not.

cheers, Rob!
Recovered guitar player.
Electronics manufacturer.