<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Multi-Resident Location Detecting in Smart Home∗</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anca Alexan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexandru Alexan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>tefan Oniga</string-name>
          <email>stefan.oniga@cunbm.utcluj.ro</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electric, Electronic and Computer Engineering, Technical University of Cluj-Napoca, North University Center Baia Mare</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Proceedings of the 1</institution>
        </aff>
      </contrib-group>
      <fpage>32</fpage>
      <lpage>38</lpage>
      <abstract>
        <p>Our homes become smarter every day, as new devices become connected and provide internet of things functionality. Using sensors, our homes can detect our presence and even the activity executed. Multi-residence environments provide some dificulties in detecting the executed activity accurately, as it is often dificult to identify the residents and determine the correct activity. Our proposed system handles CASAS activity data and tries to improve the activity detection rate for multi-resident scenarios. The neural network implementation is done using Matlab.</p>
      </abstract>
      <kwd-group>
        <kwd>Smart home</kwd>
        <kwd>CASAS</kwd>
        <kwd>multi-resident tracking</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Smart homes equipped with activity detection sensors, which have a binary output,
can be considered low-cost activity monitored locations. Although this type of
activity detection system has a low-profile and is very afordable, it can successfully
be used in multiple domains such as automation, health monitoring, security, and
activity detection [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. This system works very well if detecting simple actions or
monitoring a single subject. However, if multiple residents live in the same smart
home, correctly determining the activity type and pinpointing the correct subject
can get very challenging [
        <xref ref-type="bibr" rid="ref3 ref6">3, 6</xref>
        ]. One option to improve the activity detection rate
and accuracy is to use Artificial Intelligence to interpret the data gathered from
the Smart House sensor networks. Since we are dealing with multiple resident
scenarios, one of the most dificult roles of the artificial intelligence layer is to
correctly match the sensor data to the appropriate resident [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] to correctly identify
the performed activity. The amount of data and quality can greatly afect the
chosen data analysis algorithm and predictions. Using machine learning algorithms
(MLA) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] can greatly increase the detection accuracy due to the multiple existing
data processing functions [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Since MLA is a universal nonlinear tool for modeling
and processing complex data [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], it is a great choice for complex activity recognition.
In this article, we propose an activity detection and recognition system that is
capable of operating in a multi-resident smart house. We propose to recognize
complex activities and assign them to the correct resident.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Smart environments are evolving continuously, and their purpose is to simplify
everyday life by optimizing time, energy, and cost. Smart systems are formed by
a series of devices that can communicate, transfer data, to optimize performance
automatically without human intervention. The main components of this kind
of system are sensors, processing networks, data analysis, and system monitoring
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. One of the most recent innovations is activity detection in a multi-resident
environment. Data processing and activity recognition from CASAS data-sets are
shown [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. One algorithm for solving this dificult recognition problem is sMRT,
which handles multi-resident smart houses with binary output motion sensors. This
algorithm is trying to learn the special-temporal sensor relation. To identify an
input and output relation, a dynamic model was used to predict the state for each
resident in the next timeframe, based on the current resident state. This dynamic
model will become data input for the Bayes estimation process. The entire process
is divided into two phases, phase one consists of a learning phase that constructs
the dynamic model and a second phase that predicts the number of residents in
the location.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Proposed System</title>
      <sec id="sec-3-1">
        <title>3.1. Casas System</title>
      </sec>
      <sec id="sec-3-2">
        <title>Dataset</title>
        <p>The CASAS system contains the following sensors types: PIR sensors for presence
detection, temperature sensors, humidify sensors, light sensors, other misc. sensors
that can vary. For testing the implemented location detecting system, the dataset
used was one from the CASAS system, created at the Washington State University.
The dataset has two users, and its name is Kyoto. The dataset is labeled with the
activity type and the user that is executing it. The entire dataset is provided in a
text format (.txt) and contains the activities in chronological order. Each record
contains the date and time, the active sensor’s name, the sensor’s state (ON, OFF,
OPEN, ABSENT). Besides this data that is obtained directly from the CASAS
system, other labels are present with information regarding users and activities, as
shown in Figure 1.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.2. Activity Detection</title>
        <p>A very important learning process aspect is data preprocessing. This can be
implemented by using statistic data processing flows, numeric data scaling, primary
component analysis, or selecting certain attributes that have a common property.
All these preprocessing operations were applied to the Kyoto database provided
by the WSU. From this dataset, Kyoto, details regarding four diferent activities
were extracted. These activities were executed in three diefrent scenarios with 2
diferent users. The dataset also provides the map for the used smart house, a floor
plan containing each room, and a list of sensors alongside their placement on the
map. Analyzing the dataset activity data, we have noticed that the succession of
active sensors is diferent for the same activity. As we can observe in Figure 2, the
number of active sensors is diferent according to the activity that is executed. One
thing that we have in common for a certain activity is the same location where the
activity takes place.</p>
        <p>Since diefrent activities share the same location, other characteristics were
required to be extracted to aid the activity recognition process. The active sensors
list alongside the required sensors for each activity were centralized. From this
list, it’s clear that for the same activity, the list of active sensors and the sensor’s
activation order were diferent. We can also notice that for each activity execution,
the number of active sensors is diferent, and also the total activity execution time
difers. From this centralized list, data was extracted and the active sensor enable
probability was calculated for each activity. A hierarchy was created and the first
three most probable enabled sensors for each activity were chosen. For example, for
activity 1, the first three most probable sensors to be activated are M17, M15, and
M16. For each characteristic an index was added. This index will be added together
with the sensor rank from the previously generated hierarchy (top sensor 1, 2, or
3) to form a new characteristic that will be added for each dataset record(the text
ifle). To further improve the activity recognition rate, the probability coeficient
for a sensor to be enabled(ON state) reported to the total number of active sensors
was calculated. Also, the probability coeficient for a sensor to be enabled(ON
state) reported to the total number of active sensors for each user was calculated
as well. All the generated coeficients were added in the dataset file, as shown in
Table 1.</p>
        <p>Sensor data is sequential even though the activities are executed in parallel
because the CASAS data recording precision is very high. In Figure 3 we can
clearly notice the concurrent activities of the two users.</p>
        <p>Each activity can be interpreted as an active sensor ordered list, a set. The
smart house can be interpreted as a space S that is composed of multiple sub-spaces
that represents the house’s rooms. Each sub-space contains the list of sensors from
the corresponding room, thus the house space is a reunion of all sub-spaces. An
activity can be viewed as an intersection of certain sub-spaces. The data was
imported in Matlab using the import tool, separating the input and output data.
The columns that contain information on the sensors name an also the new
characteristics that were computed in the preprocessing phase was used as input data
(phase 2). The columns containing the person’s information and the executed
activity were used as output data and these were used as tags for the input data. The
total number of records for the used dataset is 1100. For the first phase, phase 1,
the data was used without the additional characteristics added. Using the Neural
Net Fitting tool, a new neural network was created. The chosen to learn algorithm
was Bayesian. The Bayesian reasoning ofers a probabilistic approach for the
inference. The decision logic takes into account the probabilistic distribution based on
the interest quantities but also the observed training data. This approach is very
important for the machine learning process because it provides a method of
quantitative approximation that is necessary for justifying the alternative hypotheses
evaluation.</p>
        <p>As we can notice, the neural network chosen architecture uses 20 hidden layers,
as is showed in Figure 4. The sampling type is Matrix rows. For the input data,
each row contains 7 columns. The first column contains the active sensors name
and it’s followed by 3 columns displaying the hierarchy of the first 3 active sensors
for each activity. The remaining columns contain the probability coeficient for
a certain sensor to be enabled, ON state, reported to the total number of active
sensors. As output data, each row contains two columns, one for the person that
executes the activity and one for the activity that is being executed. For the
learning process, 70% of total data were used. One part of the remaining data,
15%, was used for data validation and the remaining 15% were used for data
verification. The algorithm learning process took 455 epochs, the best result being
obtained in the 175 epoch with a value of 3.3183. The obtained result for this
phase, the phase 1, was approximately 75 percent. For the next phase, the phase
2, the data used contained the additional computed characteristics. Using the same
set-up, algorithm and hidden layer configuration, the recognition rate obtained was
almost 88 percent.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>This paper presents the implementation of a multi-resident activity detection
system using data from the CASAS system. Since the sensors used are PIR based,
having a binary output, activity detection in multiple resident locations is
challenging due to the system’s inability to identify residents. Our proposed method
of increasing the neural network accuracy is computing additional characteristics
based on the system behavior and adding them to the initial dataset data. The
Matlab tool was used to create and train a neural network, comparing the results
with and without the added computed characteristics. Thus, our proposed
neural network and data preprocessing algorithm proved to significantly increase the
activity recognition rate by 13 percent.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Alexan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Alexan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Oniga</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          <article-title>Pap: Analysis of activity detection data pre-processing</article-title>
          , in: Oct.
          <year>2019</year>
          , pp.
          <fpage>282</fpage>
          -
          <lpage>286</lpage>
          , doi: 10.1109/SIITME47687.
          <year>2019</year>
          .
          <volume>8990804</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Gupta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>McClatchey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Caleb-Solly</surname>
          </string-name>
          :
          <article-title>Tracking changes in user activity from unlabelled smart home sensor data using unsupervised learning methods</article-title>
          (Oct.
          <year>2020</year>
          ), doi: 10.1007/s00521-020-04737-6.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kanevski</surname>
          </string-name>
          <article-title>: Advanced Mapping of Environmental Data: Introduction</article-title>
          , in: Feb.
          <year>2010</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          , isbn: 9781848210608, doi: 10.1002/9780470611463.ch1.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>[4] Machine learning for internet of things data analysis: a survey</article-title>
          ,
          <source>Digital Communications and Networks 4.3</source>
          (
          <issue>2018</issue>
          ), pp.
          <fpage>161</fpage>
          -
          <lpage>175</lpage>
          , issn:
          <fpage>2352</fpage>
          -
          <lpage>8648</lpage>
          , doi: https://doi.org/10.1016/j.dcan.
          <year>2017</year>
          .
          <volume>10</volume>
          .002, url: http://www.sciencedirect.com/science/article/pii/S235286481730247X.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T.</given-names>
            <surname>Majoros</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Ujvari</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          <article-title>Oniga: EEG data processing with neural network</article-title>
          ,
          <source>Carpathian Journal of Electronic and Computer Engineering</source>
          <volume>12</volume>
          (Dec.
          <year>2019</year>
          ), pp.
          <fpage>33</fpage>
          -
          <lpage>36</lpage>
          , doi: 10.2478/cjece-2019-0014.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Ranasinghe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Al Machot</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <article-title>Mayr: A Review on Applications of Activity Recognition Systems with Regard to Performance and Evaluation</article-title>
          ,
          <source>International Journal of Distributed Sensor Networks</source>
          <volume>12</volume>
          (
          <year>July 2016</year>
          ), doi: 10.1177/1550147716665520.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Suto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Oniga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lung</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          <article-title>Orha: Comparison of ofline and real-time human activity recognition results using machine learning techniques</article-title>
          ,
          <source>Neural Computing and Applications</source>
          <volume>32</volume>
          (Oct.
          <year>2020</year>
          ), doi: 10.1007/s00521-018-3437-x.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Cook</surname>
          </string-name>
          <article-title>: sMRT: Multi-Resident Tracking in Smart Homes with Sensor Vectorization</article-title>
          ,
          <source>IEEE Transactions on Pattern Analysis and Machine Intelligence</source>
          (
          <year>2020</year>
          ), pp.
          <fpage>1</fpage>
          -
          <lpage>1</lpage>
          , doi: 10.1109/TPAMI.
          <year>2020</year>
          .
          <volume>2973571</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>