Reply by Bernhard Holzmayer●March 14, 20062006-03-14

gabi wrote:

> Hi,
> I've got a fundamental question. I have a signal (impulse response of a
> room, computed from the original signal and the recorded signal) and
> now I want to find out the maximum of that impulse response. This IR
> has to be interpolated somehow, right now it is done by oversampling,
> but I was wondering if there could be another possiblity like
> zeropadding. The question is now, what will be more accurate in finding
> the real place of the maximum?
>
> Greetings,
> Gabi

Hi Gabi,
basically, every "improvement" on the signal can be done only if additional
information is either in the signal stream itself, or in the method which
you want to apply.
If your signal is completely arbitrary, you cannot improve it.
In this case the solution would be to take the best sample.
If your signal is arbitrary, but band-limited:
apply a filter with optimal band-limiting properties.
Finding the optimal result, can be reduced to what we learned in school:
If I know all derivates of a signal and at least one sample, then I can
calculate/restore the complete signal.
Usually, you know more about the signal (and it's physical background) than
just the recorded signal trace.
Look at the signal trace and mark the point, where you'd expect the maximum.
Find out, why you are sure.
Discussing it, will reveal lots of hidden knowledge.
Make use of it, and you'll probably find the best approximation.
Again, hidden knowledge is most often hidden in the derivates.
Example: the trace which Carlos proposed (0,10,11,0,5) reveals its problem,
if you look at it's derivates. It's enough (in this case) to calculate the
first derivate, to find out, why Andor's VSA would fail here.
If I knew about the bandwidth of that signal, I'd just remove the last
value, since it's certainly irrelevant for the calculation of the maximum.
Et voila, Andor's polynomial approach provides a perfect result (since it
makes use of the derivatives ...). Proposing a polynomial approach, did
secretly introduce hidden knowledge (or guess) about the nature of the
signal.
Bernhard

Reply by Andor●March 13, 20062006-03-13

Carlos Moreno wrote:

> Andor wrote:
>
> > My VSA* to solve this problem:
> >
> > 1. Find the sample with maximum absolute value in the impulse response.
> > 2. Fit a parabola through the sample and its left and right neighbour.
> > 3. Find the peak of the parabola.
>
> This can fail miserably -- try to imagine the band-limited signal that
> would give the following (contiguous) samples: 0, 10, 11, 0, 5
>
> I picture a peak somewhere between the second and third sample with
> amplitude 15 or 20 or even more. Yet the parabola that passes through
> 10, 11, 0 could have a peak quite close to the 10 and 11 points.

In the example you give, the relative error is about 15% (the maximum
between 10 and 11 is about 14.1). But you are right, the VSA can fail
miserably. Any algorithm except perfect sinc reconstruction can fail
(give me an algorithm, I'll give you a counter example such that the
estimated peak has arbitrary relative error). The VSA can be extended
to include the derivatives, if the training data shows insufficient
performance. I noticed that the estimated time of the peak is very
exact. Perhaps the VSA can be used to estimate the time, and some other
algorithm estimate the peak value?
However, given the application (probably to compute the SNR or the RT60
time of an impulse response), I don't think that degree of accuracy is
required. This assumption may be completely invalid.
Regards,
Andor

Reply by Carlos Moreno●March 13, 20062006-03-13

Andor wrote:

> My VSA* to solve this problem:
>
> 1. Find the sample with maximum absolute value in the impulse response.
> 2. Fit a parabola through the sample and its left and right neighbour.
> 3. Find the peak of the parabola.

This can fail miserably -- try to imagine the band-limited signal that
would give the following (contiguous) samples: 0, 10, 11, 0, 5
I picture a peak somewhere between the second and third sample with
amplitude 15 or 20 or even more. Yet the parabola that passes through
10, 11, 0 could have a peak quite close to the 10 and 11 points.
The key element is that your VSA ignores the derivative of the signal
at the neighbour points -- in fact, the thing only works if the signal
is sampled at a much higher rate than the minimum necessary for perfect
reconstruction.
Carlos
--

