Help with Constant Q Graphical Equalizer Design

MrAl

Joined Jun 17, 2014
13,704
Oh sorry about that, didn't know that's what you had meant.
I edited it to add in some more labels so it would be consistent with what I wrote out.

And yes your MFB is correct, I derived that MFB eqn from another circuit which had R3 and R2 basically in the other positions, I didn't even notice it was oriented differently there in this circuit.



Ohh I see, I analyzed it with the pot in any arbitrary position. My goal was to do it for any position so that I can substitute Ra and Rb accordingly for any boost/cut. And well of course Ra= 0 for Full boost or Rb=0 for Full cut.

Hello again,

Well when you assign values for the pot you are analyzing for any pot position, you just wait till later to set those values.

I might also point out that if we say:
"The gain is dependent on A"

that does not mean that it cant be A+1 or even A+2, just that A is a big factor in determining the gain because if you change A you change the gain. So that could be why we are seeing A+1 instead of the presumed A.
 
Oh sorry about that, didn't know that's what you had meant.
I edited it to add in some more labels so it would be consistent with what I wrote out.
I edited my example schematic after you added your edits, so you need to update your version. I erased the capacitor at the output of the MFB filter; I erased the 10 ohm resistors; I gave a different designation to the R3 resistor at the input of opamp U1B, because there is also R3 in the MFB filter.
 

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
Hello again,

Here is a symbolic proof of the G+1 idea:
(4*(G+1)^2*R1^2*R2)/(R2+R1)^2=(4*(G+1)^2*R1^2*R2)/(R2+R1)^2

and again that comes from the full boost mode only simplification. Note that we really only have to prove the full boost mode, the full cut more, the no boost or cut mode, and that the gain is monotonically increasing or decreasing. Showing the boost mode is G+1 says a lot by itself though.

I get for the transfer function:
Hs1=-(s*C2*R2*R3)/(s^2*C1*C2*R1*R2*R3+s*C2*R1*R2+s*C1*R1*R2+R2+R1)

and with C2=C1 we get:
Hs2=-(s*C1*R2*R3)/(s^2*C1^2*R1*R2*R3+2*s*C1*R1*R2+R2+R1)

and because we always set R3=2*R1 we end up with:
Hs3=-(2*s*C1*R1*R2)/(2*s^2*C1^2*R1^2*R2+2*s*C1*R1*R2+R2+R1)
Is this your tf for the entire thing using 1 filter?

I edited my example schematic after you added your edits, so you need to update your version. I erased the capacitor at the output of the MFB filter; I erased the 10 ohm resistors; I gave a different designation to the R3 resistor at the input of opamp U1B, because there is also R3 in the MFB filter.
Okay i edited it as well.
I'll do it over from scratch and upload my soln based off of this schematic
 

Attachments

Hello Renaldo,

The LTspice simulation output was 6dB down because your input source amplitude was set to 0.5V (typically 1V would be used). Is that what you want?

Also, I did not notice that Rc is always twice the value of Ra. Since that is the case, there is no need to pass it separately as a parameter (I have changed this in my simulation). I also made the base setting for all the sliders a parameter so that they might all be moved up or down as a group. Max boost or cut is about +/-12.5dB, but at the extremes, there is quite a bit of ripple across the audio band because the individual bandpass curves do not overlap enough. Is this what you want?
 
Okay i edited it as well.
I'll do it over from scratch and upload my soln based off of this schematic
Here's the schematic with some nodes numbered in red in preparation for a nodal solution. I've replaced the filter with a gain block; for now I'll just let the gain block be a scalar with a value of -1 which is the mid-band gain of the filter. The resistor labeled RW is the resistor connected to the wiper of the pot. RA is the resistance from the wiper to the top terminal of the pot; RB is the resistance from the wiper to the bottom terminal of the pot.

ReducedSchematic2.png

The nodal equations can be set up in matrix form (an admittance matrix). The variable Ao is the opamp gain. A is the ratio R6/R5 and H is the gain of the gain block:

