DSPRelated.com
Forums

All-Pass FIR

Started by John Phillips August 11, 2004
Just a simple question on how to create an all-pass FIR filter.  I think
that know how to do an odd tap all-pass:

Coefficients for a three tap all-pass filter:

0 1 0

What are the coefficients for a four tap, all-pass filter?




Thanks for any help for such a novice question.

John


"John Phillips" <jsp5646@hotmail.com> wrote in message
news:qozSc.191066$tH1.9479448@twister.southeast.rr.com...
> Just a simple question on how to create an all-pass FIR filter. I think > that know how to do an odd tap all-pass: > > Coefficients for a three tap all-pass filter: > > 0 1 0 > > What are the coefficients for a four tap, all-pass filter?
Well, I'm not sure how to do it if the filter has to be flat. Probably the one you posed is the *only* flat one. It has one zero at the orgin. Higher order filters have more zeros and have magnitude ripple as a result I do believe. But, if you want a higher order all pass with some ripple allowed, here are some pointers: Let's start with a specification that allows for sinusoidal ripple in the all pass magnitude response - we'll not worry about the amplitude of the ripple for now: I'll make a set of assertions that you can test if you like: - A linear phase FIR filter has as many zeros outside the unit circle as inside the unit circle. They fall in reciprocal pairs inside and outside the unit circle and, unless single zeros, occur in complex conjugate pairs - forming "quads". - A "ripply" all pass linear phase FIR filter can have all the zeros outside the unit circle lying on a circle of radius k>1. Therefore, it would have all the zeros inside the unit cirlce lying on a circle of radius (1/k)<1. - The zeros of an equiripple "ripply" all pass linear phase FIR filter will be equally spaced in angle around the orgin. - The closer the zeros to the unit circle, the higher the ripple. So, you can construct the filter polynomial from a constellation of zeros as above. The result will be a linear phase equiripple all pass FIR filter. If you want a shorter filter that isn't linear phase, with the same number of ripples you can throw out a complex conjugate pair of zeros outside the unit circle or inside the unit circle from the "quad". There are multiple filters that are not linear phase that all have the same magnitude response - depedning on which zeros are thrown out. If you select all the zeros from the inside of the unit circle, you have a minimum phase ripply all pass. If you slect all the zeros from the outside of the unit circle, you have a maximum phase ripply all pass. In throwing out half the zeros, you may select some of the outside and some of the inside zeros in order to do things like maximize the energy in the coefficients, minimize the energy in the coefficients, etc. Fred
John Phillips wrote:

> Just a simple question on how to create an all-pass FIR filter. I think > that know how to do an odd tap all-pass: > > Coefficients for a three tap all-pass filter: > > 0 1 0 > > What are the coefficients for a four tap, all-pass filter?
You need to decide what you want the all-pass to do. An all-pass filter is built for a purpose; usually, adjusting a signal's phase without much affecting its amplitude. (There is usually some small ripple.) The filter you describe seems to be a symmetric FIR. As far as I know. all symmetric all-passes have an odd number of taps, all of which are zero except for the middle tap, which is one. All are pure delays, and rather uninteresting in consequence. The taps after the middle one are mere window dressing. Interesting all-passes are IIRs, usually designed to correct a particular phase distortion that a signal has undergone. Jerry -- ... the worst possible design that just meets the specification - almost a definition of practical engineering. .. Chris Bore &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
> Coefficients for a three tap all-pass filter: > > 0 1 0 > > What are the coefficients for a four tap, all-pass filter?
0 1 0 0 --Frank
Frank wrote:

>>Coefficients for a three tap all-pass filter: >> >>0 1 0 >> >>What are the coefficients for a four tap, all-pass filter? > > > 0 1 0 0 >
0 0 1 0 works pretty good too, I hear. Paul
Paul Russell wrote:

> Frank wrote: > >>> Coefficients for a three tap all-pass filter: >>> >>> 0 1 0 >>> >>> What are the coefficients for a four tap, all-pass filter? >> >> >> >> 0 1 0 0 >> > > 0 0 1 0 works pretty good too, I hear. > > Paul
0 0 0 1 and 1 0 0 0 complete the set. Jerry -- ... the worst possible design that just meets the specification - almost a definition of practical engineering. .. Chris Bore &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Thu, 12 Aug 2004 10:30:13 -0400, Jerry Avins <jya@ieee.org> wrote:

>Paul Russell wrote: > >> Frank wrote: >> >>>> Coefficients for a three tap all-pass filter: >>>> >>>> 0 1 0 >>>> >>>> What are the coefficients for a four tap, all-pass filter? >>> >>> >>> >>> 0 1 0 0 >>> >> >> 0 0 1 0 works pretty good too, I hear. >> >> Paul > > >0 0 0 1 and 1 0 0 0 complete the set.
1 0 0 0 is the minimum phase version. Surely this would sound better than 0 0 0 1. Regards, Allan.
Jerry Avins <jya@ieee.org> wrote in message news:<411b7ef5$0$5893$61fed72c@news.rcn.com>...
> Paul Russell wrote: > > > Frank wrote: > > > >>> Coefficients for a three tap all-pass filter: > >>> > >>> 0 1 0 > >>> > >>> What are the coefficients for a four tap, all-pass filter? > >> > >> > >> > >> 0 1 0 0 > >> > > > > 0 0 1 0 works pretty good too, I hear. > > > > Paul > > > 0 0 0 1 and 1 0 0 0 complete the set. > > Jerry
Do you want to put the filter just for delaying the input signal? Then all these filters will work, But if your aim of this exersice is to manipulate the phase of the incomminng signal then you have to go for the IIR structure.
Thanks everyone for your thoughts.  After seeing some of the them and
thinking about how the FIR filter is calculated, I realized that all I
needed to do was to make one tap a 1.  We have a system at work that the
user must input a filter but I did not want a filter so I thought about what
coefficients that would remove it, delay is not an issue.  I tried the 1 0 0
is it provided just what I needed.

Thanks for all your comments, even the funny ones.

John



"asish" <asishmr@sasken.com> wrote in message
news:f3f1ed51.0408130115.e8542d8@posting.google.com...
> Jerry Avins <jya@ieee.org> wrote in message
news:<411b7ef5$0$5893$61fed72c@news.rcn.com>...
> > Paul Russell wrote: > > > > > Frank wrote: > > > > > >>> Coefficients for a three tap all-pass filter: > > >>> > > >>> 0 1 0 > > >>> > > >>> What are the coefficients for a four tap, all-pass filter? > > >> > > >> > > >> > > >> 0 1 0 0 > > >> > > > > > > 0 0 1 0 works pretty good too, I hear. > > > > > > Paul > > > > > > 0 0 0 1 and 1 0 0 0 complete the set. > > > > Jerry > > Do you want to put the filter just for delaying the input signal? > Then all these filters will work, But if your aim of this exersice is to > manipulate the phase of the incomminng signal then you have to go for > the IIR structure.
Allan Herriman <allan.herriman.hates.spam@ctam.com.au.invalid> writes:

> On Thu, 12 Aug 2004 10:30:13 -0400, Jerry Avins <jya@ieee.org> wrote: > > >Paul Russell wrote: > > > >> Frank wrote: > >> > >>>> Coefficients for a three tap all-pass filter: > >>>> > >>>> 0 1 0 > >>>> > >>>> What are the coefficients for a four tap, all-pass filter? > >>> > >>> > >>> > >>> 0 1 0 0 > >>> > >> > >> 0 0 1 0 works pretty good too, I hear. > >> > >> Paul > > > > > >0 0 0 1 and 1 0 0 0 complete the set. > > 1 0 0 0 is the minimum phase version. Surely this would sound better > than 0 0 0 1.
Such a filter provides crisper, cleaner highs as well as a mid-range with more "presence." Bass response is tight and controlled. Of course, the sound of any digital filter can be improved with Jean-Pierre-Marie Digital-AccuPhase interconnects. 8^) -- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA randy.yates@sonyericsson.com, 919-472-1124