Using BLE to Pre-empt Transitions between Smart Indoor Spaces

One of the abiding concerns of relatives of people with intellectual disability who are approaching adulthood, and those who care for senior citizens with cognitive impairment, relates to scheduling and organisation of daily activities such as commuting, medication plans and appointments. With appropriate software, information can be collected and harvested to support ID service users or aging people who have lost part of their cognitive skill. One key enabler in this system is the smartphone that has become part of modern life. Although the GPS capabilities of smartphones work well for outside locations, indoor positioning is still problematic and indoor location is a vital awareness component in ambient assistance. This study considers the use of Bluetooth Low Energy (BLE ) Received Signal Strength Indicators (RSSI) from either a smart phone or beacon to assist with user embarkation and transition between spaces. The full scope of the study considers the impact of phone orientation, whether a phone is in the hand of the user, how performance can be impacted by presence of typical office furniture and the impact of different phone models. In this preliminary version we focus on differences between whether the phone is in the hand of the user or on a table top and how RSSI information can be used to develop services that predict and assist with behaviour of users as they move between locations.


INTRODUCTION
This work focuses on how mobile technology can assist cognitive impairment with particular emphasis on providing context for scheduling and organisation of daily activities such as commuting, medication plans and appointments. In particular, this work focuses on the departure and arrival of service users, and understanding points in time when guidance may be needed.
An ambient assistant that "knows" the broad envelope of locations, intentions, activities and sequence of activities that a service user usually completes, could intervene with some physiological signal or prompt to assist the person to continue with their activities with minimum interruption. Figure 1 shows the outline of a service user beside a schematic earth. For simplicity, we only consider three sensory elements: (1) represents hearing, (2) sight and (3) touch.
Signals from sensory perception travel through the physiological, emotion, feeling, thinking responses, which are all inner body activities, with action\s expressed outside the body through the persons behaviour and performance [8].
In some cases the physiological, emotion, feeling and thinking responses and/or transition between them become impaired. This is represented at (4) by the jigsaw element denoting a missing piece -a cognitive impairment. The difficulty is that relatives, carers and professionals are not initially sure of the location, shape or pattern of this figurative piece. Some common impairments are accurately described through good clinical practice guidelines and therefore have explicit care plans to manage the conditions while other impairments do not. In the physical space, a user needs to navigate between areas of interest. However, areas of interest also have location, attributes, methods, sequencing and scheduling elements too.
Smart phones have multiple roles here because they can give live feedback prompts (stimuli through an audio ring, vibration or through visual infographics) to a cognitively impaired user. In this work, we explicitly consider flexible assistance for phone or beacon users in indoor spaces to preempt and assist with embarkation from a building. This approach could also be applied to understand and respond to the behaviour of users who are involved in an ambulatory process in a smart public space, such as a gallery, museum or hospital.
Bluetooth Received Signal Strength Indicator (RSSI) as a means of precise localisation (pinpointing the location of a user) [2] has been shown to have issues in cluttered indoor environments. Nevertheless, adopting a relaxation of the localisation challenge still provides useful information. This work therefore focuses on to what extent the RSSI data can be useful. We believe that Bluetooth can assist with understanding when a user is preparing to leave a room or region of a room through course-grained RSSI classification. Specifically, we aim to establish the extent to which BLE discriminates the following three states: -Very close (2m or less) -In the vicinity (2m to 20m) -Not in the vicinity (> 20 m away) A good understanding of how these states relate to logging of BLE presence data, would enable a probabilistic model to be created to pre-empt a user as they are about to leave a location or building. The complete study will consider the above classification for an Android Smartphone with the following set of comparative experiments: 1. Attenuation through body: A phone mounted flat in an unobstructed way on a table top vs in the user's hand and therefore subject to attenuation of signal through a user's body.

