DSPRelated.com
Forums

Reverberation Question

Started by Tom October 18, 2003
Suppose I have a sound source and one microphone. I can assume that the
transfer function on reaching the microphone is az^-5 (say) where z^-5
is a five step time-delay and 'a' is an attenuation factor <1. However,
suppose we have just one reverberation off a nearby wall which takes 8
samples to reach the same microphone.Am I right in saying that the new
transfer function (acoustic that is) is

az^-5 + bz^-8  where b<a. This is beacause sound follows an inverse
square law and must attenuate the further away it gets from the source.
Are there any cases where b>a ie if there is a standing wave for
instance?
ie the smalest delay must have the largest amplitude always.

Thanks

Tom



Tom wrote:

> Suppose I have a sound source and one microphone. I can assume that the > transfer function on reaching the microphone is az^-5 (say) where z^-5 > is a five step time-delay and 'a' is an attenuation factor <1. However, > suppose we have just one reverberation off a nearby wall which takes 8 > samples to reach the same microphone.Am I right in saying that the new > transfer function (acoustic that is) is > > az^-5 + bz^-8 where b<a. This is beacause sound follows an inverse > square law and must attenuate the further away it gets from the source. > Are there any cases where b>a ie if there is a standing wave for > instance? > ie the smalest delay must have the largest amplitude always. > > Thanks > > Tom
What I am driving at is that I cannot understand why a room impulse response is always non-min phase. The definition of min-phase is that the impulse response always decays (ie does not rise and then fall). From the above example I cannot see why terms with larger delay should have larger amplitude when they are further from the source. Here is another related point: Suppose I pass the same white n noise through two transfer functions H1 and H2 (modelling a single reverberation/ microphone) where Y1=H1.n and Y2 = H2.n are the received signals at two microphones and H1 = 0.8z^-5 + 0.2z^-8 H2=0.6z^-9 + 0.5z^-13 ie H1 and H2 are both min-phase. When I cross-correlate Y1 and Y2 I get three peaks -at delays of 1,4, and 8. Of these the delay at 8 is the largest and so I take this to be the time difference of arrival. I am happy with this. However if I now change H1 and H2 such that H1=0.2z^-5+0.8z^-8 and H2=0.5z^-9 + 0.6z^-13 ie they are both non-min phase I now get three peaks in the cross-correlation: at 1, 5 and 8. Of these the peak is at 5. I might then conclude that the time-difference of arrival is now 5 samples - but is this the case? Tom Tom
Tom wrote:
   ...
