The Locator Framework for Detecting Movement Indoors

,


Introduction
Determing the movement, location and activity of individuals indoors is an active area of research (Vance et al., 2010;Vance et al., 2011).Determining movement is important within vertical markets such as tracking company assets, gaming, supply chain, manufacturing, elderly care monitoring, fire fighting, entertainment and security.The ability to use existing wireless infrastructures for the tracking of individuals makes it feasible to roll-out cost-effective tracking sytems within these vertical markets.Location determination can be categorized as either active or passive (Furey et al., 2008a).Examples of such approaches are common and have differing qualaties and benefits depending on the use case, acess to sensors and granuality of accucacy required (Bekris et al., 2002).An active tracking system requires participants to carry on their person an electronic tracking device e.g.mobile, sensor, e-badge, laptop, smartwatch which communicates with the infrastructure.This does offer the ability of two-way communication and in some cases a certain amount of processing which could be considered similar to the Edge Computing Paradigm.A passive localization approach does not require any on-body devices but relies on the infrastructure sensing changes in the signal values which within certain thresholds can be determined to indicate movement.These are known as Device Free Passive Localisation (DfPL) systems and work by sampling the signal strength variances in the wireless network (Deak et al., 2010).An underlying enabler for this device free person movement detection is due to the human body being composed of 70% water which resonates at 2.4 GHz which of course if the frequency with which 802.11 WiFi networks can work at.Here the human's body acts as an absorber and attenuates the WiFi signal.
Examples of where indoor location deterimation technology can be applied include: ISSN: 1693-6930  Stream a Framework for Detecting Movement Indoors (Kevin Curran) 391 a. Keeping tabs on the elderly.Here patients can be equipped with bracelets or sensors with acceloromers which can detect falls or when they wander outside predetermined safe zones.There is also the ability to track their movement over time which provides an early warning system.Tracking with WiFi is also less intrusive than camera-based systems and augmenting older people's homes with non-intrusive tracking solutions can allow them to live in the community longer.b.Fire fighting.Fire fighters can enter large buildings and it is important to be able to determine where each fire fighter is and in which zone.Indoor tracking solutions can work alongside fire fighters to increase the safety of this occupation.c.Gaming.There are many scenarios where being able to accurately track people moving inside a building can be augmented with mobile apps to provide a more immersive engaging experience.Location and accurate detection of movement has been shown to be an additive combination as shown in the popular Pokemon Go Augmented app.d.Security.Passive localization tracking systems especially provide a potential benefit to intruder detection.If the thresholds are properly set, movement detection can be sensed by the network thus providing an early warning or secondary source of alert to security personnel.
The next part provides an overview of passive and active movement detection approaches.

The Technology behind Pinpointing Users Indoors
The key enabler of detecting movement using wireless networks is the Received Signal Strength Indicator (RSSI) (Furey et al., 2011e).RSSI is a relative measurement using within the wireless network chip to determine the signal quality between an access point and a communicating target.RSSI measurements will result in an estimation of the distance of the target.The more measurements, the more accurate the hardware, stability in weather and the isolation of external electromagnetic interference will all contribute to more accurate results.
An important aspect when measuring RSSI is power attenuation due to distance.It must be noted however that absorption gradient will affect any RSSI measurements.Other factors such as walls, doors, direction of antenna, manufacturer wifi cards, other humans & large obstacle will bring discontinuities between RSSI and the distances to be measured (Nafarieh & How, 2008).RSSI values are recorded as percentages or non-dimensional numbers which frequently get converted to DBm through nonlinear mappings (Bardwell, 2005).The problem here however is that each manufacturer uses a proprietary mapping for their cards.Examples invlude Cisco WiFi cards which follow a table for conversion with higher granularity, and Atheros WiFi cards which use a lower resolution mapping (Bardwell, 2002).It is more ideal if the entire wireless infrastructure consists of single manufacturers products.The error caused by different types of WLAN cards can be around 20% which is a considerable error value (Furey et al., 2010b).
It is important therefore when conducting experiments which rely on RSSI measurements that the antenna positioning & orientation along with dBm mappings are controlled.Antenna orientation can lead to variances of up to 10 dBm in RSSI which is a considerable variance given the limitations inherent in determing movement through the same dBm measurements (Furey et al., 2008a).Other aspects which will affect the accuracy of measurments are the existence of other people in the area.This results in the received signal strength becoming absorbed when other humans obstruct the signal which leads to additional attenuation (Carlin & Curran, 2014).
Next, we outline the main active location tracking technologies for indoor environments.

