Q of 3rd order filters

Tesla23

Joined May 10, 2009
517
Tesla23....there is a formula which gives you the overshoot as a function of Qp:

Overshoot "gamma" (in %)=100*exp[-Pi/SQRT(4Qp²-1)]
Sorry, I didn't make myself clear - I know there is a simple relationship for a second order filter, but not for a higher order filters. I was just giving an example of a filter which contains a second order section with a Q of 1.4, but that the overall filter step response only has 0.12% overshoot.
 

LvW

Joined Jun 13, 2013
1,570
Sorry, I didn't make myself clear - I know there is a simple relationship for a second order filter, but not for a higher order filters. I was just giving an example of a filter which contains a second order section with a Q of 1.4, but that the overall filter step response only has 0.12% overshoot.
Tesla - OK, I se your point. Yes, I agree .....a cascade of several 2nd-order blocks can have a step response that looks better (as far as the overshoot is concerned) than that of one of the stages. But I am not sure (better: I doubt) if there is a corresponding formula for filter orders n>2.
 

MrAl

Joined Jun 17, 2014
9,555
It's straightforward, you put them in order of increasing peaking, so the 1st order section with no peaking goes first, followed by the second order sections in order of increasing Q. What's your point? What's this got to do with the OP's problem?
Ok so you see that it goes in the SAME position as the LOWEST Q stage WOULD GO if we said it had the LOWEST Q.

For example, for a fourth order filter if we had two 2nd order filters with Q's 0.6 and 1.6 respectively, we would see the 0.6 stage go first.
 

Papabravo

Joined Feb 24, 2006
19,329
The original problem was an unfamiliarity with filter specifications. He was worried about high Q, and peaking, when he should have said: "I want a filter that is maximally flat in the passband and is down by say 60 dB at the start of the stopband." Then defined where the passband and the stopband are located. Those requirements will determine the order and everything else about the design. The Q of each section will be whatever it needs to be to meet those requirements since it is determined by the pole locations. That's all.
 

Tesla23

Joined May 10, 2009
517
Ok so you see that it goes in the SAME position as the LOWEST Q stage WOULD GO if we said it had the LOWEST Q.

For example, for a fourth order filter if we had two 2nd order filters with Q's 0.6 and 1.6 respectively, we would see the 0.6 stage go first.
Maybe it's that I spent some of my time in teaching, but I've always found rules that embody explanations, rather that arbitrary definitions, are much more useful. So I see a statement like "place them in order of the peaking in their amplitude response", coupled with the knowledge that a first order section has no peaking and second order sections have peaking that increases with Q, as simple and understandable. I would find it easy to remember as it includes the elements of the explanation and is built on other elementary pieces of knowledge about filter elements, rather than arbitrary definitions.

You would prefer "place them in order of increasing Q", coupled with "I define the Q of a first order filter as 0.5". If it works for you, fine. Just remember that when you see a picture like this:
1590795202974.png
that that is not the response of your Q=0.5 filter section.
 
Last edited:

Thread Starter

PeteHL

Joined Dec 17, 2014
409
My question at this point is whether or not Q of a given filter (AKA filter Q) is equal to Qp (pole Q) of that filter, or not? In other words, if for example Qp of a given filter equals 0.5, does this mean that the filter will show an amplitude response consistent with a filter Q equal to 0.5 or something else?

From the National Semiconductor Application Note 779,

"The Q of a second-order filter of a given type will determine the relative shape of the amplitude response."

So we know what the shape of the amplitude response should be if filter Q equals 0.5. My question is, if the given filter has Qp = 0.5, will that filter have an amplitude response that is known to be that of a filter with filter Q = 0.5, or not?

-Pete
 

Tesla23

Joined May 10, 2009
517
My question at this point is whether or not Q of a given filter (AKA filter Q) is equal to Qp (pole Q) of that filter, or not? In other words, if for example Qp of a given filter equals 0.5, does this mean that the filter will show an amplitude response consistent with a filter Q equal to 0.5 or something else?

From the National Semiconductor Application Note 779,

"The Q of a second-order filter of a given type will determine the relative shape of the amplitude response."

