An Autonomous Intelligent Gateway for Wireless Sensor Network Based on Mobile Node

—One of the recent tendencies for Wireless Sensor Networks (WSNs) that significantly increases their performance and functionality is the utilization of mobile nodes. This paper describes the software architecture of an intelligent autonomous gateway, designed to provide the necessary middleware between locally deployed sensor networks based on mobile node and a remote location. The gateway provides hierarchical networking, auto management of the mobile wsn (MWSN), alarm notification and SMS/Internet access capabilities with user authentication. Our architecture includes three multi agent system modules, an interface module, a management module and a treatment module. The management module consists of two agents, a control communication agent, and a learning agent. The control communication agent interacts with the interface module and the treatment module in order to decide which data mule can reach the target. Several factors such as battery status, coverage issues, and communication situations have been taken into consideration. I. INTRODUCTION Recent developments in wireless communication and electronics have made possible the development of small, inexpensive, low power, distributive devices. These devices are capable of local processing and wireless communication and are known as sensor nodes. A sensor network can be described as a collection of sensor nodes which coordinate with each other to perform some specific function. The wireless sensor network (WSN) has been widely spread out in a variety of surveillance applications. Examples includes environmental monitoring, smart home facility, seismic detection, military surveillance, inventory tracking, smart spaces, etc [1][2][3].


I. INTRODUCTION
Recent developments in wireless communication and electronics have made possible the development of small, inexpensive, low power, distributive devices.These devices are capable of local processing and wireless communication and are known as sensor nodes.A sensor network can be described as a collection of sensor nodes which co-ordinate with each other to perform some specific function.The wireless sensor network (WSN) has been widely spread out in a variety of surveillance applications.Examples includes environmental monitoring, smart home facility, seismic detection, military surveillance, inventory tracking, smart spaces, etc [1][2] [3].
Limited energy is one of the key challenges, considering the motes are most often battery operated.Maintaining the network (e.g.replacing batteries) is a critical restriction as it is usually difficult to access to nodes due to their location.Power supply that harvests power from the environment such as solar panels may be added to the node depending on the appropriateness of the environment where the sensor will be deployed [4].However, external power supplies often have a non-continuous behavior, thus making the presence of the battery essential [5].A number of approaches have been proposed as a solution to the problem of energy efficient: Duty cycling, data driven, mobility, etc [6] [7][8].
The advances in mobile robotics allow us today to add the mobility concept into many different classes of Wireless Sensor Networks [9].Data mule has been considered as an alternative solution for this problem of data gathering.A mule is a mobile device that can visit locations within the communication distance of each of the static motes, download their measurements and return to a remote base station to load the collected data.The key benefit of this approach is that motes can conserve energy that they would otherwise use to forward data, thereby prolonging the network's lifetime.In addition to reducing the energy consumption during transmission (less power is needed), proximity also reduces the data loss rate, which results in smaller number of transmissions per byte.Finally, recharging the robots' batteries is a simpler operation than replacing motes' batteries.
In this paper we propose original architecture based on agent for an intelligently communication and data management (collecting and processing data) of wireless sensor network based on mobile node.In fact an agent is a software entity which functions continuously and autonomously in a particular environment, often inhabited by other agents and processes.In the multi-agents systems, the global behavior derives from the interaction among the constituent agents.Agents interact (cooperate, coordinate or negotiate) with one another, either to achieve a common objective or because this is necessary for them to achieve their own objectives [9] [10].
The rest of this paper is arranged as follows: section 2 gives an overview on many WSN projects that use mobile relay; in section 3 we present our architecture then his modeling and implementing with Agent UML.Some conclusions are presented in section 5.

