Reply by Tom October 21, 20032003-10-21

Fred Marshall wrote:

> Tom <somebody@nOpam.com> wrote in message news:<3F93263B.6CB0E303@nOpam.com>... > > 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, > > A 20-foot square room will have path lengths of 20-30 feet = 20-30msec > and a composite path may have 5 msec or so between direct and bounce > paths. And, if these times are arbitrarily split to get the sort of > resolution you implied, you might divide by 5 to get something like > 1msec resolution between individual path lengths. > > Your sample interval is .04535msec which is 22 times shorter than the > 1msec above. That "22" is equivalent to the "100" I had "imagined" > earlier. > So, what you have is a bounce path model sample interval that is 1/22 > of the path interval. So, you can express this function: > H=k*z-6 +s*z-9 > by multiplying the 6 and the 9 by 22 yields: > H=k*z^-132 + s*z^-198. > > Getting what had been "fractional" delays out of this is pretty easy > because the temporal resolution is much better with this > representation. In other words, you can model the paths at the same > sample rate as you're using in signal capture. That will give you > much finer temporal resolution in the estimate. > > You didn't say what sort of waveform you're using. It sometimes works > best to have very short pulses that allow you to resolve the paths and > to avoid reverberation of the backscattering kind. > > What are you going to do with this??? > > Fred
Hi Fred, I am using it as a voice activity detector. If the delay lies outside some bound then I assume it is not voice. (as the speech signal is spoken directly in front of two microphones). I also use a measure of coherence to try and avoid problems with reverberations ie if the delay is less than a defined amount and the coherence is greater than some limit then it must be a desired signal. Works really well in fact. The 'zone of activity' is a two-sheet hyberboloid and extends beyond the two mics too unfortunately as well as towards the speaker. It is interesting when I send a sine wave from outside the zone. At most frequencies it detects it is to the right (say) of the zone but at some frequencies it gives false readings. The signals outside the zone are taken to be noise of course. The method removes the noise in the silence periods of the speech. thanks Tom
Reply by Fred Marshall October 20, 20032003-10-20
Tom <somebody@nOpam.com> wrote in message news:<3F93263B.6CB0E303@nOpam.com>...
> 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, A 20-foot square room will have path lengths of 20-30 feet = 20-30msec and a composite path may have 5 msec or so between direct and bounce paths. And, if these times are arbitrarily split to get the sort of resolution you implied, you might divide by 5 to get something like 1msec resolution between individual path lengths. Your sample interval is .04535msec which is 22 times shorter than the 1msec above. That "22" is equivalent to the "100" I had "imagined" earlier. So, what you have is a bounce path model sample interval that is 1/22 of the path interval. So, you can express this function: H=k*z-6 +s*z-9 by multiplying the 6 and the 9 by 22 yields: H=k*z^-132 + s*z^-198. Getting what had been "fractional" delays out of this is pretty easy because the temporal resolution is much better with this representation. In other words, you can model the paths at the same sample rate as you're using in signal capture. That will give you much finer temporal resolution in the estimate. You didn't say what sort of waveform you're using. It sometimes works best to have very short pulses that allow you to resolve the paths and to avoid reverberation of the backscattering kind. What are you going to do with this??? Fred
Reply by Randy Yates October 20, 20032003-10-20
Hi Jerry,

I was a bit short on that other response. This time I stop and
smell the roses...  (can I do this?...)

Jerry Avins wrote:
> 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.
It's OK to make a mistake every once in awhile. (Like every hour or so for me).
> Briefly, minimum phase transformations can be undone.
Well, "can be undone" is ambiguous, a little, right? If the signal is recorded, you can undo it even if it's not causal. But I know you know this and I know what your point was, so maybe I'm being overly analytical.
> 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
This is off-topic quite a bit, but with the activity in playing the stock market over the last few years, I've often said to folks who lost money or lost the chance to make money by selling a stock too soon of their hindsight, "It's like being at a race track and saying `I should've bet on that horse.'" -- % 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
Reply by Randy Yates October 20, 20032003-10-20
Jerry Avins wrote:

> 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
As Eric would say, "Ayup." -- % 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
Reply by Jerry Avins October 20, 20032003-10-20
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;
Reply by Randy Yates October 19, 20032003-10-19
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
Reply by Tom October 19, 20032003-10-19

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
Reply by Tom October 19, 20032003-10-19

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
Reply by Tom October 19, 20032003-10-19

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;
Reply by robert bristow-johnson October 19, 20032003-10-19
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