Calculate Sound Directionality w/ Equation & CAD

  • Thread starter Thread starter Raddy13
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around calculating sound directionality using time differences measured by microphones. Participants explore the theoretical framework, mathematical modeling, and potential sources of error in the setup, including considerations of multipath effects and geometric implications. The conversation includes both theoretical and practical aspects of sound localization.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a method for determining sound directionality using time differences from microphones, presenting a mathematical model for calculating the angle of sound source based on time intervals.
  • Another participant questions the setup and suggests considering multipath effects, asking for a diagram of the system.
  • A participant mentions they have not yet addressed multipath interferences and provides a rough diagram of their theoretical setup.
  • Concerns are raised about the accuracy of the microphone spacing measurement and its impact on calculations.
  • One participant argues that the curvature of sound waves may introduce errors at angles between 0 and 90 degrees, suggesting that the distance to the sound source should be much greater than the microphone spacing to minimize error.
  • Another participant discusses the geometric implications of sound wave propagation and questions the appropriateness of using a simple sine function for calculations.
  • There is a suggestion to mathematically correct for geometric errors based on time intervals alone.
  • A participant introduces the concept of the Radiation Near Zone and its relevance to the accuracy of angle measurements.
  • Discussion arises about the practical implications of the identified errors and whether they are acceptable for the intended application.
  • One participant draws a parallel between the microphone setup and hyperbolic navigation systems, noting that time delays can indicate the position of the sound source.

Areas of Agreement / Disagreement

Participants express various viewpoints on the sources of error and the implications of geometric considerations in sound directionality calculations. There is no consensus on the best approach to address the identified errors, and multiple competing views remain regarding the theoretical and practical aspects of the problem.

Contextual Notes

Limitations include the dependence on the accuracy of microphone spacing measurements, the unresolved nature of multipath interference effects, and the geometric assumptions made in the mathematical modeling. The discussion also highlights the complexity of sound wave behavior in relation to microphone arrays.

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   Reactions: 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   Reactions: 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.
 

Similar threads

Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 19 ·
Replies
19
Views
7K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
9K