So we know what the shape of the amplitude response should be if filter Q equals 0.5. My question is, if the given filter has Qp = 0.5, will that filter have an amplitude response that is known to be that of a filter with filter Q = 0.5, or not?

-Pete
As stated in the app note, for a second order filter, the shape of the amplitude response of the filter is set by the filter Q, which is equal to the pole Q.
Here is an indicative plot:

1590795853626.png

For other filter orders, there is no generally accepted definition of "filter Q" and as far as I know it is a meaningless concept.

What are you requirements on the frequency response? i.e. what frequencies should it pass and which ones shoudl it reject and by how much?
What are your requirements on the step response (overshoot etc)?
 

MrAl

Joined Jun 17, 2014
9,555
Maybe it's that I spent some of my time in teaching, but I've always found rules that embody explanations, rather that arbitrary definitions, are much more useful. So I see a statement like "place them in order of the peaking in their amplitude response", coupled with the knowledge that a first order section has no peaking and second order sections have peaking that increases with Q, as simple and understandable. I would find it easy to remember as it includes the elements of the explanation and is built on other elementary pieces of knowledge about filter elements, rather than arbitrary definitions.

You would prefer "place them in order of increasing Q", coupled with "I define the Q of a first order filter as 0.5". If it works for you, fine. Just remember that when you see a picture like this:
View attachment 208464
that that is not the response of your Q=0.5 filter section.
Hello,

I have to say that is interesting and i see you saw right through the seaweed right to the main point and made comments that make sense. I commend you on that really and thanks for being so clear.

I do have to comment on your drawing, which is also interesting.
I'll agree that the plot you show for Q=5 is NOT the plot of "my" first order LP filter with claimed virtual Q of 0.5, no problem there. However, since that is an interesting way to look at this i submit the following plot for you to examine.

In this plot we see your plot of 2nd order with Q=0.5, and 1st order filter with Q or not with Q whatever you prefer. Note how similar the initial roll off is. Isnt that interesting :)

So although the 2nd order plot in your post is not exactly the same, there are some very interesting similarities to a first order when the 2nd order has a Q of 0.5. I think the similarities are significant.

Also, i wonder if you were able to see the other example i gave where we connect two first order filters in simple cascade and get a Q of 0.5 as the result (and it is actually a 2nd order then).

I have a more advanced "proof" that comes from more advanced mathematics but i hesitate to mention that because it gets a little involved. I'll save that for later or another time.

[NOTE: w is normalized in the plot below]
[Also on a log scale the difference is more extreme]

FirstAndSecondOrderLP_20200529-1.gif
 
Last edited:

Tesla23

Joined May 10, 2009
517
My question at this point is whether or not Q of a given filter (AKA filter Q) is equal to Qp (pole Q) of that filter, or not? In other words, if for example Qp of a given filter equals 0.5, does this mean that the filter will show an amplitude response consistent with a filter Q equal to 0.5 or something else?

From the National Semiconductor Application Note 779,

"The Q of a second-order filter of a given type will determine the relative shape of the amplitude response."

So we know what the shape of the amplitude response should be if filter Q equals 0.5. My question is, if the given filter has Qp = 0.5, will that filter have an amplitude response that is known to be that of a filter with filter Q = 0.5, or not?

-Pete
Pete,