Graphic10.png

We can get a symbolic solution:

Graphic11.png
 
Last edited:
We can substitute some numerical values. Set RA= 50000 to find the gain with the pot set to the middle:

Graphic12.png

Set A = 4 (actually it should be 3.9, but whatever) and RA = 1 (RB is then 99999) to find the maximum boost:

Graphic13.png

The maximum boost is equal to (A+1)

Set A = 4 and RA = 99999 (RB is then 1) to find the maximum cut:

Graphic14.png

Maximum cut is 1/5 which is 1/(A+1)
 
Last edited:

MrAl

Joined Jun 17, 2014
13,704
Is this your tf for the entire thing using 1 filter?
Hello again,

Well that is the TF for the entire circuit but only for when the pot is turned into the boost mode, so that makes it simpler to solve for the gain in boost mode. Note there are no pot values in it.
Since Hs3 is simplest, solve that at w=w0 and we get G+1 which is exactly what the gain is at w0.
I solved it symbolically too and it came out to "G+1" exactly.

With the gain of that op amp stage set to 4 (which i believe is the more theoretical result) we get 5, and with the gain set to 3.9 (the original gain) we get 4.9 so pick one but it's always G+1 or A+1 if you prefer.

There is probably a minor alteration to get the cut mode like that, and then find 1/(A+1).

My TF for the entire circuit including the two pot resistors is farther back in the thread. It has R22 and R23 in it and so you can see right away that it is for all modes including those in between somewhere. It's not too complicated being just 2nd order.

Also, i noticed that at w0 the entire solution is real, so if you wanted to cheat a little you could just calculate the real part of the response :)

Here is a cut mode only analysis...
That second step replace s with jw that's all.
That last step is just a simplification of the previous step.
 

Attachments

Last edited:

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
Hello Renaldo,

The LTspice simulation output was 6dB down because your input source amplitude was set to 0.5V (typically 1V would be used). Is that what you want?

Also, I did not notice that Rc is always twice the value of Ra. Since that is the case, there is no need to pass it separately as a parameter (I have changed this in my simulation). I also made the base setting for all the sliders a parameter so that they might all be moved up or down as a group. Max boost or cut is about +/-12.5dB, but at the extremes, there is quite a bit of ripple across the audio band because the individual bandpass curves do not overlap enough. Is this what you want?
Ohhh so that means for actual demonstration i should always ensure that the input signal is atleast 1V?
And you said it ripples at the extreme due to i sufficient overlap of the filter bands...does it mean that the Q of the filters should be a bit lower?

But no i don't think the ripple is wanted since it has to be demo'd in real life with actual audio signals.

EDIT: I tried 1V but it's still down to -6dB

We can substitute some numerical values. Set RA= 50000 to find the gain with the pot set to the middle:

View attachment 162871

Set A = 4 (actually it should be 3.9, but whatever) and RA = 1 (RB is then 99999) to find the maximum boost:

View attachment 162872

The maximum boost is equal to (A+1)

Set A = 4 and RA = 99999 (RB is then 1) to find the maximum cut:

View attachment 162873

Maximum cut is 1/5 which is 1/(A+1)
Thanks man.
I got my friends lecture notes on developing admittAnce matricies so im reading through that first before i attempt it for this circuit.
However what was the reasoning for taking limits and how does that limit function you use affect the soln...the one with the 5,1 parameters.
Hello again,

Well that is the TF for the entire circuit but only for when the pot is turned into the boost mode, so that makes it simpler to solve for the gain in boost mode. Note there are no pot values in it.
Since Hs3 is simplest, solve that at w=w0 and we get G+1 which is exactly what the gain is at w0.
I solved it symbolically too and it came out to "G+1" exactly.

With the gain of that op amp stage set to 4 (which i believe is the more theoretical result) we get 5, and with the gain set to 3.9 (the original gain) we get 4.9 so pick one but it's always G+1 or A+1 if you prefer.

