diff --git a/tex/chapters/filtering.tex b/tex/chapters/filtering.tex index 1463605..5065777 100644 --- a/tex/chapters/filtering.tex +++ b/tex/chapters/filtering.tex @@ -1,23 +1,26 @@ -\section{Filtering} - - \label{sec:filtering} - - \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.} - +%\section{Filtering} +% +% \label{sec:filtering} +% +% \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.} +% \section{Evaluation} + \commentByFrank{brauchen wir hier noch was (kurze einleitung) oder passt das so?} + \subsection{Barometer} \label{sec:sensBaro} % - The probability of currently residing on a given floor is evaluated using the smartphone's barometer. - Environmental influences are circumvented by using relative pressure readings instead of absolute ones. - To reduce the impact of noisy sensors, we calculate the average of several sensor reading, carried out - while the pedestrian chooses his destination. This $\overline{\mObsPressure}$ serves as relative base. - Likewise, we estimate the sensor's uncertainty $\sigma_\text{baro}$ for later use within the evaluation step. + The probability of currently residing on a floor is evaluated using the smartphone's barometer. + Environmental influences are circumvented by using relative pressure values instead of absolute ones. + To reduce the impact of noisy sensors, we calculate the average $\overline{\mObsPressure}$ of several + sensor readings, carried out while the pedestrian chooses his destination. This average serves as relative base + for all future measurements. Likewise, we estimate the sensor's uncertainty $\sigma_\text{baro}$ for later use + within the evaluation step. - In order to evaluate relative pressure readings, we need a prediction to compare them with. Therefore, each + In order to evaluate the relative pressure readings, we need a prediction to compare them with. Therefore, each transition from $\mStateVec_{t-1}$ to $\mStateVec_t$ estimates the state's relative pressure prediction - $\mStatePressure$ by examining every height-change ($z$-axis): + $\mStatePressure$ by tracking every height-change ($z$-axis): % \begin{equation} \mState_{t}^{\mStatePressure} = \mState_{t-1}^{\mStatePressure} + \Delta z \cdot b @@ -30,8 +33,8 @@ \end{equation} % In \refeq{eq:baroTransition}, $b$ denotes the common pressure change in $\frac{\text{hPa}}{\text{m}}$. - The evaluation step compares the predicted relative pressure with the observed - one using a normal distribution with the previously estimated $\sigma_\text{baro}$: + The evaluation step for time $t$ compares every predicted relative pressure $\mState_t^{\mStatePressure}$ with the observed + one $\mObs_t^{\mObsPressure}$ using a normal distribution with the previously estimated $\sigma_\text{baro}$: % \begin{equation} p(\mObsVec_t \mid \mStateVec_t)_\text{baro} = \mathcal{N}(\mObs_t^{\mObsPressure} \mid \mState_t^{\mStatePressure}, \sigma_\text{baro}^2) \enspace. @@ -42,16 +45,28 @@ % \subsection{Wi-Fi \& iBeacons} % - The smartphone's \docWIFI{} and \docIBeacon{} component provides absolute location estimation by + The smartphone's \docWIFI{} and \docIBeacon{} component provides an absolute location estimation by measuring the signal-strengths of nearby transmitters. The positions of detected \docAP{}s (\docAPshort{}) and \docIBeacon{}s - are known beforehand. This allows a comparison of each measurement with a corresponding estimation - using the wall-attenuation-factor signal strength prediction model \cite{Ebner-15}. This model uses the 3D distance $d$ and the - number of floors $\Delta f$ between transmitter and the state-in-question: + are known beforehand. Using the wall-attenuation-factor signal strength prediction model \cite{Ebner-15}, we are able to + compare each measurement with a corresponding estimation. To infer this estimation, the prediction model + uses the 3D distance $d$ and the number of floors $\Delta f$ between transmitter and the state-in-question $\mStateVec$: % \begin{equation} P_r(d, \Delta f) = \mTXP - 10 \mPLE \log_{10}{\frac{\mMdlDist}{\mMdlDist_0}} + \Delta{f} \mWAF \enspace , + \label{eq:waf} \end{equation} % + In \refeq{eq:waf}, there are three more parameters per \docAPshort{}. The signal-strength $\mTXP$ measurable at a distance + $\mMdlDist_0$ (usually \SI{1}{\meter}), a path-loss exponent $\mPLE$ describing the transmitter's environment and the attenuation + per floor $\mWAF$. + To reduce the system's setup time, we use the same three values for all \docAP{}s at the cost of accuracy. + All parameters are chosen empirically. Further details on how to determine this parameters exactly, + can be found in \cite{PathLossPredictionModelsForIndoor}. + + The same holds for the \docIBeacon{} component, except $\mTXP$, + which is broadcasted by each beacon. However, as \docIBeacon{}s cover only a small area, $\mPLE$ is usually much smaller compared + to the one needed for \docWIFI{}. + As transmitters are assumed to be statistically independent, the overall probability to measure their predictions at a given location is: % \begin{equation} @@ -59,67 +74,60 @@ \prod\limits_{i=1}^{n} \mathcal{N}(\mRssi_\text{wifi}^{i} \mid P_{r}(\mMdlDist_{i}, \Delta{f_{i}}), \sigma_{\text{wifi}}^2) \enspace . \label{eq:wifiTotal} \end{equation} - % - The prediction model itself needs three parameters per \docAPshort{}: $\mTXP$ measured at a distance - $\mMdlDist_0$ (usually \SI{1}{\meter}), the path-loss exponent $\mPLE$ describing the environment - and the attenuation per floor $\mWAF$. - \commentByFrank{aufs andere paper beziehen zum kuerzen?} - To reduce the system's setup time, we use the same values for all \docAP{}s at the cost of accuracy. - All parameters are chosen empirically. Further details on how to determine this parameters exactly, - can be found in \cite{PathLossPredictionModelsForIndoor}. - - The same holds for the \docIBeacon{} component, except $\mTXP$, which is broadcasted by each beacon. - As \docIBeacon{}s cover only a small area, $\mPLE$ is usually much smaller compared to the one needed for \docWIFI{}. - - % - + + \section{Transition} \label{sec: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 + + The transition-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 \cite{Ebner-16}. + Each walk starts at $\mStateVec_{t-1}$ and uses 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. + Hereby, the position of any $\mStateVec$ is represented by the position $\fPos{\mVertexA}$ of its corresponding vertex $\mVertexA$. This approach draws only valid movements, as ambient conditions (walls, doors, stairs, etc.) are considered. 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 + The latter depends on several constraints and recent sensor-readings from the smartphone. Using those readings 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. + instead, would lead to sample impoverishment due to the used Monte Carlo methods \cite{Isard98:CCD}. + + \commentByFrank{ist das verstaendlich oder schon zu kurz?} \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: + approaching his chosen destination with a ratio of $0.9:0.1$ over those, departing from the destination + \cite{Ebner-16}. The underlying shortest-path uses Dijkstra's algorithm with special weight (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 ). + Normally, the shortest-path calculated for a narrow grid would stick unnaturally close to obstacles like walls. + To ensure realistic (human like) path estimations, we include architectural knowledge within Dijkstra's edge-weight function \cite{Ebner-16}: + Each vertex's distance from the nearest wall is used to artificially increase the edge-weight and thus prevent the shortest-path + from clinging to walls. Obviously this has a negative effect on doors which are surrounded by walls. Therefore, doors are detected + and favoured by decreasing their edge-weight. \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: + by 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 + Turn-Detection supplies the magnitude of the detected heading change by integrating over 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: + used to estimate the current state's 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: + During the random walk, edges should satisfy the current heading and are thus drawn according to their resemblance: % \begin{equation} p(\mEdgeAB)_\text{head} = p(\mEdgeAB \mid \gHead) = \mathcal{N} (\angle \mEdgeAB \mid \gHead, \sigma_\text{head}^2) @@ -129,49 +137,45 @@ % 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} - 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. + Additionally we perform a simple activity detection for the pedestrian, able to distinguish between several actions + $\mObsActivity \in \{ \text{unknown}, \text{standing}, \text{walking}, \text{stairs\_up}, \text{stairs\_down} \}$. + 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} = + \footnotesize{ \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 \\ + 1.0 & \mObsActivity = \text{unknown} \\ + 0.8 & \mObsActivity = \text{stairs\_up} \land \fPos{\mVertexB}_z > \fPos{\mVertexA}_z \\ + 0.2 & \mObsActivity = \text{stairs\_up} \land \fPos{\mVertexB}_z \le \fPos{\mVertexA}_z \\ \cdots \end{cases} + }\enskip . \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} - - % Activity Recognition % Naives Bayes als Klassifikator % Features -> 1: Variance of mean 2: Differenz zwischen Barometer % Zeitintervall für das die Merkmale berechnet werden + + \commentByFrank{weg mit diesem absatz? das hatte ich ja schon beschrieben} The transition model includes a simple recognizer of different locomotion modes like normal walking or ascending/descending stairs. The reasoning behind this is to favour paths that correspond with the detected locomotion mode. - We use a Naives Bayes classifier with two features. For this, the sensor signals are split in sliding windows. Each window has a length of one second and overlaps 500 ms with its prior window. - The first feature is the variance of the accelerometer's magnitude during a window and the second feature is the difference between the last and first barometer measurement of the particular window. - Based on these features the classifier assigns an activity to each sliding window. - - \todo{Was passiert wenn ein überlappendes Fenster zwei verschiedene Aktivitäten zugewiesen bekommt? Sliding windows evtl. weglassen?} + \commentByFrank{bei mir ueberlappt aktuell nix, muessten mal testen was besser ist. beim ueberlappen ist das delay halt kuerzer. denke das schon ok.} + \commentByFrank{satzreihenfolge war komisch -> angepasst} + For this, the sensor signals are split in sliding windows. Each window has a length of one second and overlaps 500 ms with its prior window. + \commentByFrank{navies: naive?} + We use a Naives Bayes classifier with two features. The first one is the variance of the accelerometer's magnitude within a window. + The second feature is the difference between the last and first barometer measurement of the particular window. + Based on these features the classifier assigns an activity to each of the sliding windows. + %\todo{Was passiert wenn ein überlappendes Fenster zwei verschiedene Aktivitäten zugewiesen bekommt? Sliding windows evtl. weglassen?} diff --git a/tex/chapters/introduction.tex b/tex/chapters/introduction.tex index e7ccec9..9225b2f 100644 --- a/tex/chapters/introduction.tex +++ b/tex/chapters/introduction.tex @@ -19,6 +19,7 @@ Drawing from a probability distribution and \commentByLukas{Willst du hier das Samplen erwaehnen? Es kommt so ein bisschen aus dem Nichts und man kann es gerade nur schwer einordnen} \commentByToni{Ich möchte hier auf Monte Carlo ueberleiten. Warum macht man das ueberhaupt? Ich finde das umschreibt das ganz gut. alles andere kostet nur unfassbar viel platz wie ich finde.} +\commentByFrank{vlt als Kompromiss einfach etwas umstellen/kuerzen: Describing/Modelling (multimodal) probability densities analytically is in most cases...} finding an analytical solution for densities is in most cases a difficult task, especially in case of time sequential, non-linear and non-Gaussian models. Due to the high complexity of the human movement, we consider indoor localisation as such. @@ -93,8 +94,7 @@ The contributions of this work are as follows: Firstly, we extend current smoothing methods for indoor localisation to resolve multimodalities during the state estimation process. Secondly, we incorporate the knowledge of the user's destination as a-priori knowledge. Thirdly, we enrich the state transition model with an activity recognition to distinguish between walking, standing and walking stairs. All of our contributions are supported by an extensive experimental evaluation. } \commentByToni{Steht doch direkt einen Absatz drueber nur halt kein plakatives "The contributions of " steht. Nur das Smoothing ist die Contribution meiner Meinung nach. Das prior knowledge ist ausm fusion paper. lediglich die activity rec fehlte. habe es ergänzt :). da bin ich mir aber noch nicht sicher... es wird ja nicht wirklich evaluiert sondern eher als "gegeben" angesehen. vielleicht dann auch eher so beschreiben?} - - +\commentByFrank{finds gut so} diff --git a/tex/chapters/relatedwork.tex b/tex/chapters/relatedwork.tex index 6b86561..551b666 100644 --- a/tex/chapters/relatedwork.tex +++ b/tex/chapters/relatedwork.tex @@ -20,7 +20,8 @@ On the other hand, fixed-interval smoothing requires all observations until time %historie des smoothings und entwicklung der methoden. The origin of MC smoothing can be traced back to Genshiro Kitagawa. In his work \cite{kitagawa1996monte} he presented the simplest form of smoothing as an extension to the particle filter. -This algorithm is often called the filter-smoother since it runs online and a smoothing is provided while filtering. +This algorithm is often called the filter-smoother since it runs online and a smoothing is provided while filtering. +\commentByFrank{das mit dem weighted paths irritiert mich etwas. war das original work auch fuer etwas, wo pfade im spiel waren? weils halt gar so gut passt. ned dass da begrifflichkeiten durcheinander kommen. beim lesen fehlt mir das beim 1. anlauf was damit gemeint ist} This approach uses the particle filter steps to update weighted paths $\{(\vec{X}_{1:t}^i , W^i_t)\}^N_{i=1}$, producing an accurate approximation of the filtering posterior $p(\vec{q}_{t} \mid \vec{o}_{1:t})$ with a computational complexity of only $\mathcal{O}(N)$. However, it gives a poor representation of previous states due a monotonic decrease of distinct particles caused by resampling of each weighted path \cite{Doucet11:ATO}. Based on this, more advanced methods like the forward-backward smoother \cite{doucet2000} and backward simulation \cite{Godsill04:MCS} were developed. @@ -28,6 +29,7 @@ Both methods are running backwards in time to reweight a set of particles recurs Algorithmic details will be shown in section \ref{sec:smoothing}. %wo werden diese eingesetzt, paar beispiele. offline, online +\commentByFrank{wenn du meinst, 'bei indoor wirds NICHT verwendet' dann ist 'as' das falsche. wuerde auch 'got' statt 'gets' verwenden} In recent years, smoothing gets attention mainly in other areas as indoor localisation. The early work of \cite{isard1998smoothing} demonstrates the possibilities of smoothing for visual tracking. They used a combination of the CONDENSATION particle filter with a forward-backward smoother. @@ -35,25 +37,32 @@ Based on this pioneering approach, many different solutions for visual and multi For example, in \cite{Platzer:2008} a particle smoother is used to reduce multimodalities in a blood flow simulation for human vessels. The authors of \cite{Hu2014} use a smoother to overcoming the problem of particle impoverishment while predicting the Remaining Useful Life (RUL) of equipment (e.g. a Lithium-ion battery). %smoothing im bezug auf indoor +\commentByFrank{their -> there?} Nevertheless, their are some promising approaches for indoor localisation systems as well. For example \cite{Nurminen2014} deployed a fixed-interval forward-backward smoother to improve the position estimation for non-real-time applications. They combined Wi-Fi, step and turn detection, a simple line-of-sight model for floor plan restrictions and the barometric change within a particle filter. The state transition samples a new state based on the heading change, altitude change and a fixed step length. The experiments of \cite{Nurminen2014} clearly emphasize the benefits of smoothing techniques. The estimation error could be decreased significantly. +\commentByFrank{treated? behandelt? examined? evaluated?} However, a fixed-lag smoother was treated only in theory. In the work of \cite{Paul2009} both fixed-interval and fixed-lag smoothing were presented. They implemented Wi-Fi, binary infra-red motion sensors, binary foot-switches and a potential field for floor plan restrictions. Those sensors were incorporated using a sigma-point Kalman filter in combination with a forward-backward smoother. +\commentByFrank{then -> than?} It was also proven by \cite{Paul2009}, that the fixed-lag smoother is slightly less accurate then the fixed-interval smoother, as one would expect from the theoretical foundation. Unfortunately, even a sigma-point Kalman filters is after all just a linearisation and therefore not as flexible and suited for the complex problem of indoor localisation as a non-linear estimator like a particle filter. \commentByToni{Kann das jemand nochmal verifizieren? Das mit dem Kalman Filter. Danke.} \commentByLukas{Ich wuerde den Satz ganz weglassen. Ansonsten musst du angeben, wo die eigentlichen Probleme liegen, also z.B. in welchen konkreten Situation das Kalman Filter nicht mehr funktioniert usw. So ist es jetzt erstmal nur eine Behauptung ohne jeglichen Hintergrund.} \commentByToni{Ich bin mir nicht sicher ob das eine Behauptung ohne jeglichen Hintergrund ist. Meiner Meinung nach ist das ziemlich weitreichend bekannt. Finde den Satz persoenlich ganz gut, weil er uns deutlich von dieser Arbeit abgrenzt und das ist wichtig.} +\commentByFrank{hab zwar ka was das ist, aber vermutlich ist es auch normal-dist also unimodal? dann verweisen wir doch einfach auf fig1 mit dem zusatz: 'sowas geht garned erst'}. Additionally, the Wi-Fi RSSI model requires known calibration points and is deployed using a remarkable number of access points for very small spaces. In our opinion this is not practical and does not suite real-world conditions. Since humans with a specific destination in mind do not tend to change their directions randomly, we would further recommend adding a PDR-based transition to draw samples in a more directed manner instead of scattering them randomly in every direction. +\commentByFrank{algorithmS?} +\commentByFrank{'is able to use', oder 'will use'? gehts um die eval (will use), oder generell um die theorie und moeglichkeiten (is able to)} +\commentByFrank{man koennte die reihenfolge vlt umstellen, erst die ganzen filtering sachen beschreiben, map, activity, ... und on top of that two smoothing algorithms both implemented as fixed-interval and fixed-lag?} The here presented approach is able to use two different smoothing algorithm, both implemented as fixed-interval and fixed-lag versions. Further, our localisation system presented in \cite{Ebner-16} enables us to walk stairs and thus going into the third dimension. Therefore, a regularly tessellated graph is utilized to avoid walls, detecting doors and recognizing stairs. diff --git a/tex/chapters/smoothing.tex b/tex/chapters/smoothing.tex index 8f3e2f1..52de493 100644 --- a/tex/chapters/smoothing.tex +++ b/tex/chapters/smoothing.tex @@ -2,7 +2,9 @@ \label{sec:smoothing} The main purpose of this work is to provide MC smoothing methods in context of indoor localisation. +\commentByFrank{algorithms?} As mentioned before, those algorithm are able to compute probability distributions in the form of $p(\mStateVec_t \mid \mObsVec_{1:T})$ and are therefore able to make use of future observations between $t$ and $T$. +\commentByFrank{evtl nochmal das $t << T$ dazu? is ne weile her und verwirrt vlt mit groß und klein t} %Especially fixed-lag smoothing is very promising in context of pedestrian localisation. In the following we discuss the algorithmic details of the forward-backward smoother and the backward simulation. @@ -10,28 +12,38 @@ Further, a novel approach for incorporating them into the localisation system is \subsection{Forward-backward Smoother} +\commentByFrank{Smoother (grosses S) wie in der caption?} The forward-backward smoother (FBS) of \cite{Doucet00:OSM} is a well established alternative to the simple filter-smoother. The foundation of this algorithm was again laid by Kitagawa in \cite{kitagawa1987non}. An approximation is given by \begin{equation} p(\vec{q}_t \mid \vec{o}_{1:T}) \approx \sum^N_{i=1} W^i_{t \mid T} \delta_{\vec{X}^i_{t}}(\vec{q}_{t}) \enspace, \label{eq:approxFBS} \end{equation} +\commentByFrank{support?} +\commentByFrank{ist $\delta$ irgendwo erklaert?} +\commentByFrank{ist klein $\vec{x}$ irgendwo erklaert?} +\commentByFrank{ist die notation $A_{b \mid c}$ bekannt? mir sagt das noch garnix} where $p(\vec{q}_t \mid \vec{o}_{1:T})$ has the same support as the filtering distribution $p(\vec{q}_t \mid \vec{o}_{1:t})$, but the weights are different. This means, that the FBS maintains the original particle locations and just reweights the particles to obtain a smoothed density. The complete FBS can be seen in algorithm \ref{alg:forward-backwardSmoother} in pseudo-algorithmic form. +\commentByFrank{forward step vlt etwas genauer erklaeren weil 1. mal benutzt? oder is das hinlaenglich bekannt? :P} At first, the algorithm obtains the filtered distribution (particles) by deploying a forward step at each time $t$. +\commentByFrank{pfennigfuchserei: sagt man smoothing distribution oder smoothed distribution? bin da ned drin} Then the backward step for determining the smoothing distribution is carried out. The weights are obtained through the backward recursion in line 9. - +\commentByFrank{mir (als laie) wird nicht klar: mache ich erst alle forwaertsschritte (also alles bis zum pfadende durchlaufen) und gehe dann von da rueckwaerts (so klingts etwas im text), oder gehe ich nach jedem forwartsschritt rueckwarts (so klingts im pseudocode)} \begin{algorithm}[t] - \caption{Forward-Backward Smoother} + \caption{Forward-Backward Smoother + \commentByFrank{reihenfolge von $ \{ W^i_t, \vec{X}^i_t\}^N_{i=1}$ war oben andersrum. ned schlimm. nur wegen konsistenz :P} + } \label{alg:forward-backwardSmoother} \begin{algorithmic}[1] % The number tells where the line numbering should start \For{$t = 1$ \textbf{to} $T$} \Comment{Filtering} \State{Obtain the weighted trajectories $ \{ W^i_t, \vec{X}^i_t\}^N_{i=1}$} \EndFor \For{ $i = 1$ \textbf{to} $N$} \Comment{Initialization} + \commentByFrank{$t \mid T$ oder $T \mid T$?} \State{Set $W^i_{T \mid T} = W^i_T$} \EndFor \For{$t = T-1$ \textbf{to} $1$} \Comment{Smoothing} @@ -49,12 +61,17 @@ $} %Probleme? Nachteile? Komplexität etc. -By reweighting the filter particles, the FBS improves the simple filter-smoother by removing its dependence on the inheritance (smoothed) paths \cite{fearnhead2010sequential}. However, by looking at algorithm \ref{alg:forward-backwardSmoother} it can easily be seen that this approach computes in $\mathcal{O}(N^2)$, where the calculation of each particle's weight is an $\mathcal{O}(N)$ operation. To reduce this computational bottleneck, \cite{klaas2006fast} introduced a solution using algorithms from N-body simulation. By integrating dual tree recursions and fast multipole techniques with the FBS a run-time cost of $\mathcal{O}(N \log N)$ can be achieved. +\commentByFrank{muss ich die quelle gelesen haben ums zu verstehen? wird mir naemlich so ned klar} +By reweighting the filter particles, the FBS improves the simple filter-smoother by removing its dependence on the inheritance (smoothed) paths \cite{fearnhead2010sequential}. However, by looking at algorithm \ref{alg:forward-backwardSmoother} it can easily be seen that this approach computes in $\mathcal{O}(N^2)$, where the calculation of each particle's weight is an $\mathcal{O}(N)$ operation. To reduce this computational bottleneck, \cite{klaas2006fast} introduced a solution using algorithms from N-body simulation. By integrating dual tree recursions and fast multipole techniques with the FBS, a run-time cost of $\mathcal{O}(N \log N)$ can be achieved. \subsection{Backward Simulation} -For smoothing applications with a high number of particles, it is often not necessary to use all particles for smoothing. This decision can for example be made due to a high sample impoverishment and/or highly certain sensors. By choosing a good sub-set for representing the posterior distribution, it is theoretically possible to further improve the estimation. +For smoothing applications with a high number of particles, it is often not necessary to use all particles for smoothing. +\commentByFrank{certain = accurate?} +This decision can for example be made due to a high sample impoverishment and/or highly certain sensors. +By choosing a good sub-set for representing the posterior distribution, it is theoretically possible to further improve the estimation. -Therefore, \cite{Godsill04:MCS} presented the backward simulation (BS). Where a number of independent sample realizations from the entire smoothing density are used to approximate the smoothing distribution. +Therefore, \cite{Godsill04:MCS} presented the backward simulation (BS). Where a number of independent sample realisations +from the entire smoothing density are used to approximate the smoothing distribution. % \begin{algorithm}[t] \caption{Backward Simulation Smoothing} @@ -72,12 +89,21 @@ Therefore, \cite{Godsill04:MCS} presented the backward simulation (BS). Where a \EndFor \State{Choose $\tilde{\vec{q}}^k_t = \vec{X}^j_t$ with probability $W^j_{t\mid t+1}$} \EndFor - \State{$\tilde{\vec{q}}^k_{1:T} = (\tilde{\vec{q}}^k_1, \tilde{\vec{q}}^k_2, ..., \tilde{\vec{q}}^k_T)$ is one approximate realization from $p(\vec{q}_{1:T} \mid \vec{o}_{1:T})$} + \State{$\tilde{\vec{q}}^k_{1:T} = (\tilde{\vec{q}}^k_1, \tilde{\vec{q}}^k_2, ..., \tilde{\vec{q}}^k_T)$ is one approximate realisation from $p(\vec{q}_{1:T} \mid \vec{o}_{1:T})$} \EndFor \end{algorithmic} \end{algorithm} % -This method can be seen in algorithm \ref{alg:backwardSimulation} in pseudo-algorithmic form. Again, a particle filter is performed at first and then the smoothing procedure gets applied. Here, $\tilde{\vec{q}}_t$ is a random sample drawn approximately from $p(\vec{q}_{t} \mid \tilde{\vec{q}}_{t+1}, \vec{o}_{1:T})$. Therefore $\tilde{\vec{q}}_{1:T} = (\tilde{\vec{q}}_{1}, \tilde{\vec{q}}_{2}, ...,\tilde{\vec{q}}_{T})$ is one particular sample realization from $p(\vec{q}_{1:T} \mid \vec{o}_{1:T})$. Further independent realizations are obtained by repeating the algorithm until the desired number $N_{\text{sample}}$ is reached. The computational complexity for one particular realization is $\mathcal{O}(N)$. However, the computations are then repeated for each realization drawn \cite{Godsill04:MCS}. +This method can be seen in algorithm \ref{alg:backwardSimulation} in pseudo-algorithmic form. +Again, a particle filter is performed at first and then the smoothing procedure gets applied. +\commentByFrank{das klingt so, als waeren particle-filter und smoothing zwei komplett verschiedene sachen.} +\commentByFrank{was heisst 'drawn approximately'? nach welchen gesichtspunkte?} +Here, $\tilde{\vec{q}}_t$ is a random sample drawn approximately from $p(\vec{q}_{t} \mid \tilde{\vec{q}}_{t+1}, \vec{o}_{1:T})$. +Therefore $\tilde{\vec{q}}_{1:T} = (\tilde{\vec{q}}_{1}, \tilde{\vec{q}}_{2}, ...,\tilde{\vec{q}}_{T})$ is one particular sample +realisation from $p(\vec{q}_{1:T} \mid \vec{o}_{1:T})$. +Further independent realisations are obtained by repeating the algorithm until the desired number $N_{\text{sample}}$ is reached. +The computational complexity for one particular realisation is $\mathcal{O}(N)$. +However, the computations are then repeated for each realisation drawn \cite{Godsill04:MCS}. \subsection{Transition for Smoothing} As seen above, both algorithms are reweighting particles based on a state transition model. @@ -95,11 +121,13 @@ p(\vec{q}_{t+1} \mid \vec{q}_t, \mObsVec_t)_{\text{step}} = \mathcal{N}(\Delta d \end{equation} we receive a statement about how likely it is to cover a distance $\Delta d_t$ between two states $\vec{q}_{t+1}$ and $\vec{q}_{t}$. In the easiest case, $\Delta d_t$ is the linear distance between two states. +\commentByFrank{summarize: sum up?} Of course, based on the graph structure, one could calculate the shortest path between both and summarize the respective edge lengths. However, this requires tremendous calculation time for negligible improvements. Therefore this is not further discussed within this work. The average step length $\mu_{\text{step}}$ is based on the pedestrian's walking speed and $\sigma_{\gDist}^2$ denotes the step length's variance. Both values are chosen depending on the activity $x$ recognized at time $t$. +\commentByFrank{then oder than?} For example $\mu_{\text{step}}$ gets smaller while a pedestrian is walking upstairs, then just walking straight. This requires to extend the smoothing transition by the current observation $\mObsVec_t$. Since $\mStateVec$ is hidden and the Markov property is satisfied, we are able to do so. @@ -121,7 +149,7 @@ p(\vec{q}_{t+1} \mid \vec{q}_t, \mObsVec_t)_{\text{baro}} = \mathcal{N}(\Delta z \label{eq:smoothingTransPressure} \end{equation} This assigns a low probability to false detected or misguided floor changes. -Similar to \refeq{eq:smoothingTransDistance} we set $\mu_z$ and $\sigma^2_{z}$ based on the activity recognized at time $t$. +Similar to \refeq{eq:smoothingTransDistance} we set $\mu_z$ and $\sigma^2_{z}$ based on the activity recognised at time $t$. Therefore, $\mu_z$ is the expected change in $z$-direction between two time steps. This means, if the pedestrian is walking alongside a corridor, we set $\mu_z = 0$. In contrast, $\mu_z$ is positive while walking downstairs or otherwise negative for moving upstairs. @@ -140,6 +168,7 @@ Looking at \refeq{eq:smoothingTransDistance} to \refeq{eq:smoothingTransPressure \end{equation} % It is important to notice, that all particles at each time step $t$ of the forward filtering need to be saved. +\commentByFrank{increases?} Therefore, the memory requirement increasing proportional to the processing time. diff --git a/tex/chapters/system.tex b/tex/chapters/system.tex index 872e5ac..93ee1eb 100644 --- a/tex/chapters/system.tex +++ b/tex/chapters/system.tex @@ -27,14 +27,17 @@ In context of indoor localisation, the hidden state $\mStateVec$ is defined as f where $x, y, z$ represent the position in 3D space, $\mStateHeading$ the user's heading and $\mStatePressure$ the relative atmospheric pressure prediction in hectopascal (hPa). Further, the observation is given by % \begin{equation} - \mObsVec = (\mRssiVec_\text{wifi}, \mRssiVec_\text{ib}, \mObsHeading, \mObsSteps, \mObsPressure, x) \enspace, + \mObsVec = (\mRssiVec_\text{wifi}, \mRssiVec_\text{ib}, \mObsHeading, \mObsSteps, \mObsPressure, \mObsActivity) \enspace, \end{equation} % covering all relevant sensor measurements. Here, $\mRssiVec_\text{wifi}$ and $\mRssiVec_\text{ib}$ contain the measurements of all nearby \docAP{}s (\docAPshort{}) and \docIBeacon{}s, respectively. $\mObsHeading$ and $\mObsSteps$ describe the relative angular change and the number of steps detected for the pedestrian. $\mObsPressure$ is the relative barometric pressure with respect to a fixed reference. -Finally, $x$ \commentByLukas{Vermutlich gerade nur Platzhalter. Aber x ueberschneidet sich mit dem x der Position. Wie waers mit $\Omega$} contains the activity, currently estimated for the pedestrian, which is one of: unknown, standing, walking or walking stairs. +Finally, $\mObsActivity$ +\commentByLukas{Vermutlich gerade nur Platzhalter. Aber x ueberschneidet sich mit dem x der Position. Wie waers mit $\Omega$} +\commentByFrank{ja war ein platzhalter, hatte auch Omega vorgesehen} contains the activity, currently estimated for the pedestrian, which is one of: +unknown, standing, walking, walking stairs up or walking stairs down. The probability density of the state evaluation is given by % @@ -51,7 +54,8 @@ The probability density of the state evaluation is given by % and therefore similar to \cite{Ebner-16}. Here, we assume a statistical independence of all sensors and every single component refers to a probabilistic sensor model. -The barometer information is evaluated using $p(\vec{o}_t \mid \vec{q}_t)_\text{baro}$, whereby absolute position information is given by $p(\vec{o}_t \mid \vec{q}_t)_\text{ib}$ for \docIBeacon{}s and by $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ for \docWIFI{}. +The barometer information is evaluated using $p(\vec{o}_t \mid \vec{q}_t)_\text{baro}$, whereby absolute position information +is given by $p(\vec{o}_t \mid \vec{q}_t)_\text{ib}$ for \docIBeacon{}s and by $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ for \docWIFI{}.