someone has pointed out to you (I hope) that you generally don't have to worry about the Q of the individual filter sections when you are choosing your filter, you usually start from a catalogue of standard filter responses to see if one of those will meet your needs. There is one in:
https://www.analog.com/media/en/training-seminars/design-handbooks/Basic-Linear-Design/Chapter8.pdf
starting on page 8.31. The first ones are Butterworth filters, and the amplitude responses are (3dB point at freq = 1, I've added the filter order):

1590810093479.png
similarly for the step responses:

1590810156069.png

so these tell you, for example, that for a 4th order filter, that you are 24dB down at a frequency double the -3dB frequency. For the step responses, the ones with the longer delay correspond to the higher orders.

You want low overshoot, so the standard filters that may suit are the Bessel filters (page 8.37):
1590810364177.png
you can see that they roll off more slowly than the butterworth filters, but they do have much less overshoot:

1590810420718.png

If you can find a filter solution from a standard catalogue that meets both the frequency selectivity you need, along with the time response, that may be the easiest solution to your problem.
 

Thread Starter

PeteHL

Joined Dec 17, 2014
409
As stated in the app note, for a second order filter, the shape of the amplitude response of the filter is set by the filter Q, which is equal to the pole Q.

For other filter orders, there is no generally accepted definition of "filter Q" and as far as I know it is a meaningless concept.

What are you requirements on the frequency response? i.e. what frequencies should it pass and which ones shoudl it reject and by how much?
What are your requirements on the step response (overshoot etc)?
 

Thread Starter

PeteHL

Joined Dec 17, 2014
409
As stated in the app note, for a second order filter, the shape of the amplitude response of the filter is set by the filter Q, which is equal to the pole Q.

For other filter orders, there is no generally accepted definition of "filter Q" and as far as I know it is a meaningless concept.

What are you requirements on the frequency response? i.e. what frequencies should it pass and which ones shoudl it reject and by how much?
What are your requirements on the step response (overshoot etc)?
My question about pole Q and filter Q was because I now have a satisfactory filter that makes use of a Linkwitz-Riley 2nd order filter. In Linkwitz's article (see the link in my post #106 of this thread), what he calls Q sub zero is made equal to 0.5 when solving for the component values of the LR2 filter. So I wanted to be clear that if Q sub zero equals 0.5, then this means that response of the filter at the start of roll-off can be described as that of a filter with Q = 0.5.

My whole interest in Q came from spotting a rule of thumb in the NS app note 779 saying that in general filter ringing derives from rate of roll-off and Q of the filter. At this point I like general statements as right now anyway I'm not capable of doing sophisticated filter analysis and I needed guidance in finding a quick fix for my ringing filter.

Thank you for your effort in explaining the high level engineering.

Regards,
Pete
 

MrAl

Joined Jun 17, 2014
9,555
My question about pole Q and filter Q was because I now have a satisfactory filter that makes use of a Linkwitz-Riley 2nd order filter. In Linkwitz's article (see the link in my post #106 of this thread), what he calls Q sub zero is made equal to 0.5 when solving for the component values of the LR2 filter. So I wanted to be clear that if Q sub zero equals 0.5, then this means that response of the filter at the start of roll-off can be described as that of a filter with Q = 0.5.

My whole interest in Q came from spotting a rule of thumb in the NS app note 779 saying that in general filter ringing derives from rate of roll-off and Q of the filter. At this point I like general statements as right now anyway I'm not capable of doing sophisticated filter analysis and I needed guidance in finding a quick fix for my ringing filter.

Thank you for your effort in explaining the high level engineering.

Regards,
Pete
Do you use any math software? Everyone does these days and that makes circuit analysis faster and easier.
There are some simple rules to follow for a circuit such as a filter. But if you dont want to get involved with that you can post the filter schematic right here and someone here will provide the transfer function for you and you can then plot it with any math software that allows you to plot graphs.

If you are interested in electrical circuits you can learn some circuit analysis i dont think ti will take too long if you use math software along with it. In the old days it had to be done by hand, now it doesnt.
You could also use a simulator.
 

Tesla23

Joined May 10, 2009
517
My question about pole Q and filter Q was because I now have a satisfactory filter that makes use of a Linkwitz-Riley 2nd order filter. In Linkwitz's article (see the link in my post #106 of this thread), what he calls Q sub zero is made equal to 0.5 when solving for the component values of the LR2 filter. So I wanted to be clear that if Q sub zero equals 0.5, then this means that response of the filter at the start of roll-off can be described as that of a filter with Q = 0.5.

My whole interest in Q came from spotting a rule of thumb in the NS app note 779 saying that in general filter ringing derives from rate of roll-off and Q of the filter. At this point I like general statements as right now anyway I'm not capable of doing sophisticated filter analysis and I needed guidance in finding a quick fix for my ringing filter.

Thank you for your effort in explaining the high level engineering.

Regards,
Pete
Apologies - when I skimmed the thread I missed the Linkwitz-Riley link. I assume you are making a speaker crossover? I only ask as in your first post you had a 400Hz high pass and a 800Hz low pass which would be unusual.

If I could summarise what I think is the Linkwitz-Riley approach (and be aware I'm no audiophile and have never made an active crossover, however I'm sure someone will correct me if I am wrong).

1590903963645.png

Ideally you want Vhi + Vlo = Vin, just with the high frequencies going to Vhi, and the low frequencies going to Vlo.

This means that for the two filters, if the high pass filter has transfer function \( H_{HP}(j\omega) \) and the lowpass filter has transfer function \( H_{LP}(j\omega) \) then we want:
\[ |H_{HP}(j\omega) + H_{LP}(j\omega)| = 1 \] equation (1)

So you want to find two filter transfer functions that satisfy this. If you simply take a lowpass filter and a highpass filter, when you add them you get a lumpy response in the transition region. For example, if you just take a second order butterworth lowpass and highpass, and use their -3dB points as the crossover, you get 3dB peaking at the crossover frequency as shown in purple line below:

1590904480881.png

I suspect that even playing around with the cutoff frequency, you can't get the total response flat. L-R's contribution here was to discover that if you used two butterworth filters in series with the same cutoffs, you could achieve a perfectly flat total response (the pale blue line above). I think they are saying that they satisfy equation (1) exactly, but I haven’t verified this.

To get this response you must implement the butterworth filters exactly as specified, What makes a butterworth filter butterworth IS the pole locations, so you are not free to move them. To get the L_R response you need to cascade two identical butterworth filters for the HP and two identical ones for the LP, the individual filters should be designed with -3dB frequencies at your desired crossover frequency.

The individual filters will overshoot and ring when fed with a step function, but if you were to add the outputs of the two filters there should be minimal ringing (ideally none). What ringing were you seeing that was a worry? Do you have any way of measuring the filter responses to check they are working as specified (signal generator and oscilloscope preferably, even sound card based ones should be OK for these frequencies).
 
Last edited:

LvW

Joined Jun 13, 2013
1,570
Apologies - when I skimmed the thread I missed the Linkwitz-Riley link. I assume you are making a speaker crossover? I only ask as in your first post you had a 400Hz high pass and a 800Hz low pass which would be unusual.

If I could summarise what I think is the Linkwitz-Riley approach (and be aware I'm no audiophile and have never made an active crossover, however I'm sure someone will correct me if I am wrong).

View attachment 208562

Ideally you want Vhi + Vlo = Vin, just with the high frequencies going to Vhi, and the low frequencies going to Vlo.

This means that for the two filters, if the high pass filter has transfer function \( H_{HP}(j\omega) \) and the lowpass filter has transfer function \( H_{LP}(j\omega) \) then we want:
\[ |H_{HP}(j\omega) + H_{LP}(j\omega)| = 1 \] equation (1)

So you want to find two filter transfer functions that satisfy this. If you simply take a lowpass filter and a highpass filter, when you add them you get a lumpy response in the transition region. For example, if you just take a second order butterworth lowpass and highpass, and use their -3dB points as the crossover, you get 3dB peaking at the crossover frequency as shown in purple line below:

View attachment 208563

I suspect that even playing around with the cutoff frequency, you can't get the total response flat. L-R's contribution here was to discover that if you used two butterworth filters in series with the same cutoffs, you could achieve a perfectly flat total response (the pale blue line above). I think they are saying that they satisfy equation (1) exactly, but I haven’t verified this.

To get this response you must implement the butterworth filters exactly as specified, What makes a butterworth filter butterworth IS the pole locations, so you are not free to move them. To get the L_R response you need to cascade two identical butterworth filters for the HP and two identical ones for the LP, the individual filters should be designed with -3dB frequencies at your desired crossover frequency.

The individual filters will overshoot and ring when fed with a step function, but if you were to add the outputs of the two filters there should be minimal ringing (ideally none). What ringing were you seeing that was a worry? Do you have any way of measuring the filter responses to check they are working as specified (signal generator and oscilloscope preferably, even sound card based ones should be OK for these frequencies).
Tesla. I only can reply mobile.....very short. How did you arrive at equ.(1) ,and why did you think one would want to realize this equstion?
 

Tesla23

Joined May 10, 2009
517
I was just trying to think of the basic requirement of a crossover, in the transition region the output is the sum of the LP filter and the HP filter (via the speakers of course), so in a simplistic design a flat frequency response would mean

\[ |H_{LP}(j\omega) + H_{HP}(j\omega)| = 1 \]

i,e. an all pass function.

(I am no audiophile so I may have missed something!)

Linkwitz and Riley's initial discovery seems to be that if \( H_{LP}(j\omega) \) is a butterworth squared low pass filter, and \( H_{HP}(j\omega) \) is the correcponding butterworth squared high pass, then the sum is all-pass. For a 2nd order:

\[ H_{LP}(s) = \frac{\omega_0^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]

\[ H_{HP}(s) = \frac{s^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]


so
\[ H_{LP}(s)+H_{HP}(s) = \frac{s^4+\omega_0^4}{{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} } = \frac{s^2-\sqrt{2}\omega_0 s + \omega_0^2}{{s^2+\sqrt{2}\omega_0 s + \omega_0^2} } \]

which is an all-pass function, hence flat frequency response.
 

MrAl

Joined Jun 17, 2014
9,555
I was just trying to think of the basic requirement of a crossover, in the transition region the output is the sum of the LP filter and the HP filter (via the speakers of course), so in a simplistic design a flat frequency response would mean

\[ |H_{LP}(j\omega) + H_{HP}(j\omega)| = 1 \]

i,e. an all pass function.

(I am no audiophile so I may have missed something!)

Linkwitz and Riley's initial discovery seems to be that if \( H_{LP}(j\omega) \) is a butterworth squared low pass filter, and \( H_{HP}(j\omega) \) is the correcponding butterworth squared high pass, then the sum is all-pass. For a 2nd order:

\[ H_{LP}(s) = \frac{\omega_0^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]

\[ H_{HP}(s) = \frac{s^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]


so
\[ H_{LP}(s)+H_{HP}(s) = \frac{s^4+\omega_0^4}{{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} } = \frac{s^2-\sqrt{2}\omega_0 s + \omega_0^2}{{s^2+\sqrt{2}\omega_0 s + \omega_0^2} } \]

which is an all-pass function, hence flat frequency response.
Hi,

I think you can make all common filters with those two and an adder or subtractor and being able to change the gains. So i think you can make bandpass, notch, allpass, depending on how you add or subtract and maybe add a gain stage of 1 somewhere.
 

LvW

Joined Jun 13, 2013
1,570
I was just trying to think of the basic requirement of a crossover, in the transition region the output is the sum of the LP filter and the HP filter (via the speakers of course), so in a simplistic design a flat frequency response would mean

\[ |H_{LP}(j\omega) + H_{HP}(j\omega)| = 1 \]

i,e. an all pass function.

(I am no audiophile so I may have missed something!)

Linkwitz and Riley's initial discovery seems to be that if \( H_{LP}(j\omega) \) is a butterworth squared low pass filter, and \( H_{HP}(j\omega) \) is the correcponding butterworth squared high pass, then the sum is all-pass. For a 2nd order:

\[ H_{LP}(s) = \frac{\omega_0^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]

\[ H_{HP}(s) = \frac{s^4}{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} \]


so
\[ H_{LP}(s)+H_{HP}(s) = \frac{s^4+\omega_0^4}{{(s^2+\sqrt{2}\omega_0 s + \omega_0^2)^2} } = \frac{s^2-\sqrt{2}\omega_0 s + \omega_0^2}{{s^2+\sqrt{2}\omega_0 s + \omega_0^2} } \]

which is an all-pass function, hence flat frequency response.
Tesla, it is not an allpass. An allpass has zeros symmetrical to the poles...more tomorrow.
 

MrAl

Joined Jun 17, 2014
9,555
No, this applies to ALL allpass functions.
What applies? You said:
"An allpass has zeros symmetrical to the poles...more tomorrow. "

You used the plural form of "pole" that's what caught my attention. But isnt there such a thing as a first order allpass?
 
Top