Calculating SVF Parametric EQ boost/cut gain

Started by MrStab, March 11, 2015, 01:23:19 AM

Previous topic - Next topic

MrStab

Hi guys,

I've done days upon days (i'm a real party animal) of reading about state-variable filter EQs, and i've become kinda obsessed with them. I used a 3-band one at my last gig on Friday and it really helped tame lows on a pickup that just didn't sound fulfilling with the guitar's body wood. i'm an upper-mids/treble kinda guy.

Whilst there are numerous variations all over the place, i think the schematic most-referenced round here is that in Figure 5 here: http://sound.westhost.com/articles/state-variable.htm . So i refer to that in the following.

I've nailed the frequency calculations, the Q calculations are all there and i just need to get round to figuring them out, but i just can't figure out how to calculate how much gain is boost or cut. i assume it's either +/-15dB or 18dB, going by the precedents, but i want to know why that's the case. opamp U1A looks most like a differential amplifier - is that right? i could probably learn how to calculate the gain if there were just straight inputs and no SVF connected to the circuit, but everything past the Boost/Cut pot has me scratching my head.

Thanks in advance for any teachings!

Hopefully my question isn't answered in the article itself...
Recovered guitar player.
Electronics manufacturer.

PRR

With nothing connected to VR1 wiper, U1A is a smple unity-gain inverter.

And something on VR1 wiper can only go to input or output, both nominally low-low-Z points, so wiper loading doesn't change anything.

> how much gain is boost or cut. i assume it's either +/-15dB or 18dB

I would *assume* that all gain is in the Filter, and the filter gain is also the max boost/cut.

You are way ahead of me on SVFs. What is the gain of the filter from R4 to C6?
  • SUPPORTER

Mr. Lime

#2
Sorry for my short question.
Would Figure 5 of the SVF be suitable for an onboard guitar preamp or for what else is it used?

Thanks
Thanks for help

MrStab

#3
Quote from: PRR on March 12, 2015, 01:00:08 AM
What is the gain of the filter from R4 to C6?

I have absolutely no clue! But it helps to consider that i've been looking in the wrong place. Now you've phrased it like that, maybe i should re-read the non-EQ applications on the page and try to figure out some common ground [figurative]. after several more coffees.  

i'll have another read over the article - Figure 1 in particular - once my head is de-melatonin'd in a few hours. always helpful to have someone else point you in a new direction. thanks, Paul.

Quote from: Mr. Lime on March 12, 2015, 02:48:57 PM
Would Figure 5 of the SVF be suitable for an onboard guitar preamp or for what else is it used?

i'd imagine it's suitable - i use it first in the chain - but you'd need to convert it to a single-supply circuit (unless you're up for a bipolar supply in your guitar). Search this forum for "Japanese Parametric EQ" for a similar schematic where this has already been done (though there are other minor changes to the circuit, including an input buffer).
Recovered guitar player.
Electronics manufacturer.

MrStab

#4
Okay, so I finally got round to doing some head-scratching. i'm a little closer, but still at a total loss.

I get that the first stage of a state-variable filter is a differential amplifier. Most articles describe the circuit in generic, non-parametric-EQ terms, with the signal input/LPF resistor going to the inverting input, so i assume that this line from the ESP article holds true: "[input] may be on the inverting or non-inverting input for different results".

Although it's a tad different from my own and the ESP circuit in places, i'm currently using the Japanese EQ schematic for reference, as it clearly states +/18dB, and i figure if i can match that result with the values, i'll have understood the equation properly (schematic here: http://s68.photobucket.com/user/Morocotuco/media/Jap-parametric-eq-SCHEM.jpg.html ).

I haven't really worked with differential amplifiers before, though i have spent a considerable amount of time trying unsuccessfully to understand them over the past week or so. With simpler types of opamp circuit, i'm used to calculating gain via. the components' values, but i have no idea what input voltages to plug into these equations. Whatever i try, even when i try voltage values like "1" just to see what changes, my results are way off. i am converting voltage gain to decibels, for the record. I'm inputting values that account for the Q and Boost/Cut pots being at either extreme.

any ideas? i guess this thread has evolved into "differential amplifier calculations for dummies". which has me optimistic, if anything - i'm getting there.

cheers!

Recovered guitar player.
Electronics manufacturer.

PRR

> no idea what input voltages to plug into these equations.

The gain formulas assume infinite linearity.

If the gain were 10, and you put in "100V", they would tell you the output is "1000V".

They don't know you are working on 9V or 36V supplies, and can't ever get 1000V.

Yes, "1" is usually a much more convenient value.

> my results are way off.

Which means what? "42"? "e^Pi"? "Tuna salad"?

I think you need paper and Sharpie and show your work.

It is probably some simple misunderstanding, but we can't see it from here, and "way off" isn't even a clue.
  • SUPPORTER

jatalahd

When considering the circuits in Fig 4  and Fig 5 at sound.westhost.com, the state variable filter used in both circuits has a gain of 1, so it should pass the signal without any gain at all. According to this: http://ocw.mit.edu/courses/mechanical-engineering/2-161-signal-processing-continuous-and-discrete-fall-2008/study-materials/lpopamp.pdf, the center frequency gain of the pass-band mode of the SVF filter when feeding the plus-input is simply R5/R4 (in Fig 4 and Fig 5). Although in Fig 4 the Q control increases the gain (adds VR2 into R5), the dual pot corrects the gain to 1 using the voltage divider at the output of the SVF.