Reflection and distortion from environment:
Cluttered indoor environment (baseline) vs. "simple" outdoor environment that is free from disturbance. 3. Device type: Android phone vs iPhone vs BLE beacon 4. Orientation of phone: horizontal vs vertical.
For the purposes of this work-in-progress, we shall only present the results of the first comparison. The remainder of this document is laid out as follows. Section two provides a short literature review. Section three describes the methodology for the experiment, while section four outlines the results so far. Section five, the conclusion, discusses the preliminary results and future work.

Assistance in scheduling for people with ID
ID service users and those who suffer from mild cognitive impairment are increasingly encouraged to live independently. This includes activities of daily living (ADL) such as commuting, meal preparation and hygiene. During commuting for instance, issues such as unpredictable transport options and weather patterns make it difficult to commute independently. In the Republic of Ireland, this happens against a background of evidence based de-institutionalisation [7], from congregated settings to independent living in the community.
It is now common practice for electronic timetables or calendar entries to be used to prompt reminders to users. However, both types of data sources, while they reflect the intentions of a service or service user, cannot cope with the relative chaos of real life. Human behaviour and activity is often unpredictable and complex. Therefore, some model of user behaviour can help to provide a more realistic guide for ID service users who wish to live and travel in an uncertain world.

BLE for indoor positioning
BLE is an evolution of Bluetooth Classic that operates in the Industrial Scientific Medical (ISM) band at a frequency of 2.4 GHz. At that frequency it enables transceivers to "frequency hop" between 40 data channels with a channel spacing of 2MHz [4]. BLE is by now a standard feature of mobile phones and smart watches and is also used for mobile or fixed proximity beacons.
The problem of indoor positioning has been the subject of much research. Fingerprinting is a range based method which consists of a calibration phase that associates each position with a measured strength of the signal and a measurement phase which uses the information in the calibration phase to estimate the position of the user [5]. BLE Received Signal Strength Indicator (RSSI) has been a popular feature for localisation due to its low power consumption and cost compared to the previous methods [6]. Bluetooth Classic and BLE can be used for localisation. However, previous studies have indicated that the properties of BLE and 2.4GHz EM transmissions do not permit RSSI to be employed for consistently pinpointing a user by triangulating the position of their mobile device. Previous attempts have shown that BLE localisation is susceptible to many environmental factors such as reflection from surfaces, attenuation through human bodies, and walls [3] and this is true for indoor locations which tend to distort signal strength.
The authors have previously shown how BLE and power line monitoring can complement each other to study embarkation behaviour in an office environment. Of course like a lot of IOT data, localisation data is private information and needs to be treated carefully in order to preserve the data privacy of users [9].