> > What I am driving at is that I cannot understand why a room impulse > response is always non-min phase. > The definition of min-phase is that the impulse response always decays (ie > does not rise and then fall).
... That's not a definition, but it is a property, Put another way, a monotonic impulse response is a necessary but not sufficient property of a filter to make it minimum phase. Unless I'm wrong. Is a pure delay is minimum phase? How so? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Tom <somebody@nOpam.com> wrote in message news:<3F91F75B.686C8D35@nOpam.com>...
> Tom wrote: > > > Suppose I have a sound source and one microphone. I can assume that the > > transfer function on reaching the microphone is az^-5 (say) where z^-5 > > is a five step time-delay and 'a' is an attenuation factor <1. However, > > suppose we have just one reverberation off a nearby wall which takes 8 > > samples to reach the same microphone.Am I right in saying that the new > > transfer function (acoustic that is) is > > > > az^-5 + bz^-8 where b<a. This is beacause sound follows an inverse > > square law and must attenuate the further away it gets from the source. > > Are there any cases where b>a ie if there is a standing wave for > > instance? > > ie the smalest delay must have the largest amplitude always. > > > > Thanks > > > > Tom > > What I am driving at is that I cannot understand why a room impulse > response is always non-min phase. > The definition of min-phase is that the impulse response always decays (ie > does not rise and then fall). > From the above example I cannot see why terms with larger delay should have > larger amplitude when they are further from the source. Here is another > related point: Suppose I pass the same white n noise through two transfer > functions H1 and H2 (modelling a single reverberation/ microphone) where > > Y1=H1.n and Y2 = H2.n > > are the received signals at two microphones > > > and H1 = 0.8z^-5 + 0.2z^-8 > > H2=0.6z^-9 + 0.5z^-13 > > ie H1 and H2 are both min-phase. When I cross-correlate Y1 and Y2 I get > three peaks -at delays of 1,4, and 8. Of these the delay at 8 is the > largest and so I take this to be the time difference of arrival. I am happy > with this. > > However if I now change H1 and H2 such that > > H1=0.2z^-5+0.8z^-8 > > and > > H2=0.5z^-9 + 0.6z^-13 > > ie they are both non-min phase I now get three peaks in the > cross-correlation: at 1, 5 and 8. Of these the peak is at 5. I might then > conclude that the time-difference of arrival is now 5 samples - but is this > the case?
Tom, I'm going to avoid the discussion about minimum / nonminimum phase and defer discussion about correlation for now because I'm thinking it may complicate the viewpoint: In the case:
> H1 = 0.8z^-5 + 0.2z^-8 > > H2=0.6z^-9 + 0.5z^-13
there are two arrivals at #1 - so the arrival time is "smooshed" or, if you prefer, the arrival is distributed in time or there are two arrivals is probably the best statement. You may also say that there is a "leading edge" of the arrival and a "trailing edge of the arrival". Same for #2. This presents the problem of how to define arrival time. One way is to define it as the shortest time so 9-5=4 above. I note that you've only defined the path functions and nothing about the source or the receiver. So presumably you could have a very high sample rate compared to that corresponding to z^-1 in your path expressions. For example, multiply each of your exponents by 100 or some other suitable factor. Now, perhaps you have a more steady state situation and you want to make actual time difference measures but over a longer period of time or "integration time". Then you may be satisfied to define a weighted time of arrival based on the path structure. Consider this: H1 = K*z^-5 + (K-1)*z^-8; 0<=K<=1 If K=0, the time delay is clear. Ditto for K=1. Now, what if K is not either 0 or 1? Apparently the result will fall somewhere between 5 and 8. For example if K=0.5 the result would be 6.5. For #2, the result would be 11. The difference would be 11-6.5=4.5 At the same time, the shortest path difference is 4 from above. The point is that time delay and time delay difference measurements may depend on the method being used, the bandwidth / integration time, etc. The reason a structure might have the shortest path with higher attenuation could be that there's an attenuating mechanism that's higher in the shortest path. That's not usually the case if the shortest path is also a direct path and there are no intervening structures (e.g. a curtain). (I'm not good enough an acoustician to say whether attenuation and delay in an attenuating curtain necessarily go hand in hand - but it should not be ignored in general). However, what if there is no direct path, and are only two bounce paths, and the shortest of them has a much lower forward scattering coefficient? That would be a simple case. An example of such a path structure might be a room with an acoustic ceiling and a hard floor with the source closer to the ceiling and the receiver at mid-height - separated by a barrier that's open at the top and bottom. When you cross-correlate Y1 and Y2 you should get values at 1,4,5,8 - not just 1,4,8. The "1" represents the time difference between the trailing edge of H1 and the leading edge of H2. This isn't a good estimator. The "8" represents the time difference between the leading edge of H1 and the trailing edge of H2. This is also not a good estimator. The "4" and the "5" represent interim time differences where H1 and H2 overlap the most. The smallest of these two is the *actual* time difference between paths = 4 as defined by both leading edges. The average of these is a reasonable *estimate* of the time difference between paths = 4.5. The largest of these two "5" is the difference between trailing edges and isn't a good estimator because H1 and H2 may not / do not have the same lengths. If they were of the same lengths, then the leading-leading and trailing-trailing time differences would be the same and there would be a single value in the middle representing this single difference. Looks like there's something wrong with your code - there should be four values no matter whether the phase is minimum or non-minimum. Fred
In article bmuptn$9m2$1@bob.news.rcn.net, Jerry Avins at jya@ieee.org wrote
on 10/19/2003 15:50:

> Tom wrote: > ... >> >> What I am driving at is that I cannot understand why a room impulse >> response is always non-min phase. >> The definition of min-phase is that the impulse response always decays (ie >> does not rise and then fall). > ... > > That's not a definition, but it is a property,
that is slicing it perfectly.
> Put another way, a monotonic impulse response is a necessary
only after a finite time. i.e. the "tail" has to be monotonic. h(t) = exp(-t) - exp(-2t) is not always monotonic, but i think it be min phase, no?
> Is a pure delay is minimum phase? How so?
i don't think a pure delay is min phase, it is? (gotta think about it.) r b-j

