From 099079d6df3204a14924445dba2adeb1d5761276 Mon Sep 17 00:00:00 2001 From: kazu Date: Sat, 23 Apr 2016 21:24:56 +0200 Subject: [PATCH] added recent filtering.tex --- tex/chapters/filtering.tex | 98 +++++++++++++++++++++++++++++++------- tex/misc/functions.tex | 3 ++ 2 files changed, 84 insertions(+), 17 deletions(-) diff --git a/tex/chapters/filtering.tex b/tex/chapters/filtering.tex index 539328b..adabfca 100644 --- a/tex/chapters/filtering.tex +++ b/tex/chapters/filtering.tex @@ -4,10 +4,9 @@ \commentByToni{Bin mir nicht sicher ob wir diese Section überhaupt brauchen. Könnte man bestimmt auch einfach unter Section 3 packen. Aber dann können wir ungestört voneinander schreiben.} - \subsection{Evaluation} - -\section{Barometer} +\section{Evaluation} + \subsection{Barometer} \label{sec:sensBaro} % The probability of currently residing on a given floor is evaluated using the smartphone's barometer. @@ -75,23 +74,88 @@ % - \subsection{Transition} - - The transition step depends on random walks on a graph, generated from the buildings floorplan - \todo{cite}. This setup allows only valid movements, as ambient conditions (walls, doors, etc.) are considered. +\section{Transition} + + The distribution $p(\mStateVec_{t} \mid \mStateVec_{t-1})$ is sampled via random walks on a graph + $G=(V,E)$, which is generated from the buildings floorplan \todo{FUSION2016}. + $p(\mStateVec_{t} \mid \mStateVec_{t-1})$ is determined by walking along adjacent edges $\mEdgeAB$ connecting + two vertices $\mVertexA, \mVertexB \in V$ until a certain distance $\gDist$ is reached. + Thus, the position of any $\mStateVec$ is represented by the position $\fPos{\mVertexA}$ of the corresponding vertex. + This approach draws only valid movements, as ambient conditions (walls, doors, stairs, etc.) are considered. - Furthermore, we assume the pedestrian's desired destination to be known beforehand. This prior knowledge is evaluated - during the random walk, to favour movements approaching the chosen destination. - - To ensure the transition step provides a viable posterior distribution, we include some sensors directly into the transition step. - Adding them to the evaluation instead, would lead to sample impoverishment when using Monte Carlo methods. - - \subsection{Step- \& Turn-Detection} - % - Steps and turns are detected using the smartphone's IMU and are implemented as described in \cite{Ebner-15}. + While sampling, to-be-walked edges are not chosen uniformly, but depending on a probability $p(\mEdgeAB)$. + The latter depends on several constraints and recent sensor-readings from the smartphone. Using sensors + directly within the transition step provides a more robust posterior distribution. Adding them to the evaluation + instead, would lead to sample impoverishment due to the used Monte Carlo methods. + + \subsection{Pedestrian's Destination} + We assume the pedestrian's desired destination to be known beforehand. This prior knowledge is incorporated + during the random walk using $p(\mEdgeAB)_\text{path}$, which is a simple heuristic, favouring movements (edges) + approaching the chosen destination with a ratio of $0.9:0.1$ over those, departing from the destination + \cite{FUSION2016}. The underlying shortest-path is based on a special distance metric, considering special + architectural facts: + \subsection{Architectural Facts} + To ensure realistic path estimations, we include additional architectural knowledge. + Each vertex's distance from the nearest wall is used to prevent the shortest-path from clinging to walls. + Likewise, his distance from the nearest door (favour ). + + + \subsection{Step- \& Turn-Detection} + Steps and turns are detected using the smartphone's IMU, implemented as described in \cite{Ebner-15}. + The number of steps detected since the last transition is used to estimate the to-be-walked distance $\gDist$ + assuming a fixed step-size with some deviation: % + \begin{equation} + \gDist = \mObs_{t-1}^{\mObsSteps} \cdot \mStepSize + \mathcal{N}(0, \sigma_{\gDist}^2) + \enspace . + \end{equation} + % + Turn-Detection supplies the magnitude of the detected heading change by integrating the gyroscope's change + since the last transition. Together with some deviation and the state's previous heading, the magnitude is + used to estimate the state's current heading: + % + \begin{equation} + \gHead = \mState_{t}^{\mStateHeading} = \mState_{t-1}^{\mStateHeading} + \mObs_{t-1}^{\mObsHeading} + \mathcal{N}(0, \sigma_{\gHead}^2) \\ + \end{equation} + % + During the random walk, edges should satisfy the heading: + % + \begin{equation} + p(\mEdgeAB)_\text{head} = p(\mEdgeAB \mid \gHead) = \mathcal{N} (\angle \mEdgeAB \mid \gHead, \sigma_\text{head}^2) + \enspace . + \label{eq:transHeading} + \end{equation} + % + While the distribution \refeq{eq:transHeading} does not integrate to $1.0$ due to circularity of angular + data, in our case, the normal distribution can be assumed as sufficient for small enough $\sigma^2$. + + + + + + + + + \subsection{Activity-Detection} - \todo{write} + Additionally we perform a simple activity detection for the pedestrian, able to distinguish between + standing, walking, walking stairs upwards and downwards. Likewise, this knowledge + is evaluated when walking the grid: Edges $\mEdgeAB$ matching the currently detected + activity are favoured using $p(\mEdgeAB)_\text{act} = 0.8$ and $0.2$ otherwise. + + \begin{equation} + p(\mEdgeAB)_\text{act} = + \begin{cases} + 0.8 & \text{stairs\_up}, \fPos{\mVertexB}_z > \fPos{\mVertexA}_z \\ + 0.2 & \text{stairs\_up}, \fPos{\mVertexB}_z \le \fPos{\mVertexA}_z \\ + \cdots + \end{cases} + \end{equation} + \commentByFrank{das switch ist wahrscheinlich unnoetig und der text reicht} + + \commentByFrank{hier passen die sachen vom lukas. kurze beschreibung der beiden geschaetzten verteilungen etc} + + diff --git a/tex/misc/functions.tex b/tex/misc/functions.tex index d2b1d8d..4da1bd9 100644 --- a/tex/misc/functions.tex +++ b/tex/misc/functions.tex @@ -57,6 +57,9 @@ \newcommand{\mVertexB}{v_j} \newcommand{\mEdgeAB}{e_{i,j}} \newcommand{\mVertexDest}{v_\text{dest}} +\newcommand{\gDist}{d_\text{step}} +\newcommand{\gHead}{\theta_\text{walk}} + \newcommand{\mUsePath}{\kappa}