Calculate Sound Directionality w/ Equation & CAD

  • Thread starter Thread starter Raddy13
  • Start date Start date
AI Thread Summary
The discussion focuses on developing a program to calculate sound directionality using time differences from multiple microphones. The derived equations for determining the angle of sound source rely on the spacing between microphones and the speed of sound. A periodic error of up to 1.5 degrees at certain angles has been observed, attributed to geometric factors and the proximity of the sound source to the microphone array. Suggestions include adjusting the distance of the sound source to reduce error and considering the effects of sound wave curvature in calculations. The conversation also touches on practical implications of the errors and their relevance to the intended application of the system.
Raddy13
Messages
30
Reaction score
0
I'm writing a program that will determine sound directionality by measuring the time difference from left and right acoustic triggers (with two additional triggers to determine if the sound is coming from the front or back). Here's the math I derived:

dt = measured time interval between left and right microphones
dt_max = maximum possible time interval (i.e., source is directly to the left or right, 90 or 270 degrees)
r = spacing between microphones
c = speed of sound (temperature compensated)
a = relative bearing of sound source

dt_max = r/c

a = asin(dt/dt_max)

So I sketched a the system up in CAD and entered the distances to the left and right "ears" into a spreadsheet which spat out the predicted value, and then I measured the angle in CAD and compared the two. The predicted value is pretty close, but there's a periodic level of error which peaks at 1.5 degrees error at 45 degrees and 0 degrees error at 0 and 90. It's not a huge amount of error, but I can't figure out where it's coming from. Any thoughts?
 
Engineering news on Phys.org
Raddy13 said:
I'm writing a program that will determine sound directionality by measuring the time difference from left and right acoustic triggers (with two additional triggers to determine if the sound is coming from the front or back). Here's the math I derived:

dt = measured time interval between left and right microphones
dt_max = maximum possible time interval (i.e., source is directly to the left or right, 90 or 270 degrees)
r = spacing between microphones
c = speed of sound (temperature compensated)
a = relative bearing of sound source

dt_max = r/c

a = asin(dt/dt_max)

So I sketched a the system up in CAD and entered the distances to the left and right "ears" into a spreadsheet which spat out the predicted value, and then I measured the angle in CAD and compared the two. The predicted value is pretty close, but there's a periodic level of error which peaks at 1.5 degrees error at 45 degrees and 0 degrees error at 0 and 90. It's not a huge amount of error, but I can't figure out where it's coming from. Any thoughts?
Can you post a diagram of the setup? What allowances have you made for multipath?

Here's an interesting thread that involved acoustic multipath issues: https://www.physicsforums.com/threa...the-type-of-gun-by-the-sound-it-makes.898184/
 
I haven't gotten as far as filtering out multipath interferences, I'm still at the theoretical stage. Here's a rough diagram of the setup:

s1dgmQA.png


Sound above a certain threshold triggers the locating response from the MCU. The sound hits mic 4 first, telling the processor that the sound is located behind it, and then it calculates the interval from the time it hits mic 1 to the time it hits mic 3 and determines the bearing of the sound based on the math in my original post.
 
You need to measure the spacing between microphone centres.
 
I included that in my calculations, r = the spacing between microphones
 
In the diagram you show the curved lines from the sound point source and the curvature of those lines is irrelevant at 0 and 90 degrees but not for any angle between those two locations. If you are calculating the distances/times from a point source very near your array (as you show in your diagram) then the angle of approach of the sound from the point source to the array Mic 1 and Mic 2 locations may be introducing the error. In a practical application your array spacing should be small relative to the distance to the sound source, effectively making the arriving sound wave front more of a straight line perpendicular to the path between the source and the center point of the array.

Try moving your point source to a distance substantially proportionally greater than the distance between the sensing mic's and see if that reduces your error.
 
  • Like
Likes berkeman
I just approximated the curvature in my Word diagram, but in an accurate, theoretical, 2-D drawing, aren't the sound waves treated as circles? And the time to reach the microphone is the distance (radius) from the source divided by the speed of sound, right? Or am I misunderstanding that?

