• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Minimum Phase, constant delay (aka linear phase), whazzit?

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
2,686
Likes
5,760
Location
My kitchen or my listening room.
So, there was some confusion about what "minimum phase" means, what "excess phase" is, and why 'excess group delay' is not really in the vocabulary in regards to filter discussions,although it can be a kind of "pure delay" (aka linear phase) or a part of a filter that is "pure delay" (yes,it's possible to have a mixed-phase filter, although except for some "apodizing filters" there isn't much of that)

So, let's design an FIR filter (all zeros, no poles). We'll do that as a linear phase filter.
cdlay.jpg


Now, this is a 64 tap constant delay filter. The impulse response looks like plot 1 of the next plot:
impres.jpg

So, using Matlab I calculated the roots of the first impulse response, and replaced each one with radius larger than '1' with exactly 1/radius at the same angle. See next plots.

Top is the roots (in complex space) of the original filter. Bottom is the one with all outside roots inverted,which you may note, land EXACTLY on top of the "inside" set of roots on the right side of the graph. (why the right side has only to do with the frequency design I chose, it doesn't have to be 'right side'). The roots ON the unit circle are unchanged, and yes, they are also paired (on top of each other). Not an accident.
roots.jpg


Now, what's that other impulse response (remember this is pure FIR filtering) on about?

Well, it's the minimum phase version of the first impulse response, with all zeros outside the unit circle moved inside. And here's the frequency response plot.

minphase.jpg


Notice, exactly (yes I mean EXACTLY) the same amplitude response, but the phase response isn't even close to similar. Surprise? No, not really.

So minimum phase filters have some particular properties.

1) their group delay is a function of the derivative of their amplitude response. This is not true of constant-delay filters.
2) For any filter, you can extract the delay part, by calculating the linear fit of phase response. If you then remove the linear part, you have the actual "phase shift" that represents non-uniform delay across frequency.
3) Minimum phase filters have no poles on or outside of the unit circle. This includes all, I mean ALL practical IIR filters. Roots outside the unit circle (or in the right half-plane for analog) are UNSTABLE.
4) IIR filters can have non-minimum phase if their zeros are not all on or inside the unit circle. Those zeros outside the unit circle can be moved inside if you want minimum phase.
5) Constant delay filters are ONLY possible exactly in FIR FILTERS,and they will always be symmetric impulse responses, or for some kinds of filters with a zero at DC, antisymmetric. There are NO OTHER OPTIONS. It's not a "good idea",it's the law.

Note: I am talking about filters with real coefficients. Having complex coefficients gets ... INTERESTING. :) The math, however, remains the same, and then you have to decide what the complex output you get from the filter means. (note, yes, it can mean something, but that's a horse of another color indeed)

Now you may have heard the word "apodizing" in connection to filters. That means that SOME of the zeros outside the unit circle are moved inside, so the filter consists of a constant delay part and a minimum phase part.

Now,what is a "maximum phase" filter? Yeah, it exists. You push all the zeros OUTSIDE the unit circle. When you do this, it gives you exactly the time reverse of the minimum phase filter.
 
Last edited:
Oh, and how you do all this follows in Matlab script:

clc
clear all
close all

len=64;

bb=firpm(len-1,[0 .35 .5 1],[1 1 0 0]);

freqz(bb)


bbr=roots(bb);

t=bbr;

for ii=1:len-1
if abs(bbr(ii)) > 1.0
bbr(ii)=1/bbr(ii);
end
end

cc=poly(bbr);
cc=cc/sum(cc);
figure
freqz(cc)
subplot(2,1,1)
axis([0 1 -150 50])

figure
subplot(2,1,1)
plot(bb)
subplot(2,1,2)
plot(cc)

figure
subplot(2,1,1)
plot(t,'*');
subplot(2,1,2)
plot(bbr,'*');
 
I am curious what your definition of excess phase is. Mine is "any deviation from the minimum phase response". Poles and zeros occur in complex conjugate pairs, with some zeros (but no poles) outside the unit circle. Or if they don't, it indicates that the system is complex (i.e. a real input signal results in a complex output signal) - rare in audio.

(EDIT) I hope you don't mind, but I took your image and added some annotations to it. Let me know if it's wrong.

1741071059197.png
 
Last edited:
Thanks for the writeup. I never fully grasped the poles and zeros bits, still don’t ;) But nevertheless this is really educational.
1) their group delay is a function of the derivative of their amplitude response.
This should really be hammered into people mind. Because this is not just about filters. It also applies to transducers (among other things). A reflex box generally has higher group delay than a closed box because of the way its frequency respons change is faster. The same goes for room effects on your frequency response. These are minimum phase effects as well, so every null or peak you have will create to high group delay bumps. If you want good group delay in your room, make sure to flatten the frequency response in-room.

