Professional Documents
Culture Documents
Ambiance Intelligence Approach Using Iot and Multi-Agent System
Ambiance Intelligence Approach Using Iot and Multi-Agent System
net/publication/328364742
CITATIONS READS
0 624
6 authors, including:
Some of the authors of this publication are also working on these related projects:
IoT and Microservices Architectural Framework : Smart Usage Contexts and Adaptation View project
All content following this page was uploaded by Meftah Zouai on 24 May 2019.
ABSTRACT
Internet of things is a network of objects mainly supported by electronic devices and electronic
components such as sensors and electronic cards. These objects can be physical and virtual devices,
sensors or actuators, are autonomous and have their own intelligence characteristics. On the other
hand, smart environments are those in which sensors and actuators have been integrated, to react to
events and to adapt to those present. The environment acquires intelligence through its intelligent
components, or through the intelligence resulting from its interaction with other components. Our
contribution is a proposal of Cognitive IoT (CIoT) devices structure by adding an agent layer to the
device. Such layer provides the device with agent characteristics (intelligence, autonomy, cooperation
and organization).
Keywords
Agent, Agent Layer, IoT, MQTT
1. INTRODUCTION
Nowadays, the Internet is heavily used by humans, through computers and mobiles; indeed main
communication in the world is being carried out between humans using Internet. The Internet of
Things (IoT) is a present and future technology, which can involve physical and information system
worlds through the use of sensors. Therefore, most current human-to-human interactions will become
as the human-to-machine interactions in the near future.
In this scope, we investigate the additional mechanisms to communicate with the IoT and there
is a need to exchange information between nodes. Things have the ability to cooperate, communicate
and adapt independently, but this requires re-considering the structure of such devices/things.
Several papers analyse the global architecture of the IoT systems, but we rarely find studies on
the structure of the thing itself. The current structure, which can be found in several research papers
(Karagiannis, Chatzimisios, Vazquez-Gallego, and Alonso-Zarate, 2015), is a rigid and passive
architecture with a status on which one can perform operations. The thing (object) is dependent on
DOI: 10.4018/IJDST.2019010104
Copyright © 2019, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited.
37
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
acting with the intervention of a third party (human or object) and functions as a Programmable Logic
Controller (PLC) with predefined statuses. In this proposal, we examined the structure of the thing
and found that it loses key features such as autonomy and intelligence. This motivated the main aim
of this paper. It is novel if the addition of an agent layer to the IoT devices is done, providing it with
agent characteristics. This way, the device will be enriched with the ability to work autonomously in
an environment, directly communicate with other agents, and coordinate, collaborate and cooperate
with other objects (other devices). We bear in mind the limited capacity and power of the device,
and paid attention to preserve and exploit it properly. This is why we used the Message Queuing
Telemetry Transport (MQTT) protocol in the process of exchanging commands and information
between the IoT device and the user. Moreover, we used the JADE platform to host the agent so that
the device become a smart element and it is always connected to the IoT Gateway. In all processes
that require great capacity and energy, we can maintain the energy and the ability of the device in
this way, even though it is directed on the application side (has a specific application), and it will
provide its service to the fullest.
The rest of the paper is organized as follow: In section 2 we introduce the area of our research
work, in section 3 we briefly discuss related works. Section 4 describes the proposed structure and
its features, the section 4 outlines the implementation of the CIoT device structure. Finally, some
conclusions and perspectives are presented.
2. BACKGROUND
In this section, we are going to introduce the main concepts and technologies used in our approach.
• Application Layer: It represents the software level. It varies according to IoT markets
and stakeholders;
Figure 1. IoT architecture (Wu, Lu, Ling, Sun, and Du, 2010)
38
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
• Networks and data communication Layer: It is responsible for packet forwarding, which
includes the routing through intermediate routers. Since the networks layer knows the address
of the neighbouring network nodes, it manages quality of service (QoS);
• Sensing Layer: This layer senses/controls the physical world and data-acquirement. It is integrated
with existing hardware (RFID, sensors, actuators, etc.).
• Autonomy: An agent can act without returning to his owner in order to make decisions;
• Social Behaviour: An agent has the ability to communicate and interact with other elements
of his environment;
• Reactivity: An agent can perceive and then react to different events on his environment;
• Pro-Activity: An agent has the ability to take initiatives to adapt to the change in his environment.
• Coordination: In the case of coordination (Frécon and Kazar, 2009), the agents work on problems
whose solutions are useful for the other agents, so the work must be coordinated over time.
Coordination allows agents to consider all tasks and not duplicate work. The coordination of the
actions is related to the planning and the resolution of the conflicts, because it is at this level that
the actions (plan) of the other agents are taken into account (Bouchenak, 2001);
• Negotiation: The activities of the agents in a distributed system are often interdependent and
result in conflicts. Conflict resolution involves considering the points of view of the agents,
negotiating between them (Frécon and Kazar, 2009), and using decision-making mechanisms
regarding the purposes on which the system focuses. Negotiation is characterized by a small
number of agents involved in the process and a minimal protocol of actions: to propose, evaluate,
39
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
modify and accept or reject a solution. The problem of negotiation does not necessarily consist
in finding a compromise but can extend to the modification of the beliefs of other agents to make
prevail a point of view (Johansen, 1995).
• Reactive Agent: This agent is marked by a behaviour based on the stimulus/response principle.
The structure of purely reactive agents tends to simplicity, but they may be capable of complex
and coordinated group actions. Agents of this type are usually small in the environment. They
are not necessarily intelligent, nevertheless intelligent collective behaviour can emerge (M.
Benjima and M. Feham, 2012);
• Cognitive Agent: A cognitive agent has a symbolic representation of its environment and
is endowed with reasoning skills. The agents are immersed in an environment in which they
interact. Hence, their structure revolves around three main functions: perceiving, deciding and
acting (Bouchenak, 2001);
• Proactive Agents: They are dynamic agents who undertake because they possess in addition
to their attributes and methods, internal processes that allow them to take initiatives to achieve
their goals. A proactive agent is therefore a goal-directed agent (Johansen, 1995).
3. RELATED WORK
In this section, we examine several works related to our proposal. In Bozdogan and Kara (2015), the
authors have proposed a four layered structure for IOT; these layers are perception layer, transport
layer, network layer and application layer. The fundamental function of sensing layer is to collect
information and provide data transmission in case that the homogeneity technology used in the
network. The network layer provides a combined environment for all communication types. The
transport layer provides an implementation of QoS (reliability and security rules). The application
layer provides end-user operations and form communications software. The application software and
services functions are provided in the application layer.
In Darwish (2015), a seven layered structure is proposed; this structure consists of an environment
layer which includes the objects to be tracked which are not usually static and a hardware layer which
includes the hardware components and sensors for collecting environmental data. Additionally,
information, network, communication and service layer perform some operations likewise: service
storage and orchestration, application support and management layer and application layer.
In Zhang, Zhao, Zheng, Wu, and Wei (2012), a cognitive IoT is proposed through a network
topology; the idea is to design cognition-process-related technology. The architecture consists of
perception layer, network interconnection layer, information fusion layer and intelligent service layer.
In Khan, Khan, Zaheer, and Khan (2012), an IoT structure of five layers is proposed. The
perception layer consists of the physical objects and sensor devices. The network layer transfers
the information from sensor devices to the information processing system. The middleware layer is
responsible for the service management, is linked to the database, performs information processing
and ubiquitous computation and takes automatic decision based on the results. The application layer
provides global management of the application based on the object information processed in the
Middleware layer. Finally, Business Layer is responsible for the management of overall IoT system
including the applications and services (see Table 1).
In Bozdogan and Kara (2015), Darwish, (2015), Zhang, Zhao, Zheng, Wu, and Wei, (2012) and
Khan, Khan, Zaheer, and Khan (2012), the authors agree about perception layer, network layer and
40
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
application layer. However, we found a big difference in the processing layer. In Bozdogan and Kara
(2015), Darwish, 2015 and Zhang, Zhao, Zheng, Wu, and Wei, (2012) as for the structure used, its
main (and important) limitation concerns the rigid structure in levels for the design of the system. In
Bozdogan and Kara (2015), Darwish, 2015, and Wang (2017), the structure of object does not have
the property of intelligence, cooperation or organization.
Therefore, our work keeps the three layers (Perception layer, Network layer, Application Layer) as
they are with a slight change in the network layer where we used the MQTT protocol in the exchange
of information between the device and the user through the IoT gateway. In the processing layer, we
use the intelligent agent for the features it offers to the device from the autonomy and coordination and
cooperation. So that the device is able to make decisions independently through the data captured by
the sensor layer and data sent by other devices (agents) the device becomes aware of its environment.
(Belo, Rodrigues, Barros and Correia, 2016; Murai, 2017).
In this section, we explain our architecture and its parts, also we have presented the global functioning
of this architecture.
41
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
the behaviour of the agent changes according to this information; as a result, this changes a set of
decisions used in the software layer according to the purpose intended for him. For example, if there
is a sudden rise in temperature the agent concluded that this rose is abnormal and there is a fire in the
environment. In this situation, the agent will communicate with other devices to control the situation.
Moreover, it alerts the user about this change and the decisions made to control the fire.
• IoT Device: It is the central element in this paper. We added the agent layer to it in order to
provide the device with a kind of self-intelligence (Fortino, Guerrieri, Russo, and Savaglio,
2014); this way the device is able to adapt and update the status of the surrounding environment,
through information obtained by the sensors. The agent processes and analyses this information.
Accordingly, it shall make the appropriate decision without contacting the user;
• IoT Gateway: It is the intermediary device between the IoT devices or rather between the agents
integrated in the IoT devices (Zouai, Kazar, Haba, Saouli, and Hind, 2017), and between the IoT
devices and the user. We added two elements in the IoT gateway;
42
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
• ADE platform: Such the agent’s installation platform was added to facilitate inter-
agents communication;
• MQTT Broker: Added to the IoT device to facilitate the process of communication between the
user and the device while reducing the movement of the network and economy in the energy devices.
We implemented our architecture to create a security IoT device. This, at last, controls the safety of an
environment against accidental and incidental events. Its aim is to act on the existence of a criminal
in the environment. And it can control accidents risk such as fires and gas leaks. The implementation
is shown in Figure 5 and explained below.
We implement our proposed architecture with Raspberry pi 2 card (see left-hand side in Figure
5), where this card enabled us to combine the following three layers into one structure (As shown in
the right-hand side of Figure 5):
Figure 6 shows the architecture particularized for the security agent, as explained in the
following paragraphs:
For example:
In the first rule, when the agent feels gas leakage and the second condition (electric light) is
verified, the agent will alert to the danger of fire. The agent obtained the second condition through
communication with the other agents (see Box 1).
In the second rule, when the surveillance mode is activated and the agent sensed there is a
person in the environment (presence_sensor()=true), the agent concludes that there is an intruder in
the environment (see Box 2).
43
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
One of the functions of the agent is to monitor the temperature evolution in the environment when
there is sudden rise in temperature and in short time. The agent concludes a fire in the environment
and alerts the user and other agents (see Box 3).
• Analysis Module: It compares the security rules, with data obtained by sensors and data sent
by other agents. The security rules are defined in the rule base, if the agent detects an abnormal
thing. It informs the user and send information to the other agents. The user receives a message
in his smartphone;
• Communication Module: This module provides all agent interaction mechanisms with the other
agents. Moreover, it provides the interaction between decision-making module with history of
the status module (Figure 4).
44
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
Figure 6. Concrete architecture of the security agent (Zouai, Kazar, Haba, and Saouli, 2017)
Box 1.
Box 2.
Box 3.
45
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
46
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
• Sensing Class: The role of this class is the sensor control, all the methods of this class are able
to return the values captured by the sensors;
• Communication Class: The role of this class is the connection management between the device
and the MQTT broker;
• Security Agent Class: This class inherits from the native Agent class of the JADE platform.
5.4. Implementation
We implemented our architecture using Raspberry PI Model B and the Raspbian operating system.
With them we created the IoT device that launches the security agent embedded on the device to
ensure the security of the environment against accidental and incidental events associated with a
wireless module for the communication of the device with the other devices and with the Internet.
We implemented our security agent through the JADE (Java Agent Development Framework).
It simplifies the implementation of multi-agent systems through a middleware that complies with the
Foundation for Intelligent Physical Agents (FIPA) (Juneja, Jagga, and Singh, 2015) specifications
and through a set of graphical tools that support the debugging and deployment phases.
We uses two type of sensors to deliver the sensing layer: a PIR motion sensor (HCSR501 PIR)
for sensing the presence of someone (Intruder) in the environment. And a gas sensor for detecting
gas leakage in the location. We connected electronic sensors to the Raspberry Pi Model B. Moreover,
we controlled them with Java using General-Purpose Input/Output (GPIO).
47
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
48
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
for embedded computing application. Due to its characteristics, the deployment agent layer in the
device and operation are the storage and processing capability to improve performance in which this
card it is equipped with Zhang, Zhao, Zheng, Wu, and Wei, 2012:
49
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
• The agent sends a request message to all other devices (agents) by invoking the method broadcast
(“Request close”); each agent received the message “Request close”, it changes its status to the
close status;
• The agent sends help message to the police;
• The agent informs the users by informing message.
• MQTT protocol Communication: The MQTT protocol is based on the principle of publishing
messages and subscribing to topics, or “pub/sub”. Multiple clients connect to a broker and
subscribe to topics that they are interested in. Clients also connect to the broker and publish
50
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
messages to topics. Many clients may subscribe to the same topics and do with the information as
they please. The broker and MQTT act as a simple, common interface for everything to connect to.
MQTT (Naik, 2017) allows devices to send information on a given subject to a server (IoT
gateway) that functions as a message broker. The broker pushes this information to customers (IoT
device/user) who have previously subscribed. For the user, a topic resembles a hierarchical path.
Customers can subscribe to a specific level of a subject’s hierarchy or to multiple levels if they use
a wildcard character.
• Agent Communication: For several IoT device to collaborate, they must exchange messages
between JADE agents. Each JADE agent has a sort of mailbox that contains messages sent to
it by other agents. These mailboxes are in the form of a list which contains the messages in the
chronological order of their arrival.
• JADE agents use FIPA-compliant messages (FIPA-ACL): JADE messages are instances of
the ACLMessage class of the jade.lang.acl package.
In this section, we review the most important results we have obtained. For a real evaluation, we have
collected the following information by 19-20 December 2017 in Biskra, Algeria.
The system sensed the temperature and humidity of the environment and then stored the data in its
own database. It also notified the user in the event of significant changes in temperature and humidity.
The system also protected the environment from intruders in case the absence of the user and
the system informs the users.
Figure 15 shows a curve which summarizes changes in temperature and humidity in the
atmosphere captured within 24 hours. We can see that the temperature was between 6 and 15 degrees
while the humidity was between 35 - 68 degrees.
Each agent shares information captured by the sensors with other agents. This process allows
each agent to create an image of the surrounding environment through data sent by other agents and
data captured by the sensors. So that all agents have the same information at the same time, which
helps them to make the right decisions through common data.
Window screenshot in Figure 16 explains the exchange of messages between the agents, the agent
“IoT security” does not send a message to the other agents because it does not detect any danger in
the environment.
Window screenshot in Figure 17 explains the reaction of the agent “IoT security” after the
detection of a person in the environment and the monitoring mode is in the active status.
The agent “IoT security” broadcasted a message of “reaction request” and each agent received
such message and responded with the appropriate action to the request.
The agent also alerts the user with a message sent to the smartphone. Figure 18 shows the message
the user received immediately after the device sensed an intruder in the home.
51
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
7. CONCLUSION
In this article, we proposed a new architecture for the IoT using the agent paradigm. We benefited
from agent features to enrich the device with autonomy, coordination and cooperation qualities. We
implemented this approach using a Raspberry with sensors integration and using MQTT protocol
for communications.
In the final perspectives of this research work, we like to integrate this platform in the cloud
computing environment for device data storage, transfer and process.
52
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
53
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
REFERENCES
Basir Khan, M. R., Jidin, R., & Pasupuleti, J. (2016). Multi-agent based distributed control architecture
for microgrid energy management and optimization. Energy Conversion and Management, 112, 288–307.
doi:10.1016/j.enconman.2016.01.011
Belo, O., Rodrigues, P., Barros, R., & Correia, H. (2016). A Personalization System for Data Visualization
Platforms. International Journal of Computational Linguistics Research, 7(4), 116.
Benjima, M., & Feham, M. (2012). Multi Mobile Agent Itinerary for Wireless Sensor Networks. Int. J. Emerg.
Trends Technol. Comput. Sci., 1(1), 6–11.
Bouchenak, S. (2001). Mobilité et persistance des applications dans l’environnement Java. Institut National
Polytechnique de Grenoble-INPG.
Bozdogan, Z., & Kara, R. (2015). Layered model architecture for internet of things. J. Eng. Res. Appl. Sci.,
4(June), 260–264.
Brustoloni, J. C. (1991). Autonomous Agents: Characterization and Requirements. Comput. Sci. Tech. Rep.,
(November), 91–204.
Chaudhuri, D. (2015). GSM based home security system.
Darwish, D. (2015). Improved Layered Architecture for Internet of Things. Int. J. Comput. Acad. Res., 4(4),
214–223.
Duma, M. (2008). Agents, agent architectures and multi-agent systems. Comput. Sci., (September), 132.
Fortino, G., Guerrieri, A., Russo, W., & Savaglio, C. (2014). Integration of agent-based and Cloud Computing
for the smart objects-oriented IoT. In Proc. 2014 IEEE 18th Int. Conf. Comput. Support. Coop. Work Des.
CSCWD 2014 (pp. 493–498).
Frécon, L. & Kazar, O. (2009). Manuel d’intelligence artificielle. PPUR Presses polytechniques.
Gray, R. S., Cybenko, G., Kotz, D., Peterson, R. A., & Rus, D. (2002). D’Agents: Applications and performance
of a mobile-agent system. Software, Practice & Experience, 32(6), 543–573. doi:10.1002/spe.449
Gubbi, J., Buyya, R., Marusic, S., & Palaniswami, M. (2013). Internet of Things (IoT): A vision, architectural
elements, and future directions. Future Generation Computer Systems, 29(7), 1645–1660. doi:10.1016/j.
future.2013.01.010
Johansen, D., Van Renesse, R., & Schneider, F. B. (1995, May). Operating system support for mobile agents.
In Proceedings Fifth Workshop on Hot Topics in Operating Systems (pp. 42–45). IEEE; . doi:10.1109/
HOTOS.1995.513452
Juneja, D., Jagga, A., & Singh, A. (2015). A Review of FIPA Standardized Agent Communication Language
and Interaction Protocols. J. Netw. Commun. Emerg. Technol., 5(2), 179–191.
Karagiannis, V., Chatzimisios, P., Vazquez-Gallego, F., & Alonso-Zarate, J. (2015). A Survey on Application
Layer Protocols for the Internet of Things. Trans. IoT Cloud Comput., 3(1), 11–17.
Khan, R., Khan, S. U., Zaheer, R., & Khan, S. (2012). Future internet: The internet of things architecture,
possible applications and key challenges. In Proc. - 10th Int. Conf. Front. Inf. Technol. FIT 2012 (pp. 257–260).
doi:10.1109/FIT.2012.53
Maes, P. (1994). Agents that reduce work and information overload. Communications of the ACM, 37(7), 30–40.
doi:10.1145/176789.176792
Maes, P. (1995). Agents that Reduce work and information Overload. In Readings in Human–Computer Interaction
(pp. 811–821). Elsevier.
Maksimović, M., Vujović, V., Davidović, N., Milošević, V., & Perišić, B. (2014). Raspberry Pi as Internet of
Things hardware. Performances and Constraints. Des. Issues, 3(June), 8.
54
International Journal of Distributed Systems and Technologies
Volume 10 • Issue 1 • January-March 2019
Minerva, R., Biru, A., & Rotondi, D. (2015). Towards a definition of the Internet of Things (IoT) (Vol. 1). IEEE
Internet Initiat.
Murai, H. (2017). Prototype Algorithm for Estimating Agents and Behaviors in Plot Structures. International
Journal of Computational Linguistics Research, 8(3), 132–143.
Naik, N. (2017). Choice of effective messaging protocols for IoT systems: MQTT, CoAP, AMQP and HTTP. In
2017 IEEE Int. Symp. Syst. Eng. ISSE 2017 - Proc.
Smith, D. C., Cypher, A., & Spohrer, J. (1994). KidSim: Programming agents without a programming language.
Communications of the ACM, 37(7), 54–67. doi:10.1145/176789.176795
Tuna, G., Gungor, V. C., & Gulez, K. (2014). An autonomous wireless sensor network deployment system using
mobile robots for human existence detection in case of disasters. Ad Hoc Networks, 13, 54-68.
Wang, J. (2017). Research on Japanese digital learning system based on Agent model. Journal of Intelligent
Computing, 8(3), 98–104.
Wu, M., Lu, T. J., Ling, F. Y., Sun, J., & Du, H. Y. (2010). Research on the architecture of Internet of Things.
In ICACTE 2010 - 2010 3rd Int. Conf. Adv. Comput. Theory Eng. Proc. (Vol. 5, pp. 484-487).
Yang, W., Qiao, S., Song, Q., Liu, Z., & Yang, J. (2015, June). The design and implementation of wireless
temperature and humidity control system based on nRF905. In Industrial Electronics and Applications (ICIEA),
2015 IEEE 10th Conference on (pp. 753-756). IEEE.
Zhang, M., Zhao, H., Zheng, R., Wu, Q., & Wei, W. (2012). Cognitive internet of things: Concepts and application
example. International Journal of Computer Science Issues, 9(6), 151.
Zhao, C. W., Jegatheesan, J., & Loon, S. C. (2015). Exploring IOT Application Using Raspberry Pi. Int. J.
Comput. Networks Appl. Vol., 2(1), 27–34.
Zouai, M., Kazar, O., Haba, B., & Saouli, H. (2017). Smart house simulation based multi-agent system and
internet of things. In 2017 Int. Conf. Math. Inf. Technol. (pp. 201–203).
Zouai, M., Kazar, O., Haba, B., Saouli, H., & Hind, B. (2017). IoT Approach Using Multi-Agent System for
Ambient Intelligence. International Journal of Software Engineering and its Applications, 11(9), 15–32.
55
View publication stats