Why not IIR filters + a global phase linearization by FIR

Yes, and it is exactly the litmus test to verify the equivalence.
Thanks, then do you any idea why step shows at is does in the IIR summed with global FIR correction example?
So basically this statement turned out to be true only for the way you used it, within your (test) setup, but the quote above suggests it's more of a 'universal truth'.
I put the qualify conditions in the very second statement...........
It all depends on the tools available, but global FIR on top of an existing speaker setup, be it passive or active, does not have to lead to more pré-ringing.

I'm not convinced at all, that that is correct. Will you please show me a global correction stage in physical series with an IIR stage, devoid of pre-ring?
We wouldn't want to scare people away from trying. Pretty sure there's enough happy Rephase users out there that did exactly this. If people already have passive or active crossovers in place, that need compensating they can do so with a FIR filter on top. As long as they can reverse the phase these crossovers caused, there's no need to be extra worried about pré-ringing vs using linear phase crossovers. They both act the same. Pré-ringing is a fact with phase manipulation like this, as stated previously by @gberchin. But it needs to be mentioned that the (additional) pré-ringing as seen in the first post isn't caused by the method of applying a FIR filter after first applying IIR crossovers.
The fault is caused by something else.
Well, I certainly hope i haven't displayed such absolute confidence to scare anyone away.....i sure don't feel like i have....
 
Last edited:
  • Like
Reactions: 1 user
Intuitively, I'd guess that pre-ringing could have audible artifacts, as could some filters with impulse ringing but no FR peaks. But how to test this meaningfully?

One idea that comes to mind is to generate a pseudo-random signal, e.g. square-like waves with randomized PFM (within limits for speaker safety, or impulses?). Ideally, each click should have a completely nontonal character like raindrops on concrete or something like that. Pass the signal through filter X, and test how much 'visual' ringing on graphs is required before it becomes audible.
 
But it needs to be mentioned that the (additional) pré-ringing as seen in the first post isn't caused by the method of applying a FIR filter after first applying IIR crossovers.
Exactly. What counts is the final total transfer function each driver is working on, not matter how it was achieved (besides avoiding clipping and other effects/artifacts).

And there is always ringing, the steeper/kinkier the XO the more so which only substantially cancels on the design axis. From lack of masking pre-ringing is more audible than post-ringing, that's why we consider it a bad thing. Actually, any ringing is bad but pre-ringing is worse ;-)

BTW, sometimes I find simulator programs not giving correct results for step responses when there is no system highpass (as from the woofer's final low frequency rolloff) in place.
 
Thanks, then do you any idea why step shows at is does in the IIR summed with global FIR correction example?
If you are referring to this plot, then to me it looks similar to a minimum phase system highpass (see above) that was converted to linear phase... or a calculation/display artifact (also see above).
I suggest running test pulses, single sample set to 1, with at least 1 second of silence on both sides) through both setups and look at the sample data directly (or convolve it with a unity step for step response display).
 