RFID Tracking
Radio Frequency Identification (RFID) is a wireless technology used in areas like entering buildings or carparks, asset management and tracking wildlife.RFID works through tadio signals transmitted between tags & RFID readers.The RFID reader contain much functionality than the tags.The readers have an antenna and a transceiver, power supply, processor and network interface.Each RFID tag is composed of an antenna, transceiver, memory & unique ID.They can be classified as either active or passive tags.Passive tags do not contain a power source but are rather activated by the reader in a neat backscatter energy technique.Active tags however can contain power (e.g.batteries) which enable them to be scanned at greater distance (e.g.typically 1-30meters).The integration of batteries does tend to lead to larger tags and an increase in costs.Some active tags offer 10 years battery life.In detecting movement of people, the most common scenario is to place RFID readers at the portals to room so that the process of obtaining access through the RFID tag also doubles as a recording of movement through the portal.RFID tracking systems can therefore monitor attendance via such techniques.It is a rather crude tracking however and can only determine a person's location at room or building level.
Active RFID tags possess unique identifierd which enable tracking each second so long of course as they can interact with the reader.There are generally power saving features enabled such that tags will sleep until movement is detected.A common real-world use case for active tags is on shopping carts within supermarkets.This allows the retailers to track shopper movement and apply machine learning technqiues to mine shopper behavior.Active tags generally offer higher reliability in tracking due to their maintenance of active sessions with readers There also exists a category of RFID tags known as semi-active (or semi-passive) which contain power sources which only power the microship.The signal response is obtained similar to passive in a backscatter of the radio frequency waves.They have a higher sensitivity than passive tags, longer battery life cycles than active tags and are able to actually record aspects such as temperature logging under their own power, even if no reader is there to power it.

WiFi Tracking Solutions
WiFi (IEEE 802.11) networks have become a ubiquitous presence in home and public spaces.Access Points in infrastructure mode broadcast signals which can be availed of for location determination (Deak et al., 2013).This can be attractive option due to the low costs involved.The low costs come from the fact no additional infrastrure needs to be built and the popularity of 802.11 devices ensure they are realtively cheap to deploy (Furey et al., 2011b).Wireless systems rely on measurements of RSSI, Signal to Noise (SnR) ratio and Proximity Sensing to control power and assist in link quality measurements.Here beacon access points send out broadcasts on the up or down link periodically (Carlin & Curran, 2014).The receivers also make measurements of RSSI and Signal to noise Ratio (SnR).
Becons emits signals which transmit identifiers and quality indicators.Devices can use passive scanning (or active) to latch onto these signals (Furey et al., 2011c).The Basic Service Set Identifier (BSSI) i.e name of wireless network is broadcast periodically to all listening devices within range of the Base Service Set (BSS).The frequency of broadcasts can be configured and is usually every few milliseconds.These beacons can be used for location determination.For instance, an access point which has been determined to have the strongest signal can be considered to be the location of the mobile device.So, if we know the Base Station's coordinates (e.g.x, y), then the Mobile Device's (or person carrying it) coordinates can also be determined to be (x, y).To achieve this, WLAN fingerprinting is the most common method Systems such as from Ekahau system and the LA200 system from Trapeze networks both use this technique as their foundation for tracking.
All indoor wireless tracking systems must begin with a fingerprinting process.Here there is an offline & online stage.The offline stage is where a calibration of the positioning environment is done physically by a walk through the building.Here a map of the building floors is updated and RSSI values are constantly sampled as the engineer walks through the building clicking on the map to indicate where they are positioning themselves.This is time consuming but a necessary step towards having accurated positions at a later date.Ideally the mapper will turn 360 degrees in various places to capture the best recordings of each neighbouring access point(s).The recordings of RSSI values are stored in the indoor mapping database.Next, the online stage is there position location fixes are obtained and mapped towards the best match in the database (Feng & Curran, 2009).There can be problems if access points are moved or if substantial building changes occur which can affect accuracy.Frequeny mappings for the offline stage will overcome this (Furey et al., 2011d).

Bluetooth Tracking Solutions
Bluetooth indoor positioning systems are similar to the WiFi and RFID systems in that they use positioning servers, access points and Bluetooh tags/badges.There is also an option