So, to circle back to the topic at hand; if you make a minimum phase filter for this room correction, the total group delay will be the derivative of the resulting frequency response, not just of the filter that you applied.
 
Your image is right, modulo the annoying scaling issues with Matlab plotting.

I don't really say 'excess phase' much, I think "minimum phase", "mixed phase", "constant delay", and that's about it.

Basically, remove the delay part, and you're left with either minimum or maximum phase parts. Yeah, you can factor that out if you want. It gets "interesting" if the maximum-phase parts are ALMOST the inverse of the minimum phase part. :)
 
Last edited:
Thanks for the writeup. I never fully grasped the poles and zeros bits, still don’t ;) But nevertheless this is really educational.

This should really be hammered into people mind. Because this is not just about filters. It also applies to transducers (among other things). A reflex box generally has higher group delay than a closed box because of the way its frequency respons change is faster. The same goes for room effects on your frequency response. These are minimum phase effects as well, so every null or peak you have will create to high group delay bumps. If you want good group delay in your room, make sure to flatten the frequency response in-room.

So, to circle back to the topic at hand; if you make a minimum phase filter for this room correction, the total group delay will be the derivative of the resulting frequency response, not just of the filter that you applied.
Yes. What matters is the TOTAL response. If there are, for instance, room reflections in it, it may not be minimum phase, either. :)
 
And then there's the fact that any stable, causal filter (with some other minor constraints) can be decomposed into a stable minimum-phase part cascaded with a stable allpass part. Equalization by inverse-filtering is suddenly very popular in the forums that I follow, but people are frustrated because they can only find the inverse of the minimum-phase part -- the inverse of a stable allpass filter is always unstable. (Though, if considered an engineering problem instead of a math problem, stable approximations can be formulated.)
 
If there are, for instance, room reflections in it, it may not be minimum phase, either. :)
Right. I conveniently forgot those ;) . But neither can these effects be fixed with minimum phase filters. This is one of the reasons why you should not just apply room correction above the Schroeder frequency.
 
JJ it is conventionally said that high order filters require a lot of taps. Yet I notice that this area:

1741099693853.png


Which corresponds to this area:

1741099718918.png


seems to have a paucity of zeros - specifically where the output is changing from 0dB to -100dB in 0.1pi rad/sample. Can you explain please?
 
JJ it is conventionally said that high order filters require a lot of taps. Yet I notice that this area:

View attachment 433246

Which corresponds to this area:

View attachment 433247

seems to have a paucity of zeros - specifically where the output is changing from 0dB to -100dB in 0.1pi rad/sample. Can you explain please?
There is no need for zeros there, it's picking up the slopes of all the stopband zeros there is my guess. If you consider, it's a simple remez design, so it is argubly optimal in that the transition band is unconstrained, but the passband and stopbands are constrained so I'd go with 'no constraints, no modifications to the response there.

In general, if there are many zeros in the transition band, the filter is probably quite long for its requirements and thereby somewhat overdetermined.
 
