Why not IIR filters + a global phase linearization by FIR

For example, consider a 1st order RC lowpass filter. The phase response is given as -arctan(RCw), where w = 2*pi*f. At w=0, this approaches -RCw, that gives -RC upon differentiation. The unit is seconds. Alternatively, you may differentiate the phase to get -RC / (1+(RCw)^2), put w=0 into it, and get -RC as the answer. Either way, it's the same.

Practically, you just take the slope of the phase at a point closest to DC, say 0.1 Hz etc., and that's it. Hope that helps.
 
The key to any of the subtractive filter is the equation:

HP(f) = exp(-i x Phi1(f) )- exp(-i x Phi2(f)) M(LP(f))

Phi1 can be arbitrary, Phi2 is the phase of the LP section and M(LP(f)) is the amplitude of the LP section. The result is the sum of the HP and LP is flat with phase Phi.

If Phi1(f) is zero for all f, Exp(i x Ph1) = 1 and you just have the typical subtractive filter that when summed to the LP is zero phase regardless of the phase of the LP section.

If Phi1(f) = constant x f, then Phi1 is linear phase and the LP and HP will sum to linear phase, of a simple time delay. The problem is that the amplitude of the HP section can be not so good with notches and/or amplitude greater than 1.

If Phi1(f) = (DC GD) x f, and the LP section is minimum phase you recover the Lipshitz and Vanderkooy filters.

If Phi1 = Phi2 the HP section will have the same phase as the LP section, regardless of whether the LP section is linear phase, minimum phase or arbitrary phase.

If Phi1 = Phi2 and Phi2 is linear phase then both HP an LP have the same linear phase, and if the LP amplitude is of the Butterworth family the HP section will roll off at twice the rate of the LP

In simple words, if HP(f) = exp(-i x Phi1(f) )- (LP(f)) then

HP + LP = exp(-i x Phi1(f))- LP(f)) +LP(f)= exp(-i x Phi1(f))

How you implement the filters is a separate issue but typically you would use FIR.

That about all I can say.
 
  • Like
Reactions: newvirus2008
The easiest way to calculate DC GD for an IIR or analog filter is to calculate the DC delay for each second and first order section and sum them.
For a second order section of given pole freequency fp and Q it is calculated by:

GD [seconds]= 1 / (2*pi*fp*Q)

And for a first order section it is:

GD [seconds]= 1 / (2*pi*fp*Q)

Regards

Charles

P.S. And yes - the DC GD of Butterworth and Chebycheff filters is indeed lower than that of a Bessel of the same order !
 
  • Like
Reactions: pelanj
The key to any of the subtractive filter is the equation:

HP(f) = exp(-i x Phi1(f) )- exp(-i x Phi2(f)) M(LP(f))

Phi1 can be arbitrary, Phi2 is the phase of the LP section and M(LP(f)) is the amplitude of the LP section. The result is the sum of the HP and LP is flat with phase Phi.

If Phi1(f) is zero for all f, Exp(i x Ph1) = 1 and you just have the typical subtractive filter that when summed to the LP is zero phase regardless of the phase of the LP section.

If Phi1(f) = constant x f, then Phi1 is linear phase and the LP and HP will sum to linear phase, of a simple time delay. The problem is that the amplitude of the HP section can be not so good with notches and/or amplitude greater than 1.

If Phi1(f) = (DC GD) x f, and the LP section is minimum phase you recover the Lipshitz and Vanderkooy filters.

If Phi1 = Phi2 the HP section will have the same phase as the LP section, regardless of whether the LP section is linear phase, minimum phase or arbitrary phase.

If Phi1 = Phi2 and Phi2 is linear phase then both HP an LP have the same linear phase, and if the LP amplitude is of the Butterworth family the HP section will roll off at twice the rate of the LP

In simple words, if HP(f) = exp(-i x Phi1(f) )- (LP(f)) then

HP + LP = exp(-i x Phi1(f))- LP(f)) +LP(f)= exp(-i x Phi1(f))

How you implement the filters is a separate issue but typically you would use FIR.

That about all I can say.

I think that sums everything up very well. Thank you.

Also, I happened to find the following website which I believe would be quite useful on the forum.
https://latex.codecogs.com/eqneditor/editor.php

So now, the key to any of the subtractive filters is the equation:

1673370153660.png


And for a first order section it is:

GD [seconds]= 1 / (2*pi*fp)
 
Last edited:
For a second order section of given pole freequency fp and Q it is calculated by:

GD [seconds]= 1 / (2*pi*fp*Q)
For the second order transfer function, phase is -arctan (wwp/Q (wp^2-w2) ). At w = 0, the arctan may simply be ignored.
Differentiating gives something ugly like -wp /Q [ wp^2 - w^2 -2w^3) / (wp^2 - w^2)^2.
However, after putting in w = 0, the answer is a nice and clean -1 / wpQ = -1/(2*pi*fp*Q).
The negative sign simply indicates a delay (latency).

The easiest way to calculate DC GD for an IIR or analog filter is to calculate the DC delay for each second and first order section and sum them.
Since it is generally considered a better idea to implement higher order IIR filters as a cascade of biquads (SOSs) for numerical reasons, it is always possible to simply enter the biquad details into a program like WINISD and read the group delay (across any frequency) rather easily, without breaking one's (own) head. The group delay at a low frequency like 0.1Hz may then be used in place of the DC value.
 
Could you please recommend a book which would discuss the filters and the relevant math? Like from the fundamentals to the more advanced stuff (aimed at DSP).
The fundamentals need to come from generic academic-style books like the ones by Oppenheim, Proakis-Manolakis etc. after which one could follow audio-specific material (like the RBJ Cookbook etc.) with great ease.

Usually, the first step would be finding out how much of the "old stuff" you still remember (well) and how much has been forgotten.
 
Could you please recommend a book which would discuss the filters and the relevant math? Like from the fundamentals to the more advanced stuff (aimed at DSP). I am definitely missing the fundamentals. Thanks in advance!
I like Analog and Digital filter design by Steve Winder (2nd. ed.) (especially for newbies to get familiar with the general concepts of filter design)

If you need a more advanced DSP level, then look for
Lawrence R. Rabiner and Bernard Gold, Theory and application of digital signal processing (1975)
T. W. Parks, C. S. Burrus - Digital Filter Design (1987) (Topics in digital signal processing)
 
  • Like
Reactions: pelanj
I see that you are using a QSys processor : so you can try loudspeakers.audio that gives you a free FIR correction directly with json file for QSys (or other FIR processors) with global phase correction and/or minimal phase correction. Listen and tell us if it works fine for you.
Hi, does it do anything different from applying some form of impulse inversion? (like all room correction has to, i think)

I've made global FIR corrections on commercial analog active and passive boxes in outdoor conditions, for listening comparisons.
Never been impressed / felt there were any real improvements.

Whereas in contrast to global FIR, EQing the individual drivers first with minimum phase, and then using linear-phase xovers, has given impressive results.
 
I've made global FIR corrections on commercial analog active and passive boxes in outdoor conditions, for listening comparisons.
Never been impressed / felt there were any real improvements.
Mark,

By post #38, you had realized that the premise of this thread "A big reason that I think NOT to use global FIR on top an existing speaker setup, be it passive or active, is to avoid pre-ring" was not correct.

Post #45 you wrote:"And here's the measurement, albeit all in the digital domain. man were you guys right, as has already been proven.."

If the global FIR corrections on commercial analog active and passive boxes you made also introduced the pre-ring you demonstrated in your first post, they may have degraded, not improved the sound.

Art
 
Mark,

By post #38, you had realized that the premise of this thread "A big reason that I think NOT to use global FIR on top an existing speaker setup, be it passive or active, is to avoid pre-ring" was not correct.

Post #45 you wrote:"And here's the measurement, albeit all in the digital domain. man were you guys right, as has already been proven.."

If the global FIR corrections on commercial analog active and passive boxes you made also introduced the pre-ring you demonstrated in your first post, they may have degraded, not improved the sound.

Art
Hi Art, the evaluations I made of global FIR corrections on commercial analog active and passive boxes, were entirely based on listening tests, outdoors.
At the time, I didn't care at all about pre-ring potential as shown by measurements (and not sure i should even care now).
All i did measurement-wise, was make sure I had the same flat mag and phase traces outdoors, in all cases.

I put global FIR on UPA-1Ps active analog, JTR-3TX's passives, and on KF650z's with IIR DSP already in place.
The change on all three was more like just playing around with an EQ or two.
On the 3TX and KF650z's, I did my driver by driver min-phase EQ, then add lin-phase xovers. Both boxes improved significantly.
Couldn't get directly to the UPA drivers.
I know that's not a huge sample base to draw conclusions from, but the differences between global FIR vs individual driver EQs and then adding FIR lin-phase xovers was striking. Haven't looked back since..


