room impulse response and deconvolution
Magnus Danielson
cfmd at swipnet.se
Sat Jan 22 00:45:24 CET 2000
From: Martin Czech <martin.czech at intermetall.de>
Subject: Re: room impulse response and deconvolution
Date: Fri, 21 Jan 2000 07:40:28 +0100 (MET)
Hi there!
> Well, I should have said: The measured balloon response b(n), the unknow FIR
> filter coef. a(n) and the unit impulse response (UI) u(n) (or some other wanted
> sequence) give a system of linear equations (via matrix representation of
> convolution). It is obvious for me, that the number of equations is larger then
> the number of a(n), furthermore the matrix has a diagonal appearance, eg. a(0)
> must be 1/b(0), this enforces a(1) and so on. There is no solution for this
> linear equation problem, so I derive from this that no such filter exists.
Under curtain cases you can solve this, as you soon will see.
> Now you got me! With respect the the application here I don't know
> the interpretation for correlation (I know the mechanics of it's math,
> though, fast corelation via fft should only involve taking H**S^ (the
> conjugate complex spectrum) instead of H**S in my fast convolver.
> Corelation is comutative, ie. H**S^ = S^**H, it should also be
> = H^**S, so the best would be to conjugate the shorter wave.)
>
> Cross corelation with what? I want to know, how the room response would look
> like , if an unit impulse was applied. But this is not the case, because
> the balloon free air impulse (BFAR) looks awfull. So I assumed, that tha whole room,
> ballon, microphone, preamp, ADC arrangement is linear. The hope was, that
> if I could find an inverse filter that converts the BFAR into a UI and that
> this filter in turn will also restore the measured room response into
> the ideal UI room response.
>
> My understanding is the correlation gives the amount of equality between
> two functions, or sequences, and when this appears, ie. for what shift. Do
> you propose to corelate the room response with the BFAR?
>
> In the moment I can not see how this will help me, but that's because
> of my ignorance.
When I use this I use a signal which autocorrelation is a single pulse, thus
basically acting in for the dirac delta. Now, knowing the autocorrelation is
so nice to us, we can use the cross-correlation of the signal source and the
resulting signal from the output of the linear system. A room can be
approximated to act as a linear and (especially important) time invariant
filter. The result of this cross correlation will the be room responce as
convolved over the autocorrelation (if I recall things right). Now, if we know
the signal source has a autocorrelation which is a single sample pulse within
the time we are interested in we can just drop the autocorrelation part and
have the room responce stand there. An PRBS network (as we just discussed
earlier not too far ago) can have this autocorrelation property and thus we
can measure the property very easilly. Now, my 1973 Motorola McMOS Handbook
shows a curcuit which uses two PRBSs, a 4016 CMOS switch a RC network and some
additional curcuit for clock treatment that does the whole deal, you read out
the impulse responce sample by sample by hooking your DMM to the output and
then step the PRBS time difference to get the next sample. The
cross-correlation multiplication is done in the 4016 analog multiplexer since
the time sequences are constantly running and the time lag is steped one sample
to advance further, thus the cross-correlation is:
rxy(l) = x(n) * y(-n)
So, you just do your convolution but run the time backwars on one of the
samples instead of forward. Very simple to implement once you learned to do
convolution.
Now, if we assume that your balloon happends to have a neat convolution and
that you pop it sufficiently free from early reflections, then by cutting it's
sample early and replace the rest with 0's we have suddenly got the free-air
impulse responce of the balloon before the rooms get's in there to interfere.
Given this we now have a possibly suitable sample (given that the
autocorrelation is right that is) to cross-correlate with the full sample
(including the balloon pop). The balloon pop should be reduced to a pure spike
and the first pop-reflections should show up as spikes as well, somewhat later.
A'int that neat? ;)
Now, the downside to this method is to avoid all the extra noise, which you
can't remove. If you have a better and more continous signal with a propper
autocorrelation signal (such as PRBS provides us with) we can use the cross-
correlation to remove any added noise, since it does not correlate with the
source and will only be spread out as a sligth error. A long enougth run will
push that error down.
So, now the real question about balloons is weither their poping has a suitable
autocorrelation, which is a strange question to ask ;)
You have a sample, check it!
Just cross-correlate that sample with itself!
I spared you all the booring formulas, but I hope you can follow anyhow.
If your poping balloons does not have the properties required I think turning
to a PRBS driven speaker is really a solution. I have been thinking of building
such a thing myself, since I nowdays do not have access to the system which
built upon that method. The MLSSA card and software is a commercially available
system that does exactly this.
> AFAIK this means: s1(n) is the direct signal, s2(n) is the measured room
> response, now what is the interpretation of s1(n)#s2(n) (cross corelation).
> Is it the ideal response?
The room is not really ideal, is it? ;)
> Yes, and balloons differ..., but I think that is not so much problem.
> I'm not interested in the REAL room response, a somewhat distorted response
> that my ears can not distinguish from the REAL will be enough.
> At the moment there is clearly too much hf damping.
The trick was to actually measure the source at the same time, this will
however put some restrictions on how you put your balloon and mike since you
would like a reflection-free sample of the full pop before first reflection
comes into play.
> I guess this is the sparc gap approach. But the two ball shaped electrodes
> will certainly focus high frequency stuff, if they are not very small...
I want ozone high up in the sky and not around my nose.
> Must have written ...and is NOT critical if it is hissing broad band noise...
> because this will not appear as noise, but diffusion, after my experiments.
Well, diffusion is nice, when you want it. If you want a clearer responce noise
could be an issue.
Cheers,
Magnus
More information about the Synth-diy
mailing list