Post by Sarah ThompsonI always thought that achieving linear phase response predicated the need
for FIR filters, and that IIR filters could not approach this.
if real-time is not an issue you can filter a sound file once in the normal
forward direction and then again in the backward direction and the phase
shifts will kill each other off. you must design the gain of your IIR
filter to be half the number of dB as your original specification.
now, if you segment and overlap-add your audio, you can do it in real-time
using _truncated_ IIR filters (which are really FIR filters in IIR clothing
or, maybe, the other way around - a moving average filter is a simple
example of a truncated IIR implementation) if your willing to put up with a
lot of delay.
Post by Sarah ThompsonHowever, when
trawling around on AltaVista recently I spotted a few references to linear
phase IIR filters, but couldn't find anything on line that went as far as
owning up to the maths involved. I'm new to the list, so I have no idea if
this has been discussed already.
it hasn't here yet but there were a few breif discussions about it on
comp.dsp (try that instead of Alta Vista if you want to search newsgroup, i
don't think anyone has built a web site to the topic yet). i'm willing to
own up to the math involved here on the list but only to the point that the
concept gets understood (i.e. dialog). i'm not prepared to do a treatise
on it.
Post by Sarah ThompsonHowever, due to the enormous run time
performance advantages of IIR over FIR filter architectures, it would seem
to be enormously interesting if this really is possible.
Has anyone had any involvement in this area? If so, pointers towards useful
references would be much appreciated.
here is a reprint of a comp.dsp post of mine. for more info, go to Deja
News and search comp.dsp for the topic.
Subject: Re: Linear phase IIR filters
Author: robert bristow-johnson
Email: ***@viconet.com
Date: 1998/08/13
Forums: comp.dsp
Post by Sarah ThompsonHi,a while back I saw a message here which read an IIR filter could be
given a linear phase response by simply feeding the signal through a second
filter with reversed coefficients (which was said to be the same as feeding
the signal backwards through the filter - which is not very practical in a
real-time algorithm).
Reversing the coefficients of an IIR filter will make the filter
unstable. Trying to filter any data with an unstable filter will
generally lead to undesirable overflow results.
Thus it will NOT produce the same results as feeding the signal
through the filter backwards.
There is no real way to get linear phase IIR responses in real-time.
depending on semantics, this is not exactly true, Peter. with
_truncated_ IIR filters (these happen to have pole-zero cancellation so
their impulse response is actually finite in length but they're
implemented with an IIR filter and a delay line) you can get exactly
phase linear response if by passing the signal through the forward
truncated IIR and then backwards or time-reversed (in segments, using
overlap-add) through an identical truncated IIR.
also, see below, Smith and Wang also did this using _unstable_ truncated
IIR instead of the time-reversed IIR.
Post by Sarah ThompsonYou can get good approximations, but not exactly linear phase.
fished out of DejaNews:
Subject: Re: Zero-phase filtering
From: robert bristow-johnson <***@viconet.com>
Date: 1998/06/24
Message-ID: <***@viconet.com>
Newsgroups: comp.dsp
Post by Sarah ThompsonI am trying to find some literature on the handling of initial conditions
and transients when implementing forward-backward zero-phase filters.
The forward-backward step is pretty straightforward, but I have not been
able to find literature on the initial condition treatment . The only
reference I have is the "Discrete-Time Signal processing" book by Alan
Oppenheim and the implementation of Matlab of this zero-phase filter.
i presume you are looking into using real-time IIR filters in forward
and reverse on segments to get the zero-phase (or more accurately,
linear phase) response. if the application is not real-time but applied
to sound files, then issue is trivial: run it thought once forward and
then run the resulting sound file through the same IIR filter backward.
in either case the initial conditions for the IIR are zero.
i think the seminal paper reference is
S. R. Powell & P. M. Chau, "A Technique for Realizing Linear Phase IIR
Filters", IEEE ASSP-39, no.11, pp. 2425-2435, (Nov. 1991).
there is another AES preprint about the same topic:
S. A. Azizi, "Performance Analysis of Linear Phase Audio Filters Based
on the Zero Phase Filtering Concept", 103rd AES Convention (Sept. 1997),
AES preprint no. 4535.
in both of these cases, you time reverse a segment of audio, run it
through (backwards) an IIR filter with initial states set to zero. by
knowing the pole locations of the IIR filter, you can predict how long
it will take the IIR to decay to "zero" (to within a given precision)
after the finite audio segment has passed through. you then time
reverse the result back and overlap-add the tails over succesive
segments (this is easy if you choose the segment size to be exactly the
same length as the length of the IIR impulse response).
Julius Smith and Avery Wang did a paper (it was an internal CCRMA paper
but i think it's published somewhere) on zero-phase filters using
_truncated_ IIR filters (but the non-causal IIR was a truncated unstable
IIR which i don't like too much). these are a pair of IIR with
identical poles but one is scaled, phased, and delayed so that when it
is subtracted from the first IIR the result is _zero_ forevermore. it's
really an FIR implemented as IIR with pole-zero cancellation. if you
implement your time-reversed filters with _truncated_ IIR then you don't
have to worry about how much error you get from truncating the tail in
the time reversed filter.
a possible ref: http://cm.stanford.edu/~jos/tiir.ps.gz
there used to be a publication list for CCRMA but i can't find it. does
anybody know what they did with it?
--
r b-j
***@viconet.com a.k.a. ***@audioheads.com
a.k.a. ***@wavemechanics.com
"Don't give in to the Dark Side. Boycott intel and microsoft."
Post by Sarah ThompsonPS: I'm interested in DSP for mastering purposes, so to avoid blurring of
transients I'd like to be able to achieve constant group delay across all
bands of a multiband compressor. FIR filters would be too expensive to
implement, unfortunately, but I still would like to achieve better than
Butterworth/Bessel/Chebychev/whatever characteristics.
you'll get some blurring anyway unless all bands of your compressor are at
the same gain. but it will be phase-linear blurring which means an equal
amount (and symmetrical) of blur before and after the transient.
Post by Sarah ThompsonPPS: Has anyone tried designing IIR filters using genetic algorithms and/or
simulated annealing, in order to get around the 'no inverse transform'
problem?
i would think that someone in an IEEE paper has published about that. i'm
not in IEEE so i can't, at the moment cite anything, but if you have access
to an engineering library, look in both ASSP (and it's decendents) and
Circuits and Systems.
i _am_ in AES and no one has published genital, errrr, genetic algorithms
there for filter design but Andrew Horner _has_ published about the
application of G.A. to synthesis parameter extraction (FM and wavetable).
personally, i'm not entirely sold on the benefit.
r b-j
***@viconet.com a.k.a. ***@audioheads.com
a.k.a. ***@wavemechanics.com
"Don't give in to the Dark Side. Boycott intel and microsoft."