II. STATE OF ART:
There have been many works related to mules.
[11] Present a data muling system which uses uncontrolled entities (such as animals, humans with wireless devices) for carrying data.The authors present three tiers sensor network architecture.The bottom layer consists of a sparse sensor network.In the middle layer there are mobile www.ijacsa.thesai.orgentities such as vehicles and humans which carry the data from bottom layer to the access points in the top level.These ideas were also implemented in real systems in Zebra Net [12] and Smart-tag [13] projects.In [14] the authors use mobile mules (human) for collecting data from an isolated WSN.They propose a distributed storage management strategy (DSMS) for data buffering.DSMS can reduce data loss while keep higher-priority packets closer to the sink area.Properties of DSMS have been proved and its efficiency has been verified by simulation and real implementation.[15] Consider the data gathering issue in a spatially separated wireless sensor network, where sensor nodes may form several isolated subnetworks, each far away from each other.Mobile mules are adopted to traverse these subnetworks to conduct data collection.To address issues of data collection latency and network lifetime simultaneously, authors formulate a new problem; called EM-TSP to find mules traversal paths to visit each subnetwork in at least one landing port such that the energy consumption of sensors is bounded and the traversal path lengths of mules are minimized.[16] Present a robotic system for collecting data from wireless devices dispersed across a large environment.They address the problem of planning paths of robotic mules referred to as Gathering Problem (DGP) in order to collect the data from all sensors in the least amount of time.Authors propose an optimal algorithm for the 1D version where the robots are restricted to move along a curve and for the 2D case they present a constant factor approximation algorithm for DGP on the plane.Utility of the algorithms has been demonstrated in simulations and has been implemented on a data muling system.
Our work was motivated by the fact that none of the works presented in the state of the art were interested on the capacity of gateway to manage the wireless sensor network based on mobile node from the reception of the request to its execution.

III. PROPOSED ARCHITECTURE
The architecture presented in this work is a multi-agent architecture, in which each agent is autonomous and able to cooperate, coordinate and communicate with other agents intelligently to achieve the system task which is treatment of the user request, manage mobile node, environmental data collection and the notification of users.
Our architecture is based on a three tiers network structure "Fig.1".The lowest layer is a random deployed network composed of sensor nodes (static nodes).These nodes are able to communicate immediately with upper layer agent in near range.They can also form an ad hoc network by communicating with each other, but it is not necessary.The most notable feature of medium layer is its mobility.
The mobile agents (data mules) move to anywhere at any time if needed.They are responsible for gathering data from lower layer and then forwarding to upper layer.The highest layer represents the fixed network consisted of access point that act as a gateway between sensor nodes and the end user [17].Data mules are bundled with infrarouge, zigbee, bluetooth and wifi communication, by mean of which it can receive commands and send response.The gateway receives requests from user, collects and processes the data from mobile nodes and notifies the user using sms if any event is detected.The gateway is equipped with bluetooth, wifi, and gsm modem.

A. Agents
An agent can be defined as a software entity evolving in an environment that it can perceive and in which it acts.It is endowed with autonomous behaviors and has objectives.Autonomy is the main concept in the agent issue: it is the ability of agents to control their actions and their internal states.Agents can be classified as cognitive or reactive [18].Reactive agents are elementary agents without memory and with a defined position in time and space.Cognitive agents, instead, behave in a more complex way, and their actions are based also on past experience.Whereas cognitive agents, for every possible sequence of perceptions, act to maximize a given utility function [19], reactive agents perform their actions in consequence of the perception of stimuli coming either from other agents or from the environment.
The gateway is represented by agents "Fig.2".The agents can be reactive or cognitive and they are provided with two functions, the communication and the realization of the application tasks.The task of communication consists of passing information to the other agents or simply to relieve messages for the other agents, every agent have capacity of communication but their behavior in front of a message depends of their role in the organization [20].The specific tasks consists of checking, trying, normalizing data etc.
The multi agent architecture of the gateway, appear in the form of three under multi-system agents called: Multi Agent System Treatment, Multi Agent System Management and Multi Agent System Treatment "Fig.3,4,6".These modules collaborate between them in a continuous way to ensure the functionalities of the gateway.Below, a description of these modules.www.ijacsa.thesai.org

B. MAS Interface
The multi agent system interface represents the highest layer of our architecture.MAS manages all connections between the gateway and the remote user, it authenticates users and verifies the validity of the requests.This system contains two types of agents: SMS agent and web agent.The SMS agent receives SMS stream input.It verifies the identity of the user using a dual factor authentication.The web agent receives as input the html stream.It authenticates web users and normalizes the data to send to the management agent.Authentication is done with the validation code (password) that the legitimate user has got via SMS in the previous step (SMS agent).

