finished wifi. some todos left

This commit is contained in:
toni
2018-05-17 11:47:26 +02:00
parent a184c5af00
commit 64548fcc21
6 changed files with 166 additions and 28 deletions

View File

@@ -1,21 +1,123 @@
\section{Evaluation}
3/4 - 1 Seite
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 and are statistical independent.
The barometer 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{Wifi}
\subsection{\docWIFI{}}
\begin{itemize}
\item kleine Wifi Beacons
\item optimimierung der ap positionen über schätzverfahren cite cite cite
\item log dist model. können wir auch wieder viel citen.
\item da vorher nie erwähnt, ggf. bisschen was über VAPGrouping.
\end{itemize}
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
\subsection{Barometer}
\begin{itemize}
\item activity recognition über barometer
\item rauf/runter/treppe/aufzug etc. pp.
\end{itemize}
\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_{i,\mPosVec}^2)
\enskip ,
\label{eq:wifiProb}
\end{equation}
\noindent where $\mu_{i,\mPosVec}$ denotes the (predicted) average signal strength and $\sigma_{i,\mPosVec}^2$ a corresponding standard deviation for the \docAPshort{} identified by $i$, regarding the location $\mPosVec$.
Within this work $\mu_{\mPosVec}$ is calculated by a modified version of the wall-attenuation-factor model as presented in \cite{Ebner-17}. Here, the prediction depends on the 3D distance $d$ from the \docAPshort{} and the number of floors $\Delta f$ between the \docAPshort{} and $\mPosVec$ of the particle-in-question:
\begin{equation}
\mu_{\mPosVec} = \mTXP - 10 \mPLE \log_{10}{\frac{\mMdlDist}{\mMdlDist_0}} + \Delta{f} \mWAF
\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, 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 a 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 position.
The optimization is based on a few reference measurements $s_{\mPosVec}$ 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
\begin{equation}
\epsilon^* =
\argmin_{\mPosAPVec, \mTXP, \mPLE, \mWAF}
\sum_{s_{\mPosVec} \in \vec{s}}
(s_{\mPosVec} - \mu_{\mPosVec})^2
\enskip,\enskip\enskip
\mu_{\mPosVec} =
\mTXP{} + 10 \mPLE{} \log_{10} \| \mPosVec-\mPosAPVec \| + \text{floors}(\mPosVec,\mPosAPVec) \mWAF{}
\enspace .
\label{eq:optTarget}
\end{equation}
\noindent Here, one reduces the squared error between reference measurements $s_{\mPosVec} \in \vec{s}$ with well-known location $\mPosVec$ and corresponding model predictions $\mu_{\mPosVec}$ (cf. eq. \eqref{eq:wallAtt}).
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.
\todo{Wollen wir das mal genauer beschreiben? Also wie genau funktioniert das cooling. Das ist ja alles sehr wischi waschi gehalten}
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 \docAPshort{} providing RSSI measurements can be used for the above.
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 also allows to distribute beacons in the whole building by just plugging them into available power outlets.
\subsection{Activity Recognition}
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.
\todo{fill me}
All this is evaluated within $p(\vec{o}_t \mid \vec{q}_t)_\text{act}$ by providing a probability based on whether a particle is located at a stair, an elevator or the floor.
If the current activity $\mObsActivity$ is recognized as "standing", a particle located on the floor receives a probability given by $\kappa$, otherwise $1 - \kappa$.
The same applies to "walking up" and "walking down", here a particle located on one of the possible staircases or elevators receives $\kappa$ and those who remain on the floor $1 - \kappa$.
The probability $\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 particle filter to be stuck on a staircase or to be unable to change floors.
\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

@@ -17,6 +17,3 @@
wir experimentieren auf allen vieren.

View File

@@ -1,4 +1,5 @@
\section{Introduction}
\label{sec:intro}
Setting up a 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.
@@ -9,6 +10,8 @@ The first 300 years, the building was initially used as a convent, and, after th
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.
\todo{Bild vom Museum?}
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}.
There is also a higher chance of detecting false or misplaced turns, what can cause the position estimation to lose track or getting stuck within a demarcated area.
Thus, this paper presents a very robust but realistic movement model using a three-dimensional navigation mesh based on triangles.