So if I am not completely mistaking, the boost has to come from U1A. But that is a strange configuration for me and I really cannot figure out how to determine the gain in that section. The SVF is kind of in a feedback loop, but maybe the standard analysis won't help here... Another option is that U1A is used as a difference amplifier, but again it is not in standard form.

The writing here: http://ethanwiner.com/spectrum.html was even more confusing. There is an additional 6.8k resistor from minus-input to ground and the text says "The 6.8k resistor to ground allows nearly 20 dB. of gain, which in this case translates to available boost". This got me completely lost. I hate it when engineers don't give proper explanation to their work.

However, this is a very interesting problem and I will try to find a solution for the gain calculation.
  • SUPPORTER
I have failed to understand.

jatalahd

Here: http://www.rane.com/pdf/constanq.pdf is some more info, but the configuration is a bit different. On top of page 4 it says that:

"Boosting is accomplished by summing the bandpass (BP) output of the state-variable filter with the original signal. By weighting the series output resistor of the filter network R2, any amount of boost can be achieved."

Unfortunately it does not directly apply when Fig 5 of westhost is in question. But I am now more convinced that UA1 is a difference amplifier and the weighting of the summed signal is obtained by adjusting some resistor. And currently I have no idea which resistor of Fig 5 that might be, but it has to have some connection to the boost/cut pot. Maybe.
  • SUPPORTER
I have failed to understand.

tubegeek

#8
Here are two potentially useful resources - I'm working right now and so I haven't been able to look to closely at them but a quick glance says they might be some help:

http://www.analog.com/media/en/training-seminars/tutorials/MT-223.pdf

LOTTA math in this one:

http://www.daycounter.com/Filters/StateVariableFilters/State-Variable-Filter-Design-Equations.phtml
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

jatalahd

Finally got the correct formulas derived for the gain. It was just simply working out the gain obtained from the difference amplifier UA1 at the center frequency of boost/cut, where the SVF has a gain of -1 (inverting unity gain, -0 dB). This was already explained in the link I provided earlier. And the reason for the mysterious extra resistor got explained too during the process. Surprisingly it defines the gain :) but it works without it as well. These equations assume that the output impedance of the SVF is very small, which it is in reality.

First the gain equations for the Fig 5 of westhost (R1 = R2):
   BOOST: Vout/Vin = - ( 1 + 2*R2/R1)        --> 20*log(3) = 9.5 dB
   CUT:     Vout/Vin  = -( 1/(1 + 2*R1/R2) )  --> 20*log(1/3) = -9.5 dB

Then the gain equations for the Japanese and the EthanWiner versions (R1 = R2), Rx = resistor to ground from minus input:
   BOOST: Vout/Vin = -(1 + R2/R1 + R2/(R1||Rx))    = - (2 + R2/(R1||Rx)) --> This gives 17.6 dB gain for the japanese version and 20 dB gain for EthanWiner
   CUT:      Vout/Vin = -( 1/(1 + R1/Rx + 2*R1/R2) ) = - ( 1/(3 + R1/Rx))   --> This gives -17.6 dB gain for the japanese version and -20 dB gain for EthanWiner

Note that the notation R1||Rx is the parallel resistance of these two resistors. Note also that when designing the value for Rx, it needs to be chosen to make the boost and cut symmetric, so just remember not to throw in just "some" resistor.

This was a nice problem. When I have more time I need to tidy up my notes and calculations and put them in a safe place for future :)



  • SUPPORTER
I have failed to understand.

MrStab

Quote from: PRR on March 21, 2015, 11:55:58 AM
Which means what? "42"? "e^Pi"? "Tuna salad"?

I think you need paper and Sharpie and show your work.

i probably should've explained what i'd actually tried - i'd plugged similar-looking components into equations on a coupla sites for generic differential amplifiers and got so confused that there was too little structure to my brain farts to even present. i don't have the links on the laptop i'm using at the moment.

Quote from: jatalahd on March 23, 2015, 01:25:51 PM
Finally got the correct formulas derived for the gain.

Thanks a lot for giving me the info in a clear form, Jarmo - i'll use it to look back on the links you & Tubegeek shared with less confusion once i've played with the equation 50 times and absorbed it.

cheers!

Recovered guitar player.
Electronics manufacturer.

MrStab

just wanna say a coupla things:

firstly, those equations work great. thanks again!

secondly, this isn't related to the boost/cut function, but if anyone has the idea of using Ye Olde Pot Tapering Trick to get dual-gang reverse-log pots, don't waste your time. the load of the pot changing (ie. resistance between outer lugs) means that you'll never be able to set the lower limit accurately.

i'd read multiple times that the load would change, but because my test units ran from about 50Hz-5.5kHz, and 50Hz was the useful limit of my testing rig, it seemed to work and i just assumed all was fine. i'd even built a three-band version, but never tested it with tones - just used it at gigs (though it's now a permanent part of my rig!). took me far too long to realise this - i guess i was given the illusion that all was okay.

now i have to hunt down real PCB-mount reverse-log pots :( i know Mouser has one, but iirc the shaft is D-type and is long as hell. any suggestions? linear just sucks for a wide band.
Recovered guitar player.
Electronics manufacturer.