Jerry Avins wrote:

> Tom wrote: > ... > > > > What I am driving at is that I cannot understand why a room impulse > > response is always non-min phase. > > The definition of min-phase is that the impulse response always decays (ie > > does not rise and then fall). > ... > > That's not a definition, but it is a property, Put another way, a > monotonic impulse response is a necessary but not sufficient property of > a filter to make it minimum phase. Unless I'm wrong. > > Is a pure delay is minimum phase? How so? >
>
A pure delay in analogue is non-min phase ie exp(-sT) so I expect it is so in the digital world. I never phrased the question right. What I mean to say is ignoring the net delay what is left is either min or non-min phase ie if we have 0.6z^-5 +0.1^z-9 then this is z^-5 (0.6+0.9z^-3) and the TF after z^-5 is what I am interested in rather than just the pure delay which I can estimate (but also have problems as pointed out by the previous post). Tom
> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;

Fred Marshall wrote:

> Tom <somebody@nOpam.com> wrote in message news:<3F91F75B.686C8D35@nOpam.com>... > > Tom wrote: > > > > > Suppose I have a sound source and one microphone. I can assume that the > > > transfer function on reaching the microphone is az^-5 (say) where z^-5 > > > is a five step time-delay and 'a' is an attenuation factor <1. However, > > > suppose we have just one reverberation off a nearby wall which takes 8 > > > samples to reach the same microphone.Am I right in saying that the new > > > transfer function (acoustic that is) is > > > > > > az^-5 + bz^-8 where b<a. This is beacause sound follows an inverse > > > square law and must attenuate the further away it gets from the source. > > > Are there any cases where b>a ie if there is a standing wave for > > > instance? > > > ie the smalest delay must have the largest amplitude always. > > > > > > Thanks > > > > > > Tom > > > > What I am driving at is that I cannot understand why a room impulse > > response is always non-min phase. > > The definition of min-phase is that the impulse response always decays (ie > > does not rise and then fall). > > From the above example I cannot see why terms with larger delay should have > > larger amplitude when they are further from the source. Here is another > > related point: Suppose I pass the same white n noise through two transfer > > functions H1 and H2 (modelling a single reverberation/ microphone) where > > > > Y1=H1.n and Y2 = H2.n > > > > are the received signals at two microphones > > > > > > and H1 = 0.8z^-5 + 0.2z^-8 > > > > H2=0.6z^-9 + 0.5z^-13 > > > > ie H1 and H2 are both min-phase. When I cross-correlate Y1 and Y2 I get > > three peaks -at delays of 1,4, and 8. Of these the delay at 8 is the > > largest and so I take this to be the time difference of arrival. I am happy > > with this. > > > > However if I now change H1 and H2 such that > > > > H1=0.2z^-5+0.8z^-8 > > > > and > > > > H2=0.5z^-9 + 0.6z^-13 > > > > ie they are both non-min phase I now get three peaks in the > > cross-correlation: at 1, 5 and 8. Of these the peak is at 5. I might then > > conclude that the time-difference of arrival is now 5 samples - but is this > > the case? > > Tom, > > I'm going to avoid the discussion about minimum / nonminimum phase and > defer discussion about correlation for now because I'm thinking it may > complicate the viewpoint: > > In the case: > > H1 = 0.8z^-5 + 0.2z^-8 > > > > H2=0.6z^-9 + 0.5z^-13 > there are two arrivals at #1 - so the arrival time is "smooshed" or, > if you prefer, the arrival is distributed in time or there are two > arrivals is probably the best statement. > You may also say that there is a "leading edge" of the arrival and a > "trailing edge of the arrival". > Same for #2. > This presents the problem of how to define arrival time. > One way is to define it as the shortest time so 9-5=4 above. > I note that you've only defined the path functions and nothing about > the source or the receiver. So presumably you could have a very high > sample rate compared to that corresponding to z^-1 in your path > expressions. For example, multiply each of your exponents by 100 or > some other suitable factor. > > Now, perhaps you have a more steady state situation and you want to > make actual time difference measures but over a longer period of time > or "integration time". > Then you may be satisfied to define a weighted time of arrival based > on the path structure. > Consider this: > H1 = K*z^-5 + (K-1)*z^-8; 0<=K<=1 > If K=0, the time delay is clear. Ditto for K=1. > Now, what if K is not either 0 or 1? > Apparently the result will fall somewhere between 5 and 8. > For example if K=0.5 the result would be 6.5. > For #2, the result would be 11. > The difference would be 11-6.5=4.5 > At the same time, the shortest path difference is 4 from above. > > The point is that time delay and time delay difference measurements > may depend on the method being used, the bandwidth / integration time, > etc. > > The reason a structure might have the shortest path with higher > attenuation could be that there's an attenuating mechanism that's > higher in the shortest path. That's not usually the case if the > shortest path is also a direct path and there are no intervening > structures (e.g. a curtain). (I'm not good enough an acoustician to > say whether attenuation and delay in an attenuating curtain > necessarily go hand in hand - but it should not be ignored in > general). > > However, what if there is no direct path, and are only two bounce > paths, and the shortest of them has a much lower forward scattering > coefficient? That would be a simple case. > > An example of such a path structure might be a room with an acoustic > ceiling and a hard floor with the source closer to the ceiling and the > receiver at mid-height - separated by a barrier that's open at the top > and bottom. > > When you cross-correlate Y1 and Y2 you should get values at 1,4,5,8 - > not just 1,4,8.
I think the 5 term is smudged. I am using the Knapp-Carter method here which is pretty good I am led to believe.
> > The "1" represents the time difference between the trailing edge of H1 > and the leading edge of H2. This isn't a good estimator. > > The "8" represents the time difference between the leading edge of H1 > and the trailing edge of H2. This is also not a good estimator. > > The "4" and the "5" represent interim time differences where H1 and H2 > overlap the most. > The smallest of these two is the *actual* time difference between > paths = 4 as defined by both leading edges. > The average of these is a reasonable *estimate* of the time difference > between paths = 4.5.
How would I implement a fractional delay? (to path balance that is). I suppose z^-4.5 = exp(-sT*4.5) and use Eulers identity and then use a Pade? Thanks Tom

