Content uploaded by Andrei Vasilateanu
Author content
All content in this area was uploaded by Andrei Vasilateanu on Nov 19, 2018
Content may be subject to copyright.
Smart Home Simulation System
Andrei Vasilateanu, Ioan Andrei Popescu, Alexandra Silvia Cergan, Nicolae Goga
Department of Engineering in Foreign Languages
University Politehnica Bucuresti
Bucuresti, Romania
andrei.vasilateanu@upb.ro, andrei.popescu93@gmail.com, silviacergan@gmail.com, n.goga@rug.nl,
Abstract—Our paper is addressing an actual need of the
modern society, which is to take advantage of Internet of Things
for creating smart environments in order to improve everyday
life. We propose a solution for helping the design of smart
environments by letting the user test different topologies, without
the actual equipment, in order to find out the best configuration
for transforming the house into a connected, intelligent one.
Keywords—Internet of Things; home automation; sensors;
actuators; simulation; Artificial Intelligence;
I.
I
NTRODUCTION
We live in a connected world, an Internet of Things world,
and this brings fundamental changes to society and to
consumers. The IoT era brings new resources that can make
life better. By sensing and acting on the surrounding
environment, the IoT devices are going to create many
practical improvements, increasing the health, safety and the
comfort of the users.
Even though it is still an emerging domain, the Internet of
Things is gaining more and more support by people
everywhere. In 2013, it was estimated that there is 1 device
connected to the internet for each person on earth. By 2020, it
is forecasted that this number will increase to 9 devices.
One of the biggest problems when designing such complex
environments is finding the best way to arrange the sensors,
actuators and other smart devices. Moreover, these are not
exactly cheap devices.
We will present a solution, designed to allow people test
their own smart environments, without the actual equipment in
order to find the best configuration for transforming their
houses into connected ones.
II. I
NTERNET OF
T
HINGS
The Internet of Things defines the concept of everyday
objects, like wearable devices, home appliances or industrial
machines to gather data and take some action across a network
[1]. The concept is simple yet powerful and it might be a topic
of great interest but it is not exactly new.
In the early 2000s Kevin Ashton at MIT's AutoID
Laboratory was laying the groundwork for what would become
the Internet of Things [2]. Kevin Ashton envisioned an
infrastructure in which computers would be able to obtain
information about the real, physical world without any
intervention from humans. His point of view on Internet of
Things is best expressed quoted below:
“If we had computers that knew everything there was to
know about things, using data they gathered without any help
from us, we would be able to track and count everything, and
greatly reduce waste, loss and cost. We would know when
things needed replacing, repairing or recalling, and whether
they were fresh or past their best. We need to empower
computers with their own means of gathering information, so
they can see, hear and smell the world for themselves, in all its
random glory. “- Kevin Ashton [3]
The Information Age is shifting to the Intelligence Age,
characterized by the independently communication between
devices that are sensitive to human activity and react by
performing a specific task which will further improve the
quality of human's lifestyle.
All the existing limitations of interconnecting devices from
the early 2000s were overcome, internet connectivity extends
now beyond traditional devices like desktops, smartphones,
laptops to a range of devices and everyday things which are
able to communicate with the external environment. These
things are either sensors or actuators. A sensor tells us about
our environment (location, temperature, gas, humidity,
pressure and other sensors) while an actuator is a device that
influence the environment, like lights, switches, outlets. The
“Internet of Things” brings all together and allows humans to
interact with things with the main objective of making life
better.
By sensing and acting on our surrounding environment, the
IoT devices are going to create many practical improvements,
increasing human's health, safety and comfort. The Internet of
Things may assist in environmental protection by monitoring
air or water quality, atmospheric or soil conditions, and can
even include areas like monitoring the movements of wildlife
and their habitats.
Moreover, this shift from Information Age to Intelligence
Age is driven by our desire for efficiency, particularly in
connection with everyday tasks that can be easily automated.
We aim to create an environment for ourselves where we can
feel comfortable and secure. Ambient intelligent devices can
sense the presence, movement and behavior, analyze the data
collected from the surrounding environment in order to learn
about the owner and then make a decision based on the data.
Intelligent home systems, also called smart homes, are
modern living spaces which use technology to automate
systems, appliances and everyday tasks. A smart home should
be able to learn about its owner schedule and use that
information to automate different tasks like climate control,
light control, time to start specific devices (lights and audio
equipment can be programmed to turn on to simulate
inhabitants), television preferences. Smart Homes can also
help the elderly live happier, more independent lives. Your
smart home can monitor the movements and behavior and help
you stay connected with your loving ones by sending you an
immediate alert if they deviate from important daily routines.
These are just some of many possible scenarios in a smart
house environment.
III. C
HALLENGES
As with every new technology, Internet of Things comes
with its own challenges. One of the biggest ones comes from
the fact that such a complex system may prove hard to
configure, in the way that the sensors and devices are placed.
Today, almost every electronics vendor offers some kind of
IoT Kit (Samsung SmartThings, Loxone). Depending on your
kit (sensors, actuators, other smart devices), designing and
arranging your own environment can be a simple or a difficult
task, because being a new field, we don’t have design patterns
that support and guide us through the whole process.
In order to create an efficient and useful system for IoT,
one needs a new way of design thinking and tools with regard
to the overall architecture and, especially, the user experience.
We are used to applications and websites on the internet to
react blazingly fast, thus, we expect the same thing from a
smart system.
This is not the case with real world objects. The classic
solution on the web is that the system responds immediately
(e.g. Greg wants to buy something and in less than a second, he
will receive a notification that the transaction has failed). Now,
take a simple example of a system that closes the window.
Greg closes your windows using an application and will leave
in rush to catch the next train. He gets up on the train and
receives an email that the windows are not closing. The user
experience should accommodate physical devices which react
slowly and still be able to offer accurate and relevant feedback,
in a timely manner.
Moreover, IoT systems cannot assume that only one user
will interact with them, or that the control will be handled only
through a single device. They must adapt multiple controllers.
Another aspect is that smart devices are not exactly cheap
ones. Orange Smarthome for example, needs a monthly
subscription of 15 Euros and will provide 2 sensors for free.
Every additional sensor will cost an extra 39 Euros. So, in
order to cover the whole house and ensure a seamless
communication between the sensors, a consistent investment is
needed. Also, there are many types of sensors (optical, ambient
lightning, temperature, pressure, humidity, touch, fingerprint,
etc). One must know exactly what he needs to buy and which
will benefit his setup.
With our solution, we plan to solve these problems by
offering a simulated environment for the user to run specific
scenarios with different configurations and by providing
feedback and suggestions based on the analysis of each
simulation, thus helping the user decide on his choice of
configuration.
IV. E
XISTING
S
OLUTIONS
With currently growing interest in the smart houses
technology, there is an increasing number of people that would
like to have software that will help them to implement their
own smart homes.
A couple of software applications that have the potential to
help with developing a smart home environment are available
on the market. The main idea behind all existing applications is
that by using simulations one can test real smart environments
configurations.
A. Home I/O Bringing Home Automation
Home I/O [4] is a real time simulation of a smart house and
its surrounding environment. It allows users to control 174
interactive devices, typically found in a real house, through a
built-in Home Automation Console. Users interact with the
application through a first-person video game approach.
Several parameters in the surrounding environment can be
altered such as date and time, geographic location and weather
conditions.
HOME I/O includes 174 interactive devices, with input and
output points (I/O Points), which can be used to automate the
house. This application is designed more to be an educational
tool that will help educate children about the positive impact of
home automation in people’s lives and on the environment.
The license for this application costs in 2016 59€ single license
(1 computer per license) and 299€ classroom license (20
computers per license).
B. Cloud4All Smart Home Simulation
Cloud4all smart house emulation [5] shows a sample
layout of a house, with each room containing various
appliances. The user can navigate through the rooms and
appliances to see how the needs and preferences of the
selected profile would be applied. The user can modify
settings to appliances but it can not move them in a different
place, thus he is not able to try different configurations of the
smart environment. The application is free but it is not open
source.
C. SIMACT: A 3D Open Source Smart Home Simulator for
Activity Recognition
SIMACT [6] was built with the intention of providing a
software experimentation tool that will help developers
validate their smart home recognition approaches. The goal of
SIMACT is to enable scientist to simulate execution sequence
of activity inside a smart home to conduct their research. The
application consists in reproducing the behavior of a person
really living in a smart home. The simulator has the same
basic architecture as a smart home. It is simply composed of
different sensors that analyze what happens in the house and
write the information in a database.
Also SIMACT’s virtual environment can be changed when
needed. The SIMACT simulator is programmed entirely in
Java which makes it open source and portable. But, this
software is mainly targeted only for scientific researchers,
unlike our solution, which we are planning to be used also by
non - technical users.
V. O
UR
S
OLUTION
Our Smarthome Simulation System comes exactly between
the user and his choice of a smarthome product. It should help
him decide which configuration is best suited for his house
setup and provide him with valuable feedback and suggestions
computed on the gathered data at the end of each simulation.
It involves letting the user to test his own house
configuration without the actual equipment and run various
scenarios with different types of sensors and actuators in order
to find out how his setup will behave given these conditions
and which is the best positioning for the sensors inside the
house.
When we started developing the application, we wanted to
provide a simulated environment, composed of everything that
you can find inside a smart house. Furthermore, we needed
intelligent agents, able to act as a real person. He should
interact with the house’s appliances, items and gadgets
accordingly and sensors should be able to observe the agent’s
behavior inside the environment and act according to the
changes in the house.
Having the use cases, we thought about our target users
and we concluded that our solution is aimed to both persons
who are looking to buy or are already using home automation
kits, and developers who plan to test their newly developed
equipment.
The main difference between our solution and the existing
ones is that we also simulate the users, not only the devices,
thus being able to test more specific scenarios. Also the nature
of the implementation allows the program to be automated and
included in an industrial solution for interior designing.
In the current stage of the application we are simulating
only location sensors, able to sense the presence of the user
and position him. The work is related to another project the
team is participating, Eurostars iLight, which aims to produce
smart luminaries for locating users and devices [7].
A. Implementation
The first thing we wanted, was to create a realistic person,
one that acts like a human being. We needed to implement an
Artificial Intelligence, so we started looking at AI algorithms
and real life simulators. Usually, a person, acts on a need. This
behavior has been used in living simulators like Sims.
In Sims, when a sim is not given any explicit action to
perform, will go on and do something that he needs to do in
that moment. Let’s think of a simple example. Imagine
Robert, an agent inside the system. Right now, Robert is very
hungry, so normally, he will go to the fridge and search for
food.
We came up with 5 basic needs:
Energy
Hunger
Hygiene
Bladder
Fun
Each of this needs is satisfied by a set of activities and
each one will drop in time. For example, Hunger is satisfied
by Eating, Hygiene by Washing Hands or Taking Shower,
Energy by Sleeping, and so on.
After the needs system, the agent needed to actually act, to
do something to satisfy the need. When doing a task, one does
not perform just a single action. Usually, a series of actions is
needed to reach a specific goal.
When the agent wants to eat, it will first go to the fridge
and check if there is any food. Suppose there is, it will go to
the drawer and take a plate, then take the food from the fridge.
It will heat it, get the needed cutlery, sit on a chair and only
after that, it will finally start eating the food.
We came to the conclusion that each activity is a sequence
of sub activities. Each (sub) activity, in order to be performed,
needs a series of preconditions to be satisfied. If they are, the
activity can be performed, and its completion will result in
some post conditions. It’s clear that each post condition may
act as preconditions for other activities. In other words, a
Fig 1: Simulation set up
specific activity can be performed if and only if all its
conditions are satisfied when starting it.
In order to achieve this, we used the Graphplan Algorithm,
which is an Artificial Intelligence Algorithm. The algorithm is
used to plan a sequence of events in order to reach a specific
goal. The algorithm will try to decide which set of tasks or
steps are needed to be performed and in which specific order,
so it will reach the final state.
To achieve this, it needs a problem defined in a STRIPS
(Stanford Research Institute Problem Solver) style, another
Artificial Intelligence algorithm. In STRIPS, a problem is
defined as a set of preconditions that need to be satisfied
before the execution and a set of post conditions that will
result after the execution.
Graphplan [9] builds a complex directed graph, in which
each STRIPS problem will be represented by a node. Each
node has a link from each of its preconditions and a link to
each of its effects. It also supports mutually exclusive actions,
interference (when the effects of one action is the negation of
a precondition of the other) and competing needs.
The algorithm will take as input the list of all the possible
activities (their conditions, included), a goal which represents
what state is needed to be achieved and the list of all satisfied
conditions at the moment. It will proceed to find the path from
the current state described by the current satisfied conditions
to the target state (goal) and will return the ordered list of
activities that are needed to be performed in order to reach the
target.
In order to use this algorithm, we used PLPlan, an Open-
Source Artificial Intelligence Planner developed by Philippe
Fournier - Viger, Assistant Professor at University of
Moncton, Canada. We implemented a wrapper over this
library in order to include our needs system and provide an
easier API (application program interface) to use inside our
application.
Having the sequence of actions, the agent needs to actually
move inside the house. It should be able to find the path from
his current position to a target position. It also needs to pass
only through doors and spaces which are not occupied by
other appliances. In other words, it needs to avoid obstacles. A
well-known algorithm specialized for pathfinding is A*
Algorithm [9]. This is the algorithm used by Google Maps. It
is used to find an optimal path between a start node and an end
node.
In order to use it, the house template had to be a graph, in
which walls, appliances and agents act as obstacles, such that
the agent that is moving, will not intersect with them. The A*
Algorithm will take into account the available paths, the cost
involved to “walk” to the target and the obstacles along the
way. It is guaranteed to find the optimal path if it exists. When
computing the path, A* keeps track of the already traversed
path and in case it finds a better one, it will backtrack and
continue from there.
Having the logic block for how the simulation will be
performed, we started the development of the solution.
The application is implemented using the Java
programming language. We chose Java because it is a “Write
once, run everywhere” language.
For the Graphic User Interface, the Smart Home
Simulation System uses the Swing Framework and
presents a simulation map where the user can see exactly
what the agents are doing inside the virtual house.
The map appliances are editable and, their locations,
connections to other nodes, their appliances and items are
stored inside a MySQL Database.
Possible activities are read from a JSON file and the
planning is done through PLPlan, a Java library which
implements the GraphPlan Algorithm.
Sensors are logging the registered information inside a
file which will be analyzed.
B. Results
The key results of the solution we proposed and developed
for virtual simulation of smart home environments are the
following:
It simulates human activity inside the virtual environment
taking into consideration different scenarios for human
personality and age stages.
The virtual smart home’s positioning of appliances and
gadgets can be customized in order to give the user a
simulated environment similar to the real house.
The simulation can perform for a specific amount of time
imposed by the user.
The simulation shows the sensors activated when the
simulated activity of the human presence is detected and
it displays a log with related information.
VI. F
UTURE
I
MPROVEMENTS
The application is still in development. We plan to further
enhance the solution's capabilities, thus we defined some
objectives:
Fig 2: Simulation runtime
We need to allow a greater degree of customization. Right
now, the application allows only the customization of the
appliances inside the smart house. Further customization is
possible, for activities and sensors, but the user has to
modify the values inside a JSON file. A non-technical
person, would not be able to do it. We need to provide an
easy to understand and use interface for modifying these
files.
We also plan to offer a way to build and configure custom
scenarios, select and edit the agents inside them and allow
the user to run simulations with it.
We want to provide the user with the possibility of
uploading his own house plan in order to use it inside the
application.
We aim to provide a better User Interface and User
Experience throughout the application and make it feel
more familiar, easy to use, consistent and eye catching.
We could extend the simulation to agencies of agents [10]
allowing more elaborate care scenarios, not limited to a
single house.
However, the main improvement and purpose of the
solution, is that it needs to provide feedback to the user at the
end of each simulation. In that case, the user will be presented
with different statistics and analytics computed with the data
gathered during the simulations. He will also be given
suggestions on which is the best way to position the sensors
inside his house, such that a complete or almost complete
coverage of the house and especially most “active” (traversed)
areas will be covered.
R
EFERENCES
[1] O. Vermesan, P. Friess, Internet of Things - from research and
innovation to market deployment, 2014.
[2] R. Van Kranenburg and A. Bassi, “IoT Challenges,” in Communications
in Mobile Computing, vol 1, 2012.
[3] K. Ashton, “That ‘Internet of Things’ Thing: In the Real Word, Things
Matter More Than Ideas”, RFID Journal, vol 22, no 7, 2009.
[4] HOME I/O Bringing Home Automation, http://realgames.pt/home-io/ ,
Retrieved Aug 2016.
[5] Cloud4all Smart Home Simulation, http://www.cloud4all.info/join-the-
effort/solutions/smart-house/ , Retrieved Aug 2016.
[6] K. Bouchard, A. Ajroud, B. Bouchard and A. Bouzouane, “SIMACT: A
3D Open Source Smart Home Simulator for Activity Recognition,” in
Advances in Computer Science and Information Technology, pp. 524-
533, 2010.
[7] N. Goga, A. Vasilateanu, M. N. Mihailescu, L. Guta, et al, “Evaluating
indoor localization using WiFi for patient tracking,” in International
Symposium on Fundamentals of Electrical Engineering, 2016.
[8] A. L. Blum, and M. L. Furst, “Fast planning through planning graph
analysis, “ in Artificial intelligence, vol 90, pp. 281-300, 1997.
[9] J. Hopcroft, R. Tarjan - “Efficient Algorithms for Graph Manipulation,”
in Communications of the ACM, 1973.
[10] A. Vasilateanu, A. Margarit, and A. C. Radulescu. "Virtual Agent
organizations Supporting disease specific communities," in E-Health and
Bioengineering Conference (EHB), 2013.