393
to simply use a Bluetooh device such as mobile phone or laptop to substitute for a badge.These systems offer similar accuracies to WiFi in the range of 2-10 meters.The most common triangulation method is again via RSSI measurements.The more Blueooth beacons used, the more accurate the tracking will be.

Indoor Map Based Systems
Examples of indoor mapping systems include an offering from Point Inside.These location solutions work with indoor maps and have found roll-outs in shopping outlets and airports.Point Inside have integrated their indoor mapping and platform capabilities directly into many production apps with their native and web SDKs.These sytems use WiFi mostly for indoor position triangulation.A major difference between these & the earlier WiFi olutions are that you are reliant on have pre-existing indoor location maps in place.A key selling point for systems like Point Inside is the desire by retailers to understand more about the products their shoppers are purchasing, where they spend time within a store and what actually brands they are interacting with.They also care about how long a customer spends looking at brands and which they select.This ultimately provides retail marketers with the additional knowledge needed to individually meet shoppers needs through in-app marketing.Indoor map solutions are a relaltively easy way for users to enter the indoor location tracking sector.

Ultra-wideband
Ultra wideband (UWB) is a radio technology that uses timed short bursts of RF energy to enale accurate triangulation of the position of an object or person who is attributed to a corresponding ultra-wideband tag.Ultra-wideband can be used at low power levels for shortrange high-bandwidth communications (typically >500 MHz).It uses a large portion of the radio spectrum (Knox et al., 2009).It differs from the spread spectrum in that it transmits in a manner which does not interfere with conventional narrowband & carrier wave transmission within the same frequency band.The information is modulated on Ultra wideband signals (pulses) through encoding the polarity of the pulse, the amplitude and using orthogonal pulses.These pulses can be sent periodically at relatively low pulse rates to support time or position modulation.They can also be sent at rates up to the inverse of the UWB pulse bandwidth.These pulses are short (<60 cm for 500 MHz-wide pulse and <23 cm for 1.3 GHz-bandwidth pulse).
In Ultra wideband location systems, active tags can be attached to people who are being tracked.These tags emit signals which are detected by a network of nearby UWB receivers.If detected by at least two receivers, then the persons position can be determined.The algorithm used can be the time difference of arrival (ToA) of a signal at two readers or UWB systems can also used the angle of arrival (AoA) of the signal to determine position.Ultra wide band systems are quite adapted to working within indoor environments as the UWB tags short bursts of radio pulses can easily cope with multipath reflections from competing conventional RF signals.It is worth noting that metallic & liquid materials can cause signal interference.

Wireless Sensor Networks-zigbee
Wireless Sensor Networks (WSN) are where a number of wireless sensors are connected together for means of communication through a radio medium.A popula wireless sensor network standard is Zigbee (IEEE 802.15.4).Zigbee allows for control and communication in WSNs in a power efficient manner.The Wireless Sensor nodes create what is called a mesh network.They are also characterized by their self-forming & self-healing architecture.This aspect lends itself to positioning.When used in positioning, Zigbee uses the Time of Arrical (TOA) algorithm to triangulate between devices/tags and fixed infrastructure.Advantages of using Zigbee as a positioning technology are akin to ultra wideband.These are power efficiency, low costs and accuracy.Wireless sensor networks built on Zigbee also suffer from the weaknesses that all radio frequency technologies do such as interference, range, battery life of devices and security issues.

Camera Based
While not at first glance an obvious indoor positioning technique, camera-based positioning systems are deployed.It is accepted that vision is an excellent positioning method for humans.We are quite capable of estimating distances given a target and a clear line of sight.Cameras can attempt to replicate this.They are becoming cheaper and the resolutions 394 are increasing at a rapid rate.The use of multiple cameras trained on particular areas within buildins allows a positioning system to perform similar complex position estimations but also to visually detect a known human.All the exising problems with face recognition apply in addition to changes in facial features however they can be useful for crowd policing, crowd size estimation and also in tracking elderly patients within their home.There is of course an intrusive aspect to camera-based tracking.Vision based tracking systems also overcome the requirement for individuals to carry tracking devices so it is similar to the device free passive localization approach.The UK is widely report to have the highest per capita number of surveillance cameras in the world and many camera-based tracking case studies are in existence (Mansell & Curran, 2016).

