# Integration of Directional Antennas in an RSS Fingerprinting-Based Indoor Localization System
## 3 Proposed Indoor Localization System  
The block diagram of the proposed system is basically composed of three blocks, as illustrated in Figure 1: (1) the physical layer, where the RSS is captured by the sensor reader (SR) network and managed by the sensor network coordination middleware (SNCM); (2) the localization server, in which the RSS data are processed in order to obtain the final position of the tag; and (3) the end user application block, which represents end users. Herein, context-aware applications demand the location information to be employed by LBSs.  
The sensor network consists of a set of \(K\) sensor readers (SRs) placed at different fixed locations throughout the scenario. These devices are in charge of capturing the RSS from the beacons transmitted by the tag, which can be located in some of the \(M\) rooms or areas of interest (\(R\) = {\(R_{1}\),...,\(R_{i}\),...\(R_{M}\)}) into which the scenario was previously divided. Then, the tags whose position is desired will periodically send \(N\) beacons, and their RSS will be captured by the SRs. Each \(k\)-th SR creates an RSS vector with \(N\) components, corresponding to each transmitted beacon: \(S\) = {\(S_{1}\),...,\(S_{j}\),...\(S_{N}\)}. The captured RSS vector is organized by the SNCM layer, guaranteeing data integrity and generating a final \(N\times K\) RSS data matrix, which will be forwarded to the localization server (second block) to infer the tag position.  
Figure 1: Block diagram of the proposed RSS-based indoor localization system (ILS).  
The localization server is mainly responsible for estimating the room ID (\(R_{i}\)) where the tag is positioned. This localization engine constitutes the fundamental part of this block and consists of a two-layered architecture, which sequentially processes the RSS data matrix generated by the SNCM in the physical layer to estimate the most probable room where the tag might be located. The first layer corresponds to a pre-processing of the raw data and basically filters out outliers and averages the captured RSS data from each SR. After the pre-processing, the classifier layer, including the localization algorithm (an ANN, as will be seen), processes the averaged RSS and infers the room ID. Furthermore, a database is integrated with the server. This is employed to store all of the information related to the radio map fingerprints, system configuration and parameters related to the artificial neural network (ANN). The indoor localization system manager is the software tool supported by the server, implemented in C# and MATLAB. This program allows one to control the whole system, configuration, tag parameters, calibration process, ANN training, _etc._, giving flexibility and agility to manage the system offline phase (deployment, radio map generation and system calibration) and the experimental tests easily, as will be shown in the next sections.  
Finally, this information will be accessed by the context-aware services when demanded by the end users, in the third block. Therefore, the system can be seen as a platform to provide positioning information to support different context-aware applications (tracking, surveillance, assets control, _etc._).