BTW, sometimes I find simulator programs not giving correct results for step responses when there is no system highpass (as from the woofer's final low frequency rolloff) in place.
Yes. I too, often get incorrect step responses, or I should say very questionable ones....when there is no system high-pass.
And not just from simulations, from measurements as well.

If you'll notice in the qsys schematic i posted, there is a high-pass filter in place before test signal goes to either the IIR or FIR blocks.
The reference signal lines going to the dual-channel FFTs, of course don't have the hfp in place.

It's an IIR 10Hz BW for a system high-pass, just to eliminate any potential step response wonkiness.
qsys schematic global compare.JPG


My exploration into this 'FIR on top of IIR' has been due to outdoor subwoofer measurements, looking into what I believe is a trade-off between IIR high-pass induced group delay, vs step-response pre-ring. Then by accident, I saw what FIR on top of any driver section with low frequency response, does to step.
 
I'm not convinced at all, that that is correct.

That's too bad, because it is correct. If it exhibits more pré-ringing than applying a linear phase crossover filter of the same topology, it has to be the hardware that falls short or the timing of the filter/crossover is off to begin with. The phase compensation is exactly the same in both situations, why would it be any different is a more valid question.

I don't feel inclined to provide a sample, I already did. I just looked at the file you provided, the timing of the LR crossover summing in that sample is pretty bad to begin with.
Start there I'd say.
 
Ok, OK, I took the sum that I created in REW from RePhase samples and put some silence in front and at the back of that impulse. I ran that trough JRiver, while using the phase compensation I had created in Rephase as the convolution filter...

sum.jpg

File to play: the LR Sum, with silence added in front and after the pulse to make sure it's long enough to be recorded to disk.

convolution.jpg

Convolution filter, a Stereo wave file made of that Rephase phase compensation IR...

And I set the output of JRiver to disk. Guess what the IR looks like, as it would look like with real drivers too...

disk sample.jpg


So I ran it trough a chain with exactly the same end result. I could also create the sum in JRiver with IIR crossovers, run it trough the convolution engine and get the exact same result again. I could also setup a linear phase stream as well, but the end result would still be the same.
I think you need to check your chain for errors, not blame the FIR filtering itself, a tool that many people use successfully to do exactly this.
 
Example 2, making an IIR LR 24 crossover using 3 channels within JRiver... Left, Right and Center
Crossing-channels.jpg

Here's the crossover, first I copy the left channel to the right and center. Then I cascade 2 butterworth second order filters to make up the Linkwitz Riley 24 crossover.
I time align the streams and make them sum, first Left (tweeter) with right (mid) and then right (mid) with center (woofer). Next I swap output of center with left so I can simply apply the same convolution I had prepared already. I feed this little exercize with a single channel dirac pulse (input file into JRiver). It will result in 3 channels, the LR sum of all three in the left channel, the sum of left and right in the right channel and the center channel will now contain the original filtered left (tweeter) signal. These are recorded to disk.

First, running the above creates this output for left channel to disk:
LR-sum_jriver.jpg


Next, I run the convolution engine on top of that sum:
convolution2.jpg


What it creates is the linearized LR 24 crossovers at 200 Hz and 1300 Hz:
linearizedLR24.jpg


I can't get more practical than that. Instead of creating the crossover in JRiver, it could have been made with passive components and real drivers.
That's the practical use case of most people using RePhase to linearize their filters. Obviously the drivers need to follow a pure LR 24 curve acoustically for it to work.
This FIR compensation would then linearize the resulting IIR crossover. Without adding additional ringing, beside what's inherent in linear phase crossovers.

spectogram.jpg


If anyone is wondering what's hidden behind that metaplugin:
meta.jpg

I just connected input to output, first plan was to create the LR crossovers there. I could also use it to create linearized LR filters.
 
Last edited:
  • Like
Reactions: 1 user
That's too bad, because it is correct. If it exhibits more pré-ringing than applying a linear phase crossover filter of the same topology, it has to be the hardware that falls short or the timing of the filter/crossover is off to begin with. The phase compensation is exactly the same in both situations, why would it be any different is a more valid question.
That's what I've been trying to get to.....WHY do the measurements I've shown look different ?
(Think I'm now onto the reason(s) and hardware is one of them. Will describe in a moment.
I don't feel inclined to provide a sample, I already did. I just looked at the file you provided, the timing of the LR crossover summing in that sample is pretty bad to begin with.
Start there I'd say.
So I see in following posts you went ahead with providing samples. Thx. I like your 3-way JRiver example....nice.
Like I've said a couple of times, I have been able to phase linearize simulated IIR multi-way sections with rePhase into REW, that show no pre-ring.

What I haven't been able to do, is use my hardware as a two stage process like I've been describing, without REW showing pre-ring. (A problem I can imagine others could have too.)
Continuing to check and double check the test bed I've shown, I couldn't find any errors.
But I did notice, REW's measurement sweeps were set to start at 20Hz (not an issue sims usually have, huh?).

Moving the sweep start down to 0Hz significantly reduced the measured pre-ring depth.
New 0Hz start, then old 20Hz start
IIR 3-way with global 0Hz sweep.jpg 24dB IIR summed mag and phase w global FIR step response.JPG
I suspect further pre-ring reduction might come from a processor that extends flatter toward DC than the qsys stuff.


Conclusion: Steep is just too dang touchy for me...
I've always said I think step response is a waste of time....I got suckered into thinking I might be onto something with it, haha.



Oh, just to follow through on something you said....... that the timing of the LR crossover summing in the sample I provided is pretty bad to begin with.
It's a dead simple parallel summing that should be accurate to 0.02ms....one 48kHz sample. Are you saying that accuracy is not met?
Or that it needs to be closer than 0.02ms ? (must admit I hope not)

And like i said earlier, I didn't bother with the technically correct way of LR 3-way cascading with all-pass added, as it makes no difference for what was being explored. https://www.linkwitzlab.com/frontiers_5.htm#V
 
For completeness I'll mention that zero-phase via time-reversal can only be approximated in the IIR case. The reason is in the name: Infinite Impulse Response. The response of an IIR filter extends to infinite time, so it has to be truncated at some point to make the time-reversed filter implementable.

Yes, I wasn't actually thinking about it, thank you very much for bringing that up.

I may be worth noting that we need the root of a minimum or mixed phase phase filter which is then applied twice (multplied with itself).... A LR4 is a perfect example because Linkwitz-Riley is by definition a squared Butterworth filter.
Yes, for zero-phase filtering, one needs even order filters, for which Linkwitz-Riley filters are classic examples. You could split them into two equal Butterworth functions and insert the reversing blocks appropriately to achieve phase cancellation.

... i can't write code, or use matlab, etc...do you know a software program/ technique with which i can implement time reversed filtering?
Same here, but I think KSTR would be able to help you with it, read below.

But if you're looking to do A/B testing, then there could be a way to do it on your computer using your favourite audio editing software (e.g. Audicity etc.):

1) Open your favourite test / music piece.
2) Apply a Butterworth filter of your choice.
3) Reverse the obtained output (most software allow you to do it).
4) Apply the same filter again.
5) Reverse again to get a zero-phase Linkwitz-Riley response.

