added reviewed version of paper

This commit is contained in:
toni
2018-10-16 10:01:26 +02:00
parent 9c8bc5984e
commit b9676b304d
62 changed files with 150125 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
\abstract{
Within this work we present an updated version of our \del{award-winning} indoor localization system for smartphones.
The \add{pedestrian's} position is given by means of recursive state estimation using a particle filter to incorporate different probabilistic sensor models.
Our \del{rapid computation} \add{recently presented approximation} scheme of the kernel density estimation allows to find an exact estimation of the current position\add{, instead of classical methods like weighted-average}.
%
Absolute positioning information is given by a comparison between recent \docWIFI{} measurements of nearby access points and signal strength predictions.
Instead of using time-consuming approaches like classic fingerprinting or measuring the exact positions of access points, we use an optimization scheme based on a few reference measurements to estimate a corresponding \docWIFI{} model.
%
\add{This work provides three major contributions to the system.}
\add{The most essential contribution is the novel state transition based on continuous walks along a navigation mesh, modeling only the building's walkable areas.}
\add{The localization system is further updated by replacing the previous activity recognition with a threshold-based algorithm using barometer and accelerometer readings, allowing for continuous and smooth floor changes.}
\add{Within the scope of this work,} we tackle \del{advanced} problems like multimodal densities and sample impoverishment (system gets stuck) by introducing different countermeasures \del{, leading to a more robust localization}.
\add{For the latter, a simplification of our previous solution is presented for the first time, which does not involve any major changes to the particle filter.}
%
%TODO: additional contributions in den experimenten.
\newline
The goal of this work is to propose a fast to deploy \del{and low-cost} localization solution, that
provides reasonable results in a high variety of situations.
To stress our system, we have chosen a very challenging test scenario.
All experiments were conducted within a 13th century historic building, formerly a convent and today a museum.
The system is evaluated using 28 distinct measurement series on four different test walks, up to \SI{310}{\meter} length and \SI{10}{\minute} duration.
It can be shown, that the here presented localization solution is able to provide a small positioning error, even under difficult conditions and faulty measurements.
\del{Our advanced} \add{The introduced} filtering methods allow for a real fail-safe system, while the optimization scheme enables a setup-time of under \SI{120}{\minute} for the \del{complete} \add{\SI{2500}{\square\meter}} building.
%We are able to resolve sample impoverishment whenever it occurs and thus provide a real fail-safe system.
%finally compare the standard weighted-average estimator with our kernel density approach.
}

View File

@@ -0,0 +1,28 @@
\section{Conclusion}
%what you have seen
Within this work we provided an extensive overview of our smartphone-based indoor localization system.
The thorough evaluation demonstrated the good performance under multiple scenarios within a complex environment.
The system is able to handle problems like sample impoverishment and multimodal densities, occurring through the use of a particle filtering scheme.
The main advantage of our approach is its suitability for practical use.
Compared to other state-of-the-art solutions, the setup time is only a few hours and does not require any expert knowledge or hardware.
The localization runs solely an a commercial smartphone, thus no connection to a server or the Wi-Fi infrastructure is required.
By using navigation meshes we are able to reduce the map sizes to only a few megabytes for a complete building.
Nevertheless, there is still room for further improvements and future work.
Through the change from a graph to a mesh, we lost the ability to easily find the shortest path for navigation purposes as described in \cite{Ebner-16}.
By means of barycentric coordinates, this should however be easily adaptable to the triangular structure.
The threshold-based activity recognition is not able to distinguished between different types of elevation, namely elevator, escalator and stairs.
Especially in buildings where elevators pass many floors, the transition fails to move particles in the according speed.
Here, we need to incorporate special environmental knowledge about elevators and escalators or again integrate a probabilistic sensor model for the barometer as already done in previous works \cite{Ebner-15}.
A crucial point to further increase the accuracy of the system is the choice of the signal strength prediction model.
Currently we consider only the attenuation per floor, however by including information about walls and other obstacles, we should be able to decrease the error at the cost of additional computations.
Instead of providing those additional environmental informations by manual measurements, the optimization scheme could be used to approximate the respective model and material parameters.
Special data-structures for pre-computation combined with online interpolation might then be a viable choice for utmost accuracy that is still able to run on a commercial smartphone in real-time.
Finally, the \del{rapid computation} \add{approximation} scheme for the KDE opens up completely new possibilities when handling particle sets.
Within this paper we used it to find the real global maxima for a state estimation and to accurately calculate the Kullback-Leibler divergence.
However, many other estimation schemes are thinkable, for example a trajectory based one, with multiple path-hypotheses, each weighted based on a-priori knowledge.
The KDE approach could also be used to develop better suited resampling techniques, by enabling to draw particles from the underlying density, instead of just reproducing known owns.

View File

@@ -0,0 +1,63 @@
\subsection{State Estimation}
\label{sec:estimation}
% 1/2 bis 3/4 Seite
% particles describe posterior as samples
% (MAP) estimate => max particle
% very jumpy
% MMSE estimate => weighted average
% most of the time very good
% goes out of the window with multi modalities
% estimation of the pdf could help
% computational cheap methods are based on a parametric family
% not neccesserly given in our case
% non parametric => slow
% solution boxKDE
% Problems: larger error compared to WA and bandwidth selection
Each particle is a realization of one possible system state, here, the position of a pedestrian within a building.
The set of all particles represents the posterior of the system.
In other words, the particle filter naturally generates a sample based representation of the posterior.
With this representation a point estimator can directly be applied to the sample data to derive a sample statistic serving as a \qq{best guess}.
A popular point estimate, which can be directly obtained from the sample set, is the minimum mean squared error (MMSE) estimate.
In the case of particle filters the MMSE estimate equals to the weighted-average over all samples, \ie{} the sample mean
\begin{equation}
\hat{\mStateVec}_t := \frac{1}{W_t} \sum_{i=1}^{N} w^i_t \vec{X}^i_{t} \, \text{,}
\end{equation}
%\commentByMarkus{Passt die Notation so?}
%\commentByFrank{sieht fuer mich auf den ersten blick nach korrektem weighted average aller partikel aus. was stoert dich?}
where $W_t=\sum_{i=1}^{N}w^i_t$ is the sum of all weights.
While producing an overall good result in many situations, it fails when the posterior is multimodal.
In these situations the weighted-average estimate will find the estimate somewhere between the modes.
Clearly, such a position between modes is extremely unlikely the position of the pedestrian.
The real position is more likely to be found at the position of one of the modes, but virtually never somewhere between.
In the case of a multimodal posterior the system should estimate the position based on the highest mode.
Therefore, the maximum a posteriori (MAP) estimate is a suitable choice for such a situation.
A straightforward approach is to select the particle with the highest weight.
However, this is in fact not necessarily a valid MAP estimate, because only the weight of the particle is taken into account.
In order to compute the true MAP estimate the local density of the particles needs to be considered as well \cite{cappe2007overview}.
\del{It is obvious,} A computation of the probability density function of the posterior could solve the above, but finding such an analytical solution is clearly an intractable problem, which is the reason for applying a sample representation in the first place.
A feasible alternative is to estimate the parameters of a specific parametric model based on the sample set, assuming that the unknown distribution is approximately a parametric distribution or a mixture of parametric distributions, \eg{} Gaussian mixture distributions.
Given the estimated parameters the most probable state can be obtained from the parameterised density function.
%In the case of multi-modalities several parametric distributions can be combined into a mixture distribution.
However, parametric models fail when the assumption does not fit the underlying model.
For our application assuming a parametric distribution is too limiting as the posterior is changing in a non-predictable way over time.
%As a result, those techniques are not able to provide an accurate statement about the most probable state, rather causing misleading or false outcomes.
On the other side a non-parametric approach directly obtains an estimate of the entire density function driven by the structure of the data.
A classic non-parametric method is the kernel density estimator (KDE), where a kernel function with given bandwidth is placed at each particle to approximate the posterior.
While the kernel estimate inherits all the properties of the kernel, usually it is not of crucial matter if a non-optimal kernel was chosen.
As a matter of fact, the quality of the kernel estimate is primarily determined by the bandwidth. % TODO \cite{scott2015} ?
For our system we choose the Gaussian kernel in favour of computational efficiency.
The great flexibility of the KDE comes at the cost of a high computational time, which renders it unpractical for real time scenarios.
The complexity of a naive implementation of the KDE is \landau{MN}, given by $M$ evaluations and $N$ particles as input size.
A fast approximation of the KDE can be applied if the data is stored in equidistant bins as suggested by \cite{silverman1982algorithm}.
Computation of the KDE with a Gaussian kernel on the binned data becomes analogous to applying a Gaussian filter, which can be approximated by iterated box filter in \landau{N} \cite{Bullmann-18}.
Our \del{rapid computation} \add{approximation} scheme of the KDE is fast enough to estimate the density of the posterior in each time step.
This allows us to recover the most prober state from occurring multimodal posterior.

View File

@@ -0,0 +1,230 @@
\section{Evaluation}
\label{sec:evaluation}
The probability density of the state evaluation in \eqref{equ:bayesInt} is given by
%
\begin{equation}
%\begin{split}
p(\vec{o}_t \mid \vec{q}_t) =
p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}
\,p(\vec{o}_t \mid \vec{q}_t)_\text{act}
\enspace ,
%\end{split}
\label{eq:evalBayes}
\end{equation}
%
where every component refers to a probabilistic sensor model which are statistical independent.
The barometer and accelerometer readings are used to determine the current activity $\mObsActivity$, which is then evaluated using $p(\vec{o}_t \mid \vec{q}_t)_\text{act}$.
Absolute positioning information is given by $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ for \docWIFI{}.
\subsection{\docWIFI{}}
\label{sec:wifi}
As stated in section \ref{sec:relatedWork}, we use the smartphone's \docWIFI{} component to provide an absolute location estimation based on a comparison between recent RSSI measurements of nearby AP's and signal strength predictions. The probability given those measurements $\mRssiVec_\text{wifi}$ and a prediction, corresponding to a well-known location $\mPosVec = (x,y,z)^T$ provided by $\vec{q}_t$, can thus be written as
\begin{equation}
p(\vec{o}_t \mid \vec{q}_t)_\text{wifi} =
p(\mRssiVec_\text{wifi} \mid \mPosVec) =
\prod_{\mRssi_{i} \in \mRssiVec_\text{wifi}} p(\mRssi_{i} \mid \mPosVec),\enskip
%\mPos = (x,y,z)^T
\mPosVec \in \R^3
\enskip .
\label{eq:wifiObs}
\end{equation}
\noindent We assume a statistical independence between the respective AP's.
The comparison between a single RSSI measurement $\mRssi_i$ and the reference is given by
\begin{equation}
p(\mRssi_i \mid \mPosVec) =
\mathcal{N}(\mRssi_i \mid \mu_{i,\mPosVec}, \sigma_{\text{wifi}}^2)
\enskip ,
\label{eq:wifiProb}
\end{equation}
%\commentByFrank{ich wuerde einfach $\sigma_\text{wifi}$ nehmen. es haengt nicht von der pos $\mPosVec$ ab, und wir hatten immer fuer jeden AP das gleiche}
\noindent where $\mu_{i,\mPosVec}$ denotes the (predicted) signal strength for the \docAPshort{} identified by $i$, regarding the location $\mPosVec$.
A certain noise is allowed by the corresponding standard deviation $\sigma_{\text{wifi}}$.
Within this work $\mu_{\mPosVec}$ is calculated by a modified version of the wall-attenuation-factor model as presented in \cite{Ebner-17}.
\add{We only consider floors and ceilings in order to avoid computation-intensive intersection-tests with every wall along the line-of-sight.
Especially for a building like the one discussed in this paper, this assumption is reasonable due to the complex and historically grown architecture as well as the many different wall materials to be determined.}
Therefore, the prediction depends on the 3D distance $d$ between the \docAPshort{} in question and the location $\mPosVec$ as well as the number of floors $\Delta f$ between them:
\begin{equation}
\mu_{\mPosVec} = \mTXP - 10 \mPLE \log_{10}{\frac{\mMdlDist}{\mMdlDist_0}} + \Delta{f} \mWAF
\label{eq:wallAtt}
\end{equation}
%\commentByFrank{
% hier sollte das $i$, das du vorher hattest, wohl wieder mit rein?
% was genau $d$ bzw $d_i$ oder $d_{i,\mPosVec}$ ist, muessten wir vermutlich auch kurz erklären.
% Ich hatte auch immer unterschieden zwischen der fraglichen position (z.B. $\vec{\rho}$)
% und der position des access points (z.B. $\mPosVec_i$). also, zwei verschiedene zeichen, dass das klar wird.
% ich weis aber nicht, ob $\vec{\rho}$ noch frei ist, bzw was auf den folgenden seiten nocht kommt.
% eigentlich gehoert das $i$ dann auch noch ans $P_0$ und $\gamma$ und $d_0$.. aber der einfachheit halber, reicht das ja im text.
% vorschlag wäre etwas wie:
%}
%\begin{equation}
% \mu(i,\vec{\rho}) = \mTXP - 10 \mPLE \log_{10}{\frac{\mMdlDist}{\mMdlDist_0}} + \Delta{f} \mWAF
% ,\enskip
% d = \| \vec{\rho} - \mPosVec_i \|
% \label{eq:wallAtt}
%\end{equation}
\noindent Here, $\mTXP$ is the \docAPshort{}'s signal strength measurable at a known distance $\mMdlDist_0$ (usually \SI{1}{\meter}) and $\mPLE$ denotes the signals depletion over distance, which depends on the \docAPshort{}'s surroundings like walls and other obstacles.
The attenuation per floor is given by $\mWAF$.
For example, a viable choice for steel enforced concrete floors is $\mWAF \approx \SI{-8.0}{dB}$ \cite{Ebner-15}.
Of course, eq. \eqref{eq:wallAtt} needs to be calculated separately for every $i$ and thus available \docAPshort{}.
It should be noted, that we omitted the index $i$ in eq. \eqref{eq:wallAtt} for the sake of clarity and consistency with other literature.
The environmental parameters $\mTXP$, $\mPLE$ and $\mWAF$ need to be known beforehand and often vary greatly between single \docAPshort{}'s.
Nevertheless, for simplicity's sake it is common practice to use some fixed empirically chosen values, the same for every \docAPshort{}.
This might already provide enough accuracy for some use-cases and buildings, but fails in complex scenarios, as discussed in section \ref{sec:intro}.
Therefore, instead of using a pure empiric model, we deploy an optimization scheme to find a well-suited set of parameters ($\mPosAPVec{}, \mTXP{}, \mPLE{}, \mWAF{}$) per \docAPshort{}, where $\mPosAPVec{} = (x,y,z)^T$ denotes the \docAPshort{}'s estimated position.
The optimization is based on a few reference measurements $\vec{s_{\text{opt}}}$ throughout the building, e.g. every \SI{3}{} to \SI{5}{\meter} centred within a corridor and between \SI{1}{} and \SI{4}{} references per room, depending on the room's size.
Compared to classical fingerprinting, where reference measurements are recorded on small grids between \SI{1}{} to \SI{2}{\meter}, this highly reduces their required number and thus the overall setup-time.
The target function to optimize the $6$ model parameters for one \docAPshort{} is given by
\add{\begin{equation}
(\mPosAPVec, \mTXP, \mPLE, \mWAF) =
\argmin_{\mPosAPVec, \mTXP, \mPLE, \mWAF}
\sum_{s_{i} \in \vec{s_{\text{mac}}}}
(s_{i} - \mu_{\mPosVec})^2
\enskip,\enskip\enskip
\mu_{\mPosVec} =
\mTXP{} - 10 \mPLE{} \log_{10} \frac{\| \mPosVec-\mPosAPVec \|}{\mMdlDist_0} + \Delta f \mWAF{}
\enspace .
\label{eq:optTarget}
\end{equation}}
%\commentByFrank{hier muesste dann auch das $i$ rein, bzw die funktion $\mu()$. vorschlag waere dann:}
%\begin{equation}
% (\mPosAPVec, \mTXP, \mPLE, \mWAF)_i =
% \argmin_{\mPosVec, \mTXP, \mPLE, \mWAF}
% \sum_{s_{i,\vec{\rho}} \in \vec{s}_i}
% \big(s_{i,\vec{\rho}} - \mu(i,\mPosVec) \big)^2
%\enspace .
% \label{eq:optTarget}
%\end{equation}
%\commentByFrank{argmin liefert die argumente, nicht den fehler. da muesste nur min stehen}
%\commentByFrank{
% hier braucht es drigend eine unterscheidung zwischen den beiden positionen. der vom fingerprint und der vom ap
% $\mPosAPVec$ ist, wegen dem $\hat{ }$ einfach nur die \emph{beste}. aber sie ist halt generell anders als der fingerprint.
% deshalb brauchen wir da zwei formel zeichen.
% und wir muessen einheitlich machen, ob wir das $i$ jetzt mitnehmen, oder nicht. sonst wirkt es verwirrend
%}
\noindent Here, one reduces the squared error between reference measurements $s_{i} \in \vec{s_{\text{mac}}}$ with well-known location $\mPosVec$ and corresponding model predictions $\mu_{\mPosVec}$ (cf. eq. \eqref{eq:wallAtt}).
Whereas $\vec{s_{\text{mac}}}$ is the subset of $\vec{s_{\text{opt}}}$ for the \docAPshort{} in question, identified by its MAC-adress.
The number of floors between $\mPosVec$ and $\mPosAPVec$ is again given by $\Delta f$.
As discussed by \cite{Ebner-17}, optimizing all 6 parameters, especially the unknown \docAPshort{} position $\mPosAPVec$, usually results in optimizing a non-convex, discontinuous function.
A promising way to deal with non-convex functions is using a genetic algorithm, which is inspired by the process of natural selection \cite{goldberg89}.
The here deployed algorithm starts with a initial population, that is uniformly sampled within predefined limits of the to-be-optimized parameters.
The \docAPshort{}'s location $\mPosAPVec$ must be within the building and is therefore limited by its size.
\mTXP{}, \mPLE{} and \mWAF{} are set within a sane interval around empirically chosen values.
During each iteration, the best \SI{25}{\percent} of the population are kept.
The remaining entries are then re-created by modifying the best entries with uniform random values within $\pm$\SI{10}{\percent} of the known limits.
Inspired by {\em cooling} known from simulated annealing \cite{Kirkpatrick83optimizationby}, the result is stabilized by narrowing the allowed modification limits over time and thus decrease in the probability of accepting worse solutions.
%\commentByToni{Wollen wir das mal genauer beschreiben? Also wie genau funktioniert das cooling. Das ist ja alles sehr wischi waschi gehalten}
%\commentByFrank{ich wuerde es so lassen. da gibts genug in der literatur ueber ideen und potentielle ansaetze}
To further improve the results, we optimize a model for each floor of the building instead of a single global one, using only the reference measurements that belong to the corresponding floor.
The reason for this comes from the assumptions made in eq. \eqref{eq:wallAtt}.
Here, no walls are considered and thus we expect erroneous RSSI measurements for regions that are heavily shrouded, e.g. by steel-reenforced concrete or metallized glass.
During evaluation, the $z$-value from $\mPosVec$ in eq. \eqref{eq:wifiProb} is used to select the correct model for this location, what then provides the signal strength prediction.
For example, if a pedestrian walks on a staircase and thus is in-between multiple storeys, the average prediction of all corresponding models is calculated instead.
%man muss zwar messungen machen, dafür muss man aber die position der ap's nicht mehr kennen. daher kostet das jetzt nicht viel mehr zeit.
Basically, any kind of wireless network which allows to measure RSSI can be used for the above.
%\commentByMarkus{Provieded der AP die RSSI? Misst nicht das Smartphone an seiner Antenne?}
However, most buildings do not provide a satisfying and well covered \docWIFI{} infrastructure, e.g. staircases or hallways are often neglected for office spaces.
This applies in particular to historical buildings, as discussed in section \ref{sec:intro}.
To improve $\docWIFI$ coverage we are able to distribute a small number of simple and cheap \docWIFI{} beacons.
As beacons we use a WEMOS D1 mini, which is based on the ESP-8266EX \docWIFI{} chip \cite{Wemos}.
The building considered in this work has no \docWIFI{} infrastructure at all, not even a single \docAPshort{}.
Nevertheless, our method allows to distribute beacons in the whole building by simply plugging them into available power outlets.
\subsection{Activity Recognition}
\label{sec:activity}
To enable continuous floor changes we use a simple activity recognition based on the smartphone's barometer and accelerometer.
The method distinguishes between the following: standing, walking, walking up or walking down.
For each sensor we define two fixed-sized windows: $\vec{\omega}_\text{s}$ (short) and $\vec{\omega}_\text{l}$ (long).
As their naming suggests, the windows differ in size and thus in the number of raw sensor measurements they hold.
Both windows are implemented as real-time queues.
Therefore, if a new sensor measurement is added, the oldest entry will be removed.
To recognize the respective activities, we suggest a very simple threshold-based process.
Defining a threshold $t_\text{acc}$ for acceleration (m/s$^2$) and $t_\text{baro}$ for altitude (hPa).
\add{The corresponding activity is then detected as described by the decision tree given in fig. \ref{fig:activity} for every incoming barometer measurement.}
\begin{figure}
\begin{center}
\begin{tikzpicture}[auto]
\node [startstop](start){};
\node [box, below=0.5cm of start](x0){$\Delta \bar\omega_\text{acc} < t_\text{acc}$};
\node [activity, below=0.5cm of x0, xshift=-3cm](x1){standing};
%
\node [box, below=0.5cm of x0, xshift=3cm](x2){$|\Delta \bar\omega_\text{baro}| < t_\text{baro}$};
\node [activity, below=0.5cm of x2, xshift=-3cm](x4){walking};
%
\node [box, below=0.5cm of x2, xshift=3cm](x3){$\Delta \bar\omega_\text{baro} > 0$};
\node [activity, below=0.5cm of x3, xshift=-3cm](x3l){walking down};
\node [activity, below=0.5cm of x3, xshift=3cm](x3r){walking up};
%
\path [*->, line] (start) -- (x0);
\path [line] (x0) -| (x2) node [pos=0.25] {no};
\path [line] (x0) -| (x1) node [above, pos=0.25] {yes};
\path [line] (x2) -| (x3) node [pos=0.25] {no};
\path [line] (x3) -| (x3l) node [above, pos=0.25] {yes};
\path [line] (x3) -| (x3r) node [pos=0.25] {no};
\path [line] (x2) -| (x4) node [above, pos=0.25] {yes};
\end{tikzpicture}
\end{center}
\caption{\add{Decision tree describing the threshold-based activity recognition using the smartphones
barometer and accelerometer measurements. The respective thresholds are given by $t_\text{acc}$ and $t_\text{baro}$. For each sensor the sigma of the arithmetic mean $\Delta \bar\omega = \bar\omega_\text{l} - \bar\omega_\text{s}$ of two different fix-sized windows $\vec{\omega}_\text{s}$ (short) and $\vec{\omega}_\text{l}$ (long), holding a set of the most current sensor measurements, is calculated. The process updates with every incoming barometer reading.}}
\label{fig:activity}
\end{figure}
%
%A corresponding activity is chosen by
%
%\begin{equation}
% \mObsActivity =
% \begin{cases}
% \text{standing} & \Delta \bar\omega_\text{acc} < t_\text{acc} \\
% \text{walking} & |\Delta \bar\omega_\text{baro}| < t_\text{baro} \\
% \text{walking down} & \Delta \bar\omega_\text{baro} > 0 \\
% \text{walking up} & \text{otherwise}
% \end{cases}
%\end{equation}
%
Here, $\Delta \bar\omega = \bar\omega_\text{l} - \bar\omega_\text{s}$
%\begin{equation}
% \Delta \bar\omega = \bar\omega_\text{l} - \bar\omega_\text{s}
%\end{equation}
and $\bar\omega$ provides the arithmetic mean of the respective windows and thus represents a moving average.
We set $t_\text{acc} = $ \SI{0.015}{\meter/\square\second} and $t_\text{baro} = $ \del{\SI{0.042}{\meter/\square\second}} \add{\SI{0.042}{\hecto\pascal}}.
For both involved sensors we suggest to set the size of $\vec{\omega}_\text{s}$ between \SI{0.3}{\second} and \SI{0.6}{\second}.
Recognizing if the pedestrian is standing or walking requires less prior data, then climbing stairs.
Therefore, $\vec{\omega}_\text{l, acc}$ is recommended between \SI{1}{\second} and \SI{2}{\second}, while $\vec{\omega}_\text{l, baro}$ between \SI{3}{\second} and \SI{5}{\second}.
It should be noted, that the window size is a classic trade-off between flexibility and robustness.
The larger the window, the slower changes become noticeable and vice versa.
Of course, the above suggested values are dependent upon the particular requirements and used sensors.
However, they should be valid for many modern commercially available smartphones.
%\commentByFrank{hier hast du quotes um die activitites. in der intro noch nicht. vlt einheitlich machen ueber macros?}
The activity is now evaluated using $p(\vec{o}_t \mid \vec{q}_t)_\text{act}$ by providing a probability based on whether the 3D location $\mPosVec$ of the state-in-question is on a staircase, in an elevator or on the floor.
If the current activity $\mObsActivity$ is recognized as "standing", a $\mPosVec$ located on the floor results in a probability given by $\kappa$, otherwise $1 - \kappa$.
The same applies to "walking up" and "walking down", here a $\mPosVec$ located on one of the possible staircases or elevators provides $\kappa$ and those who remain on the floor $1 - \kappa$.
The likelihood for $\kappa$ is chosen empirically.
It is useful to find a reasonable value that is not too restrictive.
In most cases, $\kappa = 0.75$ provides good results by remaining enough room for erroneous classifications.
A significant higher value like $\kappa = 0.99$ could cause the system to be stuck on a staircase or to be unable to change floors.
%\commentByToni{Wir haben im related work schon von particeln gesprochen. hier in der eval nehm ich aber wieder viel state und state-in-question. wie wollen wir es machen?}
%\commentByToni{warum wir die große treeppe so schwer ist: wlan model zieht JEDE decke ab, nicht nur die sichtbaren, weil das model einfach so gebaut wurde. }

View File

@@ -0,0 +1,422 @@
\section{Experiments}
As explained at the very beginning of this work, we wanted to explore the limits of the here presented localization system.
By utilizing \del{it to} \add{the proposed technology in} a 13th century historic building, we created a challenging scenario not only because of the various architectural factors, but also because of its function as a museum.
During all experiments, the museum was open to the public and had a varying number of \SI{10}{} to \SI{50}{} visitors while recording.
The \SI{2500}{\square\meter} building consists of \SI{6}{} different levels, which are grouped into 3 floors (see fig. \ref{fig:apfingerprint}).
Thus, the ceiling height is not constant over one floor and varies between \SI{2.6}{\meter} to \SI{3.6}{\meter}.
In the middle of the building is an outdoor area, which is only accessible from one side.
While most of the exterior and ground level walls are made of massive stones, the floors above are half-timbered constructions.
Due to different objects like exhibits, cabinets or signs not all positions within the building were walkable.
For the sake of simplicity we did not incorporate such knowledge into the floorplan.
Thus, the floorplan consists only of walls, ceilings, doors, windows and stairs.
It was created using our 3D map editor software based on architectural drawings from the 1980s.
Sensor measurements are recorded using a simple mobile application that implements the standard Android sensor functionalities.
As smartphones we used either a Samsung Note 2, Google Pixel One or Motorola Nexus 6.
The computation of the state estimation as well as the \docWIFI{} optimization are done offline using an Intel Core i7-4702HQ CPU with a frequency of \SI{2.2}{GHz} running \add{\SI{8}{threads} on \SI{4}{cores}} and \SI{16}{GB} main memory.
However, similar to our \add{previously presented systems}, the setup is able to run completely on commercial smartphones as it written in high performant C++ code \cite{torres2017smartphone}.
%Sensor measurements are recorded using a simple mobile application that implements the standard Android SensorManager.
The experiments are separated into four sections:
At first, we discuss the performance of the novel transition model and compare it to a grid-based approach.
In section \ref{sec:exp:opti} we have a look at \docWIFI{} optimization and how the real \docAPshort{} positions differ from it.
Following, we conducted several test walks throughout the building to examine the estimation accuracy (in \SI{}{\meter}) of the localization system and discuss the here presented solutions for sample impoverishment.
Finally, the respective estimation methods are discussed in section \ref{sec:eval:est}.
\commentByToni{Activity Recognition Experimente. Wie gut ist es?}
\subsection{Transition}
\begin{figure}[t]
\centering
\begin{subfigure}{0.4\textwidth}
\def\svgwidth{\columnwidth}
\input{gfx/transEval/mesh_25_final.eps_tex}
\caption{Mesh after 25 steps}
\label{fig:transitionEval:a}
\end{subfigure}
\hspace{2cm}
\begin{subfigure}{0.4\textwidth}
\def\svgwidth{\columnwidth}
\input{gfx/transEval/grid_25_final.eps_tex}
\caption{Graph after 25 steps}
\label{fig:transitionEval:b}
\end{subfigure}
\begin{subfigure}{0.4\textwidth}
\def\svgwidth{\columnwidth}
\input{gfx/transEval/mesh_180_final.eps_tex}
\caption{Mesh after 180 steps}
\label{fig:transitionEval:c}
\end{subfigure}
\hspace{2cm}
\begin{subfigure}{0.4\textwidth}
\def\svgwidth{\columnwidth}
\input{gfx/transEval/grid_180_final.eps_tex}
\caption{Graph after 180 steps}
\label{fig:transitionEval:d}
\end{subfigure}
\caption{Simple staircase scenario to compare the graph-based model with the navigation mesh. All units are given in meter. The black line indicates the current position and the green line gives the estimated path until 25 or 180 steps, both using weighted average. The particles are colored according to their height. A pedestrian walks up and down the stairs several times in a row. After 25 steps, both methods produce good results, although there are already some outliers (blue particles). After 180 steps, the outliers using the graph have multiplied, leading to a multimodal situation. In contrast, the mesh offers the possibility to remove particles that hit a wall and can thus prevent such a situation.}
\label{fig:transitionEval}
\end{figure}
To compare our old graph-based model with our novel transition model presented within section \ref {sec:transition}, we chose a simple scenario, in which a tester walks up and down a staircase several times.
We used 1000 particles and did not perform an evaluation and resampling step to maintain the pure performance of the transition (step and heading).
The filter starts at a fixed position and is updated after every newly recognized step.
We set $\sigma_\text{step} = 0.1$ and $\sigma_\text{turn} = 0.1$ likewise.
The cells of the gridded graph were \SI{20}{} x \SI{20}{\centi\meter} in size and the transition implemented as described in \cite{Ebner-16}.
As discussed in section \ref {sec:transition}, the mesh demands for a strategy, how to handle unreachable destinations.
We chose a simple, yet effective strategy: whenever a destination is unreachable to a particle, it is removed and the last correct transitioning particle is duplicated.
Of course, the graph does not require for such a rule, since particles are only allowed to move on nodes and search for neighbours.
Fig. \ref{fig:transitionEval:a} and \ref{fig:transitionEval:b} illustrate the results after \SI{25}{steps} for each method.
The particles are colored according to their height and the walking path (green line) is estimated using weighted-average.
It can be seen that both methods provide similar results.
Due to the discrete grid structure, the purple particles on the graph scatter more strongly, while the mesh provides a truly continuous structure and thus a more compact representation.
It is important to note that outliers have already appeared in both scenarios (blue particles).
Due to the included sensor noise, they covered a too short distance for several times and thus the upcoming left turn leads upwards instead of downwards.
Going straightforward to \SI{180} steps, this phenomenon has multiplied for the graph (cf. fig. \ref{fig:transitionEval:d}), but not for the mesh (cf. fig. \ref{fig:transitionEval:c}).
This is due to the above-mentioned strategy for the mesh.
Compared to this approach, the graph is not able to remove any particles and thus they walk according to the recognized steps and heading changes, even if they theoretically hit a wall several times.
The resulting effects are obvious.
After walking up and down twice, several particle groups have formed, which no longer allows an accurate position estimation.
Of course, a similar strategy could be developed for a graph.
We have already shown how to identify the nodes nearest to walls in one of our previous works \cite{Ebner-16}.
However, the limitation to walk in \SI{45}{\degree} angles as well as the discrete cell sizes lead to restrictions for small rooms, narrow hallways or bigger cells.
For example walking through a door, would result in a strong reduction of differing particles.
If the state evaluation is then used to assign weights to particles, the crucial problem of sample degeneracy often occurs.
With a mesh, on the other hand, walkable destinations can also be located in a room behind a wall.
In combination with the continues movement, this allows for a high versatility of particles even in such situations.
Another method to fix the problems shown in fig. \ref{fig:transitionEval:d}, is by adding an activity recognition (walking up, down straight) or to incorporate a barometer.
Nevertheless, in most cases it is an advantage if a sensor model delivers good results on its own, without further dependencies.
For example, if a sensor is currently unavailable or damaged, the system is still able to provide prober results.
Besides the advantages the mesh offers, it also has a few disadvantages compared to the graph.
The computation time has increased due to the calculation of reachable destinations.
With the graph, only the direct neighbours are of interest, which can be implemented very efficiently using a tree structure.
Further, the graph allows the easily store meta information on its nodes, for example Wi-Fi fingerprints or precalculations for shortest-path methods.
This is more difficult using the mesh and requires the handling of baricentric coordinates.
\subsection{\docWIFI{} Optimization}
\label{sec:exp:opti}
%\commentByToni{Work in Progress... Irgendwie passt die Grafik nicht so wirklich. Im Gegensatz zum 2017 Paper würde ich gerne ein wenig über die geschätzten Positionen reden. Die Unterschiede zwischen Local und Global dabei. Warum machne Schätzungen gar so weit weg von der Realität sind und das es oft auch gar nicht so schlimm ist, falls das passiert. Tipps sind Willkommen. Vielleicht b) weglassen und in a einfach noch die fingerprint positionen mit rein. damit man ein gefühlt dafür bekommt wie viel wir in Vorleistung gehen müssen. An sich erkannt man ja dann das von "oben" das die optimierung manchmal gut und manchmal schlecht ist.}
%wie viele ap sind es insgesamt?
As described in section \ref{sec:wifi} we used \SI{42}{} WEMOS D1 mini to provide a \docWIFI{} infrastructure throughout the building.
Within all Wi-Fi observations, we only consider the beacons, which are identified by their well-known MAC address.
Other transmitters like smart TVs or smartphone hotspots are ignored as they might cause estimation errors.
The references (fingerprints) we used to optimize the Wi-Fi models as well as the real position of the \docAPshort{}s (black dot) can be seen in fig. \ref{fig:apfingerprint} for ground level.
Each reference location was scanned \SI{30}{} times ($\approx \SI{25}{\second}$ scan time) using a Motorola Nexus 6 at \SI{2.4}{GHz} band only.
The resulting measurements were grouped per physical transmitter and aggregated to form the average signal strength per transmitter.
The real position of every installed beacon was measured using a laser scanner.
This allows a comparison with the optimized \docAPshort{} positions, what can also be seen in fig. \ref{fig:apfingerprint}.
%
\begin{figure}[t]
\centering
\def\svgwidth{\columnwidth}
\input{gfx/optimization/wifiOptTopView.eps_tex}
\caption{Ground level of the building in the \add{$xy$-plane} from above. Includes the locations of the reference points, the ground truth and the optimized \docAPshort{}s. The grey line connects an \docAPshort{} with the corresponding optimization. The \add{colored borders} are areas of special interest and are discussed within the text. The corresponding pictures on the right side show the museum in these places.}
\label{fig:apfingerprint}
\end{figure}
%Positionsfehler und wo?
It illustrates the results of the global (blue) and the per-floor (orange) method for all \docAPshort{}'s installed to ground level.
The respective optimized positions $\mPosAPVec$ are connected by a grey line with the corresponding ground truth, providing the position error on the $xz$-plane.
The average distance error (3D) between the \docAPshort{}'s real position and the optimized ones is \SI{5.4}{\meter} ($\mu =$ \SI{5.1}{}) for the per-floor and \SI{4.8}{\meter} ($\mu =$ \SI{5.6}{}) for global strategy.
However, it is easy to see that the results are better in some areas (green) than in others (red and purple).
While the green \add{rectangle} encloses an area that has a high number of \docAPshort{}s with line-of-sight conditions, the \docAPshort{}s in red and purple are shielded by very thick stone walls and have a lower number of reference points with direct visual contact (cf. fig. \ref{fig:apfingerprint}).
The maximum position error for the global scheme is \SI{25.3}{\meter} and \SI{18.4}{\meter} for the per-floor one.
Both are related to the \docAPshort{} in the red \add{rectangle}.
%Gesamtfehler und wieso?
Of course, the position alone does not provide sufficient information of the overall performance, however it provides a good visual impression of how the optimization behaves.
The overall optimization error is measured using the difference between model predictions and real-world RSSI values for each reference measurement.
These differences can be positive or negative, which is why we indicate an absolute or signed error.
The (absolute) optimization error of the respective strategies is \SI{4.7}{\decibel} ($\mu =$ \SI{3.8}{}) for global and \SI{2.6}{\decibel} ($\mu =$ \SI{2.7}{}) for per-floor in average.
Again, the highest errors occur from \docAPshort{}s within the red and purple area, whereby the local maxima for the signed difference are \SI{-31.4}{\decibel} and \SI{17.5}{\decibel} for global and \SI{-12.7}{\decibel} and \SI{13.4}{\decibel} for local.
%global vs local
Thus, the per-floor optimization scheme provides a smaller overall error, whereby the positioning error is higher compared to the global one.
The reason for the latter can be found within the purple area.
It marks a vaulted cellar, that is \SI{1.7}{\meter} deeper than ground level and connect by a narrow staircase.
\add{Here, RSSI measurements received from \docAPshort{}'s residing on the ground level are strongly attenuated due to the massive walls of the cellar.
In contrast, measurements coming from the floor above are much less attenuated thanks to a much thinner ceiling.}
%Here, RSSI measurements taken from outside the ground level are strongly attenuated, while measurements \del{taken from above are more moderately attenuated} \add{received }.
Since the per-floor scheme uses only references from the current floor in question, while the global scheme uses all available references and thus more meaningful information in this area.
However, as the overall error suggests, this is not always an advantage, which we will see later on in the localization experiments.
%warum ist die optimierung tdz. ganz gut?
As mentioned above, some areas are heavily attenuated by big walls, what simply does not fit the used signal strength prediction model.
As discussed in section \ref{sec:relatedWork} and \ref{sec:wifi}, we only consider ceilings within the model to avoid computational expensive wall intersection-tests.
A far higher number of reference measurements in bad areas can therefore only increase the accuracy to a limited extent.
Nevertheless, by optimizing all parameters (\mPosAPVec{}, \mTXP{}, \mPLE{} and \mWAF{}) the system provides far better localization results compared to using the \docAPshort{}'s real positions with empirical values or even optimized values only for \mTXP{}, \mPLE{} and \mWAF{}.
The reason for this is obvious.
The optimized parameters fit the (unrealistic) signal strength prediction model much better than the real ones and thus provide for a smaller error between measured RSSI and predicted RSSI.
Since walls are ignored by the model, optimizing the position of the access points can compensate for the resulting effects.
This is also the reason why the optimized positions of \docAPshort{}'s attached to walls always have a certain distance to them, as can be seen in fig. \ref{fig:apfingerprint}.
A more realistic model would not only mean an overall improvement of the results, but also a further approximation to the real conditions in the building. It is to be expected that the estimated positions of the access points will then approach the ground truth.
Further evaluations and discussions regarding the here used optimization can be found in \cite{Ebner-17}.
\subsection{Localization Error}
\begin{figure}[t]
\centering
\begin{subfigure}{0.32\textwidth}
\def\svgwidth{\columnwidth}
{\input{gfx/groundTruth/gt_unten_final.eps_tex}}
\caption{Ground floor}
\end{subfigure}
\begin{subfigure}{0.32\textwidth}
\def\svgwidth{\columnwidth}
{\input{gfx/groundTruth/gt_mitte_final.eps_tex}}
\caption{First floor}
\end{subfigure}
\begin{subfigure}{0.32\textwidth}
\def\svgwidth{\columnwidth}
{\input{gfx/groundTruth/gt_oben_final.eps_tex}}
\caption{Second floor}
\end{subfigure}
\caption{All conducted walks within the building. The arrows indicate the running direction and a cross marks the end. For a better overview we have divided the building into 3 floors. However, each floor consists of different high levels. They are separated from each other by different shades of grey, dark is lower then light.}
\label{fig:floorplan}
\end{figure}
%
The 4 chosen walking paths can be seen in fig. \ref{fig:floorplan}.
Walk 0 is \SI{152}{\meter} long and took about \SI{2.30}{\minute} to walk.
Walk 1 has a length of \SI{223}{\meter} and Walk 2 a length of \SI{231}{\meter}, both required about \SI{6}{\minute} to walk.
Finally, walk 3 is \SI{310}{\meter} long and takes \SI{10}{\minute} to walk.
All walks were carried out by 4 different male testers using either a Samsung Note 2, Google Pixel One or Motorola Nexus 6 for recording the measurements.
All in all, we recorded \SI{28}{} distinct measurement series, \SI{7}{} for each walk.
The picked walks intentionally contain erroneous situations, in which many of the above treated problems occur.
\del{This allows us to discuss everything in detail.}
A walk is indicated by a set of numbered markers, fixed to the ground.
Small icons on those markers give the direction of the next marker and in some cases provide instructions to pause walking for a certain time.
The intervals for pausing vary between \SI{10}{\second} to \SI{60}{\second}.
The ground truth is then measured by recording a timestamp while passing a marker.
For this, the tester clicks a button on the smartphone application.
Between two consecutive points, a constant movement speed is assumed.
Thus, the ground truth might not be \SI{100}{\percent} accurate, but fair enough for error measurements.
The approximation error is then calculated by comparing the interpolated ground truth position with the current estimation \cite{Fetzer-16}.
An estimation on the wrong floor has a great impact on the location awareness of an pedestrian, but only provides a relatively small error.
Therefore, errors in $z$-direction are penalized by tripling the $z$-value.
%computation und monte carlo runs
For each walk we deployed 100 runs using \SI{5000}{particles} and set $N_{\text{eff}} = 0.85$ for resampling.
Instead of an initial position and heading, all walks start with a uniform distribution (random position and heading) as prior.
The overall localization results can be see in table \ref{table:overall}.
Here, we differ between the respective anti-impoverishment techniques presented in chapter \ref{sec:impo}.
The simple anti-impoverishment method is added to the resampling step and thus uses the transition method presented in chapter \ref{sec:transition}.
In contrast, the $D_\text{KL}$-based method extends the transition and thus uses a standard cumulative resampling step.
We set $l_\text{max} =$ \SI{-75}{dBm} and $l_\text{min} =$ \SI{-90}{dBm}.
For a better overview, we only used the KDE-based estimation, as the errors compared to the weighted-average estimation differ by only a few centimeter.
\newcommand{\STAB}[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}}
\begin{table}[t]
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
Method & \multicolumn{3}{c|}{none} & \multicolumn{3}{c|}{simple} & \multicolumn{3}{c|}{$D_\text{KL}$}\\
\hline
& $\bar{x}$ & $\bar{\sigma}$ & $\tilde{x}_{75}$ & $\bar{x}$ & $\bar{\sigma}$ & $\tilde{x}_{75}$ & $\bar{x}$ & $\bar{\sigma}$ & $\tilde{x}_{75}$ \\
\hline \hline
walk 0 & \SI{13.4}{\meter} & \SI{11.2}{\meter} & \SI{22.6}{\meter} & \SI{7.1}{\meter} & \SI{6.6}{\meter} & \SI{9.4}{\meter} & \SI{5.8}{\meter} & \SI{4.9}{\meter} & \SI{7.3}{\meter} \\ \hline
walk 1 & \SI{3.2}{\meter} & \SI{2.4}{\meter} & \SI{4.1}{\meter} & \SI{3.2}{\meter} & \SI{2.6}{\meter} & \SI{4.0}{\meter} & \SI{3.8}{\meter} & \SI{3.2}{\meter} & \SI{4.6}{\meter} \\ \hline
walk 2 & \SI{8.3}{\meter} & \SI{4.1}{\meter} & \SI{10.9}{\meter} & \SI{3.6}{\meter} & \SI{2.3}{\meter} & \SI{4.9}{\meter} & \SI{3.6}{\meter} & \SI{2.3}{\meter} & \SI{4.8}{\meter} \\ \hline
walk 3 & \SI{7.0}{\meter} & \SI{5.9}{\meter} & \SI{13.5}{\meter} & \SI{5.4}{\meter} & \SI{4.7}{\meter} & \SI{7.7}{\meter} & \SI{4.8}{\meter} & \SI{4.3}{\meter} & \SI{6.5}{\meter} \\
\hline
\end{tabular}
\caption{Overall localization results in meter using the different impoverishment methods. For estimation we used the KDE-based method, as the errors compared to the weighted-average differ by only a few centimeter. The results are presented given the average positioning error $\bar{x}$, the standard deviation $\bar{\sigma}$ and the \SI{75}{\percent}-quantil of positioning errors $\tilde{x}_{75}$.}
\label{table:overall}
\end{table}
All walks, except for walk 1, suffer in some way from sample impoverishment.
We discuss the single results of table \ref{table:overall} starting with walk 0.
Here, the pedestrians started at the top most level, walking down to the lowest point of the building.
The first critical situation occurs immediately after the start.
While walking down the small staircase, many particles are getting dragged into the room to the right due to erroneous Wi-Fi readings.
At this point, the activity "walking down" is recognized, however only for a very short period.
This is caused by the short length of the stairs.
After this period, only a small number of particles changed the floor correctly, while a majority is stuck within the right-hand room.
The activity based evaluation $p(\vec{o}_t \mid \vec{q}_t)_\text{act}$ prevents particles from further walking down the stairs, while the resampling step mainly draws particles in already populated areas.
In \SI{10}{\percent} of the runs using none of the anti-impoverishment methods, the system is unable to recover and thus unable to finish the walk somewhere near the correct position or even on the same floor.
Yet, the other \SI{90}{\percent} of runs suffer from a very high error.
Only by using one of the here presented methods to prevent impoverishment, the system is able to recover in \SI{100}{\percent} of cases.
Fig. \ref{fig:errorOverTimeWalk0} compares the error over time between the different methods for an exemplary run.
The above described situation, causing the system to stuck after \SI{10}{\second}, is clearly visible.
Both, the simple and the $D_\text{KL}$ method are able to recover early and thus decrease the overall error dramatically.
Between \SI{65}{\second} and \SI{74}{\second} the simple method produces high errors due to some uncertain Wi-Fi measurements coming from an \docAP{} below, causing those particles who are randomly drawn near this \docAPshort{} to be rewarded with a very high weight.
This leads to newly sampled particles in this area and therefore a jump of the estimation.
The situation is resolved after entering another room, which is now shielded by stone walls instead of wooden ones.
Walking down the stairs at \SI{80}{\second} does also recover the localization system using none of the methods.
%
\begin{figure}
\centering
\input{gfx/errorOverTimeWalk0/errorOverTime.tex}
\caption{Error development over time of a single Monte Carlo run of walk 0. Between \SI{10}{\second} and \SI{24}{\second} the Wi-Fi signal was highly attenuated, causing the system to get stuck and producing high errors. Both, the simple and the $D_\text{KL}$ anti-impoverishment method are able to recover early. However, between \SI{65}{\second} and \SI{74}{\second} the simple method produces high errors due to the high random factor involved.}
\label{fig:errorOverTimeWalk0}
\end{figure}
A similar behavior as the above can be seen in walk 3.
Without a method to recover from impoverishment, the system lost track in \SI{100}{\percent} of the runs due to a not detected floor change in the last third of the walk.
By using the simple method, the overall error can be reduced and the impoverishment resolved. Nevertheless, unpredictable jumps of the estimation are causing the system to be highly uncertain in some situations, even if those jumps do not last to long.
Only the use of the $D_\text{KL}$ method is able to produce reasonable results.
As described in chapter \ref{sec:wifi}, we use a Wi-Fi model optimized for each floor instead of a single global one.
A good example why we do this, can be seen in fig. \ref{fig:walk3:wifiopt}, considering a small section of walk 3.
Here, the system using the global Wi-Fi model makes a big jump into the right-hand corridor and requires \SI{5}{\second} to recover.
This happens through a combination of environmental occurrences, like the many different materials and thus attenuation factors, as well as the limitation of the here used Wi-Fi model, only considering ceilings and ignoring walls.
Following, \docAPshort{}'s on the same floor level, which are highly attenuated by \SI{2}{\meter} thick stone walls, are neglected and \docAPshort{}'s from the floor above, which are only separated by a thin wooden ceiling, have a greater influence within the state evaluation process.
Of course, we optimize the attenuation per floor, but at the end this is just an average value summing up the \docAPshort{}'s surrounding materials.
Therefore, the calculated signal strength predictions do not fit the measurements received from the above in a optimal way.
In contrast, the model optimized for each floor only considers the respective \docAPshort{}'s on that floor, allowing to calculate better fitting parameters.
A major disadvantage of the method is the reduced number of visible \docAPshort{}'s and thus measurements within an area.
This could lead to an underrepresentation of \docAPshort{}'s for triangulation.
Such a scenario can be seen in fig. \ref{fig:walk3:time} between \SI{200}{\second} and \SI{220}{\second}, where the pedestrian enters an isolated room.
Only two \docAPshort{}'s provide a solid signal within this area, leading to a higher error, while the global scheme still receives RSSI readings from above.
\begin{figure}[t!]
\centering
\begin{subfigure}[t]{0.45\textwidth}
\def\svgwidth{\columnwidth}
{\input{gfx/wifiOptGlobalFloor/wifiOptGlobalFloor.eps_tex}}
\caption{}
\label{fig:walk3:wifiopt}
\end{subfigure}
\hfil
\begin{subfigure}[t]{0.45\textwidth}
\resizebox{1\textwidth}{!}{\input{gfx/errorOverTimeWalk3/errorOverTime.tex}}
\caption{}
\label{fig:walk3:time}
\end{subfigure}
\caption{(a) A small section of walk 3. Optimizing the system with a global Wi-Fi optimization scheme (blue) causes a big jump and thus high errors. This happens due to highly attenuated Wi-Fi signals and inappropriate Wi-Fi parameters. We compare this to a system optimized for each floor individually (orange), resolving the situation a producing reasonable results. (b) Error development over time for this section. The high error can be seen at \SI{190}{\second}. }
\label{fig:walk3}
\end{figure}
%walk 1
Looking at the results of table \ref{table:overall} again, it can be seen that the $D_\text{KL}$ method is able to improve the results in three of the four walks.
Those walks have in common, that they suffer in some way from sample impoverishment or other problems causing the system to stuck.
The only exception is walk 1.
It was set up to provide a challenging scenario, leading to as many multimodalities as possible.
We intentionally searched for situations in which there was a great chance that the particle set would separate, e.g. by providing multiple possible whereabouts through crossings or by blocking and thus separating a straight path with objects like movable walls.
Similar to the other walks, we added different pausing intervals of \SI{10}{\second} to \SI{60}{\second}.
This helps to analyse how the particles behave in such situations, especially in this multimodal setting.
Besides uncertain measurements, one of the main sources for multimodalities are restrictive transition models, e.g. no walking through walls.
As shown in section \ref{sec:impo}, the $D_\text{KL}$ method compares the current posterior $p(\mStateVec_{t} \mid \mObsVec_{1:t})$ with the probability grid $\probGrid_{t, \text{wifi}}$ using the Kullback-Leibler divergence and a Wi-Fi quality factor.
Environmental restriction like walls are not considered while creating $\probGrid_{t, \text{wifi}}$, that is why the grid is not effected by a transition-based multimodal setting.
Given accurate Wi-Fi measurements, it is therefore very likely that $\probGrid_{t, \text{wifi}}$ represents a unimodal distribution, even if the particles got separated by an obstacle or wall.
This leads to a situation, in which posterior and grid differ.
As a result, the radius $r_\text{sub}$ increases and thus the diversity of particles.
We are able to confirm the above by examining the different scenarios integrated into walk 1.
For this, we compared the error development with the corresponding radius $r_\text{sub}$ over time.
In situations where the errors given by the $D_\text{KL}$ method and the simple method differ the most, $r_\text{sub}$ also increases the most.
Here, the radius grows to a maximum of $r_\text{sub} = $ \SI{8.4}{\meter}, using the same measurement series as in fig. \ref{fig:walk1:kdeovertime}.
In contrast, a real sample impoverishment scenario, as seen in walk 0 (cf. fig. \ref{fig:errorOverTimeWalk0}), has a maximum radius of \SI{19.6}{\meter}.
Nevertheless, such an slightly increased diversity of \SI{8.4}{\meter} is enough to influence the estimation error of the $D_\text{KL}$ in a negative way (cf. walk 1 in table \ref{table:overall}).
Ironically, this is again some type of sample impoverishment, caused by the aforementioned environmental restrictions not allowing particles inside walls or other out of reach areas.
%%estimation
\subsection{Estimation}
\label{sec:eval:est}
As mentioned before, the single estimation methods (cf. chapter \ref{sec:estimation}) only vary by a few centimetres in the overall localization error.
That means, they differ mainly in the representation of the estimated locations.
More easily spoken, in which way the estimated path is drawn and thus presented to the user.
Regarding the underlying particle set, different shapes of probability distributions need to be considered, especially those with multimodalities.
%
\begin{figure}[t]
\centering
\begin{subfigure}{0.45\textwidth}
\resizebox{1\textwidth}{!}{\input{gfx/walk.tex}}
\caption{}
\label{fig:walk1:kde}
\end{subfigure}
\hfil
\begin{subfigure}{0.45\textwidth}
\resizebox{1\textwidth}{!}{\input{gfx/errorOverTimeWalk1/errorOverTime.tex}}
\caption{}
\label{fig:walk1:kdeovertime}
\end{subfigure}
\caption{(a) Occurring bimodal distribution caused by uncertain measurements in the first \SI{13.4}{\second} of walk 1. After \SI{20.8}{\second}, the distribution gets unimodal. The weigted-average estimation (orange) provides a high error compared to the ground truth (solid black), while the KDE approach (blue) does not. (b) Error development over time for the complete walk. From \SI{230}{\second} to \SI{290}{\second} to pedestrian was not moving. }
\label{fig:walk1}
\end{figure}
%
The main advantage of a KDE-based estimation is that it provides the "correct" mode of a density, even under a multimodal setting (cf. section \ref{sec:estimation}).
That is why we again have a look at walk 1.
A situation in which the system highly benefits from this is illustrated in fig. \ref{fig:walk1:kde}.
Here, a set of particles splits apart, due to uncertain measurements and multiple possible walking directions.
Indicated by the black dotted line, the resulting bimodal posterior reaches its maximum distance between the modes at \SI{13.4}{\second}.
Thus, a weighted-average estimation (orange line) results in a position of the pedestrian somewhere outside the building (light green area).
The ground truth is given by the black solid line.
The KDE-based estimation (blue line) is able to provide reasonable results by choosing the "correct" mode of the density.
After \SI{20.8}{\second} the setting returns to be unimodal again.
Due to a right turn the lower red particles are walking against a wall and thus punished with a low weight.
Although, situations as displayed in fig. \ref{fig:walk1:kde} frequently occur, the KDE-estimation is not able to improve the overall estimation results.
This can be seen in the corresponding error development over time plot given by fig. \ref{fig:walk1:kdeovertime}.
Here, the KDE-estimation performs slightly better then the weighted-average, however after deploying \SI{100}{} Monte Carlo runs, the difference becomes insignificant.
It is obvious, that the above mentioned "correct" mode, not always provides the lowest error.
In some situations the weighted-average estimation is often closer to the ground truth.
Within our experiments this happened especially when entering or leaving thick-walled rooms, causing slow and attenuated Wi-Fi signals.
While the systems dynamics are moving the particles outside, the faulty Wi-Fi readings are holding back a majority by assigning corresponding weights.
Only with new measurements coming from the hallway or other parts of the building, the distribution and thus the KDE-estimation are able to recover.
This leads to the conclusion, that a weighted-average approach provides a more smooth representation of the estimated locations and thus a higher robustness.
A comparison between both methods is illustrated in fig. \ref{fig:estimationcomp} using a measuring sequence of walk 2.
We have highlighted some interesting areas with colored \del{squares} \add{rectangles}.
The greatest difference between the respective estimation methods can be seen inside the green rectangle, the gallery wing of the museum.
While the weighted-average (orange) produces a very straight estimated path, the KDE-based method (blue) is much more volatile.
This can be explained by the many small rooms that pedestrians pass through.
The doors act like bottlenecks, which is why many particles run against walls and thus are either drawn on a new position within a reachable area (cf. section \ref{sec:estimation}) or walk along the wall towards the door.
This causes a higher uncertainty and diversity of the posterior, what is more likely to be reflected by the KDE method than by the weighted-average.
Additionally, the pedestrian was forced seven times to look at paintings (stop walking) between \SI{10}{\second} and \SI{20}{\second}, just in this small area.
Nevertheless, even if both estimated paths look very different, they produce similar errors.
The purple rectangle displays a situation in which a sample impoverishment was successfully resolved.
Due to a poorly working \docAPshort{}, in the lower corner of the big room the pedestrians passes before walking down the stairs, the majority of particles is dragged into the upper right corner of that room and unable to walk down.
By allowing some particles to walk through the wall and thus down the stairs, the impoverishment could be dissolved.
The KDE-based estimation \add{(blue line)} illustrates this behavior very accurate.
\add{At first, the pedestrian's position is estimated in the area around the corner of the room, after the impoverishment was recognized, the estimated path is then crossing the wall, enabling the floor change.
However, as could be seen in fig. 7, before the here presented methods are able to resolve sample impoverishment, the error and thus the radius $r_\text{sub}$ increase in time as the system got stuck.
This can take up to a few seconds, in which the pedestrian has continued walking and is thus ahead of the current position estimation.
As the first particles are newly drawn into more proper regions, the system starts to recover, still remaining in an uncertain state as the particle set is split apart.
After a few filter updates, especially resampling steps, the system returns back to a more stable state.
Both, the time in which the system was uncertain as well as the lag to the real position of the pedestrian lead to problems at the end of the staircase (left corner of the purple rectangle).
While the pedestrian has already completely descended the stairs, the activity changes from walking down to walking.
Since the majority of the particles are still on the stairs, they are thus considered to be less likely than particles on a floor.
As there are only a few particles on the floors, some below and some above, the estimation is calculated somewhere in between, which finally explains the increased error in this area.}
Another situation in which the estimated paths do not provide sufficient results can be seen inside the teal rectangle.
The room is very isolated from the rest of the building, which is reflected by the fact that only 3 \docAPshort{}'s are detected.
The pedestrians have been asked to cross the room at a quick pace, leading to a higher step rate and therefore update rate of the filter.
The results within this area lead to the assumption, that even if Wi-Fi has a bad coverage, it influences the estimation results the most.
The PDR based transition alone is able to walk alongside the ground truth in an accurate manner.
However, this is of course only true if we consider this area individually, without the rest of the walk due to the accumulating bias of the relative sensors involved.
\del{In the end, it is a question of optimal harmony between transition and evaluation.}
We hope to further improve such situations in future work by enabling the transition step to provide a weight to particles that walk very likely, especially in situation where Wi-Fi provides bad readings.
\begin{figure}[t]
\centering
\def\svgwidth{0.8\columnwidth}
{\input{gfx/estimationPath2/est.eps_tex}}
\caption{Estimation results of walk 2 using the KDE method (blue) and the weighted-average (orange). While the latter provides a more smooth representation of the estimated locations, the former provides a better idea of the quality of the underlying processes. In order to keep a better overview, the top level of the last floor was hidden. The colored rectangles are used as references within the text.}
\label{fig:estimationcomp}
\end{figure}
To summarize, the KDE-based approach for estimation is able to resolve multimodalities.
It does not provide a smooth estimated path, since it depends more on an accurate sensor model than a weighted-average approach, but is suitable as a good indicator about the real performance of a sensor fusion system.
At the end, in the here shown examples we only searched for a global maxima, even though the KDE approach opens a wide range of other possibilities for finding a best estimate.
\commentByToni{Diskussion, wie die Contributions uns jetzt geholfen haben. Nochmal zusammengefasst.}