edit --- an addition: It became obvious in the thread, that IIR xovers can be successfully phase linearized , globally on top.
I still very much doubt if global FIR for an entire speaker, that extends beyond linearizing IIR xovers in place, is valid technique...
Would appreciate experts giving their thoughts...thx,
 
Last edited:
Hi Art, the evaluations I made of global FIR corrections on commercial analog active and passive boxes, were entirely based on listening tests, outdoors.
At the time, I didn't care at all about pre-ring potential as shown by measurements (and not sure i should even care now).
All i did measurement-wise, was make sure I had the same flat mag and phase traces outdoors, in all cases.
I understand not caring about pre-ring potential and not looking back, but do you know whether the flat mag and phase traces produced did or did not have pre-ring?
 
I understand not caring about pre-ring potential and not looking back, but do you know whether the flat mag and phase traces produced did or did not have pre-ring?
I don't know for certain. But my 95% probable guess is that they did have measured pre-ring, because I didn't know enough at the time to use an IIR system high-pass, instead of a system high-pass embedded in the FIR file (to get rid of measured step-response dip, aka pre-ring .)
 
edit --- an addition: It became obvious in the thread, that IIR xovers can be successfully phase linearized , globally on top.
I still very much doubt if global FIR for an entire speaker, that extends beyond linearizing IIR xovers in place, is valid technique...
Would appreciate experts giving their thoughts...thx,
Mark it's not clear exactly what you did with your corrections in your comparisons to do anything other than guess why it was not successful. Outdoors is an unusual situation for most and many comments will not be applicable to it.

Measuring and listening in the same environment is always going to make comparison of the measurement and result easier.
When that is outdoors and the speakers have been measured well and equalized to produce flat magnitude (or whatever slope is desired) and phase within the passband (without and glaring directivity errors), what more is there to be done?

Any time an equalizer changes phase without a corresponding magnitude change it is easier to get it wrong than it is to get it right. There is always more that can be done at the crossover level than there is at a global level. It makes more sense to fix the problem at the source if that is an option.

But when the best that can be done with a speaker outdoors or anechoically has been, when you bring that speaker indoors, there is more that can be done with an overall FIR filter. I don't consider myself an expert but I have spent more than enough time on this last point to have formed an opinion based on experience.
 
Mark it's not clear exactly what you did with your corrections in your comparisons to do anything other than guess why it was not successful. Outdoors is an unusual situation for most and many comments will not be applicable to it.

Measuring and listening in the same environment is always going to make comparison of the measurement and result easier.
When that is outdoors and the speakers have been measured well and equalized to produce flat magnitude (or whatever slope is desired) and phase within the passband (without and glaring directivity errors), what more is there to be done?

Any time an equalizer changes phase without a corresponding magnitude change it is easier to get it wrong than it is to get it right. There is always more that can be done at the crossover level than there is at a global level. It makes more sense to fix the problem at the source if that is an option.

But when the best that can be done with a speaker outdoors or anechoically has been, when you bring that speaker indoors, there is more that can be done with an overall FIR filter. I don't consider myself an expert but I have spent more than enough time on this last point to have formed an opinion based on experience.
Yep fluid, i know not many will connect with outdoor listening tests.
I view them as the best way to evaluate a speaker. I feel/think i can isolate variables and explore their effects outdoors, fairly, in ways impossible indoors.

And readily admit how little i know what is possible with any type of indoor global FIR corrections. It's a frontier to explore on the horizon, when straight-up quasi-anechoic speaker building, and current LCR indoor kick, appear to have have no more pluckable fruit.
 
....the premise of this thread "A big reason that I think NOT to use global FIR on top an existing speaker setup, be it passive or active, is to avoid pre-ring" was not correct.
I think that premise still holds (at least partially) because pre-ring is a "characteristic" of having a linear phase response, the pre (vs post) makes it more audible due to the human psychoacoustics. Of course, this assumes that the global FIR linearises the phase.

On the whole, FIR appears to be something that:

  • Introduces long delays just for linearising the phase of the already attenuated stopband material OR
  • Simply acts as another truncated filter on top (when non-linear phase), which may be done with less delay using IIR.

FIR and linear/zero phase techniques are great resources for offline processing (studio / lab etc.) and are extensively used in all old / new audio algorithms. But I must agree with that EQ must be IIR and FIR needs to be limited to crossovers and that is if the delay is tolerable (HF crossing etc.).