Q of 3rd order filters

LvW

Joined Jun 13, 2013
1,755
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?
Yes - there is an allpass of first order:

H(s)=(1-b1*s)/(1+b1*s)

In this case - and for all allpass functions for orders n>1 - the location of the pole(s) and the zero(es) is always symmetrical to the imag. axis of the complex s-plane. Because the real part(s) of the pole(s) must me nagative, the real part(s) of the zero(es) is positive.
 

LvW

Joined Jun 13, 2013
1,755
...................
...................
which is an all-pass function, hence flat frequency response.
Hi Tesla, you should check the last equation again.
It cannot be correct.
Adding a lowpass and a highpass will never give an allpass.
Simple example: The addition of a 2nd-order lowpass with a 2nd-order highpass (equal pole data Qp and wp for both filters) results in a 2nd-order notch filter (bandstop-filter) with a real zero at w=wp.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,472
Yes - there is an allpass of first order:

H(s)=(1-b1*s)/(1+b1*s)

In this case - and for all allpass functions for orders n>1 - the location of the pole(s) and the zero(es) is always symmetrical to the imag. axis of the complex s-plane. Because the real part(s) of the pole(s) must me nagative, the real part(s) of the zero(es) is positive.
Ok thanks for the reply.

I am working on another way to describe the 1st order low pass filter in terms of Q.
If Q is related to peaking as testla pointed out, then i cant see why it should not refer to ANY order filter.
It seems to be that if a filter has peaking then the Q must be above 0.5, but if it does not have peaking then the Q is either 0.5 or below. I suspect that the reason much of the literature says that the 1st order filter has no Q is simply because it does not require a Q as an input to the filter calculation.

Now the generally accepted text explains that for a filter to have a Q it must have complex poles. But who made that rule up? If i go to the store i can only buy two apples if they are two for a dollar?

But can you come up with any reason why the first order "has no Q" OTHER than that "a filter must have two poles to have a Q (or similar)".
I apologize if you answered this already and i missed it or forgot it because i am involved in a lot of stuff not only this forum, but in such case please refer me to the post #. Thanks.
 

Tesla23

Joined May 10, 2009
542
Hi Tesla, you should check the last equation again.
It cannot be correct.
Adding a lowpass and a highpass will never give an allpass.
Simple example: The addition of a 2nd-order lowpass with a 2nd-order highpass (equal pole data Qp and wp for both filters) results in a 2nd-order notch filter (bandstop-filter) with a real zero at w=wp.
LvW, this cannot be correct, simply because of the example I gave above where a low pass and high pass are summed to get an all pass. I'm pretty sure the algebra is correct.

What you say may be true in some situations, for example, if the low pass is a 2nd order butterworth
\[ H_{LP}(j\omega) = \frac{\omega_0^2}{s^2+\sqrt{2}\omega_0 s+\omega_0^2} \]

at the -3dB point \( H_{LP}(j\omega_0) = \frac{-j}{\sqrt{2}} \)

and if the high pass is the corresponding 2nd order butterworth

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

at the -3dB point \( H_{HP}(j\omega_0) = \frac{j}{\sqrt{2}} \)

so these will sum to 0.

In our case, however, the LP filter is two butterworth filters cascaded, and the high pass a cascade of two butterworth high-pass filters, so

at the -3dB point \( H_{LP}(j\omega_0) = \frac{-1}{2} \) and \( H_{HP}(j\omega_0) = \frac{-1}{2} \), these no longer cancel but add to unity amplitude - entirely consistent with an all pass function.
 

MrAl

Joined Jun 17, 2014
11,472
LvW, this cannot be correct, simply because of the example I gave above where a low pass and high pass are summed to get an all pass. I'm pretty sure the algebra is correct.

What you say may be true in some situations, for example, if the low pass is a 2nd order butterworth
\[ H_{LP}(j\omega) = \frac{\omega_0^2}{s^2+\sqrt{2}\omega_0 s+\omega_0^2} \]

at the -3dB point \( H_{LP}(j\omega_0) = \frac{-j}{\sqrt{2}} \)

and if the high pass is the corresponding 2nd order butterworth

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

at the -3dB point \( H_{HP}(j\omega_0) = \frac{j}{\sqrt{2}} \)

so these will sum to 0.

In our case, however, the LP filter is two butterworth filters cascaded, and the high pass a cascade of two butterworth high-pass filters, so

at the -3dB point \( H_{LP}(j\omega_0) = \frac{-1}{2} \) and \( H_{HP}(j\omega_0) = \frac{-1}{2} \), these no longer cancel but add to unity amplitude - entirely consistent with an all pass function.
As i was saying previously, i think you can form all of the basic filter functions by using a low pass and high pass and either adding or subtracting either or both and possibly a gain stage with a gain of 1 (which could mean just adding or subtracting to the original signal).
I'll try to provide some examples later if no one else does and i'll check them out before posting to make sure they perform the expected functions.
 

