DSPRelated.com
Forums

Minimum Phase Filters

Started by FilterDan August 1, 2013
As an RF engineer, I have implemented more than my fair share of analog
filters, but until I started working with digital filters, I had never
heard of a minimum phase filter. Would someone mind answering a few
questions regarding this type of filter?

1. What are they? Please describe them qualitatively, not mathematically.
The mathematical definition I can easily find.

2. In what applications are they used, and why are they needed?

3. As an example: A 51 tap FIR filter will normally have a constant group
delay of 25. However, if I implement a 6 pole Bessel in an FIR, the group
delay is only 4.3, regardless of tap count, and it varies somewhat across
the band. Does this qualify as a minimum phase filter, or simply a minimal
phase filter, or is it simply a non sequitur?

Thanks,
Dan 
IowaHills.com	 

_____________________________		
Posted through www.DSPRelated.com
On Thu, 01 Aug 2013 09:42:26 -0500, FilterDan wrote:

> As an RF engineer, I have implemented more than my fair share of analog > filters, but until I started working with digital filters, I had never > heard of a minimum phase filter. Would someone mind answering a few > questions regarding this type of filter? > > 1. What are they? Please describe them qualitatively, not > mathematically. The mathematical definition I can easily find.
A minimum phase filter is one that shows the minimum amount of phase shift for the amount of amplitude shaping. The easiest mathematical (sorry) symptom of this is a stable filter with unstable zeros. Pretty much all the filters you do in your circuit design work that don't involve transformers, transmission lines or active components are minimum phase. Op-amp filters _can_ be non-minimum phase, but usually aren't, by design.
> 2. In what applications are they used, and why are they needed?
It's felt that they give a better sound to audio, because a symmetric filter will "pre-ring". They're pretty much universal inside of control loops, because delay kills stability, so having unnecessary phase shift is a Very Bad Idea. I'm sure there's other places where they're indicated, but I don't know them.
> 3. As an example: A 51 tap FIR filter will normally have a constant > group delay of 25.
To pick nits, a symmetrical 51-tap FIR filter will have a constant group delay of 25. But, most FIR filters are symmetrical.
> However, if I implement a 6 pole Bessel in an FIR, > the group delay is only 4.3, regardless of tap count, and it varies > somewhat across the band. Does this qualify as a minimum phase filter, > or simply a minimal phase filter, or is it simply a non sequitur?
How can you implement a 6-pole Bessel in an FIR? The Bessel filter construction makes sense as an IIR filter, but not so much as an FIR filter. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Hi,

this doesn't exactly answer your question. 
Hovever, if ...
- you have a symmetric FIR filter
- you need something "faster" that preserves the magnitude resposne
- you don't care about the phase or in other words, the constant group
delay

.. then you can simply reflect poles outside the unit circle back inside.


The Matlab script below shows how it's done (tested on freeware
OctaveForge).
For short filters, easy, but the roots() function doesn't scale to very
long filters.

Cheers

Markus



close all;

% This is a symmetric FIR filter impulse response
% They are coefficients to a polynomial in z^-1
h = [1 2 4 6 6 4 2 1];

% Find the roots of that polynomial
r = roots(h);

% reflect outside-of-unity-circle roots back inside
mask = a > 1;
a = abs(r(mask));
r(mask) = r(mask) ./ a .^ 2; % divide once: on circle; divide twice:
mirrored => a .^ 2
find(mask)

% turn back to polynomial. Note, we lose a constant factor.
h2 = real(poly(r)); % imaginary part is numerical noise

figure(1); 
freqz(h);
title('original');