You need to do the above to both the low-pass and high-pass sections and then use these signals to drive your woofer and tweeter respectively. You could also skip the reversing to get a regular non zero-phase LR filter to perform the A/B testing.
I use this trick all the time for scratch FIR filter kernel, using a "dirac" single-sample pulse and apply IIR's on it, with second pass working on the time-reversed first pass.
That's great, because unfortunately, I have access only to the inputs/outputs and coefficients of my processor and not any internal data memory, which leaves me with the same "how to reverse" problem that Mark100 also mentions. You however, seem to have found a way to implement it !!
 
Last edited:

TNT

Member
Joined 2003
Paid Member
ring.png


Mark, I begin to understand that you referent to "A" as a ringing while I thought that "B" was what is normally called "pre-ringing"... but per your description above it seems that A is the result of low freq. limited bandwith - like a sequoia wave result with a tilted top when no DC coupled?

//
 
But I did notice, REW's measurement sweeps were set to start at 20Hz (not an issue sims usually have, huh?).

Moving the sweep start down to 0Hz significantly reduced the measured pre-ring depth.
New 0Hz start, then old 20Hz start
View attachment 1120953 View attachment 1120952
I suspect further pre-ring reduction might come from a processor that extends flatter toward DC than the qsys stuff.


Conclusion: Steep is just too dang touchy for me...
I've always said I think step response is a waste of time....I got suckered into thinking I might be onto something with it, haha.

Now you're on to something... the triangle shape of the step alludes to a limited band-with. (thanks TNT for that extra hint about the triangle before the peak ;))

As I said:
I can't explain your triangle shaped STEP if magnitude is flat from 20 Hz up to 20 KHz.

It would be a sharp triangle like that with a steep bandpass at 20 Hz and 20 KHz though, my input file looked like it's flat from zero to infinity.