To clarify, if this was experimental error from a real-world setup, I could understand there being a certain level of error. But since this is still all on paper, and the error level itself is sinusoidal, it makes me think I goofed up the math somewhere.
 
The problem is one of geometry, I have made the below very crude sketch to illustrate why a point source with a radiating sound pattern does not work with a simple Sine function equation. As you can see the triangle formed by dT_max , dT and a line from the bottom of dT to Mic 1 does not form a right angle isosceles triangle.
 

Attachments

  • Like
Likes tech99
JBA said:
The problem is one of geometry, I have made the below very crude sketch to illustrate why a point source with a radiating sound pattern does not work with a simple Sine function equation. As you can see the triangle formed by dT_max , dT and a line from the bottom of dT to Mic 1 does not form a right angle isosceles triangle.
Yes, we can say that the source lies within the Radiation Near Zone of the receiving array.
 
  • #10
JBA said:
The problem is one of geometry, I have made the below very crude sketch to illustrate why a point source with a radiating sound pattern does not work with a simple Sine function equation. As you can see the triangle formed by dT_max , dT and a line from the bottom of dT to Mic 1 does not form a right angle isosceles triangle.

Oh okay, I see now. Is there any to mathematically correct for it knowing only the time interval between the two microphones?

For anyone interested, I recreated JBA's drawing to scale in CAD so you can see the angle more clearly:

wLDHtgT.png
 
  • #11
Within the Radiation Near Zone of an array, the pattern varies with distance, so you need to know the distance to be certain of the angle.
Actually you do not specify a wavelength, relying on time intervals only, and it might make calculations easier if you did so. For instance, the Radiation Near Zone is usually defined approximately as extending to the Rayleigh Distance, which is D^2 / 2 Lambda.
 
  • #12
It's not looking for a specific frequency of sound, it's just looking for any sound above a certain threshold, so I think using your equation would be beyond the scope of the project. I'm already pushing the MCU to its limits speed-wise to get it to respond to the sound intervals, I think adding an FFT into the mix would be too much for the chip. Thank you though!
 
  • #13
OK, at this point it is determined there will be an error; so, maybe it is time to investigate the extent of that error depending upon the distance of the source from the array and what arc length that error represents at those distances. The point source arc error is greater the nearer the source is to the array; but, the effective arc length for a given angle error is proportionally smaller. Conversely, as the distance from the source to the array increases the error from the point source arc effect reduces (the arc radius increases so the sound front approaches closer to a straight line sound front configuration); but, the arc length of error increases with the size of the angular error. Additionally, the amount of error is greatest at the 45° angles because at the 0° and 90° points the point source arc does not effect the accuracy of the calculations; and in the 45° regions the amount or bias of angle error may be predictable.

The question is "are the errors small enough to allow the information to still be useful from a practical standpoint based upon upon the intended purpose and environment in which it is intended to be applied?".
 
  • #14
It also occurred to me that using the two pick up devices is similar to a "Hyperbolic" navigation system, such as LORAN or DECCA, where the time delay tells us that the source lies on a hyperbola having the two microphones as foci. At long distances the angle is correct.
 
  • #15
There will be a difference in amplitude due to the off-axis angle of arrival at the microphone.
Later encountered microphones will have lower angles of arrival and greater 1/r2 attenuation.
Lower amplitude sound will take a longer time to reach the same threshold needed to detect the sound.
 
  • #16
Baluncore said:
There will be a difference in amplitude due to the off-axis angle of arrival at the microphone.
Later encountered microphones will have lower angles of arrival and greater 1/r2 attenuation.
Lower amplitude sound will take a longer time to reach the same threshold needed to detect the sound.
Sorry, I am not sure about your comment. Is 1/r^2 the spreading loss? This should be independent of the characteristics of the transducer.
 
  • #17
tech99 said:
Is 1/r^2 the spreading loss? This should be independent of the characteristics of the transducer.
Yes, further away will be lower amplitude.
Lower amplitude signals will take longer to rise to the fixed threshold. That will introduce an additional time delay.
 
Back
Top