View File

@@ -0,0 +1,68 @@
\section{Introduction}
\label{sec:intro}
Setting up a reliable localization solution for a building is a challenging and time-consuming task, especially in environments that are not built with localization in mind or do not provide any wireless infrastructure or even both.
Such scenarios are of special interest when old or historical buildings serve a new purpose such as museums, shopping malls or retirement homes.
In terms of European architecture, the problems emanating from these buildings worsen over time.
In the scope of this work, we deployed an indoor localization system to a 13th century building.
The first 300 years, the building was initially used as a convent, and, after that, had different functions ranging from a granary to an office for Bavarian officials.
Over time, the building underwent major construction measures and was extended several times.
Since 1936, the \SI{2500}{\square\meter} building acts as a museum of the medieval town Rothenburg ob der Tauber \cite{Rothenburg}, Germany.
Such buildings are often full of nooks and crannies, what makes it hard for dynamical models using any kind of pedestrian dead reckoning (PDR). Here, the error accumulates not only over time, but also with the number of turns and steps made \cite{Ebner-15}.
\del{There is also a higher chance of detecting false or misplaced turns,} \add{There is also a higher probability of detecting a wrong turn,} what can cause the position estimation to lose track or getting stuck within a demarcated area.
Thus, this paper presents a \del{robust but realistic} \add{continuous} movement model using a three-dimensional navigation mesh based on triangles.
\add{In addition, a novel threshold-based activity-recognition is used to allow for smooth floor changes.}
%In addition, this allows for very small map sizes, consuming little storage space.
In localization systems using a sample based density representation, like particle filters, aforementioned problems can further lead to more advanced problems like sample impoverishment \cite{Fetzer-17} or multimodalities \cite{Fetzer-16}.
Sample impoverishment refers to a situation, in which the filter is unable to sample enough particles into proper regions of the building, caused by a high concentration of misplaced particles.
Within this work we present a simple yet efficient method that enables a particle filter to fully recover from sample impoverishment.
We also use \del{a novel} \add{an} approach for finding an exact estimation of the pedestrian's current position by using a \del{rapid computation} \add{approximation} scheme of the kernel density estimation (KDE) \cite{Bullmann-18}.
Many historical buildings, especially bigger ones like castles, monasteries or churches, are built of massive stone walls and have annexes from different historical periods out of different construction materials.
\del{This leads to problems} \add{This makes it more challenging to ensure good radio coverage of the entire building, especially} for technologies using received signal strengths indications (RSSI) from \docWIFI{} or Bluetooth.
\add{For methods requiring environmental knowledge, like the wall-attenuation-factor model, the high signal attenuation between different rooms causes further problems.}
Many unknown quantities, like the walls definitive material or thickness, make it expensive to determine important parameters, \eg{} the signal's depletion over distance.
Additionally, \del{most wireless} \add{many of these} approaches are based on a line-of-sight assumption.
Thus, the performance will be even more limited due to the irregularly shaped spatial structure of such buildings.
Our approach tries to avoid those problems using an optimization scheme for Wi-Fi based on a \del{few} \add{set of} reference measurements.
We distribute a \del{small number} \add{set} of \del{simple} \add{small (\SI{2.8}{\centi\meter} x \SI{3.5}{\centi\meter})} and cheap \add{($\sim \SI{10}{\$}$)} \docWIFI{} beacons over the whole building \add{to ensure a reasonable coverage} and instead of measuring their position \add{and necessary parameters, we use our optimization scheme, initially presented in \cite{Ebner-17}}.
\add{An optimization scheme is able to compensate for wrongly measured access point positions, inaccurate building plans or other knowledge necessary for the Wi-Fi component.
}
%An optimization scheme also avoids inaccuracies like wrongly measured access point positions or outdated fingerprints caused by changes of the environment or inaccurate building plans.
%\commentByFrank{warum fingerprints? das verwirrt mich an der stelle. willst du sagen, dass opt. besser ist, als ueberhaupt fingerprints zu nehmen? dann kommt es nicht so rueber. unsicher, deshalb kein direkter fix sondern comment}
\del{It is obvious, that} \add{Of course, } this could be solved by re-measuring the building, however this is a very time-consuming process requiring specialized hardware and a surveying engineer.
\add{Depending on the size of the building, such a complex and time-consuming process is} contrary to most costumers expectations of a fast to deploy \del{and low-cost} solution.
%
In addition, this is not just a question of \del{costs incurred} \add{initial effort}, but also for buildings under monumental protection, not allowing for larger construction measures.
\add{That is why the compact Wi-Fi beacons are a reasonable alternative to conventional access points for localization.
The access points of a classic Wi-Fi infrastructure are mostly mounted to the ceilings of the building to presume a cost efficient setting receiving the highest possible coverage.
However, this usually requires new cabling, e.g. an extra power over Ethernet connection.
In contrast, the beacons can simply be plugged into already existing power outlets and due to their low price they can be distributed in large quantities, if necessary.
In the here presented scenario, the beacons do not establish a wireless network and thus serve only to provide signal strengths.}
%To sum up, this work presents a smartphone-based localization system using.
To sum up, \add{this work presents an updated version of the winning localization system of the smartphone-based competition at IPIN 2016 \cite{Ebner-15}, including the improvements and newly developed methods that have been made since then \cite{Ebner-16, Ebner-17, Fetzer-17, Bullmann-18}.
This is the first time that all these previously acquired findings have been fully combined and applied simultaneously.
During the here presented update, the following novel contributions will be presented and added to the system:
\begin{itemize}
\item The pedestrian's movement is modelled in a more realistic way using a navigation mesh, based on the building's floorplan. This only allows movements that are actually feasible, e.g. no walking through walls. Compared to the gridded-graph structure we used before \cite{Ebner-16}, the mesh allows continuous transitions and reduces the required storage space drastically.
\item To enabled more smooth floor changes, a threshold-based activity recognition using barometer and accelerometer readings is added to the state evaluation process of the particle filter. The method is able to distinguish between standing, walking, walking up and walking down.
\item To address the problem of sample impoverishment in a wider scope, we present a simplification of our previous method \cite{Fetzer-17}. This reduces the overhead of adapting an existing system to the method and allows to incorporate it as independent component of the state transition of any approach using a general particle filter methodology.
\end{itemize}
}
%We then further omit time-consuming approaches like classic fingerprinting or measuring the exact positions of access points.
%Instead we use a simple optimization scheme based on reference measurements to estimate a corresponding \docWIFI{} model.
The goal of this work is to propose a fast to deploy \del{and low-cost} localization solution, that provides reasonable results in a high variety of situations.
Consequently, we believe that by utilizing our localization approach to such a challenging scenario, it is possible to prove those characteristics.
\add{Despite evaluating the novel contributions and the overall performance of the system, we have carried out additional experiments to determine the performance of our Wi-Fi optimization in such a complex scenario as well as a detailed comparison between KDE-based and weighted-average position estimation.}
%novel experiments to previous methods due to the complex scenario blah und blub.}
%Finally, it should be mentioned that the here presented work is an highly updated version of the winner of the smartphone-based competition at IPIN 2016 \cite{Ebner-15}.
\blfootnote{We would like to take this opportunity to thank Dr. Helmuth M\"ohring and all other employees of the Reichsstadtmuseum Rothenburg for the great cooperation and the provision of their infrastructure and resources. }

View File

@@ -0,0 +1,123 @@
\section{Particle Filtering}
As described earlier, we use a CONDENSATION particle filter to implement the recursive state estimator described in section \ref{sec:rse}.
A set of $N$ particles is defined by $\{\vec{X}^i_{t}, w^i_{t} \}_{i=1}^N$, where $\mParticleVec^{i}_{t}$ is sampled based on the state transition $p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$.
The weight $w_t^i$ is obtained by the probability density of the state evaluation $p(\mObsVec_{t} \mid \mStateVec_{t})$.
A particle set approximates the posterior as follows:
\begin{equation}
p(\mStateVec_{t} \mid \mObsVec_{1:t}) \approx \sum^N_{i=1} w^i_t \delta_{\vec{X}^i_{t}}(\vec{q}_{t}) \enspace,
\label{eg:monteEstimation}
\end{equation}
\noindent where $\delta_{x_0}(x)$ denotes the Dirac delta mass located at $x_0$.
As one can imagine, after a few iterations with continuously reweighting particles, the weight will concentrate on a few particles only.
To handle this phenomenon of weight degeneracy, a resampling procedure is performed after every filter step \cite{robotics}.
\input{chapters/estimation}
\subsection{Sample Impoverishment}
\label{sec:impo}
As we have extensively discussed in \cite{Fetzer-17}, besides sample degeneracy, particle filters (and nearly all of its modifications) continue to suffer from another notorious problem: sample impoverishment.
It refers to a situation, in which the filter is unable to sample enough particles into proper regions of the building, caused by a high concentration of misplaced particles.
%Such situations are strongly influenced by the resampling step and most of all by restrictive transition models.
As described in section \ref{sec:relatedWork}, sample impoverishment is often a problem of environmental restrictions and system dynamics.
An example using the so far presented approach can be seen in fig. \ref{fig:multimodalPath}.
Due to uncertain measurements, the posterior distribution of the particle filter is captured within a room.
Between time $t-1$ and $t$, the resampling step abandons all particles on the corridor and drawing new particles outside the room is not possible due to the restricted transition.
At this point, standard filtering methods are not able to recover.
%
\begin{figure}[t]
\centering
\def\svgwidth{0.75\columnwidth}
\input{gfx/multimodalPath.eps_tex}
\caption[An example of the occurrence of sample impoverishment.]{
An example of the occurrence of sample impoverishment enhanced by a restrictive transition model that prevents sampling through walls. At time $t-1$ the approximated position (green line) drifts apart from the ground truth (black line) due to uncertain measurements. The posterior distribution is then captured within the room and not able to recover by itself \cite{Fetzer-17}. }
\label{fig:multimodalPath}
\end{figure}
%
%todo: umschreiben weng
The simplest solution to handle sample impoverishment is by drawing a handful new particles randomly in the building.
For this, we add a slight chance of \SI{0.01}{\percent} to the resampling step, so that every particle can be chosen for repositioning instead of the standard procedure.
A new position for those particles is then drawn uniformely from the underlying mesh.
It is obvious that this leads to a higher uncertainty and possibly a multimodal posterior distribution.
Additionally, very uncertain absolute measurements, like attenuated Wi-Fi signals, can cause unpredictable jumps to such a newly drawn position, which would otherwise not be possible.
Especially, methods using relative measurements like pedestrian dead reckoning are losing their importance.
Nevertheless, this method is very easy to implement and we expect that the system should be able to recover from nearly every situation regardless of the cause.
A second method we suggest within this paper is a simplified version of our approach presented in \cite{Fetzer-17}.
Here, we used an additional, very simple particle filter to monitor if our primary (localization) filter suffers from sample impoverishment.
If that is true, both filters are combined by exchanging particles among each other.
This allows the primary filter to recover, while retaining prior knowledge.
However, we believe that such a combination of two independent filters is not necessary for most scenarios and thus the resulting overhead can be avoided.
%neue methode:
For the simplified version we distribute \SI{10000}{} samples uniformly within the complete building to approximate $p(\vec{o}_t \mid \vec{q}_t)_\text{wifi}$ as presented in section \ref{sec:wifi}.
From the resulting probability grid $\probGrid_{t, \text{wifi}}$ we are able to identify the areas where the \docWIFI{} model assumes the pedestrian is most likely located.
Of course, this often results in a multimodal representation of the probability density and thus multiple possible whereabouts.
However, compared to the used particle filter, this representation enables us to monitor the complete building without any environmental restrictions and can thus be deployed as an indicator to detect sample impoverishment.
If $\probGrid_{t, \text{wifi}}$ and the current posterior $p(\mStateVec_{t} \mid \mObsVec_{1:t})$ show a significant difference, we can assume that either the posterior got stuck and suffers from impoverishment or the \docWIFI{} quality is low due to factors like attenuation or bad coverage.
A good measure of how one probability distribution differs from a second is the well-established Kullback-Leibler divergence $D_\text{KL}$ \cite{Fetzer-17}.
To calculate $D_\text{KL}$, we need to sample densities from both probability density functions likewise.
For the posterior we use the results provided by our \del{rapid} kernel density estimation performed in the state estimation procedure, while $\probGrid_{t, \text{wifi}}$ is already in the desired form.
%To handle $D_\text{KL}$ as probability, we use a positive exponential distribution
% \begin{equation}
% f(D_{\text{KL}}, \lambda) = e^{-\lambda D_{\text{KL}}}
% \enspace .
% \label{equ:KLD}
% \end{equation}
%
Using $D_\text{KL}$, we are now able to take countermeasures against sample impoverishment, depending on its size.
However, those countermeasures will only work reliable if the \docWIFI{} measurement noise is within reasonable limits.
Attenuated or bad \docWIFI{} readings are leading $D_\text{KL}$ to grow, even if the posterior provides good results.
For this, we introduce a \docWIFI{} quality factor, enabling us to identify such situations.
The quality factor is defined by
\begin{equation}
\newcommand{\leMin}{l_\text{min}}
\newcommand{\leMax}{l_\text{max}}
q(\mObsVec_t^{\mRssiVec_\text{wifi}}) =
\max \left(0,
\min \left(
\frac{
\bar\mRssi_\text{wifi} - \leMin
}{
\leMax - \leMin
},
1
\right)
\right)
%,\enskip
%\bar\mRssi_\text{wifi} = \frac{1}{n} \sum_{i = 1}^{n} \mRssi_i
\label{eq:wifiQuality}
\end{equation}
\noindent where $\bar\mRssi_\text{wifi}$ is the average of all signal strength measurements received from the observation $\mObsVec_t^{\mRssiVec_\text{wifi}}$. An upper and lower bound is given by $l_\text{max}$ and $l_\text{min}$.
The quality factor is extensively discussed within \cite{Ebner-17} and \cite{Fetzer-17}.
%\commentByMarkus{Nochmal eine second method, meintest du third? wenn nicht versteh ich den Satz hier oder oben nicht}
Finally, we have all necessary tools to implement the second method to prevent impoverishment into the particle filter.
For this, the state transition model is extended.
Compared to the resampling step, as used by the first method, the transition $p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$ enables us to use prior measurements, which is obviously necessary for all \docWIFI{} related calculations.
As described in chapter \ref{sec:transition}, our transition method only allows to sample particles at positions, that are actual feasible for a humans within a building e.g. no walking trough walls.
If a particle targets a position which is not walk-able e.g. behind a wall, we deploy a strategy how to handle this.
For example, drawing a new position within a very small, but reachable area around the particle's current position.
%
%Instead of such a small area or even the complete building, as suggested in method one, we now define a sphere.
To prevent sample impoverishment we extend this transition strategy by making the reachable area depended upon $D_\text{KL}$ and the \docWIFI{} quality factor.
Particles are thus drawn uniformly on a sub-region of the mesh, given by a radius $r_\text{sub} = D_\text{KL} \cdot q(\mObsVec_t^{\mRssiVec_\text{wifi}})$.
The sub-region consists of all walk-able and connected triangles within $r_\text{sub}$, including stairs and elevators.
%\todo{radius ist falsch! all connected triangles... warte aber noch aufs franks transition teil.}
%The radius is given by $D_\text{KL} \cdot q(\mObsVec_t^{\mRssiVec_\text{wifi}})$ and particles are drawn uniformly on the mesh enclosed by the sphere.
This allows to increase the diversity of particles by the means of \docWIFI{}, allowing to ignore any restrictions made by the system, as long as the difference between $\probGrid_{t, \text{wifi}}$ and the posterior is high.
The subsequent evaluation step of the particle filter then reweights the particles, so that only those in proper regions will survive the resampling.
To further improve the method we give particles a chance of \SI{0.01}{\percent} to walk trough a nearby wall, if the destination is not outside.
This enables to handle sample impoverishment more quickly in situations caused by environmental restrictions, even when the \docWIFI{} quality is low.
Especially in areas full of nooks an crannies, the vulnerability to errors should be decreased.
%In most cases $\lambda$ tends to be somewhere between \SI{0.01}{} and \SI{0.10}{}.

View File

@@ -0,0 +1,108 @@
\section{Related Work}
\label{sec:relatedWork}
We consider indoor localization to be a time-sequential, non-linear and non-Gaussian state estimation problem.
Such problems are often solved using Bayesian filters, which update a state estimation recursively
with every new incoming measurement.
A powerful group of methods to obtain numerical results for this approach are particle filter.
In context of indoor localization, particle filter approximate a probability distribution describing the pedestrian's possible whereabouts by using a set of weighted random samples (particles).
Here, new particles are drawn according to some importance distribution, often represented by the state transition, which models the dynamics of the system.
%\todo{statt dynamics of the system vlt: the pedestrian's movement?}
Those particles are then weighted by the state evaluation given different sensor measurements.
A resampling step is deployed to prevent that only a small number of particles have a significant weight \cite{chen2003bayesian}.
Most localization approaches differ mainly in how the transition and evaluation steps are implemented and the sensors are incorporated \cite{Fetzer-16, Ebner-16, Hilsenbeck2014}.
%\todo{hier ist irgendwie ein harter cut zu dem nächsten satz}
%Additionally, within this paper we present a method, which is designed to run solely on a commercial smartphone.
%In its most basic form, the state transition is given by.. einfach distanz und heading.. intersection with walls usw.
%\todo{nochmal mit frank klären was wir jetzt GENAU machen.}
The system's dynamics describe a pedestrian's potential movement within the building.
This can be formulated as the question \emph{``Given the pedestrian's current position and heading are known, where could he be after a certain amount of time?''}.
Obviously, the answer to this question depends on the pedestrian's walking behavior, any nearby architecture and thus the building's floorplan.
%
Assuming the pedestrian to walk almost straight towards his current heading with a known, constant walking speed, the most basic form of state transition simply rejects all movements, where the line-of-sight between current position and potential destination is blocked by an obstacle \cite{Ebner-15}.
%
Despite its simplicity, this approach suffers from several drawbacks.
The intersection-test can be costly, depending on the number of used particles and the complexity of the building.
Furthermore, it is limited mainly to 2D transitions within the plane.
Smooth 3D transitions, like walking stairs, would require much more complex intersection tests \cite{Afyouni2012}.
To overcome both limitations, the building's floorplan can be used to derive a graph-based structure, like voronoi diagrams or fixed-distance grids, moving all costly intersection tests into a one-time offline phase \cite{Ebner-16, Hilsenbeck2014}.
Hereafter, graph-based random walks along the created data-structure can be used as a fast transition approximation.
Smooth transitions in 3D space can be achieved by generating nodes and edges along stairs and elevators.
Furthermore, the nodes can be used to store additional information, like their distance towards a pedestrian's desired destination.
Such information can be included during the transitions step, \eg{} increasing the likelihood of all potential movements that approach this destination \cite{Ebner-16}.
However, the graph-based approach also imposes some potential issues. When using a gridded graph, the spacing between adjacent
nodes directly represents the transition's accuracy. Likewise, the amount of required memory to represent the floorplan
scales about quadratically with this spacing. Even though nodes/edges are only created for actually walkable areas (like a sparse cube),
large buildings require millions of nodes and might not fit into memory at once.
Furthermore, (large) outdoor regions between adjacent buildings require unnecessarily large amounts
of memory to be modeled \cite{Afyouni2012}. While voronoi diagrams have the ability to mitigate this issue to some degree,
they usually suffer from reduced accuracy for large open spaces, as many implementations only use the edges to estimate potential movements \cite{Hilsenbeck2014}.
We therefore present a novel technique based on continuous walks along a navigation mesh.
Like the graph, the mesh, consisting of triangles sharing adjacent edges,
is created once during an offline phase, based on the building's 3D floorplan.
Using large triangles reduces the memory footprint dramatically (a few megabytes for large buildings)
while still increasing the quality (triangle-edges directly adhere to architectural-edges) and allows
for truly continuous transitions along the surface spanned by all triangles.
%eval - wifi, fingerprinting
The outcomes of the state evaluation process depend highly on the used sensors.
Most smartphone-based systems are using received signal strength indications (RSSI) given by \docWIFI{} or Bluetooth as a source for absolute positioning information.
At this, one can mainly distinguish between fingerprinting and signal-strength prediction model based solutions \cite{Ebner-17}.
Indoor localization using \docWIFI{} fingerprints was first addressed by \cite{radar}.
During a one-time offline-phase, a multitude of reference measurements are conducted.
During the online-phase the pedestrian's location is then inferred by comparing those prior measurements against live readings.
Based on this pioneering work, many further improvements where made within this field of research \cite{PropagationModelling, ProbabilisticWlan, meng11}.
However, despite a very high accuracy up to \SI{1}{\meter}, fingerprinting approaches suffer from tremendous setup- and maintenance times.
Using robots instead of human workforce might thus be a viable choice, still this seems not to be a valid option for old buildings with limited accessibility due to uneven grounds and small stairs.
%wifi, signal strength
Signal strength prediction models are a well-established field of research to determine signal strengths for arbitrary locations by using an estimation model instead of real measurements.
While many of them are intended for outdoor and line-of-sight purposes \cite{PredictingRFCoverage, empiricalPathLossModel}, they are often applied to indoor use-cases as well \cite{Ebner-17, farid2013recent}.
Besides their solid performance in many different localization solutions, a complex scenario requires an equally complex signal strength prediction model.
As described in section 1, historical buildings represent such a scenario and thus the model has to take many different constraints into account.
An example is the wall-attenuation-factor model \cite{PathLossPredictionModelsForIndoor}.
It introduces an additional parameter to the well-known log-distance model \cite{IntroductionToRadio}, which considers obstacles between (line-of-sight) the access point (AP) and the location in question by attenuating the signal with a constant value.
Depending on the use-case, this value describes the number and type of walls, ceilings, floors etc. between both positions.
For obstacles, this requires an intersection-test of each obstacle with the line-of-sight, which is costly for larger buildings.
Thus \cite{Ebner-17} suggests to only consider floors/ceilings, which can be calculated without intersection checks and allows for real-time use-cases running on smartphones.
%wifi optimization
To further reduce the setup-time, \cite{WithoutThePain} introduces an approach that works without any prior knowledge.
They use a genetic optimization algorithm to estimate the parameters for a signal strength prediction, including access point positions, and the pedestrian's locations during the walk.
The estimated parameters can be refined using additional walks.
Within this work we present a similar optimization approach for estimating the AP's location in 3D.
However, instead of taking multiple measuring walks, the locations are optimized based only on some reference measurements, further decreasing the setup-time.
Additionally, we will show that such an optimization scheme can partly compensate for the above abolished intersection-tests.
%immpf
Besides well chosen probabilistic models, the system's performance is also highly affected by handling problems which are based on the nature of \add{a} particle filter.
They are often caused by restrictive assumptions about the dynamic system, like seen from the aforementioned problem of sample impoverishment.
The authors of \cite{Sun2013} handled the problem by using an adaptive number of particles instead of a fixed one.
The key idea is to choose a small number of samples if the distribution is focused on a small part of the state space and a large number of particles if the distribution is much more spread out and requires a higher diversity of samples.
The problem of sample impoverishment is then addressed by adapting the number of particles dependent upon the system's current uncertainty \cite{Fetzer-17}.
%\commentByFrank{ich glaube encountered ist das falsche wort. du willst doch auf 'es wird gefixed' raus, oder? addressed? mitigated?}
In practice, sample impoverishment is often a problem of environmental restrictions and system dynamics.
Therefore, the method above fails, since it is not able to propagate new particles into the state space due to environmental restrictions e.g. walls or ceilings.
In \cite{Fetzer-17} we deployed an interacting multiple model particle filter (IMMPF) to solve sample impoverishment in such restrictive scenarios.
We combine two particle filter using a non-trivial Markov switching process, depending upon the Kullback-Leibler divergence between both.
However, deploying an IMMPF is in many cases not necessary and produces additional processing overhead.
Thus, a much simpler, but heuristic method is presented within this paper.
%estimation
Finally, as the name recursive state estimation says, it requires to find the most probable state within the state space, to provide the "best estimate" of the underlying problem.
In the discrete manner of a particle representation this is often done by providing a single value, also known as sample statistic, to serve as a best guess \cite{Bullmann-18}.
Examples are the weighted-average over all particles or the particle with the highest weight.
However, in complex scenarios like a multimodal representation of the posterior, such methods fail to provide an accurate statement about the most probable state.
Thus, in \cite{Bullmann-18} we present a \del{rapid computation} \add{approximation} scheme of kernel density estimates (KDE).
Recovering the probability density function using an efficient KDE algorithm yields a promising approach to solve the state estimation problem in a more profound way.

View File

@@ -0,0 +1,39 @@
\section{Recursive State Estimation}
\label{sec:rse}
We consider indoor localization to be a time-sequential, non-linear and non-Guassian state estimation problem.
The filtering equation to calculate the posterior is given by the recursion
\begin{equation}
\arraycolsep=1.2pt
\begin{array}{ll}
&p(\mStateVec_{t} \mid \mObsVec_{1:t}) \propto\\
&\underbrace{p(\mObsVec_{t} \mid \mStateVec_{t})}_{\text{evaluation}}
\int \underbrace{p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})}_{\text{transition}}
\underbrace{p(\mStateVec_{t-1} \mid \mObsVec_{1:t-1})d\vec{q}_{t-1}}_{\text{recursion}}
\end{array}
\enspace ,
\label{equ:bayesInt}
\end{equation}
\noindent where $\mStateVec_t$ is the hidden state and $\mObsVec_t$ provides the corresponding observation vector at time $t$.
As realization of \eqref{equ:bayesInt} we use the well-known CONDENSATION particle filter \cite{Isard98:CCD}.
Here, the transition is used as proposal distribution and a resampling step is utilized to handle the phenomenon of weight degeneracy.
The state $\mStateVec$ is given by
\begin{equation}
\mStateVec = (x, y, z, \mStateHeading),\enskip
x, y, z, \mStateHeading \in \R \enspace,
\end{equation}
\noindent where $x, y, z$ represent the position in 3D space and $\mStateHeading$ is the user's current (absolute) heading.
In context of particle filtering, a particle is thus a weighted representation of one possible state $\mStateVec$.
The observation vector is defined as
\begin{equation}
\mObsVec = (\mRssiVec_\text{wifi}, \mObsHeading, \mObsSteps, \mObsActivity) \enspace .
\end{equation}
\noindent Here, $\mRssiVec_\text{wifi}$ contains the signal strength measurements of all \docAP{}s currently visible to the phone. $\mObsHeading$ provides the relative angular change and $\mObsSteps$ the number of steps since the last filter-step.
The result of a simple activity recognition using the phone's barometer and acceleromter is given by $\mObsActivity$, which is one of: "standing", "walking", "walking up" or "walking down".

View File

@@ -0,0 +1,139 @@
\section{Transition}
\label{sec:transition}
\begin{figure}[t]
\centering
\begin{subfigure}{0.325\textwidth}
\centering
\includegraphics[width=5.1cm]{gfx/transition/museumMap.pdf}
\caption{3D Floorplan}
\label{fig:museumMap}
\end{subfigure}
\begin{subfigure}{0.325\textwidth}
\centering
\includegraphics[width=5.1cm]{gfx/transition/museumMapGrid.pdf}
\caption{Navigation graph}
\label{fig:museumMapGrid}
\end{subfigure}
\begin{subfigure}{0.325\textwidth}
\centering
\includegraphics[width=5.1cm]{gfx/transition/museumMapMesh.pdf}
\caption{Navigation mesh}
\label{fig:museumMapMesh}
\end{subfigure}
\caption{
Floorplan and transition data structures for the ground floor of the building (\SI{71}{\meter}~x~\SI{53}{\meter}).
To reach every nook and cranny, the graph based approach (b) requires many nodes and edges.
The depicted version uses a coarse node-spacing of \SI{90}{\centi\meter} (1700 nodes) and barely reaches all doors and stairs.
A navigation mesh (c) requires only 320 triangles to tightly reach every corner within the building.
}
\label{fig:transition}
\end{figure}
Within previous works, we used a graph of equidistant nodes (see \reffig{fig:museumMapGrid})
to model the buildings floorplan, representing the basis for the transition step \cite{Ebner-15, Ebner-16}.
% in 15 und 16 haben wir stueckweise den graph eingefuhert
%
The graph equals a grid, where each node constitutes the center of a grid-cell.
Cells, usually around \SI{30} x \SI{30}{\centi\meter} in size,
are only placed in regions that are actually walkable and not intersected by any walls
or other obstacles. After placement, each cell is connected with their, up to 8, potential
neighbors in the plane, creating a walkable graph for each floor. The resulting graphs are
hereafter connected via stairs or elevators, to form the final data structure
for the whole building.
This allowes for (semi-)random walks along the graph, by assigning probabilities to each edge,
using prior knowledge provided by sensors, forming the transition probability
$p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$ \cite{Ebner-16}.
Due to the equidistant spacing, the resulting graph was rather rigid and
only well-suited for rectangular buildings. For more contorted buildings, like many
historic ones, the node-spacing needs to be small, to reliably reach every door, stair
and corner of the building. Within \reffig{fig:museumMapGrid} we used a
\SI{90}{\centi\meter} spacing, that is barely able to reach all places within
the lower floors of the building, and failing to connect the upper floors reliably.
While using smaller spacings remedies the problem, it requires huge amounts of memory:
up to several hundred megabytes and millions of nodes and edges to model a single building.
% musuem aus figure: 90cm grid : ca 2000 nodes, ca 6500 edges
% museum aus figure: 30cm grid : ca 32k nodes und 120k edges
% museum ganz, 20cm grid : ca 75k nodes, 280k edges
Because of both, required memory amounts and inaccuracies of the graph-based
model, we developed a new basis for the transition step, that is still able to answer
$p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$.
The new foundation is provided by well-known navigation meshes \cite{navMesh1}
where the walkable area is spanned by convex polygons, sharing
their outline edges. Each polygon knows its adjacent
neighbors, creating a walkable mesh.
Using variable shaped/sized elements instead of rigid grid-cells
provides both, higher accuracy for reaching every corner, and a reduced
memory footprint as a single polygon is able to cover arbitrarily
large regions. However, polygons impose several drawbacks on
common operations used within the transition step, like checking whether
a point is contained within some region. This is much more costly for polygons
compared to grid-cells, which are axis-aligned rectangles.
% museum aus figure: 305 3-ecke
% museum ganz : 789 fuer alles
%
Such issues can be mitigated by using triangles instead of polygons, depicted within \reffig{fig:museumMapMesh}.
Doing so, each element within the mesh has exactly three edges and a maximum of three neighbors.
While this usually requires some additional memory, as more triangles are need compared to polygons,
operations, such as aforementioned contains-check, can now easily be performed,
\eg{} by using barycentric coordinates.
\newcommand{\turnNoise}{\mathcal{T}}
\newcommand{\stepSize}{\mathcal{S}}
This data structure yields room for various strategies to be applied within the transition step.
The most simple approach uses an average pedestrian step size together with the
number of detected steps $\mObsSteps$ and change in heading $\mObsHeading$
gathered from sensor observations $\mObsVec_{t-1}$.
Combined with previously estimated position $(x,y)^T$ and heading $\mStateHeading$
%from $\mStateVec_{t-1}$
, including uncertainties for step-size $\stepSize$
and turn-angle $\turnNoise$,
this directly defines new potential whereabouts
$p(\mStateVec_{t} \mid \mStateVec_{t-1}, \mObsVec_{t-1})$:
\begin{equation}
\begin{aligned}
x_t &=& \overbrace{x_{t-1}}^{\text{old pos.}}& & &+& \overbrace{\mObsSteps \cdot \stepSize}^{\text{distance}}& & &\cdot& \overbrace{\cos(\mStateHeading_{t})}^{\text{direction}}& & ,\enskip \turnNoise &\sim \mathcal{N}(\mObsHeading, \sigma_\text{turn}^2) \\
y_t &=& y_{t-1}\phantom{.}& & &+& \mObsSteps \cdot \stepSize& & &\cdot& \sin(\mStateHeading_{t})& & ,\enskip \stepSize &\sim \mathcal{N}(\SI{70}{\centi\meter}, \sigma_\text{step}^2) \\
\mStateHeading_{t} &=& \mStateHeading_{t-1} + \turnNoise\\
\end{aligned}
\end{equation}
\noindent{}with
\begin{equation*}
\mObsSteps,\mObsHeading \in \mObsVec_{t-1}
\enskip\enskip\enskip
\text{and}
\enskip\enskip\enskip
x_{t-1},y_{t-1},\mStateHeading_{t-1} \in \mStateVec_{t-1}
\enskip.
\end{equation*}
Whether the newly obtained destination $(x_t, y_t)^T$ is actually reachable from the start $(x_{t-1}, y_{t-1})^T$ can be determined
by checking if their corresponding triangles are connected with each other.
If so, the corresponding $z_t$ can be interpolated using the barycentric coordinates of $(x_t, y_t)^T$
within a 2D projection of the triangle the position belongs to and applying them to the original 3D triangle.
If the destination is unreachable,
\eg{} due to walls or other obstacles. Those occurrences demand for different handling strategies. Simply trying again might
be a viable solution, as uncertainty induced by $\turnNoise$ and $\stepSize$ will yield a slightly different destination
that might be reachable. Increasing $\sigma_\text{step}$ and $\sigma_\text{turn}$ for those cases might also be a viable choice.
Likewise, just using some random position, omitting heading/steps might be viable as well.
The detected steps $\mObsSteps$ and the heading change $\mObsHeading$ are obtained using the smartphone's IMU.
To provide a robust heading change, we first need to rotate the gyroscope onto the east-north-up frame using a suitable transformation matrix.
After the rotation, integrating over the gyros $z$-axis for a predefined time interval provides the users heading change (yaw) \cite{Ebner-15}.
To obtain the matrix in the first place, we assume that the acceleration during walking is cyclic and thus the average acceleration over several cycles has to be almost zero.
This enables to measure the direction of gravity and use it to construct the transformation matrix.
It should be noted, that especially for cheap IMUs, as they can be found in most smartphones, the matrix has to be updated at very short intervals of one or two seconds to preserve good results \cite{davidson2017survey}.
To receive the number of steps, we use a very simple step detection based on the accelerometer magnitude.
For this, we calculated the difference between the average magnitude over the last \SI{200}{\milli\second} and the gravity vector.
If this difference is above a certain threshold ($> \SI{0.32}{\m\per\square\s}$), a step is detected.
To prevent multiple detections within an unrealistic short interval, we block the complete process for \SI{250}{\milli\second} \cite{Koeping14}.
Of course, there are much more advanced methods as surveyed in \cite{davidson2017survey}, however this simple method has served us very well in the past.
%\commentByFrank{es gaebe noch ganz andere ansaetze etc. aber wir haben wohl nicht mehr genug platz :P}
%\commentByToni{ich denke aber auch, es langt.}