Fred Marshall wrote:

> T > the source or the receiver. So presumably you could have a very high > sample rate compared to that corresponding to z^-1 in your path > expressions. For example, multiply each of your exponents by 100 or > some other suitable factor.
I sample at 22,050Hz 8 bits in real-time which is all I can handle - I would like to do better of course but I have so much processing I am lucky to get away with what I have! Tom
robert bristow-johnson wrote:
> In article bmuptn$9m2$1@bob.news.rcn.net, Jerry Avins at jya@ieee.org wrote > on 10/19/2003 15:50: > > >>Tom wrote: >>... >> >>>What I am driving at is that I cannot understand why a room impulse >>>response is always non-min phase. >>>The definition of min-phase is that the impulse response always decays (ie >>>does not rise and then fall). >> >>... >> >>That's not a definition, but it is a property, > > > that is slicing it perfectly. > > >>Put another way, a monotonic impulse response is a necessary > > > only after a finite time. i.e. the "tail" has to be monotonic. > > h(t) = exp(-t) - exp(-2t) > > is not always monotonic, but i think it be min phase, no? > > >>Is a pure delay is minimum phase? How so? > > > i don't think a pure delay is min phase, it is? (gotta think about it.)
Hey Robert, One definition of minimum phase is that the system is causal and stable and its inverse is also causal and stable. A pure delay has transfer function G(z) = z^{-N}, |z| > 0. The inverse of G(z) is 1/G(z) = z^{N}, |z| < \infty. Since this is a left-handed sequence (due to it's region-of-convergence), it is not causal. Thus a pure delay is not minimum phase. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:

   ...
> > A pure delay has transfer function G(z) = z^{-N}, |z| > 0. The inverse > of G(z) is 1/G(z) = z^{N}, |z| < \infty. Since this is a left-handed > sequence (due to it's region-of-convergence), it is not causal. Thus > a pure delay is not minimum phase.
Randy, I like that demonstration. I had another in mind that depends on a chain of physical reasoning. I didn't want to chance its being flawed, so I waffled. Briefly, minimum phase transformations can be undone. If I could undo a pure delay, I'd get rich at the race track. Come to think of it, you just said that in algebra; didn't you? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;