figure(2);
freqz(h2);
%title('minimum phase. Same magnitude, different phase, shorter
groupdelay');

figure(3); grpdelay(h);
figure(4); grpdelay(h2);

figure();
h(1024) = 0;
h2(1024) = 0;
plot(20*log10(abs(fft(h2) ./ fft(h))));
title('gain deviation (note, roots+poly loses scaling factor)');

	 

_____________________________		
Posted through www.DSPRelated.com
On 8/1/13 8:12 AM, Tim Wescott wrote:
> On Thu, 01 Aug 2013 09:42:26 -0500, FilterDan wrote: > >> As an RF engineer, I have implemented more than my fair share of analog >> filters, but until I started working with digital filters, I had never >> heard of a minimum phase filter. Would someone mind answering a few >> questions regarding this type of filter? >> >> 1. What are they? Please describe them qualitatively, not >> mathematically. The mathematical definition I can easily find. > > A minimum phase filter is one that shows the minimum amount of phase > shift for the amount of amplitude shaping. > > The easiest mathematical (sorry) symptom of this is a stable filter with > unstable zeros.
while i have to poles, i haven't applied the term "unstable" to zeros. but if "unstable zeros" are zeros that live in the same region as unstable poles (those would be poles in the right half s-plane or outside the unit circle in the z-plane), i think you have that backwards, Tim. minimum-phase filters are filters that have all of the zeros in the same region as stable poles. when you invert a filter, the poles become zeros and the zeros become poles. so only a minimum-phase filters have stable inverses. one other important property of minimum-phase filters is that this minimum phase (which Tim correctly says that it's the minimum amount of phase shift given a particular amplitude response of the filter) in radians is related to the natural log of the amplitude ("nepers" or dB/8.68589) by the Hilbert transform. that's a kinda hard fact to prove.
> Pretty much all the filters you do in your circuit design work that don't > involve transformers, transmission lines or active components are minimum > phase. Op-amp filters _can_ be non-minimum phase, but usually aren't, by > design.
it all depends on where you put the zeros. an all-pass filter is, virtually by definition, not minimum phase. sometimes analog (or DSP) engineers put an APF in the chain to do some kinda frequency-dependent delay compensation. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
FilterDan <95095@dsprelated> wrote:
> As an RF engineer, I have implemented more than my fair share of analog > filters, but until I started working with digital filters, I had never > heard of a minimum phase filter. Would someone mind answering a few > questions regarding this type of filter?
> 1. What are they? Please describe them qualitatively, not > mathematically. The mathematical definition I can easily find.
Seems to me that there is much less choice about the phase response for analog (RLC) filters, assuming a reasonable cost for R, L, and C. Well, delay and phase aren't quite the same, but this is reminding me of the recent discsusion on NTSC color TV frequencies. When we got our first color TV (vacuum tube TV days) my dad bought me a book on color TV servicing. (You at least had to know about tube replacement, but the book covered more than that.) One that I remember not understanding at the time is an analog delay (coax cable) to keep the luminance and chrominance together. The luminance signal has about 4MHz bandwidth, and chrominance about 1MHz. There is delay (and phase shift) as they go through their respective filters. If there was an easy way to build filters with a longer delay, instead of a delay line, they would have done it.
> 2. In what applications are they used, and why are they needed?
Seems to me that there are many cases where a filter with no phase shift would be nice to have. A favorite claim of loudspeaker manufacturers is that theirs have better phase properties than the competition. Fortunately, human hearing is fairly phase insensitive.
> 3. As an example: A 51 tap FIR filter will normally have a constant group > delay of 25. However, if I implement a 6 pole Bessel in an FIR, the group > delay is only 4.3, regardless of tap count, and it varies somewhat across > the band. Does this qualify as a minimum phase filter, or simply a minimal > phase filter, or is it simply a non sequitur?
-- glen
On Thu, 01 Aug 2013 10:35:01 -0700, robert bristow-johnson wrote:

> On 8/1/13 8:12 AM, Tim Wescott wrote: >> On Thu, 01 Aug 2013 09:42:26 -0500, FilterDan wrote: >> >>> As an RF engineer, I have implemented more than my fair share of >>> analog filters, but until I started working with digital filters, I >>> had never heard of a minimum phase filter. Would someone mind >>> answering a few questions regarding this type of filter? >>> >>> 1. What are they? Please describe them qualitatively, not >>> mathematically. The mathematical definition I can easily find. >> >> A minimum phase filter is one that shows the minimum amount of phase >> shift for the amount of amplitude shaping. >> >> The easiest mathematical (sorry) symptom of this is a stable filter >> with unstable zeros. > > while i have to poles, i haven't applied the term "unstable" to zeros. > but if "unstable zeros" are zeros that live in the same region as > unstable poles (those would be poles in the right half s-plane or > outside the unit circle in the z-plane), i think you have that > backwards, Tim.
Yes, I do. I was thinking the right thoughts, but I left out a phrase, or a sentence, or something. Dan: I should have said that the easiest symptom that filter is _not_ minimum phase is if it is stable and has one or more unstable zeros. And Robert, yes, in this usage an "unstable zero" is one that lies outside of the stability boundary in question (Re(p) > 0 in the Laplace domain, |p| > 1 in the z domain). It's probably not strictly correct, but it makes a nice shorthand. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.really> writes:

> On Thu, 01 Aug 2013 10:35:01 -0700, robert bristow-johnson wrote: > >> On 8/1/13 8:12 AM, Tim Wescott wrote: >>> On Thu, 01 Aug 2013 09:42:26 -0500, FilterDan wrote: >>> >>>> As an RF engineer, I have implemented more than my fair share of >>>> analog filters, but until I started working with digital filters, I >>>> had never heard of a minimum phase filter. Would someone mind >>>> answering a few questions regarding this type of filter? >>>> >>>> 1. What are they? Please describe them qualitatively, not >>>> mathematically. The mathematical definition I can easily find. >>> >>> A minimum phase filter is one that shows the minimum amount of phase >>> shift for the amount of amplitude shaping. >>> >>> The easiest mathematical (sorry) symptom of this is a stable filter >>> with unstable zeros. >> >> while i have to poles, i haven't applied the term "unstable" to zeros. >> but if "unstable zeros" are zeros that live in the same region as >> unstable poles (those would be poles in the right half s-plane or >> outside the unit circle in the z-plane), i think you have that >> backwards, Tim. > > Yes, I do. I was thinking the right thoughts, but I left out a phrase, > or a sentence, or something. > > Dan: I should have said that the easiest symptom that filter is _not_ > minimum phase is if it is stable and has one or more unstable zeros. > > And Robert, yes, in this usage an "unstable zero" is one that lies > outside of the stability boundary in question (Re(p) > 0 in the Laplace > domain, |p| > 1 in the z domain). It's probably not strictly correct, > but it makes a nice shorthand.
I don't like it. Is it that hard to simply state "zeros outside the unit circle?" -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Thu, 01 Aug 2013 15:19:21 -0400, Randy Yates wrote:

> Tim Wescott <tim@seemywebsite.really> writes: > >> On Thu, 01 Aug 2013 10:35:01 -0700, robert bristow-johnson wrote: >> >>> On 8/1/13 8:12 AM, Tim Wescott wrote: >>>> On Thu, 01 Aug 2013 09:42:26 -0500, FilterDan wrote: >>>> >>>>> As an RF engineer, I have implemented more than my fair share of >>>>> analog filters, but until I started working with digital filters, I >>>>> had never heard of a minimum phase filter. Would someone mind >>>>> answering a few questions regarding this type of filter? >>>>> >>>>> 1. What are they? Please describe them qualitatively, not >>>>> mathematically. The mathematical definition I can easily find. >>>> >>>> A minimum phase filter is one that shows the minimum amount of phase >>>> shift for the amount of amplitude shaping. >>>> >>>> The easiest mathematical (sorry) symptom of this is a stable filter >>>> with unstable zeros. >>> >>> while i have to poles, i haven't applied the term "unstable" to zeros. >>> but if "unstable zeros" are zeros that live in the same region as >>> unstable poles (those would be poles in the right half s-plane or >>> outside the unit circle in the z-plane), i think you have that >>> backwards, Tim. >> >> Yes, I do. I was thinking the right thoughts, but I left out a phrase, >> or a sentence, or something. >> >> Dan: I should have said that the easiest symptom that filter is _not_ >> minimum phase is if it is stable and has one or more unstable zeros. >> >> And Robert, yes, in this usage an "unstable zero" is one that lies >> outside of the stability boundary in question (Re(p) > 0 in the Laplace >> domain, |p| > 1 in the z domain). It's probably not strictly correct, >> but it makes a nice shorthand. > > I don't like it. Is it that hard to simply state "zeros outside the unit > circle?"
The control guys I hang with say "unstable zeros". Think of it as the dialect 'round here. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Thanks for the responses. I'll have to work on this idea of zeros outside
the unit circle to see the affects.

