From: Robert Adams on
I am wondering if anyone has a good program for achieving an arbitrary
desired phase response with a cascade of allpass filters (either 1st
or 2nd-order). I've begun writing a gradient-search algorithm but I'm
thinking it's already been done.


Thanks for any pointers.


Bob Adams
From: robert bristow-johnson on
On Jan 15, 9:37 am, Robert Adams <robert.ad...(a)analog.com> wrote:
> I am wondering if anyone has a good program for achieving an arbitrary
> desired phase response with a cascade of allpass filters (either 1st
> or 2nd-order). I've begun writing a gradient-search algorithm but I'm
> thinking it's already been done.
>
> Thanks for any pointers.

Bob, dunno about the z-plane, but in the s-plane, but considering
group delay, it's a lot like designing all-pole filters, but twice as
much.

Consider a single pole (and zero) APF:


H(s) = (w0 - s)/(w0 + s)

H(jw) = (w0 - jw)/(w0 + jw)

|H(jw)|^2 = (w0^2 + w^2)/(w0^2 + w^2) = 1 (as it should)

arg{ H(jw) } = arg{ w0 - jw } - arg{ w0 + jw }

= - 2 * arctan(w/w0)

group delay:

tau(w) = - (d/dw)arg{ H(jw) }

= - (d/dw)(-2 * arctan(w/w0))

= (2/w0) * 1/(1 + (w/w0)^2)

= (2/w0) * |H_lpf(jw)|^2

where

H_lpf(s) = 1/(w0 + s)


now, for second order, i think something very similar comes out.

so if you take your desired phase response, convert that to your
desired group delay, then considering the inverse bilinear transform,
pre-warp the desired group delay, then design an analog all-pole LPF
that hits that warped function.

i dunno. but maybe it's a start.

r b-j
From: Robert Adams on
On Jan 15, 5:49 pm, robert bristow-johnson <r...(a)audioimagination.com>
wrote:
> On Jan 15, 9:37 am, Robert Adams <robert.ad...(a)analog.com> wrote:
>
> > I am wondering if anyone has a good program for achieving an arbitrary
> > desired phase response with a cascade of allpass filters (either 1st
> > or 2nd-order). I've begun writing a gradient-search algorithm but I'm
> > thinking it's already been done.
>
> > Thanks for any pointers.
>
> Bob, dunno about the z-plane, but in the s-plane, but considering
> group delay, it's a lot like designing all-pole filters, but twice as
> much.
>
> Consider a single pole (and zero) APF:
>
>     H(s)  =  (w0 - s)/(w0 + s)
>
>     H(jw)  =  (w0 - jw)/(w0 + jw)
>
>     |H(jw)|^2  =  (w0^2 + w^2)/(w0^2 + w^2)  = 1  (as it should)
>
>     arg{ H(jw) } = arg{ w0 - jw } - arg{ w0 + jw }
>
>                  = - 2 * arctan(w/w0)
>
> group delay:
>
>    tau(w) = - (d/dw)arg{ H(jw) }
>
>           = - (d/dw)(-2 * arctan(w/w0))
>
>           = (2/w0) * 1/(1 + (w/w0)^2)
>
>           = (2/w0) *  |H_lpf(jw)|^2
>
> where
>
>     H_lpf(s)  =  1/(w0 + s)
>
> now, for second order, i think something very similar comes out.
>
> so if you take your desired phase response, convert that to your
> desired group delay, then considering the inverse bilinear transform,
> pre-warp the desired group delay, then design an analog all-pole LPF
> that hits that warped function.
>
> i dunno.  but maybe it's a start.
>
> r b-j

Thanks!


Actually I discovered in the last few days that there are Matlab
routines designed to implement phase-compensated IIR filters that do
the job pretty well.

Bob