A Dirac STEP:
Dirac.jpg

This was my input signal, RePhase makes it seem the pulse go all the way down to zero, hence the flying STEP after the peak. The ideal shape we can't reach in practice.
I only used it because I saw that flat 20 Hz to 20 KHz in your sample. Usually I put a high-pass on the bottom of my sims and a low-pass on top to somewhat mimic a real driver.
If the signal starts abruptly at 20 Hz, the FIR correction you use is trying to make up for that, that's why the STEP shows that huge drop before the peak, it's building up the low frequencies for an "immediate" start of the signal at 20 Hz. Same thing will happen on top. It's acting like a super steep bandpass, as the file you started with has no beginning or end.
That's what puzzled me about your STEP triangle shape, it shows it does not have the proper bandwidth to keep that pure DIRAC STEP shape. The FIR processing is probably trying to make up for that. When I tried to correct your 3-way sample I got steep lines climbing up at 20HZ up and down again at 20 KHz, and no impulse showed in REW, that did puzzle me for a bit...

Oh, just to follow through on something you said....... that the timing of the LR crossover summing in the sample I provided is pretty bad to begin with.
It's a dead simple parallel summing that should be accurate to 0.02ms....one 48kHz sample. Are you saying that accuracy is not met?
Or that it needs to be closer than 0.02ms ? (must admit I hope not)

And like i said earlier, I didn't bother with the technically correct way of LR 3-way cascading with all-pass added, as it makes no difference for what was being explored. https://www.linkwitzlab.com/frontiers_5.htm#V

Me comming to a false conclusion there, there were no wiggles in the linear phase summation, but there were wiggles in the FR of the IIR summation after phase correction,
just now I realize it was due to that steep start at 20 Hz, it creates the wiggles in the FR as you can't start with nothing that abruptly or fast.

Now knowing what we've learned so far, I made a RePhase correction for your 3-way summation, using a limited bandwidth correction of 20 Hz - 20 KHz and corrected the phase on your LR24 example:

Correction-Mark.jpg

This way the STEP isn't trying to correct for that limited bandwidth. So it doesn't need to dive that deep anymore...
It isn't precisely like the linear phase crossovers yet, but it's getting quite close.

If you're wondering why the STEP is still sagging more below zero on it's way in, showing the magnitude result will solve that:
magnitude.jpg

See how that STEP still tried to build up the level towards 20 Hz and down again at 20 KHz? That seems to be the true difference between the STEP of the linear phase filters and the FIR corrected ones. The linear phase filters never bothered to correct the steep bandpass at 20 Hz and 20 KHz. Because a signal needs a start and a stop...
Now that's something we never see in practice... a signal that starts like lightning at 20 Hz on a proper SPL level...
That doesn't mean we never see these kind of corrections in FIR files, the FIR correction trying to make up for bandwidth that isn't there in the file that's being corrected...

Case solved? :)

(uploaded the mdat with this last correction, change name from zip to mdat)
 

Attachments

  • Global mdat set corrected.zip
    8.3 MB · Views: 60
Last edited:
  • Like
Reactions: 1 user
View attachment 1121010

Mark, I begin to understand that you referent to "A" as a ringing while I thought that "B" was what is normally called "pre-ringing"... but per your description above it seems that A is the result of low freq. limited bandwith - like a sequoia wave result with a tilted top when no DC coupled?

//
Yes, I have been referring to triangle "A", as the pre-ringing.

I think the circle "B" reflects digital gack in FFT measurements, and is high-frequency driven.
Recently read a post by fluid somewhere, saying clock synchronization errors between measurement soundcard and DUT show that kind of gack, (gack noticeable at top of the step response, and in impulses in general, too.)

A system low-pass takes some of the gack out, but not all. I think it's the cheap, easy way out to get around clock sync.
Looking forward to trying out full clock sync when I get a Core110f back from repair, which can simultaneously function as a USB sound card and processor....so it must have the same dang clock haha.