There is probably a minor alteration to get the cut mode like that, and then find 1/(A+1).

My TF for the entire circuit including the two pot resistors is farther back in the thread. It has R22 and R23 in it and so you can see right away that it is for all modes including those in between somewhere. It's not too complicated being just 2nd order.

Also, i noticed that at w0 the entire solution is real, so if you wanted to cheat a little you could just calculate the real part of the response :)

Here is a cut mode only analysis...
That second step replace s with jw that's all.
That last step is just a simplification of the previous step.
Ah i see. This was definitely different to mine. Will use this to compare my work against and ill report back to you guys with what i got (which now must be the same thing)
 

The Electrician

Joined Oct 9, 2007
2,986
Thanks man.
I got my friends lecture notes on developing admittAnce matricies so im reading through that first before i attempt it for this circuit.
However what was the reasoning for taking limits and how does that limit function you use affect the soln...the one with the 5,1 parameters.
Ao is the open loop opamp gain. For an ideal opamp, the gain is infinite, so letting Ao go to infinity we get the result for an ideal opamp.
If we don't do that, the symbolic result is a big mess like this:

Graphic15.png


If we are looking for numeric results such as for plotting response curves, setting Ao to a big number like one million would work just fine.

The value of the gain block in post #65 was set to -1 to explore the max boost and cut. If you wanted the actual frequency response, you could replace H in the symbolic solution for tf with the real H(s) you already have for the filter (with something other than R3 to avoid the duplication if you're getting a symbolic result):

MFB tf.png

Using this method is not practical for the full 15 band circuit, but it's ok for one (or maybe up to 5) band to explore what parameters affect max boost, etc.

Use spice for the 15 band circuit! :)
 

MrAl

Joined Jun 17, 2014
13,704
Hello again,

I did a quick two BP stage symbolic analysis, and then graphed the results.
What it looks like is rather strange because the in between gain is quite a bit lower than the two peak gains, and the peak gains go above A+1 when both are in boost mode.
Note this shows both stages in full boost mode.

Not sure if i would want a GE like that.
 

Attachments

The Electrician

Joined Oct 9, 2007
2,986
Hello again,

I did a quick two BP stage symbolic analysis, and then graphed the results.
What it looks like is rather strange because the in between gain is quite a bit lower than the two peak gains, and the peak gains go above A+1 when both are in boost mode.
Note this shows both stages in full boost mode.

Not sure if i would want a GE like that.
I get the same result:

Graphic16.png

It looks somewhat better on the more usual LogLog plot:

Graphic17.png
 

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
Hello again,

I did a quick two BP stage symbolic analysis, and then graphed the results.
What it looks like is rather strange because the in between gain is quite a bit lower than the two peak gains, and the peak gains go above A+1 when both are in boost mode.
Note this shows both stages in full boost mode.

Not sure if i would want a GE like that.

I get the same result:

View attachment 162933

It looks somewhat better on the more usual LogLog plot:

View attachment 162934
Sorry for the late response guys.
I got out the admittance matrix except for Rows 3,5 and 7. How'd you get Ao+1 alone in those rows.
Like for example, for row 3 the nodal equation would have had to be AoV2+V3 = 0 (Sum of all currents into node 3 = 0)...this I don't understand.

And it looks like it has some ripple in the output because of bandpass stages interacting with each other based on the responses you guys got when you plot them.

According to this:
https://www.rane.com/note154.html

Also check this out

https://www.rane.com/note101.html

It's because of interacting filter stages (i'm assuming Q should be high to reduce this interaction...I designed my filter stages with a Q of 4). But realistically what effect does this ripple really have on the output signal?
Because according to those links alot of commercial grade EQs contain ripple in the output.
 
Last edited:

The Electrician