C. Mas Management
The multi agent system Management manages all connections between the gateway and the mobile nodes.It contains two agents.Communication control agent (CCA) and Learning agent (LA).CCA receives the request sent by the remote user through the multi agent system interface (MASI).It launches the multi agent system treatment (MAST) to collect and retrieve information about mobile nodes deployed in the environment.This information relates to the position of each mobile and its battery level node.

1) Communication Control Agent :
When the CCA receives the data stream sent by the MAST, it reasons in order to decide the choice of the mobile node best suits the target to reach.In our case we have chosen the Belief-Desire-Intention (BDI) agent architecture to model the communication control agent.The BDI model is one of the most successful theoretical models of rational agents.This model allows the agent to maintain a belief base (BC) and complete deductive reasoning through the manipulation of the BC.

2) Learning Agent :
It establishes the connection between the management agent and the knowledge base.The knowledge base contains all the rules necessary for the gateway to decision making: Mobile node to activate, communication media to choose etc.We can also find the history of actions established by the gateway.This history allows the management agent to define its action plan directly and quickly without the need to establish a new representation of the environment.

D. MAST
Multi agent system Treatment represents the interface between the gateway and the environment to monitor.MAST is responsible for the manipulation and the pretreatment of collected data.It includes perception agent, alarm agent and database agent.
Perception agent (PA) is responsible for collecting data from environment.Pretreatment includes verification of input data, the ability to identify malfunctions and finally, transmitting of measured values pretreated to the other agents.The main objective of handling preprocessed values is the identification of anomalies and the launching of alarms.Alarm agent (AA) allows sending alarm messages to remote users when some data goes above or below a certain threshold.The database agent (DA) is responsible for the updating of environmental databases with data from the sensor nodes.This task, although trivial, is vital for system performance.IV.IMPLEMENTING THE PLATFORM We validate our approach by implementing the proposed architecture in soekris box.Each box has an embedded UNIX system, an IEEE 802.11 interface and a 3G modem.An NXT robot was deployed on top of each Soekris box for interfacing to the statics sensors (Tier 1).Communication between the mobile node and the soekris is made via wifi.As shown in "Fig.7", the wsn is composed of arduino motes deployed in a star topology in an indoor environment.One of the issues currently being tackled is the monitor physical or environmental conditions, such as temperature.

1) Static aspect
Agent UML allows the representation of several levels of abstraction in the design class diagrams.We consider these two levels: the conceptual and implementation levels.
a) The conceptual level It is high enough for the multi-agent system eliminating all surface information for understanding the structure of the system.The agent class diagram in "Fig.8"shows the conceptual level of the platform.In the future work, we plan to test our architecture using drones as mobile nodes.Secondly, we plan to reduce the latency of our network.The solution consists of finding mules traversal paths to visit each subnetwork in at least one landing port such the traversal path lengths of mules are minimized.

Fig. 2 .
Fig. 2. Multi Agent architecture of the gateway

Fig. 7 .
Fig. 7. Test platform A. Designing the model In this section we propose a new design methodology based on the AUML language.Agent UML is an extension of UML to take into account the agent notions.Agent UML inherits representations proposed by UML [21][22].It contains 13 diagrams types symbolizing many different views to represent particular concepts of information system.They fall into three main groups: Diagrams behavioral:  Use Case Diagram  Activity Diagram  State Machine (State Chart) Diagram Structural diagrams:  Class Diagram  Object Diagram  Component Diagram  Composite Structure Diagram  Package Diagram  Deployment Diagram Interaction Diagrams:  Sequence Diagram  Communication Diagram  Timing Diagram  Interaction Overview Diagram These diagrams are not necessarily all used at modeling.The design of the proposed architecture is described through

Fig. 8 .
Fig. 8. Class diagram (conceptual level) b) The implementation level This gives in detail the contents of agents."Fig.9"shows a portion of the class diagram for the agent's level implementation

Fig. 10 .
Fig. 10.Use case diagram V. CONCLUSION In this paper we have proposed a new generic distributed architecture based on multi-agent systems for mobile wireless sensor networks.Our architecture was developed and implemented in soekris box.This architecture allows a user to gather all the information sensed by the wsn, as well as to send commands to a group or individual mobile node.Moreover the agents assigned to our gateway autonomy and intelligence in the management of mobile nodes taking into account several factors such as battery status, coverage issues, and communication situations.