Tim Wescott asked:
How can you implement a 6-pole Bessel in an FIR?  The Bessel filter
construction makes sense as an IIR filter, but not so much as an FIR
filter.

My reply is:
I can implement virtually any type of filter as an FIR. For example, I can
implement an 8 pole Inverse Chebyshev, with the stop band set to 60 dB, and
get virtually the same phase and magnitude response as an IIR
implementation. Having said this, I should say that it doesn't make sense
to implement some of the polynomials, such as the Butterworth and
Chebyshev, as an FIR because they require too many taps to achieve the true
response. The Inverse Chebyshev, Gauss, and Bessel polynomials work quite
nicely as FIR prototypes however.

See these links for some examples of an Inverse Chebyshev FIR and Bessel
FIR.

http://www.iowahills.com/B2PolynomialFIRFilters.html
http://www.iowahills.com/5FIRFiltersPage.html

If you try my FIR software, you will see that I can synthesize "analog
type" group delay FIR filters. Do these constitute minimum phase filters,
or something close to one? (I don't have MatLab)

Thanks,
Dan
	 

_____________________________		
Posted through www.DSPRelated.com
On Thu, 01 Aug 2013 15:56:18 -0500, "FilterDan" <95095@dsprelated>
wrote:

>Thanks for the responses. I'll have to work on this idea of zeros outside >the unit circle to see the affects.
Another simple working conceptual definition of "minimum phase" is just "minimum delay" or "minimum latency". If you look at the impulse responses of FIRs for "minimum phase" filters the main lobe happens right away, as compared to more common FIRs with symmetric impulse responses.
>Tim Wescott asked: >How can you implement a 6-pole Bessel in an FIR? The Bessel filter >construction makes sense as an IIR filter, but not so much as an FIR >filter. > >My reply is: >I can implement virtually any type of filter as an FIR. For example, I can >implement an 8 pole Inverse Chebyshev, with the stop band set to 60 dB, and >get virtually the same phase and magnitude response as an IIR >implementation. Having said this, I should say that it doesn't make sense >to implement some of the polynomials, such as the Butterworth and >Chebyshev, as an FIR because they require too many taps to achieve the true >response. The Inverse Chebyshev, Gauss, and Bessel polynomials work quite >nicely as FIR prototypes however.
Here's one trick to make a decent Butterworth (or other non-linear phase) FIR filter without getting too crazy on the tap quantity: http://dspguru.com/dsp/tricks/using-parks-mcclellan-to-design-non-linear-phase-fir-filter
>See these links for some examples of an Inverse Chebyshev FIR and Bessel >FIR. > >http://www.iowahills.com/B2PolynomialFIRFilters.html >http://www.iowahills.com/5FIRFiltersPage.html > >If you try my FIR software, you will see that I can synthesize "analog >type" group delay FIR filters. Do these constitute minimum phase filters, >or something close to one? (I don't have MatLab) > >Thanks, >Dan > > >_____________________________ >Posted through www.DSPRelated.com
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com