View File

@@ -18,7 +18,7 @@ The filtering equation to calculated the posterior is given by the recursion
\end{equation}
%
where $\mState$ is the hidden state and $\mObs_t$ provides the corresponding observation vector at time $t$.
As realization of \eqref{equ:bayesInt} we use the well-known CONDENSATION algorithm \cite{Isard98:CCD}.
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 $\mState$ is given by
@@ -36,6 +36,6 @@ The observation vector is defined as
\end{equation}
%
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 is given by $\mObsActivity$, which is one of: unknown, standing, walking, walking up the stairs or walking down the stairs.
The result of a simple activity recognition using the phone's barometer is given by $\mObsActivity$, which is one of: standing, walking, walking up or walking down.

View File

@@ -1737,6 +1737,18 @@ Indoor Localisation}},
pages={1-8},
}
@article{Ebner-17,
author = {Ebner, Frank and Fetzer, Toni and Deinzer, Frank and Grzegorzek, Marcin},
title = {{On Wi-Fi Model Optimizations for Smartphone-Based Indoor Localization}},
journal = {ISPRS International Journal of Geo-Information},
volume = {6},
year = {2017},
month = {August},
number = {8},
issn = {2220-9964},
doi = {10.3390/ijgi6080233}
}
@book{condon1967handbook,
title={Handbook of physics},
author={Condon, E.U. and Odishaw, H.},
@@ -2873,12 +2885,6 @@ year = {2003}
issn = {}
}
@article{Ebner-17,
author={F. Ebner and T. Fetzer and F. Deinzer and M. Grzegorzek},
journal={{IMWUT}},
title={{On Wi-Fi Optimizations for Smartphone-based Indoor Localization}},
year={2017, submitted},
}
@INPROCEEDINGS{Fetzer-17,
author={T. Fetzer and F. Ebner and F. Deinzer and M. Grzegorzek},
@@ -2915,4 +2921,34 @@ address = {{Rothenburg, Germany}},
note={under review}
}
@book{goldberg89,
added-at = {2017-04-11T02:23:13.000+0200},
author = {Goldberg, D. E.},
biburl = {https://www.bibsonomy.org/bibtex/2af6ec8ef88eb576d7ecc8ac3a84126a3/geovani},
interhash = {79bb58f1d9d57b042cf0f771784d4adb},
intrahash = {af6ec8ef88eb576d7ecc8ac3a84126a3},
keywords = {},
owner = {gregor},
publisher = {Addison-Wesley},
timestamp = {2017-04-11T02:23:13.000+0200},
title = {Genetic Algorithms in Search, Optimization, and Machine Learning},
year = 1989
}
@ARTICLE{Kirkpatrick83optimizationby,
author = {S. Kirkpatrick and C. D. Gelatt and M. P. Vecchi},
title = {Optimization by simulated annealing},
journal = {SCIENCE},
year = {1983},
volume = {220},
number = {4598},
pages = {671--680}
}
@misc{Wemos,
title = {{WEMOS Electronics}},
note = {\url{https://www.wemos.cc/}, Accessed: 2018-03-22},
address = {{Rothenburg, Germany}},
}

View File

@@ -11,11 +11,11 @@
\newcommand{\mRssi}{\ensuremath{s}} % client's signal-strength measurement
\newcommand{\mMdlRSSI}{\ensuremath{\varsigma}} % model's signal-strength
\newcommand{\mPosAP}{\varrho} % char for access point position vector
\newcommand{\mPos}{\rho} % char for positions
\newcommand{\mPosAP}{\hat\varrho} % char for access point position vector
\newcommand{\mPos}{\varrho} % char for positions
\newcommand{\mPosVec}{\vec{\mPos}} % position vector
\newcommand{\mPosAPVec}{\vec{\mPosAP}} % AP position vector
\newcommand{\mRssiVec}{\vec{s}} % client signal strength measurements
\newcommand{\mState}{q} % state variable