LvW

Joined Jun 13, 2013
1,755
LvW, this cannot be correct, simply because of the example I gave above where a low pass and high pass are summed to get an all pass. I'm pretty sure the algebra is correct.
Hi Tesla...
If your calculation would be correct, the squaring of [s²-SQRT(2)*wo*s+wo²] must result in the numerator of the 4th order as given in your left hand expression, right? But this is not the case. Please, check it!
 

Tesla23

Joined May 10, 2009
542
Hi Tesla...
If your calculation would be correct, the squaring of [s²-SQRT(2)*wo*s+wo²] must result in the numerator of the 4th order as given in your left hand expression, right? But this is not the case. Please, check it!
\[ 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} } \]

this uses the factorisation:
\[ s^4+\omega_0^4=(s^2+\sqrt{2}\omega_0 s + \omega_0^2)(s^2-\sqrt{2}\omega_0 s + \omega_0^2) \]

So \( s^4+\omega_0^4\) cancels one of the butterworth polynomials from the denominator, leaving in the numerator the RHP zeroes for the all pass function.

It’s actually really neat.
 

LvW

Joined Jun 13, 2013
1,755
If Q is related to peaking as testla pointed out, then i cant see why it should not refer to ANY order filter.
I think, this wording can lead to misunderstandings....yes - Q is "related" to peaking of the magnitude function. But peaking is - from the mathematical point of view - the RESULT of the pole position. And the introduction of a parameter named "Qp" serves only the purpose to describe the pole position (and, hence, has some relation to the peaking behaviour).

I suspect that the reason much of the literature says that the 1st order filter has no Q is simply because it does not require a Q as an input to the filter calculation.
Yes - a first-order lowpass is described by the time constant T only (pole frequency wp=3dB-cut-off wc= 1/T). Of course, the DC gain can be below or above unity - but that is not the question here.

Now the generally accepted text explains that for a filter to have a Q it must have complex poles. But who made that rule up? If i go to the store i can only buy two apples if they are two for a dollar?
Not quite correct - ......must have a pole pair - and as a special case, this pair can be a double pole or even two different poles on the negative-real axis of the s-plane.

But can you come up with any reason why the first order "has no Q" OTHER than that "a filter must have two poles to have a Q (or similar)".
I apologize if you answered this already and i missed it or forgot it because i am involved in a lot of stuff not only this forum, but in such case please refer me to the post #. Thanks.
I think, in my post#154 I have listed seven arguments against a definition of a Q-value for a 1st-order lowpass.
More than that, I never would say "....has no Q....". I think, a clear wording is necessary in order to avoid confusion.
When a 1st-order function y=1/(1+ax) has only one parameter (x) that can be varied (in our case T=1/wp), there is no necessity to ask for a second describing parameter.
 

LvW

Joined Jun 13, 2013
1,755
Tesla - I must admit that I am slightly confused about the math.
I agree to your view (factorisation) - on the other hand, taking the square root from the 4th-order expression (numerator and denominator separately) we get another result.
I must tink about it. Have you - or somebody else - any explanation for this discreapency?
 
Last edited:

Tesla23

Joined May 10, 2009
542
Tesla - I must admit that I am slightly confused about the math.
I agree to your view (factorisation) - on the other hand, taking the square root from the 4th-order expression (numerator and denominator separately) we get another result.
I must tink about it. Have you - or somebody else - any explanation for this discreapency?
I don’t know what discrepancy you are referring to. We aren’t taking square roots, simply cancelling out a common factor. If I simplify p(s)/q(s)^2 by noting that q(s) is a factor of p(s), (say p(s) = q(s)r(s) ), then I end up with r(s)/q(s), and nothing to do with square roots.
 

MrAl

Joined Jun 17, 2014
11,472
I think, this wording can lead to misunderstandings....yes - Q is "related" to peaking of the magnitude function. But peaking is - from the mathematical point of view - the RESULT of the pole position. And the introduction of a parameter named "Qp" serves only the purpose to describe the pole position (and, hence, has some relation to the peaking behaviour).


Yes - a first-order lowpass is described by the time constant T only (pole frequency wp=3dB-cut-off wc= 1/T). Of course, the DC gain can be below or above unity - but that is not the question here.


Not quite correct - ......must have a pole pair - and as a special case, this pair can be a double pole or even two different poles on the negative-real axis of the s-plane.


