=Paper= {{Paper |id=Vol-2148/paper2 |storemode=property |title=Analysis of Patient Domestic Activity in Recovery From Hip or Knee RePlacement Surgery: Modelling Wrist-worn Wearable RSSI and Accelerometer Data in The Wild |pdfUrl=https://ceur-ws.org/Vol-2148/paper02.pdf |volume=Vol-2148 |authors=Mike Holmes,Hao Song,Emma Tonkin,Miquel Perello Nieto,Sabrina Grant,Peter Flach |dblpUrl=https://dblp.org/rec/conf/ijcai/HolmesSTPGF18 }} ==Analysis of Patient Domestic Activity in Recovery From Hip or Knee RePlacement Surgery: Modelling Wrist-worn Wearable RSSI and Accelerometer Data in The Wild== https://ceur-ws.org/Vol-2148/paper02.pdf
  Analysis of patient domestic activity in recovery from Hip or Knee replacement
 surgery: modelling wrist-worn wearable RSSI and Accelerometer data in the wild

Mike Holmes1 ∗, Hao Song1 , Emma Tonkin1 , Miquel Perello Nieto1 , Sabrina Grant1 and Peter Flach1
                                    1
                                      University of Bristol
                                  ∗mike.holmes@bristol.ac.uk


                          Abstract                                evolve to keep up with these changing trends. After joint re-
                                                                  placement, up to 30% of patients report minimal improve-
     The UK health service sees around 160,000 total              ment or their symptoms get worse and not all patients are
     hip or knee replacements every year and this num-            satisfied with their outcome [Beswick et al., 2012]. Poor out-
     ber is expected to rise. Expectations of surgical out-       comes include continuing pain, functional limitation and in-
     come are changing alongside demographic trends,              creased health care utilisation. Consequentially, improving
     whilst aftercare may be fractured as a result of re-         outcomes after joint replacement is a key research priority.
     source limitation or other factors. Conventional as-            Patients routinely receive a follow-up appointment approx-
     sessments of health outcomes must evolve to keep             imately six weeks following surgery. However, this may not
     up with these changing trends. In practice, patients         be with the surgeon, but with a registrar. This may com-
     may visit a health care professional to discuss re-          plicate assessments. Various strategies have been proposed
     covery and will provide survey feedback to clini-            to increase efficiency whilst maintaining quality and patient
     cians using standardised instruments, such as the            acceptability, such as the use of ’virtual clinics’ [Williams,
     Oxford Hip & Knee score, in the months follow-               2014]. These rely on Patient Reported Outcome Measures
     ing surgery. To aid clinicians in providing accurate         (PROMs), such as the Oxford Hip or Oxford Knee Score and
     assessment of patient recovery a continuous home             the EQ-5D, a measure of health status. These can assess var-
     health care monitoring system would be beneficial.           ious health outcomes including pain, function and aspects of
     In this paper the authors explore how the SPHERE             quality of life, but have sometimes significant limitations. For
     sensor network can be used to automatically gener-           example, PROMs may be subjective to a certain extent and
     ate measures of recovery from arthroplasty to facil-         may reflect the patient’s level of pain [Senden et al., 2011;
     itate continuous monitoring of behaviour, including          Stevens-Lapsley et al., 2011].
     location, room transitions, movement and activity;              Previously, research has explored the relationship between
     in terms of frequency and duration; in a domes-              PROMs and objective measures, notably performance-based
     tic environment. The authors present a case study            tests such as timed walks or sit-to-stand tests [Bolink et al.,
     of data collected from a home equipped with the              2012]. Such objective measures are administered in con-
     SPHERE sensor network. Machine learning algo-                trolled, laboratory style settings, and may not reflect levels
     rithms are applied to a week of continuous obser-            of activity in daily life. Multimodal sensor systems present
     vational data to generate insights into the domestic         in domestic settings, such as those used in ambient assisted
     routine of the occupant. Testing of models shows             living scenarios [Rashidi and Mihailidis, 2013], allow assess-
     that location and activity are classified with 86%           ment of behaviour and activity in a natural setting. Establish-
     and 63% precision, respectively.                             ing a relationship between PROMS and multimodal sensor
                                                                  data permits us to develop effective methods of passive mon-
                                                                  itoring and recovery after surgery, providing a further data
1   Introduction                                                  source that, if used alongside PROMS, may allow for rela-
The UK health service sees around 160,000 hip and knee re-        tively timely intervention in the event of complications, po-
placements every year [National Joint Registry, 2018] within      tentially improving patient outcomes.
the National Health Service and this number is expected to
increase. Hence, innovative approaches to evaluating sur-         1.1   Contribution
gical outcomes will be needed to respond to the increasing        The contribution of this research is to make an initial evalu-
burden of joint replacement surgery. Health care interven-        ation of statistical method, from literature (section 2), which
tions, such as surgeries, are only part of a patient’s journey.   may provide measurement or classification of mobility infor-
Expectations of surgical outcome are changing alongside de-       mation including location and room transitions, movement
mographic trends [National Joint Registry Editorial Board,        intensity and distance, and posture & ambulatory activites,
2017]. Conventional assessments of health outcomes must           using data gathered in the wild. Techniques detailed in litera-
ture (section 2) are applied to one week of continuous obser-      which provide a pattern of distinct Received Signal Strength
vational data recorded within a real residence (section 3.1).      Indicator measures, based on proximity to each receiver in
   Results of classifier training are presented in section 4,      the network.
along with visualisation of measurements and classifications          As in literature [Quan et al., 2010; Wang et al., 2014],
for location, movement and activity. An evaluation of meth-        RSSI has been used to fingerprint locations within a space
ods using real-world data is presented in discussion in section    by learning the discriminant RSSI vectors from a moving av-
5, with conclusions in section 6.                                  erage [Quan et al., 2010].
   A valuable outcome of this initial evaluative research has
been to highlight the future work (section 7) necessary to de-     2.2    Movement
velop algorithms for long-term measurement and classifica-
tion which can be robust to the challenges presented when          Measures of movement are often based on either measured
working with data gathered in the wild.                            acceleration [Preston et al., 2012; Xiao et al., 2016] or in-
                                                                   ferred positional change as represented by shift in Received
1.2    SPHERE: A sensor platform for health care in                Signal Strength Indicator (RSSI) [Krumm and Horvitz, 2004;
       a residential environment                                   Gansemer et al., 2010b; 2010a]. Both approaches have ad-
                                                                   vantages and disadvantages, considering different types of
SPHERE is an interdisciplinary research project which aims         movement and the location of the accelerometer. A wrist-
to develop sensor technologies capable of supporting a vari-       worn accelerometer as used in SPHERE may show spikes in
ety of practical use cases, including healthcare and ambient       magnitude based on ambulation (e.g. walking or running)
assisted living outcomes. An additional goal of SPHERE is          but also for rapid hand / arm movements (e.g. chopping veg-
to build systems that are considered acceptable by the public      etables), and acceleration magnitude may not spikes for low
and which are flexible and powerful enough to function well        acceleration positional change (e.g. transcending stairs with
in a broad variety of domestic environments [Woznowski et          aid of a stair lift). RSSI will highlight positional change re-
al., 2015; 2017].                                                  gardless of acceleration but will not show movement that is
   ‘Smart home’ systems development has primarily taken            non-positional (e.g. walking or running on a tread mill), and
place in laboratory settings[Alam et al., 2012], or, as in the     may over overestimate small movements which block line of
SPHERE project, in a customised home[Tao et al., 2015]. Re-        sight to RSSI receivers (e.g. rolling over in bed).
search, development and testing of multimodal sensor tech-            In this work both magnitude and RSSI based movement
nologies was completed in a home owned by the project, the         calculations are shown for comparison.
SPHERE House. In 2017, the SPHERE project began to de-
ploy a multimodal sensor network into dozens of homes in
                                                                   2.3    Activity
the South West of England.
   The work reported here is part of a set of initial studies      Activity recognition using wearable and mobile devices has
on data generated using the SPHERE sensor network in de-           been a major focus for the recent years [Bao and Intille, 2004;
ployment. In particular, this study is intended to establish the   Kwapisz et al., 2011; Siirtola and Röning, 2012; Ravi et al.,
behaviour of the sensor network and of the associated ana-         2005; Janidarmian et al., 2017].
lytic infrastructure, including measurements of participant lo-      From a device prospective, mobile phones, smart watches
cation, movement and activity, in a genuine deployment con-        and wrist bands have the dominant source of data, which nor-
text ‘in the wild’.                                                mally captures the acceleration signal around the body of the
                                                                   users. In this paper we also focus on the 3-axes acceleration
2     Related work                                                 data obtained from a wrist band, which is one of the standard
                                                                   choice in the field.
Key indicators of relevance to PROMS include movement
patterns (such as room to room transfers), patterns of im-
provement (quality of movement, distance walked, climbing          3     Case study
stairs), activities undertaken (such as cooking or cleaning)
                                                                   In this study the authors present initial results and data vi-
and sleep (e.g. hours sleeping, quality of sleep).
                                                                   sualisations for a single case study participant home of the
   This study focuses on three measurements of participant
                                                                   SPHERE cohort over the first week of system installation.
domestic behaviour including location, movement and activ-
ity. In this section, the authors provide a brief overview of         The case study presents the authors work in progress in
research relating to each method employed.                         developing methods of analysis to monitor, visualise and val-
                                                                   idate key indicators of recovery from surgery, such as hip or
2.1    Indoor localisation                                         knee arthroplasty. The experiments in this paper focus on ex-
                                                                   perimental evaluation of methods for measurement of move-
Indoor localisation [Quan et al., 2010; Wang et al., 2014] is      ment within the home.
an important area of research for behavioural analysis in res-
idential health care. The ability to predict the location of a
                                                                   3.1    Methods
patient not only gives insight into domestic routine and habi-
tation, but allows other information to be physically contextu-    In this section the authors present an overview of methods
alised. The SPHERE low-energy Bluetooth network provides           used to generate the three classification metrics: in-door lo-
a mesh of overlapping or interacting signal strength fields        calisation, movement and activity classification.
Data Collection                                                    wears a head mounted camera to record the view, which can
The case study home has been selected as it represents a sim-      be later annotated for the activities performed.
ple use-case for SPHERE technology in the wild. The res-
idence has a single occupant with few rooms and all rooms
located on the same floor. Figure 1 shows a graphical repre-
sentation of the layout of the residence.
          Bedroom 1                     Livingroom 1

                           Hall 1




                                                                           Figure 3: Visualisation of technician walk around
                                            Kitchen 1

           Exit          Bathroom 1                                Ethics: data collection and publication
    Figure 1: Connection between different rooms in the house      The data used in this study has been collected as part of the
                                                                   SPHERE project [Woznowski et al., 2015; 2017]. The par-
   The SPHERE system has been installed in the residence           ticipant in this case study has provided consent for data to
for five months. In this paper the authors focus on analysis of    be recorded within their home. Participation in the SPHERE
the first week of installation, so as to give an overview of the   project is voluntary and participants are at liberty to exit the
methods used for analysis and visualisation of data.               experiment at any time.
   Figure 2 details the physical architecture of one subsystem        Due to the sensitive nature of data collected within a real-
of the SPHERE sensor network, the wrist-worn Bluetooth             world residential environment, data used in this study is not
Low-Energy (BLE) wearable device. The wrist wearable har-          being made public alongside this paper. A data set of activity
bours a tri-axial accelerometer and broadcasts over Bluetooth      and location annotated SPHERE sensor data, recorded dur-
at 25Hz.                                                           ing short scripted experiments in the SPHERE House (The
                                                                   SPHERE Challenge) [Twomey et al., 2016], is available on-
                                                                   line.

                                                                   Classifying location using RSSI fingerprints
                                                                   RSSI levels between the wrist-worn wearable and each in-
                                                                   stalled receiver within the home have been recorded. Using
                                                                   a 3-second sliding window, a vector of RSSI values is con-
                                                                   structed to represent the position of the participant. For each
                                                                   second and each gateway, the sum, mean, minimum, maxi-
                                                                   mum and variance in RSSI are calculated across the second.
                                                                   Each second in the sliding window was then concatenated to
Figure 2: Diagram of wearable Bluetooth LE subsystem of SPHERE     produce a vector of length n = 75.
                                                                      A multi-layer perceptron artificial neural network (MLP)
   Data collected from a second SPHERE subsystem; the en-          with three hidden layers, 100 nodes per hidden layer, was
vironmental sensor network; will provide passive infra-red         trained to classify the location of the wearable based on RSSI
activation data, of use in validating the predictions made us-     vectors. To train the classifier, the annotations taken during
ing the wearable data.                                             the technician walk-around activity (figure 3) were used to
   To develop a localisation training set for the home, dur-       label the training and test set of vectors. The set of labelled
ing installation of the SPHERE sensor network, a technician        vectors were shuffled and split 50/50 between training and
performs an annotation procedure called a ’technician walk-        testing sets. The MLP was trained using the ’adam’ [Kingma
around’. The technician carries the wearable device to each        and Lei, 2015] algorithm. Results of training and testing are
room in the home, annotating the start and end times in each       presented in the section 4.
labelled location. The technician walk-around was repeated            Location predictions are used to visualise room occupancy
prior to the sensor network being removed from the home.           over time and to localise movement metrics, providing a view
Figure 3 visualises the technician walk around.                    on where movement happens within the home and at what
   The participant is asked to perform their daily routine in a    times of day.
fast-forward manner. That is, the participant starts from the         In addition, location predictions are used to visualise the
location of the bed, visit corresponding locations according       frequency of predicted transition from room to room. Pre-
to their usual routine, while performing simple activities like    dicted room transitions are expected to abide by the adjacency
“making a cup of tea”. During the experiment, the participant      of rooms, as given in the residence layout in figure 1.
Classifying movement intensity                                     distance travelled were generated at 1-minute intervals. Ac-
Movement intensity is calculated by the magnitude of accel-        celerometer based movement: 6,363 accelerometer magni-
eration (equation 1), as given by the mean tri-axial accelerom-    tude observations were calculated, at 1-minute intervals. Ac-
eter readings from the wrist-worn wearable, over a 1-minute        tivity recognition: 302,400 estimates of activity were gener-
window. This approach has been successfully demonstrated           ated from RSSI and accelerometer data, at 2-second intervals.
in [Xiao et al., 2016]. The wearable device transmits acceler-
ation in x, y and z dimensions at 25Hz.                            4     Results
                        q                                          In this section the authors present initial results applying lo-
                     A = a2x + a2y + a2z                    (1)    calisation, movement and activity classification algorithms to
                                                                   the first week of data from the case study home.
   Acceleration magnitude was calculated for each 1-minute
of accelerometer data. For each 1-second window, the stan-         4.1    Indoor localisation
dard deviation of magnitude was calculated. Movement in-           Table 1 shows the test set performance of the trained MLP
tensity is here defined as the sum of magnitude standard de-       indoor localisation classifier. Table 4.1 shows the training and
viations (per second) over a given time window.                    testing split for each class.
   Movement is also calculated by the Euclidean distance be-
                                                                                   Location             Train     Test
tween consecutive RSSI vectors. Similarly to the method de-
scribed in [Muthukrishnan et al., 2009], an RSSI vector (slid-
                                                                                   Bedroom 1              37       42
ing window) was calculated for each observation window, in
                                                                                   Bathroom 1             30       22
this case 1-minute. For each 1-minute window, the Euclidean
                                                                                   Kitchen 1              30       29
distance between the current and previous window was cal-
                                                                                   Living Room 1          57       49
culated.
                                                                                   Hall 1                 37       50
   Movement classification is compared to activations of pas-
sive infra-red sensors (PIR) installed in each room of the res-
idence. PIR sensors activate when movement is detected in                      Table 1: Location classifier test-set results
a room. As the case study home is a single occupancy res-
idence, PIR activations are anticipated to occur inline with           Class           Precision      Recall    f1-score       Support
increased acceleration magnitude.
                                                                       bathroom 1         0.86         0.83       0.84           23
Classifying activities using RSSI and tri-axial                        bedroom 1          0.79         0.94       0.86           35
acceleration                                                           hall 1             0.80         0.83       0.82           48
From the fast-forward experiment, three models are obtained            kitchen 1          1.00         0.91       0.95           32
for predicting standing, lay down, and walk with a one-vs-rest         living room 1      0.88         0.80       0.83           54
strategy.                                                              avg / total        0.86         0.85       0.85          192
   As both the RSSI and acceleration are collected at a rela-
tively high frequency and hence are not synchronised to each
other, the sliding window (with 2 sconds length) approach has         Figure 4 visualises room occupancy in 2-hour windows, as
been applied on the raw signal to obtain the standard feature      predicted by the localisation classifier. Figure 5 shows loca-
vectors.                                                           tion transitions from location to location, within the home.
   Since each activity is only collected for a couple of sec-
onds during the fast-forward experiment, here we strategi-         4.2    Movement intensity and distance
cally avoid features that require a higher amount of train-        Figure 6 shows movement intensity in 2-hour windows, over
ing data, leaving features only involving calculating the mean     the observed week. Figure 7 shows movement as calculated
values, median values, and standard deviations for each indi-      by mean euclidean distance between RSSI vectors in each
vidual acceleration and RSSI, as well as the overall accelera-     2-hour window. Figure 8 shows passive infra-red sensor acti-
tion and RSSI readings on the target wearable device.              vations over the same period.
   Regarding the model, we apply the Logistic regression for          Table 2 shows movement intensity for each day in each
obtaining probabilistic outputs, which can then be corrected       residential location.
via Beta probability calibration.                                     Figure 9 shows the intensity of movement calculated by
   With calibrated probabilistic outputs, one can easily visu-     accelerometer magnitude in each domestic locations, across
alise the uncertainty with each prediction, as well as calculat-   the first week of observation.
ing the overall time spent on these activities.
                                                                   4.3    Activity Recognition
3.2   Data                                                         As we train the corresponding model for each activity with
In this section the authors present a brief overview of the data   the one-vs-rest strategy, the results can be simply evaluated as
generated using methods described in section 3.1.                  in table 3. Table 3 shows test set performance of the classifier.
   Location: 379,234 location classifications were made at 1       Figures 10, 11 and 12 show activity classifications aligned to
second intervals. RSSI based movement: 6,375 estimates of          location classifications (figure 4) across the observed week.
                          Table 2: Movement (magnitude) per day per location. Sub-index indicates the rankings from high to low values.

                                           Day           Bathroom                   Bedroom                                              Hall            Kitchen            Living room               Total

                                           Mon             0.43                        0.76                                           10.35                0.06                   8.74               20.35(7)
                                           Tue             0.14                        2.47                                            9.20                1.74                  22.43               35.99(3)
                                           Wed             1.78                       11.25                                            1.07                3.68                   7.08               24.87(6)
                                           Thu             4.40                       10.04                                            1.13                8.28                   9.84               33.69(4)
                                           Fri             1.55                       11.26                                            2.66                5.28                   6.66               27.41(5)
                                           Sat             5.12                       11.95                                            4.89               10.33                   6.71               39.00(2)
                                           Sun             5.37                       21.67                                            5.98               29.45                  27.03               89.50(1)
                                           Total         18.79(5)                    69.4(2)                                         35.28(4)            58.82(3)               88.49(1)


                                      mean every 120Min                                                                                                                            sum every 120Min
    08:00                                                                                  1.0                                                                                                                                 20
    16:00                                                                                                                                                      0-0
    00:00                                                                                                                                                      2-0
    08:00
    16:00                                                                                  0.8                                                                 4-0




                                                                                                                                                                                                                                    sum std. dev of magnitude
    00:00                                                                                                                                                                                                                      16
    08:00                                                                                                                                                      6-0

                                                                                                   proportion of time
    16:00
    00:00                                                                                  0.6                                                                 8-0




                                                                                                                                                Time of day
    08:00                                                                                                                                                     10-0                                                             12
    16:00
    00:00                                                                                                                                                     12-0
    08:00                                                                                  0.4
    16:00                                                                                                                                                     14-0                                                             8
    00:00
    08:00                                                                                                                                                     16-0
    16:00                                                                                  0.2
    00:00                                                                                                                                                     18-0
    08:00                                                                                                                                                                                                                      4
    16:00                                                                                                                                                     20-0
                                                                                           0.0                                                                22-0
                 n


                            1


                                        1


                                                   1


                                                                  1


                                                                                1
            ow


                           m


                                      om



                                                    ll


                                                             en


                                                                             m
                                                 ha




                                                                                                                                                                      n


                                                                                                                                                                           e


                                                                                                                                                                                  d


                                                                                                                                                                                           u

                                                                                                                                                                                                     Fri


                                                                                                                                                                                                            t

                                                                                                                                                                                                                       n
                      oo




                                                                          roo
            kn




                                                                                                                                                                                                            Sa
                                                             ch




                                                                                                                                                                     Mo


                                                                                                                                                                           Tu

                                                                                                                                                                                 We


                                                                                                                                                                                         Th




                                                                                                                                                                                                                    Su
                                  dro
                     thr
       Un




                                                         kit


                                                                       ng
                                be
                     ba




                                                                                                                                                                                           Day
                                                                      livi




             Figure 4: Location by 2-hour window across week 1                                                                                         Figure 6: Movement intensity (magnitude) by 2-hour window


                                            mean every 1Min                                                                                                                        sum every 120Min
                                                                                               100                                                                                                                            15.0
                                                                                                                                                               0-0
       Unknown                                                                                                                                                 2-0
                                                                                                                                                                                                                              12.5




                                                                                                                                                                                                                                                 sum Euclidean distance
                                                                                               80                                                              4-0
                                                                                                             proportion of transitions




     bathroom 1                                                                                                                                                6-0
                                                                                                                                                                                                                              10.0
                                                                                                                                                               8-0
                                                                                                                                                Time of day




      bedroom 1                                                                                60
                                                                                                                                                              10-0
                                                                                                                                                              12-0                                                            7.5
            hall 1                                                                             40                                                             14-0
                                                                                                                                                              16-0                                                            5.0
       kitchen 1                                                                                                                                              18-0
                                                                                               20
                                                                                                                                                              20-0                                                            2.5
    living room 1                                                                                                                                             22-0
                                                                                               0
                                                                                                                                                                      on



                                                                                                                                                                            e


                                                                                                                                                                                   ed



                                                                                                                                                                                            u



                                                                                                                                                                                                       i



                                                                                                                                                                                                              t


                                                                                                                                                                                                                       n
                                                                                                                                                                                                      Fr
                       n



                                  1



                                             1



                                                         1



                                                                      1



                                                                                 1




                                                                                                                                                                                                            Sa
                                                                                                                                                                           Tu




                                                                                                                                                                                           Th




                                                                                                                                                                                                                     Su
                      w


                                 om



                                            m




                                                                               om
                                                                   n
                                                      ll




                                                                                                                                                                     M




                                                                                                                                                                                  W
                                                    ha
                    no




                                                                 he
                                          oo
                               ro




                                                                             ro




                                                                                                                                                                                               Day
                  nk




                                                               tc
                                        dr
                             th




                                                             ki



                                                                            g
                 U




                                      be




                                                                          in
                           ba




                                                                       liv




Figure 5: Location transitions across week 1 comparing non-                                                                                                     Figure 7: Movement distance (RSSI) by 2-hour window
overlapping intervals of 1 minute. Outer squares indicate: one-step
adjacency in red and two-steps adjacency in dotted orange.                                                                                                     Table 3: Activity classifier 3-folds cross validation results

                                                                                                                                                              Class             Precision        Recall          f1-score   Support
5       Discussion
                                                                                                                                                              lay down            0.75               0.92         0.83        13
Localisation predictions appear accurate on the small sam-                                                                                                    stand               0.61               0.71         0.66        35
ple set used for training and testing the classifier. Results                                                                                                 walk                0.53               0.47         0.50        36
of classifier testing (Table 1) show average precision of 86%                                                                                                 avg / total         0.63               0.70         0.66        84
and recall 85% over the five classes. However, given the lim-
ited size of the data set, the assumption of independence be-
tween samples in the training and test set does not hold. For
                                             sum every 120Min                                                                                               sum every 120Min
                                                                                                                              08:00
                0-0                                                                      250                                  16:00
                                                                                                                              00:00
                2-0                                                                                                           08:00                                                               3000
                                                                                                                              16:00
                4-0                                                                                                           00:00
                6-0                                                                      200                                  08:00                                                               2400
                                                                                                                              16:00




                                                                                                       sum of activations
                8-0                                                                                                           00:00
 Time of day




                                                                                                                              08:00
                                                                                         150                                  16:00                                                               1800
               10-0                                                                                                           00:00
               12-0                                                                                                           08:00
                                                                                                                              16:00                                                               1200
               14-0                                                                      100                                  00:00
                                                                                                                              08:00
               16-0                                                                                                           16:00                                                               600
                                                                                                                              00:00
               18-0                                                                      50                                   08:00
                                                                                                                              16:00
               20-0                                                                                                                                                                               0
               22-0




                                                                                                                                           1




                                                                                                                                                        1




                                                                                                                                                                 l1




                                                                                                                                                                               1




                                                                                                                                                                                              1
                                                                                                                                      om




                                                                                                                                                    m




                                                                                                                                                                               n




                                                                                                                                                                                          om
                                                                                                                                                                  l
                                                                                                                                                               ha




                                                                                                                                                                             he
                                                                                                                                                   oo
                                                                                                                                    ro




                                                                                                                                                                                         ro
                                                                                                                                                                           tc
                                                                                                                                                 dr
                                                                                                                                  th




                                                                                                                                                                         ki




                                                                                                                                                                                      g
                        n


                                e


                                             d


                                                      u

                                                              Fri


                                                                         t

                                                                                    n




                                                                                                                                               be
                                                                        Sa




                                                                                                                                 ba




                                                                                                                                                                                    in
                      Mo


                               Tu

                                         We


                                                  Th




                                                                                    Su




                                                                                                                                                                                   liv
                                                      Day                                                                                                         room



     Figure 8: Passive infra-red sensor activation by 2-hour window                                                         Figure 11: Predictions of the activity ‘stand’ in the predicted loca-
                                                                                                                            tions across one week

                                             sum every 120Min
   08:00                                                                                                                                                    sum every 120Min
   16:00                                                                                                                      08:00
   00:00                                                                                 7.5                                  16:00
   08:00
                                                                                               sum std.dev of magnitude
   16:00                                                                                                                      00:00
   00:00                                                                                                                      08:00                                                               2500
   08:00                                                                                 6.0                                  16:00
   16:00                                                                                                                      00:00
   00:00                                                                                                                      08:00                                                               2000
   08:00                                                                                 4.5                                  16:00
   16:00                                                                                                                      00:00
   00:00                                                                                                                      08:00
                                                                                                                              16:00                                                               1500
   08:00                                                                                 3.0                                  00:00
   16:00                                                                                                                      08:00
   00:00                                                                                                                      16:00                                                               1000
   08:00                                                                                                                      00:00
   16:00                                                                                 1.5                                  08:00
   00:00                                                                                                                      16:00
   08:00                                                                                                                      00:00                                                               500
   16:00                                                                                                                      08:00
                                                                                         0.0                                  16:00
                                                                                                                                                                                                  0
                        1



                                     1


                                                 ll 1



                                                                    1



                                                                                    1
                      om



                                    om




                                                               en



                                                                                m
                                                 ha




                                                                              roo
                                                              ch




                                                                                                                                           1




                                                                                                                                                        1




                                                                                                                                                                 1




                                                                                                                                                                               1




                                                                                                                                                                                              1
                    o


                               dro
                thr




                                                                                                                                      om




                                                                                                                                                    m




                                                                                                                                                                ll




                                                                                                                                                                               n




                                                                                                                                                                                          om
                                                             kit




                                                                                                                                                               ha




                                                                                                                                                                           he
                                                                         ng




                                                                                                                                                 oo
                               be
               ba




                                                                                                                                      ro




                                                                                                                                                                                         ro
                                                                                                                                                                          tc
                                                                        livi




                                                                                                                                                dr
                                                                                                                                  th




                                                                                                                                                                         ki




                                                                                                                                                                                     g
                                                                                                                                               be
                                                                                                                                 ba




                                                                                                                                                                                    in
                                                  room




                                                                                                                                                                                   liv
                                                                                                                                                                  room

               Figure 9: Movement (magnitude) by location across week 1
                                                                                                                            Figure 12: Predictions of the activity ‘lay down’ in the predicted
                                                                                                                            locations across one week
                                             sum every 120Min
       08:00
       16:00
       00:00
       08:00                                                                             2000
                                                                                                                            way, bathroom, kitchen and living room between 04:00 and
       16:00
       00:00                                                                                                                06:00 on most mornings. The participant leaves the residence
       08:00                                                                             1600
       16:00                                                                                                                between 06:00 and 08:00 between Tuesday and Friday. The
       00:00
       08:00
       16:00                                                                             1200
                                                                                                                            living room is occupied in the evenings between 16:00 and
       00:00
       08:00
                                                                                                                            22:00, with the longest periods of occupancy on the Monday,
       16:00                                                                             800                                Tuesday and Sunday.
       00:00
       08:00
       16:00                                                                             400
                                                                                                                               The room transitions (figure 5) show that living room and
       00:00
       08:00
       16:00
                                                                                                                            kitchen are most frequently moved between. However, the
                                                                                         0                                  transition matrix calculated by majority class in each pair-
                           1




                                         1




                                                      1




                                                                    1




                                                                                    1




                                                                                                                            wise minute causes the hallways to be under represented. Al-
                      om




                                     m




                                                  ll




                                                                    n




                                                                               om
                                                 ha




                                                               he
                                    oo
                      ro




                                                                               ro
                                                               tc
                                dr
                 th




                                                                                                                            lowing for second order adjacency; essentially allowing for
                                                             ki




                                                                           g
                               be
                ba




                                                                          in
                                                                        liv




                                                      room                                                                  hops over the hallway; reduces the error.
                                                                                                                               Movement intensity (figure 6) by accelerometer magnitude
Figure 10: Predictions of the activity ‘walk’ in the predicted loca-                                                        supports the location predictions, showing that movement in-
tions across one week                                                                                                       tensity decreases at 22:00 on most days and remains low until
                                                                                                                            04:00, a time when the participant is located in the bedroom.
                                                                                                                            The most intense movement within the home was recorded
that reason, in our current analysis we may expect lower lev-                                                               on the weekend.
els of accuracy than estimated. From the location prediction                                                                   Movement intensity measurements by accelerometer mag-
data across the week (figure 4), a regular routine emerges.                                                                 nitude are supported by the PIR activation (figure 8) data.
The participant occupies the bedroom from around 22:00 on                                                                   With the exception of the installation period, between 08:00
most nights, with occupancy transitioning through the hall-                                                                 and 12:00 on Monday, when there were SPHERE technicians
in the home, the individual participants’ movement from the       ring in the bedroom and living room. The results suggest that
wearable maps well to the movement detected by the PIR sen-       the method of classification has produced meaningful activ-
sors.                                                             ity classifications and should provide a basis for an expanded
   Movement intensity (accelerometer magnitude) by loca-          activity set in future work.
tion highlights where activity occurs within the home. Table
2 shows that over the entire week the living room was where       7   Future work
most movement occurred, followed by the bedroom, kitchen,
hallway and finally the bathroom.                                 In future work, a longer period of observation will be anal-
   Figure 9 shows how movement intensity varied in locations      ysed using methods identified in this paper. It is anticipated
over time. The visualisation shows low intensity movement         that with a longer period of observation issues such as con-
during night time hours, when the participant is located in       cept shift or hardware failure may reduce the effectiveness of
the bedroom. More intense movement is detected in both the        classifiers for periods of time.
kitchen and living room each day in the late afternoon and           Particularly, the method of RSSI fingerprinting used in this
evening. The most intense and sustained movement occurred         initial case study would not be robust to hardware failure or
in the kitchen on Sunday morning.                                 removal. In future work it will be necessary to develop a
   A comparison of magnitude measurements in figure 6 and         continuous retraining strategy, such that should a gateway be
RSSI measurements in figure 7 during sleeping hours high-         unplugged or suffer failure then location classification can re-
lights a potential problem with using RSSI measurement.           cover and learn from the new gateway topology.
RSSI signal change can be by obscuring the wearable. Dur-            SPHERE and HemiSPHERE participants have completed
ing sleep the RSSI signals can be modified by a participant       additional surveys to help with annotation of routine and be-
changing sleeping position and obscuring the wearable, re-        haviour. In analysing a longer time period, future work will
sulting in a perceived movement in position.                      incorporate feedback from a sleep quality survey, daily di-
                                                                  aries and Social Rhythm Metric (SRM).
   Walking activity, shown in figure 10, appears mostly in the
evening, overlapping with time spent moving in the kitchen           We are currently collecting data from additional partici-
and living room (Figure 6).                                       pants and pending to apply the same analysis on the collected
                                                                  data. We need to consider how our current analysis pipeline
   Standing activity, shown in figure 11, occurs in the hall,
                                                                  generalises to other house layouts, participants and number
kitchen and living room and routinely at the beginning and
                                                                  of house occupants.
end of each day, overlapping with time spent in the kitchen
                                                                     One possible research direction is about how to validate
and living room (figure 4).
                                                                  the predicted locations when multiple participants are in the
   Laying down, shown in figure 12, indicates sleep during
                                                                  household. In our current analysis it was possible to validate
hours of low activity in the bedroom, as shown in figure 6.
                                                                  with the PIR activation.However, we will need to incorporate
                                                                  different sensors and heuristics to differentiate between the
6   Conclusions                                                   house occupants.
The case study has demonstrated that RSSI and tri-axial ac-          In our current work activities are limited to walking, stand
celerometer data can be used to measure key indicators of re-     and lay down. In future work, these activities are to be ex-
covery from Hip and Knee replacement surgery, such as daily       tended to include sitting down, and climbing and descending
routine, sleep patterns, location transitions and movement in-    stairs. Further activities are facilitated by additional annota-
tensity over a short period of time.                              tion of head mounted camera data recorded during the day in
   RSSI fingerprints collected during the technician walk-        fast-forward activity.
around activity were sufficient (Table 1) to model distinct lo-      To further develop a view of domestic routine, data from
cations within the home. However, transitions such as kitchen     smart-meter attached devices such as microwave, toaster, ra-
to bathroom, which appear in figure 5, are not physically pos-    dio and television will be integrated with participant location
sible according to the layout of the home in figure 1. The        predictions to highlight patterns of user interaction with do-
likely cause is the adjacency of kitchen and bathroom mean-       mestic appliances.
ing the fingerprints may converge dependent on factors such
as radio-frequency interference.                                  References
   To improve the classification algorithm and reduce erro-       [Alam et al., 2012] Muhammad Raisul Alam, Mamun
neous location transitions, a representation of possible tran-      Bin Ibne Reaz, and Mohd Alauddin Mohd Ali. A
sitions given a prior must be included in the model. This           review of smart homes - past, present, and future. IEEE
improvement will be a focus of future work.                         Transactions on Systems, Man, and Cybernetics, Part C
   Routine of activity and passivity is highlighted in move-        (Applications and Reviews), 42(6):1190–1203, 2012.
ment estimates, with accelerometer magnitude providing the
clearest view of true movement levels. RSSI tended to over        [Bao and Intille, 2004] Ling Bao and Stephen S Intille. Ac-
estimate movement.                                                  tivity recognition from user-annotated acceleration data. In
   Activity classifications, shown in figures 10, 11 and 12,        International Conference on Pervasive Computing, pages
show a pattern of activity in locations. Laying down occurs         1–17. Springer, 2004.
mostly in the bedroom, with standing occurring mostly in the      [Beswick et al., 2012] Andrew David Beswick, Vikki
living room and kitchen, and walking predominantly occur-           Wylde, Rachael Gooberman-Hill, Ashley Blom, and Paul
   Dieppe. What proportion of patients report long-term           [Rashidi and Mihailidis, 2013] Parisa Rashidi and Alex Mi-
   pain after total hip or knee replacement for osteoarthritis?      hailidis. A survey on ambient-assisted living tools for
   a systematic review of prospective studies in unselected          older adults. IEEE journal of biomedical and health in-
   patients. BMJ open, 2(1):e000435, 2012.                           formatics, 17(3):579–590, 2013.
[Bolink et al., 2012] SAAN Bolink, SN van Laarhoven,              [Ravi et al., 2005] Nishkam Ravi,         Nikhil Dandekar,
   M Lipperts, IC Heyligers, and B Grimm. Inertial sen-              Preetham Mysore, and Michael L Littman. Activity
   sor motion analysis of gait, sit–stand transfers and step-up      recognition from accelerometer data. In Aaai, volume 5,
   transfers: differentiating knee patients from healthy con-        pages 1541–1546, 2005.
   trols. Physiological measurement, 33(11):1947, 2012.           [Senden et al., 2011] Rachel Senden, Bernd Grimm, Ken-
[Gansemer et al., 2010a] S Gansemer, S Pueschel, R Frack-            neth Meijer, Hans Savelberg, and Ide C Heyligers. The
   owiak, S Hakobyan, and U Grossmann. Improved RSSI-                importance to including objective functional outcomes in
   based Euclidean distance positioning algorithm for large          the clinical follow up of total knee arthroplasty patients.
   and dynamic WLAN environments. 9(1):9, 2010.                      The Knee, 18(5):306–311, 2011.
[Gansemer et al., 2010b] Sebastian Gansemer, Uwe Gross-           [Siirtola and Röning, 2012] Pekka Siirtola and Juha Röning.
   mann, and Syuzanna Hakobyan. RSSI-based Euclidean                 Recognizing human activities user-independently on
   Distance algorithm for indoor positioning adapted for the         smartphones based on accelerometer data.             IJIMAI,
   use in dynamically changing WLAN environments and                 1(5):38–45, 2012.
   multi-level buildings. pages 1–6. IEEE, September 2010.        [Stevens-Lapsley et al., 2011] Jennifer E Stevens-Lapsley,
[Janidarmian et al., 2017] Majid       Janidarmian,       Atena      Margaret L Schenkman, and Michael R Dayton. Compari-
   Roshan Fekr, Katarzyna Radecka, and Zeljko Zilic. A               son of self-reported knee injury and osteoarthritis outcome
   comprehensive analysis on wearable acceleration sensors           score to performance measures in patients after total knee
   in human activity recognition. Sensors, 17(3):529, 2017.          arthroplasty. PM&R, 3(6):541–549, 2011.
[Kingma and Lei, 2015] Diederik P Kingma and Jimmy Lei.           [Tao et al., 2015] Lili Tao, Tilo Burghardt, S Hannuna, Mas-
   Adam: A Method for Stochastic Optimization. page 15,              simo Camplani, Adeline Paiement, Dima Damen, Majid
   2015.                                                             Mirmehdi, and Ian Craddock. A comparative home ac-
[Krumm and Horvitz, 2004] J. Krumm and E. Horvitz. Lo-               tivity monitoring study using visual and inertial sensors.
   cadio: inferring motion and location from wi-fi signal            In E-health Networking, Application & Services (Health-
   strengths. In The First Annual International Conference           Com), 2015 17th International Conference on, pages 644–
   on Mobile and Ubiquitous Systems: Networking and Ser-             647. IEEE, 2015.
   vices, 2004. MOBIQUITOUS 2004., pages 4–13, Aug                [Twomey et al., 2016] Niall Twomey, Tom Diethe, Meelis
   2004.                                                             Kull, Hao Song, Massimo Camplani, Sion Hannuna,
[Kwapisz et al., 2011] Jennifer R Kwapisz, Gary M Weiss,             Xenofon Fafoutis, Ni Zhu, Pete Woznowski, Peter Flach,
                                                                     and Ian Craddock. The SPHERE challenge: Activity
   and Samuel A Moore.            Activity recognition using
                                                                     recognition with multimodal sensor data. arXiv preprint
   cell phone accelerometers. ACM SigKDD Explorations
                                                                     arXiv:1603.00797, 2016.
   Newsletter, 12(2):74–82, 2011.
                                                                  [Wang et al., 2014] Yujian Wang, Bin Zhao, and Zhaohui
[Muthukrishnan et al., 2009] Kavitha           Muthukrishnan,
                                                                     Jiang. RSSI-Based Smooth Localization for Indoor En-
   Berend Jan van der Zwaag, and Paul Havinga. Inferring
                                                                     vironment. The Scientific World Journal, 2014:1–8, 2014.
   Motion and Location Using WLAN RSSI. In Richard
   Fuller and Xenofon D. Koutsoukos, editors, Mobile Entity       [Williams, 2014] Dan Williams. Virtual follow up of hip and
   Localization and Tracking in GPS-less Environnments,              knee replacement patients, 2014.
   volume 5801, pages 163–182. Springer Berlin Heidelberg,        [Woznowski et al., 2015] Przèmyslaw Woznowski, Xenofon
   Berlin, Heidelberg, 2009.                                         Fafoutis, et al. A multi-modal sensor infrastructure for
[National Joint Registry Editorial Board, 2017] National             healthcare in a residential environment. In IEEE Int. Conf.
   Joint Registry Editorial Board. National joint registry           on Communication Workshop (ICCW), 2015.
   14th annual report 2017, 2017.                                 [Woznowski et al., 2017] Przèmyslaw Woznowski, Alison
[National Joint Registry, 2018] National Joint Registry.             Burrows, Tom Diethe, et al. SPHERE: A sensor platform
   Joint replacement statistics, 2018.                               for healthcare in a residential environment. In Designing,
                                                                     Developing, and Facilitating Smart Cities, pages 315–333.
[Preston et al., 2012] Timothy Preston, Wendy Baltzer, and
                                                                     Springer International Publishing, Cham, 2017.
   Stewart Trost. Accelerometer validity and placement for
   detection of changes in physical activity in dogs under        [Xiao et al., 2016] Luo Xiao, Bing He, Annemarie Koster,
   controlled conditions on a treadmill. Research in Veteri-         Paolo Caserotti, Brittney Lange-Maia, Nancy W. Glynn,
   nary Science, 93(1):412–416, August 2012.                         Tamara B. Harris, and Ciprian M. Crainiceanu. Movement
                                                                     prediction using accelerometers in a human population:
[Quan et al., 2010] Michael Quan, Eduardo Navarro, and
                                                                     Movement Prediction Using Accelerometers in a Human
   Benjamin Peuker. Wi-Fi Localization Using RSSI Finger-            Population. Biometrics, 72(2):513–524, June 2016.
   printing. page 6, 2010.