You are on page 1of 6

Distributed Home Automation System Based on

IEC61499 Function Blocks and Wireless Sensor


Reza Abrishambaf, Mert Bal Valeriy Vyatkin

Department of Engineering Technology Department of Electrical Engineering and Automation
Miami University Aalto University, Helsinki, Finland
Hamilton, OH, United States Department of Computer Science, Electrical and Space
{abrishr, balm} Engineering,
Luleå Tekniska Universitet, Sweden

Abstract— In this paper, a distributed home automation These systems suffer from flexibility and scalability in which
system will be demonstrated. Traditional systems are based on a adding/removing a sensor requires significant efforts and in
central controller where all the decisions are made. The proposed some cases, it is not feasible at all.
control architecture is a solution to overcome the problems such
as the lack of flexibility and re-configurability that most of the The IEC 61499 function blocks is a new standard, which has
conventional systems have. This has been achieved by employing been proposed for Distributed Industrial-Process Measurement
a method based on the new IEC 61499 function block standard, and Control Systems (IPMCS) [1] with the purpose of providing
which is proposed for distributed control systems. This paper also more flexibility and re-configurability to the existing IEC
proposes a wireless sensor network as the system infrastructure in 61131-3 standard. In IEC 61499, distributed systems are
addition to the function blocks in order to implement the Internet- modeled using such artefacts as function block applications
of-Things technology into the area of home automation as a mapped to networks of containers called devices. The latter are
solution for distributed monitoring and control. The proposed capable of communicating and making decisions locally.
system has been implemented in both Cyber (nxtControl) and
Physical (Contiki-OS) level to show the applicability of the Wireless Sensor Network (WSN) is a network of tiny and
solution. battery-powered nodes composed of one or more sensors,
processing unit and transceiver called End Devices (ED). The
Keywords— Home Automation, Wireless Sensor Networks, IEC information (rather than raw data) collected by each sensor is
61499 Function Blocks, Internet-of-Things (IoT), Contiki-OS transferred to a base station called Coordinator for further
processing. Due to its distributed nature, WSN has a high degree
I. INTRODUCTION of flexibility and re-configurability. Adding or removing a new
Recent advances in electro-mechanical systems have been sensor node to the network will not affect the overall system’s
functional in realization of a broad range of industrial and home goal. The nodes are capable of configuring themselves with the
automation applications. This is due to the latest developments existing network infrastructure.
in emerging technologies such as Micro-Electro-Mechanical
Both IEC 61499 and WSN technologies are distributed in
Systems (MEMS) that has led the development of tiny, battery-
nature allowing high degrees of flexibility, scalability and re-
powered embedded electronics devices which are capable of
configurability. For this reason, they promise a great potential in
communicating and connecting to the Internet. Connectivity is
realizing applications concerning distributed control of
an essential parameter for today’s demanding Internet-of-Things
industrial systems.
(IoT) applications.
Nowadays, applying advanced technologies to home
Home automation systems are recently adopted in order to
automation context becomes increasingly popular. For instance,
save energy through optimization of household resource usage
a GSM based home automation system has been proposed in [2]
by means of utilizing smart sensing and actuating devices. In
where a combination of GSM and ZigBee (IEEE 802.15.4.)
some cases, home automation systems use renewable energy
technologies was employed to achieve a better network
generation devices such as solar panels and wind turbines in
interoperability. The Internet connectivity has not been
order to improve the energy efficiency of the house. Controlling
discussed. Another home automation system based on ZigBee
home appliances based on a demand-oriented method is the
has been presented in [3] in which several home appliances are
challenge which motivates researchers to design and develop
controlled by an embedded controller board connected to the
various control architectures.
coordinator. The coordinator itself is connected to a dedicated
Conventional control architectures commonly used in building gateway in order to provide Internet accessibility using WiFi.
automation applications are based-on centralized controllers The whole system is controlled remotely by users. However, this
which all control decisions are made by a centralized controller. system lacks the IPv6 connectivity which is the basic