Reply by Andor●March 13, 20062006-03-13

gabi wrote:

> Hi,
> I've got a fundamental question. I have a signal (impulse response of a
> room, computed from the original signal and the recorded signal) and
> now I want to find out the maximum of that impulse response. This IR
> has to be interpolated somehow, right now it is done by oversampling,
> but I was wondering if there could be another possiblity like
> zeropadding. The question is now, what will be more accurate in finding
> the real place of the maximum?

My VSA* to solve this problem:
1. Find the sample with maximum absolute value in the impulse response.
2. Fit a parabola through the sample and its left and right neighbour.
3. Find the peak of the parabola.
4. Done.
Are you sure you need to go through all this trouble and can't just
take the sample with the maximum absolute?
Regards,
Andor
*) Very Simple Algorithm

Reply by Ron N.●March 13, 20062006-03-13

gabi wrote:

> Hi,
> I've got a fundamental question. I have a signal (impulse response of a
> room, computed from the original signal and the recorded signal) and
> now I want to find out the maximum of that impulse response. This IR
> has to be interpolated somehow, right now it is done by oversampling,
> but I was wondering if there could be another possiblity like
> zeropadding. The question is now, what will be more accurate in finding
> the real place of the maximum?

How do you know that you are oversampling? Is the signal naturally
sufficiently bandlimited? If so, you could sample at a lower rate,
somewhere above 2x the highest frequency, and then use zeropadding
as one method of reconstruction by interpolation of the original
signal. If the signal isn't naturally bandlimited, then any lower
sample rate will either have aliasing in the data, or have more
information thrown away by additional filtering needed before the
sampler, either of which could affect the accuracy of your results.
IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M

Reply by Feng Ouyang●March 13, 20062006-03-13

Zero padding in frequency domain is equivalent to interpolation in time
domain. Here interpolation is defined as the convolution between the
sampled data and an over-sampled version of a sinc function.
Interpolation can be done in many ways. However, any interpolation is based
some assumption, because we ultimately have more output data than the input.
The zero-padding (or equivalently sinc-convolution) assumes that the true
signal is band-limited. You can also assume that the true signal is smooth
in time domain, and thus use something like spline fitting, or polynormial
fitting.
I am not sure what you mean by oversampling. If it is done by increasing
the sampling rate at measurement, this would be the best way to improve
accuracy.
Hope it helps.
Feng
"gabi" <gabi.muckenschnabl@gmx.de> wrote in message
news:1142258068.053982.262160@i39g2000cwa.googlegroups.com...

> Hi,
> I've got a fundamental question. I have a signal (impulse response of a
> room, computed from the original signal and the recorded signal) and
> now I want to find out the maximum of that impulse response. This IR
> has to be interpolated somehow, right now it is done by oversampling,
> but I was wondering if there could be another possiblity like
> zeropadding. The question is now, what will be more accurate in finding
> the real place of the maximum?
>
> Greetings,
> Gabi
>

Reply by Carlos Moreno●March 13, 20062006-03-13

gabi wrote:

> Hi,
> I've got a fundamental question. I have a signal (impulse response of a
> room, computed from the original signal and the recorded signal) and
> now I want to find out the maximum of that impulse response. This IR
> has to be interpolated somehow, right now it is done by oversampling,
> but I was wondering if there could be another possiblity like
> zeropadding. The question is now, what will be more accurate in finding
> the real place of the maximum?

Could you determine a sampled version of the derivative of the
impulse response from the signal and the recorded signal? If
so, then interpolating for the zero-crossings should be easier
and more precise (more precise for a given amount of processing,
that is).
Carlos
--

Reply by gabi●March 13, 20062006-03-13

Hi,
I've got a fundamental question. I have a signal (impulse response of a
room, computed from the original signal and the recorded signal) and
now I want to find out the maximum of that impulse response. This IR
has to be interpolated somehow, right now it is done by oversampling,
but I was wondering if there could be another possiblity like
zeropadding. The question is now, what will be more accurate in finding
the real place of the maximum?
Greetings,
Gabi