Joined Oct 9, 2007
2,986
Sorry for the late response guys.
I got out the admittance matrix except for Rows 3,5 and 7. How'd you get Ao+1 alone in those rows.
Like for example, for row 3 the nodal equation would have had to be AoV2+V3 = 0 (Sum of all currents into node 3 = 0)...this I don't understand.
Those 3 are not ordinary nodal equations. They are constraint equations. Rewrite as Ao*V2 = -V3; it's just saying that the output of the opamp (V3) is just Ao (the gain of the opamp) times the input (V2) with appropriate sign.
 

The Electrician

Joined Oct 9, 2007
2,986
ccording to this:
https://www.rane.com/note154.html

It's because of interacting filter stages (i'm assuming Q should be high to reduce this interaction...I designed my filter stages with a Q of 4). But realistically what effect does this ripple really have on the output signal?
Because according to those links alot of commercial grade EQs contain ripple in the output.
It's a fact; you will get ripple unless you do the fancy technique described in the Rane note154

I expanded my analysis to include 5 bands. Here's the response with 5 bands at max boost (RA = 1 ohm):

Graphic18.png

With less boost (RA = 35000 ohms) you still get ripple. Reducing the Q will make it less:

Graphic19.png

This is the sort of thing audio purists have flame wars over. How much ripple is tolerable?

And lowering Q will probably increase the interaction between bands. Here's the response with the first band set to maximum boost and the next 4 set for flat response:

Graphic20.png
 
Last edited:

MrAl

Joined Jun 17, 2014
13,704
Hello again,

Well what we seem to be calling "ripple" here is the response of the output with full boost for more that one BP section analysis, and although i have no problem with a little bit of this so called ripple, i do have a problem when the low point is 3db down from the high point or at least nearly so. I would probably shoot for less than that if i was going to design one for my own personal use.
3db down is effectively halving the output level which could make some audio selections sound unrealistic. Of course the listener is the final judge here, but since this is still in the design stage why not see if it can be improved. Yes, reducing the Q of each stage will probably do the trick and that's not too hard to check.
 

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
Will inquire about the ripple tolerance and report back to you guys. I guess any extra things like this can be justified or discussed in the discussion part of the write-up, but it'd be pretty cool to not have it (or as little as possible) for the real life demo.

I can redesign the filters for a Q of 2 and i'll post my values. I think I read somewhere that the Q of an EQ shouldn't be too high, but I cant remember what was the suggested range for Q values for an EQ. But judging from those screenshots it looks like the "Constant Q" aspect of the topology seems to be working which is pretty cool.

Hello again,

Well what we seem to be calling "ripple" here is the response of the output with full boost for more that one BP section analysis, and although i have no problem with a little bit of this so called ripple, i do have a problem when the low point is 3db down from the high point or at least nearly so. I would probably shoot for less than that if i was going to design one for my own personal use.
3db down is effectively halving the output level which could make some audio selections sound unrealistic. Of course the listener is the final judge here, but since this is still in the design stage why not see if it can be improved. Yes, reducing the Q of each stage will probably do the trick and that's not too hard to check.
What do you mean by "unrealistic" im trying to conceptualize this effect of ripple on the sound quality, i'm assuming that it can mess with the tones of certain sections of the audio?
 

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
The bands redesigned for a Q of 2.
BTW I used the admittance matrix method and got the A+1 and 1/A+1 (Finally)

You can see in the background thats what I was doing in Maple (The inverse matrix was HUGE), what was your reasoning for doing Z[5,1]/Z[1,1]?

