DSPRelated.com
Forums

Time for my annual unanswered question again.

Started by Bob Cain May 7, 2004
If I have a real specification of an allpass filter that is 
the group delay of that filter as a function of frequency, 
how may I find the impulse response of that filter?  I'd 
like the result to be exact at the specification points.


Thanks,

Bob
-- 

"Things should be described as simply as possible, but no 
simpler."

                                              A. Einstein
In article c7fc5u06gb@enews3.newsguy.com, Bob Cain at
arcane@arcanemethods.com wrote on 05/07/2004 03:00:

> If I have a real specification of an allpass filter that is > the group delay of that filter as a function of frequency, > how may I find the impulse response of that filter?
you mean, a closed form expression of the impulse response? r b-j
"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:c7fc5u06gb@enews3.newsguy.com...
> If I have a real specification of an allpass filter that is > the group delay of that filter as a function of frequency, > how may I find the impulse response of that filter? I'd > like the result to be exact at the specification points. > > > Thanks, > > Bob > -- > > "Things should be described as simply as possible, but no > simpler." > > A. Einstein
How about: convert the group delay to phase, put it into Matlab together with all 1's for the amplitude as a "R, Theta" array. Do a polar to cartesian conversion, and inverse transform the result (I don't recall if Matlab can do a Fourier transform on a polar array). Regards Ian
Calculate its Fourier transform coefficients by taking unit
magnitudes, calculating the phase from your specs and then inverse
transform. You have to add pi*k to the DFT phases or do zero phase
windowing after the transform to get the IR properly centered if you
need that...

Now I'm off to my holidays... :-) Seeya in 8 days...
--smb

Bob Cain <arcane@arcanemethods.com> wrote:
> If I have a real specification of an allpass filter that is > the group delay of that filter as a function of frequency, > how may I find the impulse response of that filter? I'd > like the result to be exact at the specification points. > > > Thanks, > > Bob

robert bristow-johnson wrote:
> In article c7fc5u06gb@enews3.newsguy.com, Bob Cain at > arcane@arcanemethods.com wrote on 05/07/2004 03:00: > > >>If I have a real specification of an allpass filter that is >>the group delay of that filter as a function of frequency, >>how may I find the impulse response of that filter? > > > you mean, a closed form expression of the impulse response?
Or an algorithm that maps the specification exactly to it. There's a fairly simple one for going the other way, from the FIR to a group delay but as yet I've been unable to find or get anyone else to find a way to map it from frequency to time domain when specified as group delay. Numeric integration won't do. It is only approximate. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein

Ian Buckner wrote:


> > How about: convert the group delay to phase, put it > into Matlab together with all 1's for the amplitude as a > "R, Theta" array. Do a polar to cartesian conversion, > and inverse transform the result (I don't recall if Matlab can do > a Fourier transform on a polar array).
Right, the problem is how to do the first thing you state. Convert to phase. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein

Stephan M. Bernsee wrote:

> Calculate its Fourier transform coefficients by taking unit > magnitudes, calculating the phase from your specs and then inverse > transform. You have to add pi*k to the DFT phases or do zero phase > windowing after the transform to get the IR properly centered if you > need that... > > Now I'm off to my holidays... :-) Seeya in 8 days...
Damntion! :-) I was going to ask you just how you would do the "calculating the phase from my specs" part. Numeric integration doesn't work. I've tried it. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein
"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:c7gcq92289g@enews4.newsguy.com...
> > > Stephan M. Bernsee wrote: > > > Calculate its Fourier transform coefficients by taking unit > > magnitudes, calculating the phase from your specs and then inverse > > transform. You have to add pi*k to the DFT phases or do zero phase > > windowing after the transform to get the IR properly centered if you > > need that... > > > > Now I'm off to my holidays... :-) Seeya in 8 days... > > Damntion! :-) I was going to ask you just how you would do > the "calculating the phase from my specs" part. Numeric > integration doesn't work. I've tried it.
Bob, Why doesn't numeric integration work? I presume that you have the delay at zero frequency. One problem could be that "group delay" might be actually measured as (wrapped) phase instead of delay - so that the group delay thus derived might be too small by quite a bit! This is similar to the problem of unwrapping phase. If this is an issue then it will certainly be an issue for any method one might propose in going from group delay to impulse response. I can think of an approximate method: Start with a low order filter to be designed. Allow for an equiripple symmetric FIR allpass design - this is obtainable analytically and the ripple can be as small as you like (I believe). This filter has zeros that show up in quads. It has a minimum phase part and a maximum phase part that have corresponding zero pairs in them and between the parts as well. The square root of this filter has a multiplicity of solutions - depending on which zero pairs of the quads you retain. Calculate the group delay for every one of these solutions. Find the solution that yields the minimum group delay error. Iterate on the order of the filter to find the order that yields the minimum or an acceptable error in group delay. I did a similar program for not-linear phase / i.e. not symmetric allpass FIR filters that looks for the maximum energy impulse response out of all possible such filters of the same order. So, the objective criterion was different but the approach was the same right up to the end. Fred
Bob Cain wrote:

> ... the problem is how to ... Convert to phase. > > > Bob
Phase = frequency/delay. Radians and radians per second, or cycles and cycles/per second. For degrees, you need a constant somewhere. Jerry -- Engineering is the art of making what you want from things you can get. &#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;
Jerry,
That doesn't seem dimensionally correct to me. Phase = Frequency * Delay?
Radians = (Radians/Second) * Seconds.
cheers, Syms.
"Jerry Avins" <jya@ieee.org> wrote in message
news:409becd0$0$2989$61fed72c@news.rcn.com...
> Phase = frequency/delay. Radians and radians per second, or cycles and > cycles/per second. For degrees, you need a constant somewhere. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#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; >