Fig. 2. (a) Proposed system architecture based on IoT-ARM, (b) Communication network stack

infrastructures of the IoT, i.e. the EDs are not connected to the de-centralized control of home automation systems, ii)
Internet. An SMS-based system has been demonstrated in [4] implementation of wireless, IoT-enabled sensing and actuation
where it relies on GSM network totally. User sends an SMS to a devices for monitoring and control of home automation systems.
GSM modem and the corresponding home appliance will be
This paper proposes a methodology for design and
actuated by a microcontroller interface. Z-Wave is one of the
development of home automation systems using wireless sensor
oldest technologies that has been adopted in home automation
networks for sensing and actuation, and IEC61499 Function
widely [5]. According to [6], Z-Wave has a reliable and stable
Blocks for decentralized control of the home automation
network. Another popular home automation standard is X10
devices. The presented methodology adopts WSN as the
which is very common in the US and supports power supply to
infrastructure for the reason to deploy an IoT-based system. This
EDs [6,7]. The main disadvantage is that multiple devices
has been achieved by employing Contiki-OS [10] as the
cannot be used at the same time. EnOcean is one of the new
operating system at node level in order to provide internet
technologies that is very popular in home automation because of
accessibility to low-power and low-cost sensor nodes. The
energy harvesting wireless technology [8]. The modules based
whole system architecture is on the basis of IEC 61499 function
on EnOcean are composed of ultra-low power devices and
block standard which provides flexibility, re-configurability and
energy harvesters such as solar panels. An intelligent home
interoperability. Considering WSN technology and IEC 61499
automation system based on CC2530 wireless sensors has been
standard together, the proposed system addresses both 3C
proposed in [9]. The system is designed to control the heat
(Communication, Computation and Control) and 3S (Safety,
pumps and air conditioning. The user is able to control and
Security and Scalability) to ensure and guarantee an IoT-based
monitor the whole system using an SMS which reads the status
system’s requirements.
of all the sensors and actuators.
The rest of the paper is organized as follows: Section II
However, in all the aforementioned works, the performance
demonstrates the proposed system architecture where several
of the proposed frameworks in internet connectivity, flexibility,
tiers reside. Section III presents the WSN as the infrastructure.
re-configurability and interoperability have not been properly
IEC 61499 standard will be discussed in the Section IV.
addressed. These are essential requirements for today’s IoT-
System’s implementation and discussion will be presented in
demanding market. This paper mainly addresses the two
Section V and Section VI concludes the paper.
problems that commonly occur in home automation systems: i)
The need of a robust, scalable distributed control architecture for

II. SYSTEM ARCHITECTURE based on widely successful Representational State Transfer
The proposed system architecture is presented in Fig. 1. The (REST) but intended for constrained nodes and networks. CoAP
architecture is based on IoT Architectural Reference Model runs on the devices that support UDP.
(IoT-ARM) [11] and it is composed of 4 tiers, namely: Things, B. Data Flow Layer
iSystem, Cloud and Application tier. In this layer, User Datagram Protocol (UDP) has been
A. Things Tier utilized. It is a communication protocol that provides some
This tier addresses the physical layer of the architecture essential messaging services over Internet Protocol (IP) which
where sensor- & actuator-equipped embedded platform reside. is referred to UDP/IP. UDP is a replacement of the widely used
It is aimed to acquire real-time data and perform filtering. The Transmission Control Protocol (TCP) intended for constrained
devices are also able to transmit and receive data from other networks in order to save the time and processing.
devices and/or the gateway which is located in iSystem tier. C. Addressing and Routing Layer
B. iSystem Tier The addressing and routing protocols are presented in this
Intelligent embedded systems are located in the iSystem tier. layer. It is based on a new standard which allows the Internet
It includes a gateway to collect the data from the Things tier and Protocol version 6 (IPv6) to be implemented over Low Power
transmit them to the cloud. It can also be the place of early-life Wireless Personal Area Network and called 6LoWPAN. It
data analysis, filtering and aggregation. This tier establishes a offers a compression mechanism between IEEE 802.15.4 and
connection between things and the Internet. IPv6 for lossy and noisy networks so that IPv6 packets can be
used over IEEE 802.15.4.
The Things tier and the iSystem tier are linked by a local
wireless network which will be explained in detail in Section III. In this context, there is a special routing protocol dedicated
for low power devices with limited processing capabilities
C. Cloud Tier called RPL (IPv6 Routing Protocol for Low-Power and Lossy
This is the database tier where early-life or at-rest science- Network) [12]. Low-Power and Lossy Network (LLN) is a
data analysis, real-time security-event analytics will take place. network which all the end-devices and routers are low data rate
All the archives of the data can be stored and accessed from and resource-constraint. RPL provides an effective guideline for
other tiers. routing mechanism in such networks.

