# RSSI and Device Pose Fusion for Fingerprinting-Based Indoor Smartphone Localization Systems
## 3 Methodology
### Cascaded Neural Network Implementation of Proposed Framework  
As mentioned earlier, the conceptual framework of this method, which uses device-pose identification with RSSI for localization, can be implemented using any pattern recognition algorithm. This subsection describes a cascaded neural network implementation of the proposed framework, which is one possible realization of the framework. The results of this cascaded neural network implementation are given in Sections 4.3 and 4.4. Results for cascaded K-Nearest Neighbor and Naive Bayes implementations of the framework are also given in Section 4.5 to show the flexibility of the technique. It is stressed again that the proposed framework (i.e., classifying then combining the phone's device pose with the RSSI data) is general, and the optimization of the algorithmic technique to implement this framework (e.g., SVM, ensemble learning, CNN, etc. ), which could possibly improve accuracy further, was not studied as it was outside the scope of this paper and would require an in-depth study in its own right. Neural networks were chosen to implement and study the framework for two reasons:  
* Because the RF-fingerprinting localization approach and phone's device pose identification are both fundamentally pattern recognition problems, machine learning classifiers and in particular neural networks were a prime choice for implementation due to their robustness and generalization capabilities with noisy and uncertain data. The trends in the literature also indicate their increased adoption for indoor localization [2]. * The universal approximation theorem [21] for neural networks implies that a single hidden layer neural network with enough neurons can approximate any hyperfunction to an arbitrarily high accuracy, thereby forming arbitrary decision boundaries in the classification input space. Because the proposed framework changes the input data vector for classification, this makes neural networks a good candidate to evaluate the effect. The RSSI measurement from all N anchors at a particular time can be considered an N-dimensional vector \(\vec{r}=\langle r_{1},r_{2},\ldots,r_{N}\rangle\). Each RSSI measurement vector \(\vec{r}_{i}\) at the \(i\)th time corresponds to an element in the set of ground-truth zone labels \(Y=\{Y_{1}=Zone1,\ldots,Y_{M}=ZoneM\}\), which relate to M zones of interest in the region's fingerprint map. Similarly, the 3-axis accelerometer measurement vector \(\vec{a}_{i}=\left\langle a_{x},a_{y},a_{z}\right\rangle\), which is received at the \(i\)th time instance, corresponds to an element in the set of K  
Figure 3: Proposed framework overview. ground-truth device pose labels \(X=\{X_{1}=DevicePose1,\ldots,X_{K}=DevicePoseK,\ldots\}\). The output vector \(\vec{O}_{i}=\langle P(X_{1}),P(X_{2}),\ldots,P(X_{K})\rangle\) of the device pose neural network denotes the probability of \(\vec{a}_{i}\) belonging to the \(k\)th device pose class, and the output vector \(\vec{L}_{i}=\langle P(Y_{1}),P(Y_{2}),\ldots,P(Y_{M})\rangle\) of the localization neural network denotes the probability of \(\vec{r}_{i}\) belonging to the \(m\)th location. The difference between how an RSSI-only and an RSSI-and-device-pose localization neural network would perform zoning classification can be explained as follows:  
* RSSI-and-device-pose: In order to combine the device pose and RSSI data, a neural network was trained using the accelerometer data to produce a device pose classification (neural network on the left in Figure 4), and we added this binary output classification vector as additional dimensions to the RSSI vector (thus, \(\vec{r}_{i}=\left\langle r_{1},r_{2},\ldots,r_{N},softmax\left(\vec{O}_{i} \right)\right\rangle\)). This projects the RSSI measurements from the different device poses onto orthogonal dimensions in the input space for the localization neural network. A second neural network (the neural network on the right in Figure 4) was then used on the combined RSSI-and-device-pose input vectors to produce the location output.