Was it that those were the only non-zero elements of those rows...since the tf is V5/V1?(That's what I was assuming but I cant tell since the matrix is so huge it won't fit nicely on my screen to check the elements...it's really confusing to look at)

Gonna try to do up some responses to make sure I get the same thing as you guys as well.
 

Attachments

The Electrician

Joined Oct 9, 2007
2,986
You can see in the background thats what I was doing in Maple (The inverse matrix was HUGE)
You'll notice the semicolon after the line "Z=Inverse[Y];". That prevents the Z matrix from being displayed, which is just a waste; seeing it only makes you glad that mathematical software exists--no one could ever do the inverse by hand!

...what was your reasoning for doing Z[5,1]/Z[1,1]?
Z[5,1] is the transfer impedance from node 1 to node 5; Z[1,1] is the driving point impedance at node 1. The ratio of those two can be shown to give the voltage transfer ratio from node 1 to node 5.
 

MrAl

Joined Jun 17, 2014
13,704
Will inquire about the ripple tolerance and report back to you guys. I guess any extra things like this can be justified or discussed in the discussion part of the write-up, but it'd be pretty cool to not have it (or as little as possible) for the real life demo.

I can redesign the filters for a Q of 2 and i'll post my values. I think I read somewhere that the Q of an EQ shouldn't be too high, but I cant remember what was the suggested range for Q values for an EQ. But judging from those screenshots it looks like the "Constant Q" aspect of the topology seems to be working which is pretty cool.

What do you mean by "unrealistic" im trying to conceptualize this effect of ripple on the sound quality, i'm assuming that it can mess with the tones of certain sections of the audio?
Hi,

By 'unrealistic' i mean that some instruments and maybe voices will sound different, because part of the response is boosted while you cant boost other frequencies because the band is not wide enough to cover the whole spectrum evenly.

The Q is related directly to R1 and R2 of the BP filter with a constant gain of 1.

Here is a plot of what we see with different Q's for the 2 band example. There is a 2d plot of Q's from 1 to 4, and a 3d plot of all Q's between 1 and 5 (not that good of a graphic, but better than nothing).
The idea is to get the transfer function into a form with just Q and w1 and w2 the two center frequencies, then plot amplitude vs w with Q running 1 to 5.
It is easier to visualize the amplitude effect though in the 2d view.

What we see here is the bands becoming more 'filled in' in the middle as Q goes down, but we also see the band stretching a bit to the right also. We also see more of a boost.
Maybe a good choice is Q=2 as that does not dip as much in the middle.

There is also the chance that as we go up in frequency the bands show less cut in the middle, i did not look at any others yet.

This is a good example of using the computer for studying a circuit design for determining the feasibility of that circuit in the real world.

[LATER]
Added a third file showing various Q's with 3 BandPass channels where the 3rd channel is placed right between the two at 100Hz and 160Hz, so it fills in the gap with Q=4. Kind of interesting.
 

Attachments

Last edited:

Thread Starter

Ronaldo95163

Joined Sep 2, 2018
52
Hi,

By 'unrealistic' i mean that some instruments and maybe voices will sound different, because part of the response is boosted while you cant boost other frequencies because the band is not wide enough to cover the whole spectrum evenly.

The Q is related directly to R1 and R2 of the BP filter with a constant gain of 1.

Here is a plot of what we see with different Q's for the 2 band example. There is a 2d plot of Q's from 1 to 4, and a 3d plot of all Q's between 1 and 5 (not that good of a graphic, but better than nothing).
The idea is to get the transfer function into a form with just Q and w1 and w2 the two center frequencies, then plot amplitude vs w with Q running 1 to 5.
It is easier to visualize the amplitude effect though in the 2d view.

What we see here is the bands becoming more 'filled in' in the middle as Q goes down, but we also see the band stretching a bit to the right also. We also see more of a boost.
Maybe a good choice is Q=2 as that does not dip as much in the middle.

There is also the chance that as we go up in frequency the bands show less cut in the middle, i did not look at any others yet.

This is a good example of using the computer for studying a circuit design for determining the feasibility of that circuit in the real world.

[LATER]
Added a third file showing various Q's with 3 BandPass channels where the 3rd channel is placed right between the two at 100Hz and 160Hz, so it fills in the gap with Q=4. Kind of interesting.
Having some problems with the plots...maple keeps crashing on me...will try to do it on matlab instead.
Either way they should result in the same thing as yours.
Q=2 seems to give a nice response with 3 filters since the ripple is almost gone.

Why would we consider q=1 as not usable?...is it because its response is too wide? The gain seems to be a bit large too
 
Top