Here's the 3-way IIR with global FIR correction, and no system low-pass filter, circle "B" gack, and some ragged stuff about everywhere.

IIR with global no system high pass or low pass.jpg


followed by the same with a system low pass, BW 24dB/oct at 20kHz.
To illustrate how circle "B" cleans up with a system low-pass. (as well as some small reduction in overall jaggies)
IR global w lp.jpg
 
Now you're on to something... the triangle shape of the step alludes to a limited band-with. (thanks TNT for that extra hint about the triangle before the peak ;))

As I said:


It would be a sharp triangle like that with a steep bandpass at 20 Hz and 20 KHz though, my input file looked like it's flat from zero to infinity.

A Dirac STEP:
View attachment 1121033
This was my input signal, RePhase makes it seem the pulse go all the way down to zero, hence the flying STEP after the peak. The ideal shape we can't reach in practice.
I only used it because I saw that flat 20 Hz to 20 KHz in your sample. Usually I put a high-pass on the bottom of my sims and a low-pass on top to somewhat mimic a real driver.
If the signal starts abruptly at 20 Hz, the FIR correction you use is trying to make up for that, that's why the STEP shows that huge drop before the peak, it's building up the low frequencies for an "immediate" start of the signal at 20 Hz. Same thing will happen on top. It's acting like a super steep bandpass, as the file you started with has no beginning or end.
That's what puzzled me about your STEP triangle shape, it shows it does not have the proper bandwidth to keep that pure DIRAC STEP shape. The FIR processing is probably trying to make up for that. When I tried to correct your 3-way sample I got steep lines climbing up at 20HZ up and down again at 20 KHz, and no impulse showed in REW, that did puzzle me for a bit...



Me comming to a false conclusion there, there were no wiggles in the linear phase summation, but there were wiggles in the FR of the IIR summation after phase correction,
just now I realize it was due to that steep start at 20 Hz, it creates the wiggles in the FR as you can't start with nothing that abruptly or fast.

Now knowing what we've learned so far, I made a RePhase correction for your 3-way summation, using a limited bandwidth correction of 20 Hz - 20 KHz and corrected the phase on your LR24 example:

View attachment 1121038
This way the STEP isn't trying to correct for that limited bandwidth. So it doesn't need to dive that deep anymore...
It isn't precisely like the linear phase crossovers yet, but it's getting quite close.

If you're wondering why the STEP is still sagging more below zero on it's way in, showing the magnitude result will solve that:
View attachment 1121042
See how that STEP still tried to build up the level towards 20 Hz and down again at 20 KHz? That seems to be the true difference between the STEP of the linear phase filters and the FIR corrected ones. The linear phase filters never bothered to correct the steep bandpass at 20 Hz and 20 KHz. Because a signal needs a start and a stop...
Now that's something we never see in practice... a signal that starts like lightning at 20 Hz on a proper SPL level...
That doesn't mean we never see these kind of corrections in FIR files, the FIR correction trying to make up for bandwidth that isn't there in the file that's being corrected...

Case solved? :)

(uploaded the mdat with this last correction, change name from zip to mdat)
Good stuff wesayso :) Case closed.

I do think the reason behind the measurement's I've been getting, is the vagaries of the measurement math having to work with the limited audio range it's given to analyze. And especially the difficulty of the math handling the discontinuity of steep starts or stops in bandwidth.
All I work with are electrical or acoustic measurements, so it's clearly something I MUST keep in mind.

Here's a last example of adding both a system high-pass and low-pass to the IIR3-way globally FIR corrected,
to soften the task on REW in handling the discontinuities and limited bandwidth that were being presented to it.
IR global w lp and hp.jpg
 
  • Like
Reactions: 1 users
By the way, if you want a perfect reconstruction, linear phase digital crossover topology with zero overshoot and ringing: https://www.aes.org/e-lib/browse.cfm?elib=8170
The article appears to require an AES subscription. But since you're yourself the author, is it possible for you to share a copy here, on the forum? I'm sure many would be interested in reading it.
 
  • Like
Reactions: 1 user