Why not IIR filters + a global phase linearization by FIR

I've not found a way to do this, I think it would be a useful addition, I have one request in the pipeline with them, they seem very open to suggestions.

Thanks. I'll ditto the request...after i donate :)
Re scaling, I worked out the scaling factor for 8th order Bessel from what you posted based on Greg's scaling factor to work directly from the Bessel tables and also worked out the scaling for the the 4th order by iteration, should be good to one decimal place.
Scaling factors I have are:
4th order Bessel: /1.76
8th order Bessel: /1.795
That's the same scaling factor i got...55-56Hz low-pass for 100Hz xover, -6dB.
 
You may look at the higher order / higher sample-rate implementations for consistency though. Maybe Mark can help you with his observations on the 10th and 16th ones.
10th & 16th were a pretty close match with 8th. Phase response matching is a little improved though a slightly wider overlap region, but not enough to matter imo. And the low pass magnitude gets a little steeper as order increases, but it too seems insignificant.
I can't really see any reason to go higher than 8th, given the delay increase.
 
@pos If you see this, would it be a possibility to add a Gaussian filter option into your Rephase FIR program?:

Post #298 gberchin
Is you Gaussian version, by any chance, supposed to look like the one below ? Is the delay meant to increase the roll-off rate around the transition region of the high-pass?
No, the Gaussian version uses a true mathematical Gaussian "Bell Curve" in the time domain:

x(t) = [1/(sqrt(2·pi·sigma)]exp[-t²/(2·sigma²)]

This is truncated on both ends when the amplitude falls below some suitably low threshold. The delay in the time domain is only to make the zero-phase Gaussian waveform causal.

The time-domain Gaussian produces another Gaussian in the frequency domain:

X(f) = exp[-½(2·pi·sigma·f)²]

You can rearrange the X(f) equation to solve for the value of sigma that produces X(f) = ½ at the desired value of f, then substitute that into the x(t) equation to create the time-domain impulse response and FIR filter coefficients.
 
fluid, funny you should post that. I just logged in for the first time in a long time. This thread caught my eye as I used to have interest in linearphase and TP crossovers. I've attached a paper I wrote back in 2002 that might be of interest to some posting here. I'm not particularly interested in joining the discussion though. Just though the paper might be of interest.
 

Attachments

  • New_XO_Rev1.zip
    78.2 KB · Views: 87
  • Like
Reactions: 1 users
I have verified that "group delay at DC" provides the proper alignment delay for Bessel lowpass filters of orders 3-8. Tested at frequencies of 100Hz and 10,000Hz -- it's really sensitive at the higher frequencies, as one might expect.
I intuitively ended up using the "DC (max) value" in my script as well, but now I don't seem to know why it's not the 100Hz value that is supposed to align correctly !!
10th & 16th were a pretty close match with 8th. .....I can't really see any reason to go higher than 8th, given the delay increase.
Were these delays, by any chance, same as (or close to) the group delays of the Bessel LPFs ?
For the classic subtractive-delay crossover it is definitley the case that the fullrange delay must be equal to the group-delay of the lowpass at 0 Hz and not equal at the crossover frequency. I guess this is also the case here.
Any idea as to why it's like that ? Isn't it supposed to be the latter ? I couldn't obtain the original Vanderkooy-Lipshtiz paper.
 
Last edited:
I can give you a simple non-mathematical explanation:
A highpass filter that deserves to be called like that does definitely have to have very high damping at very low frequencies and should definitley block DC. This can only be achieved if the two signals going to the subtractor are equal in level and phase when the frequency is approaching 0 Hz.

But the group-delay and amplitude response of the lowpass filter around the crossover frequency do definitley influence the shape of the derived highpass.

Regards

Charles
 
Thanks for the hint, phase accurate. Yes, the shape is definitely dependent of the LPF characteristics at cutoff, but the best slope seems to be at the DC value of the GD, which is also the max value for Bessel filters.
I've attached a paper I wrote back in 2002 that might be of interest to some posting here.
Could you please specify the alignment delay for the subtractive HPF in Figure 9 ?

Also, is it an overal Butterworth response that you mean when you say Q=0.7071, for a 4th order filter ?
 
@pos If you see this, would it be a possibility to add a Gaussian filter option into your Rephase FIR program?:

Post #298 gberchin

No, the Gaussian version uses a true mathematical Gaussian "Bell Curve" in the time domain:

x(t) = [1/(sqrt(2·pi·sigma)]exp[-t²/(2·sigma²)]

This is truncated on both ends when the amplitude falls below some suitably low threshold. The delay in the time domain is only to make the zero-phase Gaussian waveform causal.

The time-domain Gaussian produces another Gaussian in the frequency domain:

X(f) = exp[-½(2·pi·sigma·f)²]

You can rearrange the X(f) equation to solve for the value of sigma that produces X(f) = ½ at the desired value of f, then substitute that into the x(t) equation to create the time-domain impulse response and FIR filter coefficients.
SubSoniks, I don't know why you quoted me above (#364) but my Gaussian filter has always been correct, as it came directly from the Gaussian window function. You may verify the same from post #337. It's just that the Gaussian function on a log scale does not quite resemble the "bell curve" we know of.
 
SubSoniks, I don't know why you quoted me above (#364) but my Gaussian filter has always been correct, as it came directly from the Gaussian window function. You may verify the same from post #337. It's just that the Gaussian function on a log scale does not quite resemble the "bell curve" we know of.I
It was purely intended to give some context for POS, nothing more. I don't have a usable way to generate Gaussian filters so it would be a useful addition for I think some people who would want to explore the use of FIR generated Gaussian filters.
 
For a speaker, I doubt I'll ever get convinced global FIR is a good idea....unless it's a full-ranger. Too much tune to a spot imo.
Driver by driver rules!
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.
 
Could you please specify the alignment delay for the subtractive HPF in Figure 9 ?
Got it, the delay is supposed to be an all-pass filter matching the LPF's phase, as opposed to a pure delay. This also renders the (summed) output phase non-linear, as shown below in black. Nevertheless, the high-pass section seems to roll off faster as promised, with the actual crossing happening at 2290Hz.
 

Attachments

  • 1673353410942.png
    1673353410942.png
    6.5 KB · Views: 48
Thanks for the hint, phase accurate. Yes, the shape is definitely dependent of the LPF characteristics at cutoff, but the best slope seems to be at the DC value of the GD, which is also the max value for Bessel filters.

Could you please specify the alignment delay for the subtractive HPF in Figure 9 ?

Also, is it an overal Butterworth response that you mean when you say Q=0.7071, for a 4th order filter ?

It's explained in the paper. Regardless of whether the LP filter is linear or minimum phase the required delay is the DC GD of the LP section. For a linear phase LP the DC GD is arbitrary. Remember, this is the delay of the filter, not delay associated with the impulase response for FIR processing. So the LP could, in theory, be zero phase with zero delay or 5 seconds delay. Doesn't matter. With Q = 0.707 the amplitude is that of a Butterworth filter, regardless of order and the HP section will roll off at twice the rate of the LP whent he LP is linear phase.
 
Got it, the delay is supposed to be an all-pass filter matching the LPF's phase, as opposed to a pure delay. This also renders the (summed) output phase non-linear, as shown below in black. Nevertheless, the high-pass section seems to roll off faster as promised, with the actual crossing happening at 2290Hz.

No, the LP section for Fig 9 is linear phase , pure time delay, to achieve a linear phase for HP + LP.
 
Regardless of whether the LP filter is linear or minimum phase the required delay is the DC GD of the LP section ...... With Q = 0.707 the amplitude is that of a Butterworth filter, regardless of order and the HP section will roll off at twice the rate of the LP whent he LP is linear phase.....No, the LP section for Fig 9 is linear phase , pure time delay, to achieve a linear phase for HP + LP.
Ok, so I guess this technique is primarily aimed at FIR Butterworth filters. Sorry.
 
Please forgive me a beginner question, I am trying to understand this. Group delay at DC is the phase shift relative to the corner frequency, but instead of in degrees, in ms? Or how do I calculate that?
Group delay is the slope of the phase vs. frequency curve. Group delay at DC is the limit of slope of the phase curve as frequency approaches zero. Phase is in radians, and frequency is in radians/second, so group delay is in seconds.
 
In any even-order Butterworth filter, the product of the Quality Factors is 1/sqrt(2).

4th-order Butterworth:
s² + 0. 765366864730178s + 1.0 (Q = 1. 30656296487638)
s² + 1. 84775906502257s + 1.0 (Q = 0. 541196100146197)
Yes, thank you. I was just trying to find out if I was using the correct filter as intended by the author, as I was unable to get the double slope HPF using an IIR Butterworth filter, even using the GD at DC.
Group delay at DC is the phase shift relative to the corner frequency, but instead of in degrees, in ms? Or how do I calculate that?
The phase response (which is an inverse tangent function) approaches linear phase at DC and the GD at DC is nothing but the delay that corresponds to this linear phase.

To calculate this, one needs to differentiate the phase response with respect to frequency (d/df) and substitute f = 0Hz into the result. This term is mainly used for analysis purposes.