D. Application Tier D. Meduim Layer

This is the application tier which provides user access and This is the physical layer and media access control which is
holds the control architecture. User interface, application device based on IEEE 802.15.4 standard. The standard is for Low-Rate
management are all based on the IEC 61499 standard. Each Wireless Personal Area Network (LR-WPAN) which offers
application will be mapped into one or more devices to form a low-cost and low-speed (250kbps) for battery-powered devices
distributed control architecture. The Human Machine Interface such WSN.
(HMI) is also assumed to reside in this tier.
III. WSN AS SYSTEM INFRASTRUCTURE IEC 61499 function block standard has been employed
Recently, WSN technology has been adopted in home recently in the context of industrial automation and Distributed
automation area due to their low-cost, flexible and easy to Control System (DCS). This is due to the lack of flexibility and
deployment characteristics. The sensor nodes are low-power re-configurability of the previous IEC 61131-3 standard which
microcontroller-based platforms capable of not only sensing but was dedicated to the Programmable Logic Controllers (PLCs).
also actuating. The platform also contains a transceiver unit in Function block is the basic building block of the IEC 61499 in
order to establish a communication with the other neighborhood which events and data related algorithms are implemented in the
nodes. head and the body of a function block, respectively. The head is
also responsible for the Execution Control Chart (ECC) where
Fig. 1 (b) presents the communication stack which is fully all the decisions and scheduling are implemented there. Fig. 2.
compliant with IoT standards. It has the basic infrastructure presents the overall architecture of the IEC 61499 standard.
adopting several standards which are essential for an IoT-based
system. A system is a collection of devices which are connected by
means of a communication network. Resources are functional
A. Application Layer units that have control over their own functionalities
This is the application layer protocol intended for low-power independently. An application can be deployed on one or more
and resource-constraint devices such as sensor node platforms. resources in a distributed fashion.
Machine to Machine (M2M) communication and IoT are Fig. 3. demonstrates a mesh topology network where several
supposed to be implemented on such devices and therefore, sensor nodes are deployed in an environment in order to sense
simplicity, low overhead and multicast are required to be and actuate. The base station is responsible to collect the
considered while designing the application layer. For this gathered the information from the network and forward it for
reason, Constrained Application Protocol (CoAP) has been future processing. It also sends commands to the sensors back to
selected as a software protocol in order to provide the ability of perform actuation. Due to this distributed nature of the WSN
interacting over internet to the sensor node platforms. It is fully mesh topology, we propose to assign a device in a system based

on IEC 61499 standard. As a result, the WSN will be modelled with IoT system requirements. Fig. 5. presents the system
as a system where one or more devices (nodes) are connected by simulated in the Cooja platform of Contiki-OS.
means of IEEE 802.15.4 communication protocol. Each device
(node) contains several resources such as: one or more sensors
and actuators, a processor, a transceiver and a power supply unit.
Once modelled, an application can be deployed to one or more
devices to perform a certain task.

Fig. 2. System, Device and Resource in IEC 61499 standard Fig. 4. Implementation architecure for four rooms

Fig. 3. WSN and its corresponding function block representation

