Both forms of FDLS generate full polynomials. If you need it factored into 1st/2nd-order sections for biquads, then you have to do that yourself.@gberchin : In what form are the IIR coefficients produced? Is it as numerator and demoninator polynomials at the full overall degree, or factored into a product of some number of first and second order N and D? I am always concerned about stability for higher order rational polynomials ...
I think that's a well said, succinct explanation of the two types of delays.Like Charlie said above, there're two delays: One due to the computations and the other for satisfying causality, and since the latter cannot be violated by any method (including FIR). the only thing we can aim for is to minimise the former, which IIR filters are very good at, with very good response tracking of analogue filters, even to the lowest frequencies.
I can see how a DSP/computer designer is interested in minimizing computational delay, particular if the goal is to reduce delay down to near analog.
Or for the purpose of needing less computing power for a given task.
Once FIR is brought into the audio use, particularly for linear-phase, it seems the ratio or FIR filter delay (that satisfies causality) to computational delay, is high to the point of making computational delay largely irrelevant.
For fixed computational delay, 0.5ms to 3ms is a range that has spanned the audio processors / mixes / etc, I've worked with.
Which of course quickly gets swamped by linear or mixed phase, FIR filter usage. To the point of not caring anymore, about computational latency.
Hmmm, I forget how exactly to evaluate IIR stability for higher order polynomials when expressed as a single ratio of N over D. Anyone?
This sort of concern weighs on my mind:
https://dsp.stackexchange.com/questions/54386/relation-between-order-and-stability-in-iir-filter
But if the stability concerns can be addressed I would be very interested in trying some group delay EQ using the FDLS approach. I vaguely recall someone pointing out this possibility before, but the delay EQ required something like 80 biquads worth! I know I can create the same EQ using FIR, and it would be interesting to compare the two approaches and publish the result.
This sort of concern weighs on my mind:
https://dsp.stackexchange.com/questions/54386/relation-between-order-and-stability-in-iir-filter
But if the stability concerns can be addressed I would be very interested in trying some group delay EQ using the FDLS approach. I vaguely recall someone pointing out this possibility before, but the delay EQ required something like 80 biquads worth! I know I can create the same EQ using FIR, and it would be interesting to compare the two approaches and publish the result.
Nice, Thanks.Here is an example from Stanford, math that I don't understand but the impulses are the same length and so are the magnitudes with a pretty steep filter.
https://ccrma.stanford.edu/~jos/filters/Linear_Phase_Really_Ideal.html
It seems to me that you are looking at making rules based on how specific programs respond and I can understand as they do behave that way.
Don't mean to be doing that at all. Comparing different program optimizations was just a sidetrack trying to understand the difference in results.
Basic goal has been simple and unchanging....to illustrate/contend the principle that the placement of the impulse peak in FIR filters marginal for the task in terms of frequency resolution.....improves with impulse at start vs center.
I think any example of marginal taps will illustrate that principle, to a greater or lesser degree simply depending on the example.
Computational latency wholly depends on how much computational "horsepower" you can bring to the party. As someone who has often worked on low-end hardware, this is not always a non-concern.
Higher-oder IIRs are usually made by cascading biquads to avoid such stability issues due to numerical / roundoff errors (that may take the poles outside of unit circle). This way, if each biquad is stable the whole thing is stable as well.
https://www.dsprelated.com/showarticle/1137.php
You've seen how a 2nd order PEQ (FIR version) required a 4095th order FIR filter, proportionally high delay, poor response matching, high computations and higher storage. Block reversal (though complicated) has a selectable delay but FIR length is not flexible, no matter how small the EQ!!
https://www.dsprelated.com/showarticle/1137.php
Yes, but the IIR + block reverse methods do not use FIR filters at all, and thus the block-related delay is the only one that needs to be tolerated. In other words, FIR is the villain when it comes to delay, not linear-phase, or causality.I can see how a DSP/computer designer is interested in minimizing computational delay, particular if the goal is to reduce delay down to near analog.
Or for the purpose of needing less computing power for a given task.
Once FIR is brought into the audio use, particularly for linear-phase, it seems the ratio or FIR filter delay (that satisfies causality) to computational delay, is high to the point of making computational delay largely irrelevant.
You've seen how a 2nd order PEQ (FIR version) required a 4095th order FIR filter, proportionally high delay, poor response matching, high computations and higher storage. Block reversal (though complicated) has a selectable delay but FIR length is not flexible, no matter how small the EQ!!
Last edited:
Sure, you are correct, but according to gberchin the FDLS code generates IIR numerator and denominator polynomials at the full degree so that is what one would start with, not with a cascade of biquads. It's a good idea to check stability when N is high, which is necessary for doing group delay EQ of e.g. highpass filters and at high frequencies because the allpass delay profile is not all that well suited for this task. Otherwise the rational polynomial could be factored down to N<=2 sections (biquads). In either case, some extra work should be done after the FDLS approximation has been generated.
Easiest way is to observe the positions of the roots of the denominator (poles). If any of them is in the right half-plane (continuous time) or outside the unit circle (discrete time), then the transfer function is unstable.Hmmm, I forget how exactly to evaluate IIR stability for higher order polynomials when expressed as a single ratio of N over D. Anyone?
Matlab/Octave and NumPy make finding roots of polynomials easy.
There are other methods using contour integrals and similarly exotic analyses, but the pole analysis is easier and much more intuitive.
How do you implement the time-reversal of an IIR impulse response? The only method with which I am familiar is to create a FIR filter that matches the impulse response of the IIR filter, and reverse the coefficient order.Yes, but the IIR + block reverse methods do not use FIR filters at all
Yeah, that sounds familiar -- that might have been one of my posts on comp.dsp or perhaps at the Klipsch forum. Recall that a true allpass filter can only generate 180° phase shift per order. So a relatively long delay at a relatively high frequency can require an absurdly large allpass filter.I vaguely recall someone pointing out this possibility before, but the delay EQ required something like 80 biquads worth!
Well, maybe you could use a computer to do it, and maybe the factorisation as well. Of course, I'm assuming that you'd be already using a computer as you're operating an advanced modelling algorithm that returns high-order filters...... the FDLS code generates IIR numerator and denominator polynomials at the full degree so that is what one would start with, not with a cascade of biquads. It's a good idea to check stability when N is high...
https://in.mathworks.com/help/control/ref/lti.isstable.html
The MATLAB invfreqz() function (that serves a similar purpose) has a variation wherein the transfer function it returns guarantees stability. I wonder if something like that could be built into the FDLS algorithm itself.
https://in.mathworks.com/help/signal/ref/invfreqz.html
In case of IIRs, we keep the filter the same way (recursive with coefficients a0-b2) but turn the signals around instead (twice). For this, we need to be able to look ahead a few samples, and hence the block-based processing delay. Please see the link (pdf in post#54) and attachment below for the exact methodology.How do you implement the time-reversal of an IIR impulse response?
For PEQs, it may also be possible to start with a square-rooted gain (with adjusted Q), that nullifies the squaring effect.
https://www.aes.org/e-lib/browse.cfm?elib=14096
Attachments
I see ... it doesn't matter whether you reverse the filter or reverse the signal, the effect is the same. I suspect that the throughput delay is the same, too. I haven't read the references, yet, but I do worry about edge-effects in the "reversed-signal" case.In case of IIRs, we keep the filter the same way (recursive with coefficients a0-b2) but turn the signals around instead (twice). For this, we need to be able to look ahead a few samples, and hence the block-based processing delay.
Mark100,
I am not trying to belittle FIR filters but just saying that "high-order FIR" may not be necessary for linear phase. I also understand that FIR is your "trump card" and probably the only flexible technology you have access to, on a non-programmable processor.
Some advantages of FIRs:
However, I believe that the main attraction behind FIR filters is that they're just more "layman-friendly".
I am not trying to belittle FIR filters but just saying that "high-order FIR" may not be necessary for linear phase. I also understand that FIR is your "trump card" and probably the only flexible technology you have access to, on a non-programmable processor.
Some advantages of FIRs:
- FIR filters are not recursive and therefore unconditionally stable.
- Since they're easy to use and can copy any response, and therefore easier to pass around (important in internet forums). I'm sure you may have seen a lot of threads where beginners think of simply "throwing in a few MiniDSPs" to do it all.
- They're easily linear phase, unlike the more complicated IIRs meant for geeks. The term "linear-phase" itself is a nice propaganda in the audio world, where everyone is just trying to look like an audiophile who can hear things that others can't.
- Since they require a lot of computations, more expensive processor / DSP chip manufacturers would sincerely / aggressively lobby for FIR, often calling it the ultimate filter etc. People who buy these expensive units would also proudly brag about their equipment, and explain how their processor could "do anything", just like that. Thus, there's more money going around, with a lot of free advertisement, which is good for the world economy.
However, I believe that the main attraction behind FIR filters is that they're just more "layman-friendly".
There have been a few commercial (live PA) units with this type of filtering, which I believe wouldn't have had them if they delay were really objectionable. I understand that the mechanics behind the reversed filtering could look very discouraging even to professionals.I suspect that the throughput delay is the same, too. I haven't read the references, yet, but I do worry about edge-effects in the "reversed-signal" case.
I am not trying to belittle FIR filters
Then don't... it isn't that hard, you weren't even trying 😀.
First and most importantly.....Happy New Year Everyone !Mark100,
I am not trying to belittle FIR filters but just saying that "high-order FIR" may not be necessary for linear phase. I also understand that FIR is your "trump card" and probably the only flexible technology you have access to, on a non-programmable processor.
newvirus2008, you've made some mistakes regarding why i use high-order FIR, and what processing capability I have at my disposal.
I don't see high-order FIR being necessary at all for linear phase.
I've made many acoustic measurements of multi-ways experimenting with complementary linear-phase xovers, ranging from 1st order, 2nd, 4th, ......all the to brickwalls.
To me, "linear phase" is just a synonym for flat phase at zero degrees across the spectrum.........
I use high-order because I get better acoustic polar measurements, from minimizing lobing regions by reducing summation regions.
It's also much easier to use drivers solely in the range that they have inherently flat mag and phase, by narrowing the ranges of their summations with adjacent drivers.
The processor I use (QSys) is the most flexible and programmable I've yet encountered. It's an open-architecture type, where you build whatever schematic with whatever processing components you want.
If anything, it's greatest limitation is it's FIR capability with 16k taps per channel max.
IIR is not so constrained. A few examples:
A single PEQ component can have up to 32 individual PEQ or shelving filters, and any number of PEQ components can be placed in series. (as if 32 weren't enough already)
Any number of All-Pass, first or second order, may be used with Q's ranging from 0.1 to 10.
Any number of custom IIR filters may be used, with up to 256 bi-quad sections per filter.
You should see the list of available filter and xover components.
Other than your first advantage, the rest just seems like reverse-marketing speak...Some advantages of FIRs:
- FIR filters are not recursive and therefore unconditionally stable.
- Since they're easy to use and can copy any response, and therefore easier to pass around (important in internet forums). I'm sure you may have seen a lot of threads where beginners think of simply "throwing in a few MiniDSPs" to do it all.
- They're easily linear phase, unlike the more complicated IIRs meant for geeks. The term "linear-phase" itself is a nice propaganda in the audio world, where everyone is just trying to look like an audiophile who can hear things that others can't.
- Since they require a lot of computations, more expensive processor / DSP chip manufacturers would sincerely / aggressively lobby for FIR, often calling it the ultimate filter etc. People who buy these expensive units would also proudly brag about their equipment, and explain how their processor could "do anything", just like that. Thus, there's more money going around, with a lot of free advertisement, which is good for the world economy.
I won't speak for what attracts others to FIR, but for me YES! FIR has been much much "layman-friendly".However, I believe that the main attraction behind FIR filters is that they're just more "layman-friendly".
I worked with IIR xovers a ton on 4-way setups when interested in live-sound. IIR xovers and IIR EQs are an utter PIA compared to complementary linear phase xovers, and min-phase PEQs imbedded into a FIR file.
I'm also attracted to the unquestionably better sound I can get from FIR's ease of use, compared to IIR.
Yep. I have one such processor. They provide the ability to achieve flat phase at continually varying xover frequencies on the fly, which of course means non-FIR.There have been a few commercial (live PA) units with this type of filtering, which I believe wouldn't have had them if they delay were really objectionable. I understand that the mechanics behind the reversed filtering could look very discouraging even to professionals.
That's their big feature, being able to change xover freqs on the fly, and adjust all relevant xover sections delays to maintain flat phase.
I've never seen a live-sound processor of this type try to achieve any order beyond 4th, simply because a propagation delay beyond 10-15ms is a live-sound non-starter.
Fulcrum-Acoustics, which provides DSP settings for many commercial processors in use with their speakers, only uses 364 taps when their settings include a FIR filter. It's been interesting studying where they put impulse peak. 😉
Not a valid viewpoint imo. As FIR can be used entirely minimum phase, with near-zero 'FIR time' delay.Yes, but the IIR + block reverse methods do not use FIR filters at all, and thus the block-related delay is the only one that needs to be tolerated. In other words, FIR is the villain when it comes to delay, not linear-phase, or causality.
People generally associate FIR with linear-phase, because it begs the question why use FIR, if not to gain linear-phase.
But FIR is often used for reasons other than linear-phase.
One of which you mentioned, unconditional stability. FIR is the same across all platforms, without IIR implementation & computational variances.
The ability to easily imbed an essentially unlimited number of min-phase EQs is another biggie.
Anyway, If FIR is the villain when it comes to delay, it is entirely due to it's usage as linear-phase (or mixed phase).
So it is linear-phase, satisfying causality, that is the source of the delay.....NOT FIR itself.
And do the IIR + block reverse methods you speak of also have to satisfy causality? Seems like they must.
Like per a previous post you made... "snip.....there're two delays: One due to the computations and the other for satisfying causality, and since the latter cannot be violated by any method (including FIR).....snip" (bold my emphasis)
Nope, FIR is not the villain when it comes to delay...not at all.
Achieving linear-phase is the villain.....with any method , eh?
Can't do much linear phase with IIR unless you experiment with non-causal filters (see paper in #231). BTW, can your unit implement gberchin's crossovers?The processor I use (QSys) is the most flexible and programmable I've yet encountered. It's an open-architecture type, where you build whatever schematic with whatever processing components you want.
If anything, it's greatest limitation is it's FIR capability with 16k taps per channel max.
IIR is not so constrained.
My point was that the FIR layer meant for IIR phase cleanup would introduce delay. Non-causal IIR transfer functions can be made causal by adding a delay but that need not be very large like FIR tap count. As taps are increased to accommodate low frequency filters, delay rises.As FIR can be used entirely minimum phase, with near-zero 'FIR time' delay.So it is linear-phase, satisfying causality, that is the source of the delay.....NOT FIR itself.
And do the IIR + block reverse methods you speak of also have to satisfy causality? Seems like they must.
Last edited:
Yes. That is the fundamental truth here. As I mentioned, linear-phase implies symmetrical impulse response, and vice-versa. In order for a symmetrical impulse response to be implementable as a FIR filter, a causality delay of at least floor(N/2) samples must be introduced, where N is the number of samples in the impulse response.Achieving linear-phase is the villain.....with any method , eh?
That is for true linear phase across the full bandwidth. As engineers we can bend that rule somewhat, in various ways, when we approximate linear phase.
Achieving linear-phase is the villain.....with any method , eh?
Some rule-bending below (wav attached).As engineers we can bend that rule somewhat, in various ways, when we approximate linear phase.
The filter is non-linear phase but together with the non-linear phase of an existing Butterworth filter, can give more or less linear phase all the way upto fs/2. The impulse is not at the centre of the file and the delay is only about double that of the regular filter.
Attachments
- Home
- Loudspeakers
- Multi-Way
- Why not IIR filters + a global phase linearization by FIR