Last edited:
And then there's the fact that any stable, causal filter (with some other minor constraints) can be decomposed into a stable minimum-phase part cascaded with a stable allpass part. Equalization by inverse-filtering is suddenly very popular in the forums that I follow, but people are frustrated because they can only find the inverse of the minimum-phase part -- the inverse of a stable allpass filter is always unstable. (Though, if considered an engineering problem instead of a math problem, stable approximations can be formulated.)

This is when you calculate the time-reverse, which will be stable, and make it into an FIR. :)
 
And then there's the fact that any stable, causal filter (with some other minor constraints) can be decomposed into a stable minimum-phase part cascaded with a stable allpass part. Equalization by inverse-filtering is suddenly very popular in the forums that I follow, but people are frustrated because they can only find the inverse of the minimum-phase part -- the inverse of a stable allpass filter is always unstable. (Though, if considered an engineering problem instead of a math problem, stable approximations can be formulated.)

I should note that TOO MUCH (too precise) EQ can create a problem, in that the zone of correction (in physical space) gets teeny-tiny.

Then, of course, there's the interaction with your body and head. :p
 
Last edited:
I notice that this area [...] seems to have a paucity of zeros - specifically where the output is changing from 0dB to -100dB in 0.1pi rad/sample.
Intuitively (I could be wrong), I think that by putting more zeros there you'd end up with a sharper cutoff for a given filter order, but the filter would no longer be equiripple.

EDIT: What I said was not quite correct. It can still be equiripple, but there will be more ripple.
 
Last edited:
I should note that TOO MUCH (too precise) EQ can create a problem, in that the zone of correction (in physical space) gets teeny-tiny.
In fact that is a major problem with "room correction" that is seldom acknowledged. When one employs room correction via signal processing, the correction is generally "correct" only at one location in the room. And the more "precise" (to use JJ's term) the correction, the smaller that location.

I've always maintained that room correction is best applied as physical changes to the room itself. The signal processing solution is best applied as "fine tuning".
 
This is when you calculate the time-reverse, which will be stable, and make it into an FIR.
The end result being a tradeoff between accuracy of correction and throughput delay (latency). Latency isn't generally a problem in audio-only reproduction, but in audio-for-video or live audio performances, it can be catastrophic.
 
Thank you @j_j for the very concise information. Really does help some of us less informed ones.
 
Intuitively (I could be wrong), I think that by putting more zeros there you'd end up with a sharper cutoff for a given filter order, but the filter would no longer be equiripple.

EDIT: What I said was not quite correct. It can still be equiripple, but there will be more ripple.
You'd also be putting constraints into the unconstrained part of the frequency response, I think.
 
In fact that is a major problem with "room correction" that is seldom acknowledged. When one employs room correction via signal processing, the correction is generally "correct" only at one location in the room. And the more "precise" (to use JJ's term) the correction, the smaller that location.

I've always maintained that room correction is best applied as physical changes to the room itself. The signal processing solution is best applied as "fine tuning".

Absolutely. First, fix the acoustics. Part of the problem with room correction aside from the positional aspect was discussed in the subwoofer thread, in that big problems in room response that create zeros (dips) mean there is energy STORAGE in the room. Adding more to that storage is, err, problematic in most cases.
 
The end result being a tradeoff between accuracy of correction and throughput delay (latency). Latency isn't generally a problem in audio-only reproduction, but in audio-for-video or live audio performances, it can be catastrophic.

Until you get to modern video codecs that have 5 or 6 frame minimum latency and memory. :) But, yes, synchronization is required.
 
Just for grins I tried moving the transition band of the filter, keeping the same transition length.

Here is the root plot for .15 to .3 as transition band.

(sorry for the squished plot, but the autoscaling is a pain to fsck with.

As you can see in the lower plot especially, the zeros moved to be outside the new transition band.

nroots.jpg
 
Back
Top Bottom