{"id":297,"date":"2020-07-27T18:30:34","date_gmt":"2020-07-28T01:30:34","guid":{"rendered":"https:\/\/boom-tracker.com\/tracker\/?p=297"},"modified":"2020-07-27T18:30:35","modified_gmt":"2020-07-28T01:30:35","slug":"pyramid-of-abstractions","status":"publish","type":"post","link":"https:\/\/boom-tracker.com\/tracker\/blog\/pyramid-of-abstractions\/","title":{"rendered":"Pyramid of abstractions"},"content":{"rendered":"\n<p>I&#8217;m starting to tackle the problem of identifying the individual sounds and correlating them with things detected by all the microphones.  In order to do this I&#8217;m going to come up with abstractions for the data at each stage in the process. I&#8217;m going to start designing this from the bottom up.  The terms for each abstraction are presented in <strong>bold<\/strong> the first time it is used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"434\" src=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy.png\" alt=\"\" class=\"wp-image-299\" srcset=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy.png 546w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy-300x238.png 300w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy-250x199.png 250w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy-226x180.png 226w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/AbstractionHierachy-377x300.png 377w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><figcaption>The hierarchy of abstractions<\/figcaption><\/figure>\n\n\n\n<p>At the base of the pyramid of abstractions are <strong>samples<\/strong>. These are individual measurements of the voltage the microphone element produces.  The samples are grouped together into <strong>buffers<\/strong>.  Currently the size of a buffer is 512 samples, collected at approximately 20kHz.  The microcontroller decides if the buffer is <em>interesting<\/em> by looking for samples where the voltage falls above a threshold.  If interesting, it then forwards that buffer and preceding and following buffers to the server.<\/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\/07\/SoundAbstraction.png\" alt=\"\" class=\"wp-image-300\" width=\"693\" height=\"254\" srcset=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction.png 1003w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-300x110.png 300w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-768x282.png 768w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-250x92.png 250w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-550x202.png 550w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-800x294.png 800w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-491x180.png 491w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/SoundAbstraction-818x300.png 818w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p>The server receives these sound buffers from an individual microphone controller.  The server groups these buffers together based on time.  Each buffer spans about 22 milliseconds, and buffers from the same controller that arrive within 50 ms of each other are considered to be part of the same <strong>sound<\/strong> (50 ms chosen so that 1 or 2 dropped buffers don&#8217;t break up a single sound.)<\/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\/07\/ClusterAbstraction.png\" alt=\"\" class=\"wp-image-301\" width=\"664\" height=\"207\" srcset=\"https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction.png 995w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-300x94.png 300w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-768x240.png 768w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-250x78.png 250w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-550x172.png 550w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-800x250.png 800w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-576x180.png 576w, https:\/\/boom-tracker.com\/tracker\/wp-content\/uploads\/2020\/07\/ClusterAbstraction-960x300.png 960w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/figure>\n\n\n\n<p>Sounds from different microphone controllers are grouped together by the server into <strong>sound clusters<\/strong> that occur within some small time frame that will be bounded by the time it takes for sound to travel between microphones (plus some small amount to allow for timing errors.)  If the sound cluster contains sounds from more than 2 microphones, it will be considered to have originated from the same <strong>event<\/strong>.   <\/p>\n\n\n\n<p>The server then tries to determine where the event happened.  It does this by calculating the <strong>time-offsets<\/strong> and <strong>similarities<\/strong> of each pair of sounds in a cluster.  If the similarity of a pair of sounds falls below some threshold then the time-offset for that pair will be discarded.  The remaining time-offsets for a cluster will then be combined the the physical arrangement of their corresponding microphone assemblies and used to calculate a best-guess for the <strong>location<\/strong> of the event.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m starting to tackle the problem of identifying the individual sounds and correlating them with things detected by all the microphones. In order to do this I&#8217;m going to come up with abstractions for the data at each stage in the process. I&#8217;m going to start designing this from the bottom up. The terms for&hellip; <a class=\"more-link\" href=\"https:\/\/boom-tracker.com\/tracker\/blog\/pyramid-of-abstractions\/\">Continue reading <span class=\"screen-reader-text\">Pyramid of abstractions<\/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":"Abstracting the data","bgseo_description":"Organizing the collected sound samples so that they can analyzed and the location of a source event identified","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[3,7,8],"tags":[],"class_list":["post-297","post","type-post","status-publish","format-standard","hentry","category-blog","category-design","category-implementation"],"_links":{"self":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/297","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=297"}],"version-history":[{"count":2,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":302,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/posts\/297\/revisions\/302"}],"wp:attachment":[{"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boom-tracker.com\/tracker\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}