I think, in my post#154 I have listed seven arguments against a definition of a Q-value for a 1st-order lowpass.
More than that, I never would say "....has no Q....". I think, a clear wording is necessary in order to avoid confusion.
When a 1st-order function y=1/(1+ax) has only one parameter (x) that can be varied (in our case T=1/wp), there is no necessity to ask for a second describing parameter.
Oh it's not about looking for another describing parameter, it is about looking at responses and asking the question is the first order similar to some value of Q for another filter such as 2nd order. If we could what this would do is actually eliminate a parameter, namely, referring both to Q and peaking factor we could eliminate peaking factor and only have to refer to Q.

But have a look at these plots and see if you can spot the two first order filters.
But hopefully you cant, because there is only one true first order filter.
It is very interesting that the two upper plots are nearly identical throughout yet one is first order and one is 2nd order. The 2nd order has Q=0.25, suggesting that maybe that would be a better choice if we were to assign a virtual Q to the first order LP in the plot.
Actually in this view the Q looks more like zero which is interesting somewhat.
 

Attachments

Last edited:

LvW

Joined Jun 13, 2013
1,755
I don’t know what discrepancy you are referring to. We aren’t taking square roots, simply cancelling out a common factor. If I simplify p(s)/q(s)^2 by noting that q(s) is a factor of p(s), (say p(s) = q(s)r(s) ), then I end up with r(s)/q(s), and nothing to do with square roots.
OK - I agree that I have expressed myself not very clear.
Problem: Squaring the denominator of the final expression (second order) gives the denominator of the first expression (4th order).
However, squaring the numerator of the quadratic expression does NOT lead to the original 4th-order numerator.

Why not? Where is the error?
 

hrs

Joined Jun 13, 2014
397
I must admit that I do not understand the question? Which kind of filter are you speaking of?
In an attempt to demonstrate the relevance of assigning a Q of 0.5 to a first order filter MrAl mentioned in post #158 that
2. To avoid saturation it is best to put the filter with the lowest Q first and the rest after that.
So in that context I wonder: What is filter saturation and how does it relate to Q?
 

Tesla23

Joined May 10, 2009
542
OK - I agree that I have expressed myself not very clear.
Problem: Squaring the denominator of the final expression (second order) gives the denominator of the first expression (4th order).
However, squaring the numerator of the quadratic expression does NOT lead to the original 4th-order numerator.

Why not? Where is the error?
There is no error.

Using your reasoning, if I have an expression ab/b^2 which I simplify to a/b, you would argue this is wrong. Squaring the final denominator gives the original, but if you square the final numerator you don’t get back the original.

If you don’t believe me, here is wolfram alpha’s simplification:

1591363972247.png
 

LvW

Joined Jun 13, 2013
1,755
Tesla....you are right. I have made a bloody error. For a moment,I was of the opinion that squaring the numerator and the denominator (that means: Squaring the whole expression) would not change the value of the ratio num/den..
This is, of course, totally wrong. It seems I am getting older. Sorry for that.
(Your simple example has opened my eyes..)

Now - coming back to your post #175 I have no other choice than to agree to you.
Indeed, the sum of two rather uncommon filters (4th-order lowpass and 4th-order highpass) results in a second-order allpass.
Both 4th-order filters are "uncommon" because each of them consists of a series connection of two identical 2nd-order stages (your wording: "squaring of a 2nd-order function").
I think, in practice, nobody would use such a 4th-order filter - however, here it can serve as part of such a hypothetical and interesting allpass realisation.
I did not know it before....

UPDATE 1: I have simulated the sum of two such 4th-order functions.....not really an allpass. In the pole frequency area there is a peak of app. 6 dB.

UPDATE 2: Tesla, as far as algebra is concerned, I agree with you. But we must not forget the system point of view. What does it mean to convert a 4th-order function to a 2nd-order function? What about the several poles and zeroes ? A 4th-order highpass has 4 poles in the origin. Did they disappear (because an allpass has no poles in the origin) ? I am afraid, that a pure mathematical view does not tell us the truth in this case...
Do you know what I mean?
 
Last edited:

LvW

Joined Jun 13, 2013
1,755
Oh it's not about looking for another describing parameter, it is about looking at responses and asking the question is the first order similar to some value of Q for another filter such as 2nd order. If we could what this would do is actually eliminate a parameter, namely, referring both to Q and peaking factor we could eliminate peaking factor and only have to refer to Q.