Set up of experiment and data collection
The experimental work was performed in the biomedical engineering and assistive technology (BEAT) lab of the Greenway Hub Building in the DIT campus. The BEAT lab measures 12 x 7 meters, and is clear from obstructions. This space is surrounded by heavy movable tables and benches and a profusion of metal ducting overhead.
A 10 x 4 meters grid of location dots were placed on the open floor area, such that the distance between each two neighbouring crosses was one meter. These reference points were marked at the ground so as to indicate the position of each point in the grid, the columns of the grid were given letters referenced from A to J (10 columns) while the rows had a number reference from one to 4 (4 rows). In addition, four additional marks were placed in the corridor outside the lab as shown in Figure 2.
The equipment of the experiment consisted of a movable tripod on which the phone was fixed, the height of the phone was fixed to 80 cm above the ground as it is approximately table height and it was noted that a user would hold the phone at a similar height. Three Raspberry Pi Model Bs (indicated by antenna icons in Figure 2) which have on-board BLE transceivers, acted as anchor nodes receiving the RSSI signal from the phone. Each Raspberry Pi was placed on a tripod at a similar height to the phone. The 3 Pi's were placed at fixed recording positions at three of the 4 corner points A1, A4 and J4 as shown in Figure 2. All the Raspberry Pis were oriented toward the center of the experimental space. Finally, for this pilot experiment, an Android version 6.0.1 smartphone was used. The role of each Raspberry Pi was to measure the RSSI signal emitted from the BLE unit in the smartphone. User location was approximated based on a finger printing algorithm that consists first of an offline phase that entails constructing the radio map of the RSSI signal for each Pi and then an online phase that consists of using it as a basis for approximating the coarse-grained position of the user.
To construct the radio map, a distributed data logging application was developed using the Python programming language. The application has client-server architecture so that two Raspberry Pi's act as a server providing the service of measuring the RSSI signal to the third Raspberry pi (master node) that acts as client requesting the measurement of RSSI's from the other two devices. The master measures the RSSI values and stores the measured values to be used when constructing the radio maps.
To construct a radio map, the RSSI signal measurements were collected by three devices for each grid point. Due to the relative instability of the instantaneous signal, 100 measurements were collected for each grid point then the mean was taken to represent the signal detected at that particular grid position. The first part of the experiment consisted of measuring the RSSI signal emitted for each grid point while it was placed horizontally on the tripod as shown in Figure 3. The second phase was similar to the first except that the phone was held in the user's hand.  Figure 4 shows the mean value of 100 measurements of RSSI collected at each individual grid position for each Raspberry Pi for two cases; when the phone is fixed on the tripod and when the phone is flat in the user's hand as shown in figure 3. If the phone is located very close to the position of a Raspberry Pi, that Pi receives a high RSSI ranging between -51 dBm and -40 dBm if the phone is on the tripod and between -51dBm and -48dBm if the phone is held in the user's hand. This confirms Farragher's results [3] that the body of a user acts as an absorber of the signal, as the human body is made up of more than 70% water [10] [1]. This effect of the body can be noticed in figure 4, as there are more points in the grid with relatively strong signals in the region nearest the Raspberry Pi in the case when the phone is on the tripod than in the case when the phone is in the user's hand. This would be particularly challenging when detecting if a person is within the vicinity of a particular Raspberry Pi since it is difficult to say if they are near a particular anchor device as the signal may be absorbed by their body.

CONCLUSIONS AND FUTURE WORK
This preliminary work aims to indicate the intention of the user based on a fingerprinting based method for coarse-grained indoor localisation, it is observed that the original fingerprinting is labour intensive and requires the use of several statistical methods to deal with the instability of the signal, so this work proposes a method that does not indicate the precise position of the user but instead seeks to detect the user's intention to transit to the next space in a building. By carefully locating the Bluetooth devices in specific positions, this technique has the novel potential to detect the intention of the user to transit from one zone to another. If a "prediction of user intent" is achievable, then there is an opportunity to introduce intervention or assistance, in time, to aid the user before the actual intended activity even occurs. If a person leaves the experiment space they will head away from the two anchor nodes 1 and 3 and towards anchor node 2 which results in an increase in the signal strength for the latter node and a decrease of signal strength for the former ones. In addition to studying the impact of the other 3 dimensions of the experiment, future work will focus on building a mathematical model that uses the information from the radio map to indicate the proximity of the user relative to an anchor node and subsequently their intention to stay or to leave the room or space. This study has also shown that Bluetooth devices such as a Raspberry Pis will only definitively pick up the position of a Bluetooth enabled device when it is within 2m. The interaction of the signal with different structures in the room makes prediction of the position somewhat challenging as it is observed that the mean of the signal strength does not decrease necessarily with distance in all cases. Sometimes the measured signal is stronger in the far points of the grid than in the vicinity of the Pis. On the other hand if the measurements from the three anchor devices are combined it could potentially lead to an improvement in predicting the position or the intention of the user in determining whether (s)he is about to leave the room or not.
A final observation is that the grid point in the corridor has a uniform mean RSSI even for the second Raspberry Pi which is located one meter away from the grid points on the corridor although it does detect the presence of nearby phone. This indicates also that if several measurements of RSSI's show high variability it is most likely that the person is in the same room as the device collecting the measurements, while if measurements show a stable value this would imply that the person is in a different room than the device.