Locator Framework
This section provides an overview of an indoor location tracking extensible architecture including the web application and the mobile app which we have developed which builds on our previous work (Mansell & Curran, 2016).This framework allows the use of various indoor tracking technologies to be plugged in.It also allows the use of passive and active tracking technologies in a hybrid approach to increase the accuracy and the number of scenarios under which activity recognition could be detected in addition to location within the indoor environment

Architecture
The web application is implemented in Java and supports interaction with the system by a range of different types of clients.The web application offers content in a RESTful way.Access to the web portal is via JSP pages which are compiled into HTML mark-up with Ajax used as the primary means of transferring data.Data transfer is based on a commonly used data interchange format (i.e.JSON) to permit reuse of functionality by the mobile application.Figure 1 shows the communication procedure with the web application.The request and response may or may not contain JSON data.

Figure 1. Web app communication
The web application is modular and loosely coupled allowing functionality to easily be reused or replaced entirely if required.A three tiered system is used to achieve this.The layers are data access, business and presentation.Each layer has a clearly defined role; the data access layer or DAL is used exclusively for communication with the database, the business layer holds any application specific logic while the presentation layer contains user display/interaction logic as well as offering an endpoint for client communication.The presentation layer communicates with the business layer while the business layer communicates with the DAL layer which communicates with the database.As a result program flow of control is easily followed and traced.The presentation layer makes use of the model view controller architectural pattern to further separate display logic from interaction logic helping to keep the system maintainable and easily changed in the future.In order to transfer data between layers, data transfer objects (DTOs) were created to model application data (e.g. a BeaconDTO contains all beacon information).Web application layers are shown in 395 application and inversion of control container for Java web applications which relies heavily on the use of interfaces and XML wiring to inject dependencies (or configurable properties) into other classes.The use of dependency injection is one of the most effective ways of reducing a class' dependency on another class and greatly aides in keeping classes loosely coupled, reusable, extensible and highly testable.A number of software design patterns were used for the implementation, most noticeably the business layer which uses the command design pattern to encapsulate particular pieces of functionality such as saving a user's location.A business command performs some specific high level business functionality and interacts with the database by using the DAL services mentioned previously to persist or retrieve data (e.g. a location service which contains references to a position DAO and beacon DAO used to determine location).The presentation layer uses the Spring framework's Java annotations to specify web request (URIs) mapping with specific Java functionality in classes known as controllers.Each controller contains a collection of URI mappings with Java methods offering similar aspects of functionality e.g. a beacon controller only contains functionality related to beacons.In keeping with the system structure, controller methods will always execute a business command.
Figure 2. Web app architecture

Mobile Application
The mobile application uses the Android beacon library to communicate with nearby beacons to retrieve their Eddystone-UID.This Eddystone-UID is comprised of an id and instance id.The Android beacon library is an open source library with a large support base and is regularly updated for bug fixes and support for new features.Once retrieved the Eddystone-UID communicates to the server which determines and stores the user's current position.The mobile app is how the end users interact with the system both in the initial stages where locations can be detected/recorded, settings changed but also for initial registration.The various screens within this mobile app are shown in the following sections.

Registration
Figure 3 shows the register page which allows new user to create a new user account to collect reward points with.Here any new user wishing to gain access to the system will be required to enter a unique username along with a password.The password input is run through a complexity checker prior to being accepted.There are a number of navigation options available on this and subsequent input screens to that users can cancel, return to previous screens or quit.Figure 4 shows the main menu with options for activities, position settings, account settings and exiting the app.

Menu
The menu page shown to users after login allows the user to navigate between application pages.The menu bar includes access to all pages via icons or an overflow icon (three dots on the right with text shown on selection) if there is limited space.At any time, the user may exit the application which displays a confirmation dialog beforehand.The menu bar is shown on all pages to allow quick navigation to any page from any page.

Beacon Scanning
The beacon scanning screen allows a user to enable scanning for beacons with a prompt shown if Bluetooth is not already enabled (See Figure 6).Once scanning is enabled, the scanning functionality of the mobile application lets beacons be scanned for every ten seconds.If a beacon (closer than the ranging distance threshold) is found, then its Eddystone-UID details are sent to the web application which saves a new position history with the current timestamp.While remaining within range of the same beacon, new position histories are saved every 60 seconds.If multiple beacons are scanned, then the closest beacon is used.Once beacon scanning is enabled it will continue to run in the background even if the user closes the application completely.We choose this because beacon scanning is performed in a custom background service which the application communicates with.This becomes problematic however when attempting to get the current status of the background service after restarting the application as Android does not provide a clear way of checking if a service is running or not.Nevertheless, if the application does restart, the state of the background service is correctly shown by the state of the buttons.Although the normal scan cooldown time results in very little additional battery consumption, a power saving mode has been included which increases the scanning cooldown to thirty seconds.This reduces the time it takes to discover new beacons although user locations are still saved often enough to be considered accurate.