But have a look at these plots and see if you can spot the two first order filters.
But hopefully you cant, because there is only one true first order filter.
It is very interesting that the two upper plots are nearly identical throughout yet one is first order and one is 2nd order. The 2nd order has Q=0.25, suggesting that maybe that would be a better choice if we were to assign a virtual Q to the first order LP in the plot.
Actually in this view the Q looks more like zero which is interesting somewhat.
MrAl - I suppose you are referring to the two blue curves, right?
Yes - I agree that both functions look very similar within the shown (limited) frequency range. The reason is as follows:
The 2nd-order lowpass with Qp=0.25 has two real poles which are not very close to each other. For this reason, the magnitude function has two different "corner frequencies" and will start to drop with 20dB/dec (like the 1st-order stage) above the first corner and with another 20dB/dec above the second corner frequency (which is not contained in the frequency range shown in your diagram).

Comment: I think, the two (blue) curves are a good example to show that it really makes no sense (and would be confusing) to assign a Q-value of 0.5 to the first-order function. The second-order function has Q=0.25. This can be proven and it was incorporated into the mathematical expression which is the basis for the graphical display. As we can see, the 1st-order function has nearly the same response (in the first frequency region) - in particular in the region of the cutoff frequency. Don`t you think it would be confusig and unlogical (crazy?) to say this function has a Q=0.5 (and the other one which is nearly identical has Q=0.25) ?
 
Last edited:

MrAl

Joined Jun 17, 2014
11,472
MrAl - I suppose you are referring to the two blue curves, right?
Yes - I agree that both functions look very similar within the shown (limited) frequency range. The reason is as follows:
The 2nd-order lowpass with Qp=0.25 has two real poles which are not very close to each other. For this reason, the magnitude function has two different "corner frequencies" and will start to drop with 20dB/dec (like the 1st-order stage) above the first corner and with another 20dB/dec above the second corner frequency (which is not contained in the frequency range shown in your diagram).

Comment: I think, the two (blue) curves are a good example to show that it really makes no sense (and would be confusing) to assign a Q-value of 0.5 to the first-order function. The second-order function has Q=0.25. This can be proven and it was incorporated into the mathematical expression which is the basis for the graphical display. As we can see, the 1st-order function has nearly the same response (in the first frequency region) - in particular in the region of the cutoff frequency. Don`t you think it would be confusig and unlogical (crazy?) to say this function has a Q=0.5 (and the other one which is nearly identical has Q=0.25) ?
Yes but then again i amended that spec for this kind of viewpoint and stated that the first order could be said to have a virtual Q of 0.25 not 0.5, but then i amended it a second time (perhaps not as clear) as having a Q of zero because in the limit the response becomes IDENTICAL from w=0 to w=infinity. I'll double check this though.

I guess the main theme i am seeing from all these tests and thoughts is that although saying the Q should be 0.5 may not be the best idea, it can be said that the first order filter has an equivalent "Lowest possible Q" maybe without assigning a number to it, or Q=0.

If we were given that 5th order filter design task and were only allowed to use Q as the parameter in which to decide which filter stage came first (choice of first order, 2nd order Q=0.6 and another Q=0.7) we would always put the first order first regardless what else came after (assuming all 2nd order filter stages after that).
But as said before, if we equate "peaking" to "Q" then we would always note that a filter that has no peaking regardless what order it is, has Q of 0.5 or less. The first order has no peaking so it makes sense to think of it as 0.5 or less, and transforming a 2nd order into a perfect first order i think requires a Q of zero so the first order could be said to have the lowest Q of all.

Please keep in mind that the pole position idea came from the distant past. From that point of view, this is the future. The future always holds changes sometimes big changes sometimes small changes. When we seek to understand things we cant always rely on a mechanical application of theory sometimes we have to amend or it may be good to amend. Along the way i have found many things overlooked in theory even though most if it works just fine.

And BTW, i did not make up that 5th order filter design task Texas Instruments did and they stated it the same way i did, in terms of Q only, and they always put the first order filter first.
 

MrAl

Joined Jun 17, 2014
11,472
In an attempt to demonstrate the relevance of assigning a Q of 0.5 to a first order filter MrAl mentioned in post #158 that

So in that context I wonder: What is filter saturation and how does it relate to Q?
Hi,

IN short, saturation is when the signal amplitude exceeds the power supply limits. It is at that point we would see very undesirable clipping occur. In reality though clipping often occurs before that because many op amps are not rail to rail. For example the LM358 op amp which has been around for a long time now, will start to clip when the output exceeds Vcc-1.5 volts approximately. So with a 10v power supply the maximum output signal amplitude would be about 8.5 volts peak approximately.

It relates to Q because depending on the value of the Q of the filter we could see peaking that goes above the expected normal signal amplitude range. When this happens at best all we will see is clipping (which in a filter is not good at all) but worst case we might see the filter produce unusual distortion too as it goes out of the linear range of operation (linear operation is a necessity for clean filter operation).
 
Top