From 1b5adafa7678a3e7def3931cdd0f1a487c6ea5a8 Mon Sep 17 00:00:00 2001 From: Alexander James Wallar Date: Wed, 12 Mar 2014 14:15:48 +0000 Subject: [PATCH] Add presentation --- .gitignore | 3 ++ Makefile | 2 +- docs/paper/paper.aux | 2 ++ docs/paper/paper.log | 86 ++++++++++++++++++++++++++++++++++++++------ docs/paper/paper.tex | 37 +++++++++++++++++-- tests/test_server.py | 2 +- 6 files changed, 116 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 50367f7..e0064a3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ database/ imgs/ sounds/* +presentations/* + +!presentations/Ocean.pdf !sounds/Cock.wav *.pdf diff --git a/Makefile b/Makefile index b15fdb0..3600cb4 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ depend: mkdir sounds paper: - cd docs/paper; pdflatex paper.tex; cd ../../; + cd docs/paper; pdflatex paper.tex; pdflatex paper.tex; pdflatex paper.tex cd ../../; documentation: cd docs; doxygen Doxyfile; cd .. diff --git a/docs/paper/paper.aux b/docs/paper/paper.aux index 7528bf0..7d2a32a 100644 --- a/docs/paper/paper.aux +++ b/docs/paper/paper.aux @@ -7,3 +7,5 @@ \@writefile{loa}{\contentsline {algorithm}{\numberline {1}{\ignorespaces Determining the Standard Deviation}}{3}} \newlabel{algo:Std}{{1}{3}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Multiple Source}{3}} +\@writefile{loa}{\contentsline {algorithm}{\numberline {2}{\ignorespaces Multiple Source Sound Localization}}{4}} +\newlabel{algo:MS}{{2}{4}} diff --git a/docs/paper/paper.log b/docs/paper/paper.log index b4b34fe..42dfbc5 100644 --- a/docs/paper/paper.log +++ b/docs/paper/paper.log @@ -1,8 +1,8 @@ -This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.5.30) 10 MAR 2014 01:48 +This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.5.30) 10 MAR 2014 14:47 entering extended mode restricted \write18 enabled. %&-line parsing enabled. -**paper.tex +**paper.tex cd ../../ (./paper.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. @@ -287,6 +287,9 @@ LaTeX Font Warning: Command \small invalid in math mode on input line 117. LaTeX Font Warning: Command \small invalid in math mode on input line 118. +LaTeX Font Warning: Command \small invalid in math mode on input line 118. + + LaTeX Font Warning: Command \small invalid in math mode on input line 118. LaTeX Font Info: Try loading font information for OMS+cmr on input line 119. @@ -298,6 +301,9 @@ LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available (Font) Font shape `OMS/cmsy/m/n' tried instead on input line 119. +LaTeX Font Warning: Command \small invalid in math mode on input line 120. + + LaTeX Font Warning: Command \small invalid in math mode on input line 131. @@ -345,15 +351,73 @@ LaTeX Font Warning: Command \small invalid in math mode on input line 151. LaTeX Font Warning: Command \small invalid in math mode on input line 151. -[3] (./paper.aux) ) +[3] + +LaTeX Font Warning: Command \small invalid in math mode on input line 172. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 172. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 172. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 172. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 173. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 173. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 174. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 175. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 177. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 177. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 177. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 178. + + +LaTeX Font Warning: Command \small invalid in math mode on input line 179. + +[4] (./paper.aux) ) Here is how much of TeX's memory you used: - 2494 strings out of 493315 - 33359 string characters out of 6137904 - 98191 words of memory out of 5000000 - 5914 multiletter control sequences out of 15000+600000 + 2495 strings out of 493315 + 33368 string characters out of 6137904 + 99199 words of memory out of 5000000 + 5915 multiletter control sequences out of 15000+600000 14254 words of font info for 50 fonts, out of 8000000 for 9000 957 hyphenation exceptions out of 8191 - 38i,17n,23p,231b,471s stack positions out of 5000i,500n,10000p,200000b,80000s + 38i,17n,23p,241b,471s stack positions out of 5000i,500n,10000p,200000b,80000s -Output written on paper.pdf (3 pages, 176698 bytes). +Output written on paper.pdf (4 pages, 182662 bytes). PDF statistics: - 86 PDF objects out of 1000 (max. 8388607) - 62 compressed objects within 1 object stream + 89 PDF objects out of 1000 (max. 8388607) + 64 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/docs/paper/paper.tex b/docs/paper/paper.tex index 3aa48fc..1eb012d 100644 --- a/docs/paper/paper.tex +++ b/docs/paper/paper.tex @@ -115,9 +115,9 @@ \subsubsection{Single Source} \STATE $t_{max} \leftarrow \Function{GetMaxTime}(\Var{eventList})$ \STATE $t_{min} \leftarrow \Function{GetMinTime}(\Var{eventList})$ \STATE $t_{err} \leftarrow 1 - \mathlarger{\frac{t_{max} - \Var{event}.\Var{timestamp}}{t_{max} - t_{min} + \epsilon}}$ -\STATE $err \leftarrow \frac{c}{t_{err} + \Var{event}.\Var{confidence}}$ +\STATE $\Var{err} \leftarrow \frac{c}{t_{err} + \Var{event}.\Var{confidence}}$ \COMMENT {$c$ is a scaling constant} -\RETURN $err$ +\RETURN $\Var{err}$ \end{algorithmic} \end{algorithm} @@ -151,6 +151,37 @@ \subsubsection{Multiple Source} \grad{x, y}(\mathcal{-P}, x_g, y_g, r, spl, events) \end{align*} The variables, $r$, $spl$, $events$ are the same as in $\mathcal{L}$, however, -$x_g$ and $y_g$ are the initial guesses for the gradient decent. +$x_g$ and $y_g$ are the initial guesses for the gradient decent. The function +returns the $x$ and $y$ values that minimizes the equation $-\mathcal{P}$ given +constant arguments $r$, $spl$, and $events$. + +Now that we are able to bias the gradient decent, it is possible for us to find +mutliple local maximas in the probability density function, $\mathcal{P}$. This +is done by iterating through the list of events and performing the gradient +decent function with an initial guess of the position of the event. Once we +have a list of $x, y$ points, we are able to apply an affinity propogation +algorithm to determine the point clusters and therefore distinguish between +multiple sources of the same sound in our WASN. This is shown in +\textbf{Algorithm} \ref{algo:MS}. + +\begin{algorithm}[ht] \caption{Multiple Source Sound Localization} +\label{algo:MS} \begin{algorithmic}[1] \setcounter{ALC@line}{0} + +\vspace*{1mm} + +\STATE $\Function{GetLocations}(\Var{r}, \Var{spl}, \Var{eventList}) \rightarrow$ +\STATE $\Var{locations} \leftarrow \Function{InitLocationList}()$ +\FORALL {$e \in \Var{eventList}$} +\STATE $\Var{locations}.\Var{add}(\mathcal{L}_m(\Var{r}, \Var{spl}, \Var{eventList}, e.\Var{x}, e.\Var{y}))$ +\ENDFOR +\STATE $\Var{centers} \leftarrow \Function{AffinityPropagation}(\Var{locations})$ +\COMMENT {\Var{centers} is a list of $(x, y, c)$ points where $c$ is the confidence} +\RETURN $\Var{centers}$ + +\end{algorithmic} +\end{algorithm} + +Now given reference data and a list of node events, we it is possible to +determine the position of multiple instances of the same sound. \end{document} diff --git a/tests/test_server.py b/tests/test_server.py index a0ccaef..2651ed0 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -18,7 +18,7 @@ server_port = 8000 test_sound_class = "Chicken" -test_sound_name = "Cock" +test_sound_name = "Koel" loc = api.Locaudio(server_addr, server_port)