# inv filter deconvolution

Started by June 24, 2004
```Hello all,

I am working on a project to equalize the response of a loudspeaker
using dsp prefiltering.  I want to use a logarithmically-swept sine
excitation function to measure the linear impulse response and
harmonic distortion as described in Farina's paper "Simultaneous
measurement of impulse response and distortion with a swept-sine

In the paper, he claims the inverse filter of the log-swept sine for
deconvolving the speaker's output is simply the time-reversed input
with an exponentially-decreasing envelope applied.  This is to
compensate for the fact that the power is more spread out in the high
frequency range.  All of this makes sense to me.

But, when I convolve my excitation function (20Hz-20kHz) with its
inverse (using a fast convolution routine in MatLab), I don't get a
delta function.  The convolution sum has some residual high frequency
information (a peak near 20kHz when I convert to freq).  I am
wondering if this is problematic, or just an artifact of the
convolution routine.

Since the inverse filter has a much higher amplitude at large
frequency, I imagine a convolution would produce the max response when
the high-f sinusoids are lined up, and conversely the most negative at
the convolution steps when they are 180deg out of phase.  So I guess
it makes sense that the conv result would be wavy near the place where
the input function directly overlaps its inverse...

Of course, when I use the inverse filter to deconvolve the speaker's
output, I don't want this artifact to corrupt my measured impulse
response.  Is it possible for me to find an inverse filter that does a
better job?
```
```> In the paper, he claims the inverse filter of the log-swept sine for
> deconvolving the speaker's output is simply the time-reversed input
> with an exponentially-decreasing envelope applied.

The author also claims that envelope applied to the inverse filter has
a dB slope of 6dB/octave.  When I generate a log-swept sine, take the
fft, and convert to dB scale, I measure the fall-off from low to high
frquency as 3dB/octave. (??)
```
```Dan Shorb wrote:
>> In the paper, he claims the inverse filter of the log-swept sine for
>> deconvolving the speaker's output is simply the time-reversed input
>> with an exponentially-decreasing envelope applied.
>
> The author also claims that envelope applied to the inverse filter has
> a dB slope of 6dB/octave.  When I generate a log-swept sine, take the
> fft, and convert to dB scale, I measure the fall-off from low to high
> frquency as 3dB/octave. (??)
Hi Dan,

I use the same sort of procedure for HTRFs for which I have to
deconvolve the headset transfer (for me its all is done in the freq
domain using complex division). I checked the procedure above by
extracting the inverse chirp using
prihc=real(fftshift(fft(dirac)./fft(chirp)) % (dirac & chirp I guess you
know what they are) next I convolved conv(prihc,chirp) and I got my
dirac pulse back. Slightly noisy though, but time anti-aliasing solves
this, a little.
It seems to work, but there's 1 catch. The chirp needs to run from dc to
fs/2. You can imagine what happens with fft(dirac)./fft(chirp) when
fft(chirp) becomes zero. You have to block out those bins in the complex
division and set them to zero. Same problems occur when you obtain steep
notches in during measurements
My guess is that undefined values (zero?) for high freq bins causes the
error.

Suo

```