This section focuses on the implementation of a simple
network for building automation focusing on controlling the Fig. 5. Cooja network simulator while initializing
temperature and humidity levels across various rooms. Fig. 4.
depicts the implementation architecture. For the sake of As it can be seen in the Fig. 5., there are 4 sensor nodes
simplicity, only four rooms have been considered. Extending shown by numbers 1 to 4. Node 5 is the base station. This is a
this architecture to more rooms and having more sensor nodes is snapshot of the network initialization, that is, all the nodes are
straightforward task since the system is very flexible and communicating together in order to discover the neighbors and
configurable based IEC 61499 standard. It also supports online the whole network. An IPv6 address and a Node ID will be
reconfiguration in both WSN and control level. A sensor node assigned to each node and all the IPs will be recorded by the base
can be programmed and added to the network without any station. Upon finishing the initialization, all the nodes will
disruption in the overall system’s goal. transfer the acquired data to the base station. In this work, Sky
A. WSN Infrastructure Implementation
As mentioned before, Contiki-OS has been employed to
design and develop the WSN infrastructure which is compliant

Fig. 6. IEC 61499 control appliction implemented in nxtSTUDIO

Motes have been used for the simulation and TelosB [16]
platforms have been employed for the implementation. For this
reason, each sensor node is able to report temperature, humidity,
light and its own battery level to the base station. It is assumed
that each node can control three actuators including A/C in each
room. The base station will use the IPv6 address in order to
forward the commands received from the control level (IEC
61499) to each node.
B. IEC 61499-based Control System Implementation
The control architecture is based on IEC 61499 function
block standard and it has been implemented in nxtSTUDIO
software by nxtControl GmbH [17]. nxtONE is a new software
recently adopted by researchers and companies in the context of
IPMCS based on IEC 61499. The package contains
nxtSTUDIO, nxtLIB, nxtHMI, nxtIECRT and nxtSERVICES.
It provides a full support of HMI/SCADA systems design. Fig.
6. demonstrates the function blocks network developed for home
automation system in nxtSTUDIO Demo version. This is the
control application that has been developed and, as it can be seen
in the figure, there are 5 main function blocks, namely:
BASE_STATION, ROOM1_PANEL, ROOM2_PANEL, Fig. 7. HMI user interface panel developed in nxtSTUDIO
ROON3_PANEL and ROOM4_PANEL. The application also HMI panel is composed of the CAT instances shown in Fig.
acts as the Gateway in order to forward the acquired data to the 6. All the icons are designed from the scratch by the user. For
internet and database. This application has been mapped to 5 instance, AC1 and SP1 of ROOM1_PANEL are the first room’s
devices in order to form a fully distributed control system, that A/C and the set point value. These are shown by an ON/OFF
is, each ROOM_PANEL has been mapped to a separate device. button and a round knob, respectively. Once changed, the values
All the function blocks are based on Composite Automation will be send to the BASE_STATION and it will be forwarded to
Type (CAT) that both user-interface and control logic are the corresponding room based on the IPv6 address saved in the
integrated [18]. BASE_STATION or coordinator is responsible Node 5.
for reading data from Node 5 and based on the Node ID, the
corresponding CNF event will be issued. This event will then Fig. 8 depicts the cloud interface and database for a room.
trigger the corresponding REQ of ROOM_PANEL in order to For this reason, Ubidots platform [19] has been employed which
read the room data and show them in the HMI panel (Fig. 7.). is a cloud service to capture and post data to the internet. Each
ROOM_PANEL has been designed in such a way that upon
receiving a message from the sensor, all the data will be posted

