{"id":65,"date":"2020-06-28T08:23:36","date_gmt":"2020-06-28T15:23:36","guid":{"rendered":"https:\/\/boom-tracker.com\/tracker\/?p=65"},"modified":"2020-07-02T22:35:13","modified_gmt":"2020-07-03T05:35:13","slug":"theory","status":"publish","type":"post","link":"https:\/\/boom-tracker.com\/tracker\/blog\/theory\/","title":{"rendered":"Theory"},"content":{"rendered":"\n<p>The basic idea behind this project is to use an array of microphones to measure the relative time of a sound. Then, using the locations and arrangement of the microphones, we should be able to calculate where the sound originated.<\/p>\n\n\n\n<p>Here&#8217;s how this will work. Let&#8217;s assume we have two microphones on an east-west line a distance <em>d <\/em>apart, and a sound wave is propagating past them at an angle <em>\u0398<\/em>. Assuming we know the speed of propagation <em>v<\/em>, we can take the time difference <em>t <\/em>of the arrival at the two microphones, and calculate what <em>\u0398<\/em> must be. It looks like the diagram at the top of the every page on this site:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-1024x791.png\" alt=\"\" class=\"wp-image-49\" width=\"943\" height=\"728\" srcset=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-1024x791.png 1024w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-300x232.png 300w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-768x593.png 768w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-250x193.png 250w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-550x425.png 550w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-800x618.png 800w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-233x180.png 233w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-388x300.png 388w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront-647x500.png 647w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/Wavefront.png 1056w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/figure>\n\n\n\n<p>So <em>\u0398=arcsin(v*t\/d)<\/em> and that gives us a <em>rough<\/em> direction to the source of the sound. The distance <em>d <\/em>can be measured with a measuring tape. The time difference <em>t <\/em>can be measured by a computer, and the velocity of sound can be <a rel=\"noreferrer noopener\" href=\"http:\/\/hyperphysics.phy-astr.gsu.edu\/hbase\/Sound\/souspe3.html\" target=\"_blank\">calculated if we know the air temperature.<\/a> Let&#8217;s assume some values to see it in action:<\/p>\n\n\n\n<p>d = 20 meters (approximately 65 ft for those playing in the US)<\/p>\n\n\n\n<p>v = 343.3 meters\/second or 1126 feet\/second <em>(at 20\u00b0C \/ 77\u00b0F )<\/em><\/p>\n\n\n\n<p>t = 1 millisecond = 0.001 seconds<\/p>\n\n\n\n<p>So \u0398 = arcsin(343.3*0.001\/20) = 0.01717 radians which is just a little less than 1 degree of arc.<\/p>\n\n\n\n<p>Since the microphones are set on an east-west line, that means that the direction to the source of the sound is 1 degree west of north, or 359\u00b0.<\/p>\n\n\n\n<p><em>Clever people will notice that I&#8217;ve glossed over a critical detail. I&#8217;ve assumed that the wave is propagating from the top of the page, rather than from the bottom. If it <strong>were <\/strong>propagating from the bottom, then the timing would be the same, but the bearing to the sound would be 1 degree west of south, or 181\u00b0<\/em>. How do we figure out which of those is correct?<\/p>\n\n\n\n<p>The answer is using more than 2 microphones. Let&#8217;s assume we had 4 microphones arranged in a square like so:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"1024\" src=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/06\/FullArray3-791x1024.png\" alt=\"sound wave propagating past an array of 4 microphones\" class=\"wp-image-66\"\/><figcaption>Full Array<\/figcaption><\/figure>\n\n\n\n<p>The time between the arrival at Mic1 and Mic3 is here represented as <em>t&#8217;<\/em>, and and distance is represented by <em>d&#8217;<\/em>. Using similar logic to that above, if <em>t&#8217; = 58.2 milliseconds<\/em>, and the distance is the same, then the bearing from these two mics is either 358\u00b0 <em>(if coming from the upper left)<\/em> or 2\u00b0 <em>(if coming from the upper right)<\/em>. Since 358\u00b0 and 359\u00b0 are about the same, we can deduce the correct answer. Actually, with 4 microphones we have a total of 6 baselines to calculate with.<\/p>\n\n\n\n<p>There&#8217;s only one problem left with this:  It&#8217;s based on a false assumption that the sound wave is straight line, but it&#8217;s not.  It&#8217;s an expanding circle (or actually sphere).  Still this is a useful approximation, and will get it close enough to do a more subtle analysis.  More on that <a href=\"\/tracker\/blog\/better-theory\/\">next time<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The basic idea behind this project is to use an array of microphones to measure the relative time of a sound. Then, using the locations and arrangement of the microphones, we should be able to calculate where the sound originated. Here&#8217;s how this will work. Let&#8217;s assume we have two microphones on an east-west line&hellip; <a class=\"more-link\" href=\"https:\/\/boom-tracker.com\/tracker\/blog\/theory\/\">Continue reading <span class=\"screen-reader-text\">Theory<\/span> <span class=\"meta-nav\" aria-hidden=\"true\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-blog","category-theory"],"_links":{"self":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":6,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/65\/revisions\/140"}],"wp:attachment":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}