[SciPy-User] interpolating an impulse response

Charles R Harris charlesr.harris at gmail.com
Tue Apr 12 00:23:15 EDT 2011


On Mon, Apr 11, 2011 at 11:41 AM, henry lindsay smith <
henrylindsaysmith at gmail.com> wrote:

> ok, my filter knowledge is a bit rusty it seems.
>
> I have a simple filter - for a loudness model.  It is specified at 48khz.
> it is a 2nd order IIR filter.  To have the same frequency response at
> 44.1khz I think I need to interpolate the impulse response.  however thats
> hard when there are only 3 coefficient in a and b.  any ideas?
>

I don't think you can do it exactly. If you have O[n] + a_0 * O[n-1] + a_1 *
O[n-2] + ... = I[n], the frequency response of the left hand side is 1 +
a_0/z + a_1/z^2 + ..., where z = exp(2*pi*j*f/48e3). Note the discrete set
of frequencies. Trying to match a sum of such such discrete frequencies with
a sum of differently spaced discrete frequencies isn't going to work, the
results will have different fundamental periods. However, presuming that the
input has gone through an anti-aliasing filter up front, you should be able
to make an approximation over the range of frequencies you are interested in
that is probably good enough by resampling in the frequency domain, doing an
inverse fft, and discarding the smaller coefficients in the result.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110411/04d632e7/attachment.html>


More information about the SciPy-User mailing list