to the cloud in real-time and without any delay. User will have REFERENCES
access to the past and current data from anywhere in the world. [1] International Electrotechnical Commission. “IEC 61499: Function
Blocks”, International Standard, First Edition, Geneva, 2005.
[2] C. Felix and I. Jacob Raglend, "Home automation using GSM," Signal
Processing, Communication, Computing and Networking Technologies
(ICSCCN), 2011 International Conference on, Thuckafay, 2011, pp. 15-
[3] K. Gill, S. H. Yang, F. Yao and X. Lu, "A zigbee-based home automation
system," in IEEE Transactions on Consumer Electronics, vol. 55, no. 2,
pp. 422-430, May 2009.
[4] H. ElKamchouchi and A. ElShafee, "Design and prototype
implementation of SMS based home automation system," Electronics
Design, Systems and Applications (ICEDSA), 2012 IEEE International
Conference on, Kuala Lumpur, 2012, pp. 162-167.
[5] P. Amaro, R. Cortesao, J. Landeck, and P. Santos,"Implementing an
Advanced Meter Reading infrastructure using a Z-Wave compliant
Wireless Sensor Network," in Proc. 2011 3rd International Youth
Conference on Energetics (IYCE) , pp.1-6.
[6] C. Withanage, R. Ashok, C. Yuen and K. Otto, "A comparison of the
popular home automation technologies," 2014 IEEE Innovative Smart
Grid Technologies - Asia (ISGT ASIA), Kuala Lumpur, 2014, pp. 600-
[7] J. Walko, "Home Control," Computing & Control Engineering Journal,
Fig. 8. Cloud interface developed using Ubidots platform. vol.17(5), pp.16,19, Oct.-Nov. 2006.
[8] EnOcean GmbH, “”.
VI. CONCLUSIONS [9] J. Brito, T. Gomes ; J. Miranda ; L. Monteiro ; J. Cabral ; J. Mendes ; J.
L. Monteiro, "An intelligent home automation control system based on a
In this paper, a fully distributed control architecture for home novel heat pump and Wireless Sensor Networks," 2014 IEEE 23rd
automation has been proposed. Unlike the conventional control International Symposium on Industrial Electronics (ISIE), Istanbul, 2014,
systems, distributed architectures are intended to enhance the pp. 1448-1453.
flexibility and re-configurability. The proposed system is [10] Contiki: The Open Source OS for the Internet of Things,
composed of four tires namely, Things, iSystem, Cloud and “”.
Application. The application tire is fully compliant with IEC [11] IoT Architectural Reference Model, “”.
61499 function block standard and it’s been deployed in a [12] RPL: IPv6 Routing Protocol for Low-Power and Lossy NetworksInternet
distributed fashion for both control and HMI purposes. Engineering Task Force (IETF), Request for Comments: 6550, ISSN:
Databases and real-time security have been implemented in the 2070-1721.
cloud tire. In the IoT device section, sensors (actuators) and [13] R. Abrishambaf, S. N. Bayindir, and M. Hashemipour, “Energy analysis
of routing protocols in wireless sensor networks for industrial
intelligent embedded devices reside in the Things and iSystem applications,” in Journal of Systems and Control Engineering, Proceeding
tires, respectively. In order to enhance the connectivity of the of Institute of Mechanical Engineers (IMechE), May, 2012, pp.678–684.
whole system further, wireless sensors and actuators have been [14] Heinzelman W. Application-specific protocol architectures for wireless
employed. Moreover, the Contiki-OS have been used to networks. PhD Thesis, Massachusetts Institute of Technology, USA,
implement a fully IoT-compliant system. 2000.
[15] J. Miranda et al., "Path loss exponent analysis in Wireless Sensor
This paper presents the first phase of a research project Networks: Experimental evaluation," 2013 11th IEEE International
initiated at Internet-of-Things and Industrial Wireless Conference on Industrial Informatics (INDIN), Bochum, 2013, pp. 54-58.
Networking (IoT-iWin) Lab at the Miami University, Hamilton [16] J. Polastre , R. Szewczyk , D. Culler, “Telos: enabling ultra-low power
Campus. Further results and especially the performance wireless research,” Proceedings of the 4th international symposium on
evaluation and numerical analysis of the simulated system is Information processing in sensor networks, Los Angeles, California,
April 24-27, 2005.
expected to be published in near future.
[17] nxtControl GmbH,
[18] V. Vyatkin, “ IEC 61499 Function Blocks for Embedded and Distributed
Control Systems Design”, Third Edition, Publisher: International Society
of Automation, 2016.
[19] Ubidots, “”