Position History
The position history page allows a user to view all their own position histories in a list shown in Figure 5.When a position history is selected, specific details are shown including the time and date they visited each position.This page automatically updates each time a new position history is saved (if beacon scanning is enabled) allowing the user to see in real time which location they are in.

Account Settings
The account settings page allows users to manage their account details such as name and password.The user account id and username are also shown.These can be used if admin support is needed.Any validation errors will result in icons similar to those on the login and registration pages.The URL that the application uses can be changed here.The reset button allows a user to reset any changes they have made.Figure 7 shows the about page.

Web Application
Since the web portal is only accessible by admin users, the main page displays a login form in which users must enter valid administrative credentials to gain access to the management section of the web portal.The index page includes a download button from which  ISSN: 1693-6930 TELKOMNIKA Vol 16, No 1: February 2018 : 390 -401 398 a user can download the mobile application and install it.Once Eddystone-URLs gain widespread native support by mobile browsers, the download functionality could be simply offered to users (without any knowledge of the system) by configuring beacons to broadcast this download URL.

Manage User Accounts
Here the key information relating to user accounts is shown.This include usernames, user account types and full names.This page allows an administrative to update, create or delete any user accounts.Figure 8 shown manage user accounts page.A sample of some of the dialogs produced because of various actions on this page are shown in Figure 9 including the delete and create user account dialog which is also used for updating user accounts.

Manage Locations
The manage locations section (as shown in Figure 10) allows administrative to assign positions to beacons.This is crucial and can only be performed in this screen.Here an admin can manage locations and create, update & delete pre-existing location data if incorrect.Positions associated with a particular location can be deleted here.Deletion confirmation is inbuilt

Manage Beacons
Managing beacons is one of the key features of the web portal and the manage beacon page allows admins to do this.Beacons can be created, modified and deleted from this page as shown in figure 11.During creation or modification, beacons can be optionally assigned to a location via a dropdown which is populated with locations saved through the manage locations page.If a beacon is assigned a location, then a position name must be entered.

View Position Histories
The view position histories page can be used by admins to view position histories for all users within the system (see figure 12).The admin can also elect to auto refresh this page meaning table data will automatically update every few seconds, displaying any new position histories which may have been saved.This pages includes search functionality (also offered on all other management pages), which allows the information displayed to be searched allowing an admin user to filter these results by a username, date, location or position.

View Charts
Admin users through the View charts feature can look at various statistics such as the most popular locations (this is capured through total linger time), the most frequently visited positions, average linger time & the last known location visited.Session & Linger time are calculated from the amount of continuous time each user spends at a position.This is referred to as a position history session.The view charts fearture contains an auto refresh functionality which can be disabled if required.The chart data automatically refreshes every 5 seconds.Hovering over a chart will display additional details.Also, a user can select locations which updates other charts with data explicitly for the chosen location.

Conclusion
An overview of an extensible indoor location determination framework which uses Bluetooth beacons for active positioning which can determine location of individuals is presented here.It also uses device free passive localisation techniques for determination of activities performed in each location.The Bluetooth active localisation hardware can easily be substituted with another active technology such as WiFi or Zigbee.The framework allows a seamless updating of locations, beacons & activities.The Java web application supports interaction with the system by a range of different types of clients.It offers content in a RESTful way via JSP pages which are compiled into HTML with Ajax used as the primary means of transferring data.Data transfer is based on JSON data interchange format to permit reuse of functionality by the mobile application.Future plans include the integration of Channel State Information (CSI) in order to more accurately classify activities using device free passive localisation.

Figure 2 .
The layers of the web application use the open source Spring framework.Spring is an ISSN: 1693-6930  Stream a Framework for Detecting Movement Indoors (Kevin Curran)

Figure 3 .
Figure 3. Register page with (left) and without (right) input Figure 4. Main menu

Figure 12 .
Figure 12.View position histories page