# Architecture of an MAS-Based Intelligent Communication in a WSN

Authors: Mostefa Bendjima; Mohammed Feham
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Wireless sensor networks (WSNs) are designed to collect information across a large number of sensor nodes with limited batteries. Therefore, it is important to minimize energy consumption of each node, so as to extend the lifetime of the network. This paper proposes the use of an intelligent WSN communication architecture based on a multiagent system (MAS), to ensure optimal data collection. MAS refers to a group of agents that interact and cooperate to achieve a specific goal. To ensure this objective, we propose the integration of a migrating agent into each node to process data and enhance cooperation between neighboring nodes, while mobile agents (MAs) can be used to reduce data transfer between the nodes and send them to the base station (Sink). The collaboration of these agents generates a simple message that summarizes important information to be transmitted by an MA. To reduce the size of MAs, nodes in the network sectors are grouped in such way that, for each MA, an optimal itinerary is established, using a minimum amount of energy with efficient data aggregation within a minimum time. Successive simulations in large-scale sensor networks show the good performance of our proposal in terms of energy consumption and packet delivery rate.


---

## Body

## 1. Introduction

The field of communication and in particular wireless sensor network communication has changed dramatically in recent years [1, 2]. Sensors have become cheaper, allowing their use in an increasing number of areas. A WSN consists of hundreds or thousands of elements capable of collecting data from a monitored environment and transmitting them via the wireless medium to a Sink responsible for their processing. These networks are different from other wireless networks because they generally have the following features: high density, low flow, low energy capacity, and an inaccessible environment. Network elements, called sensor nodes, have small dimensions and are equipped with modules for data acquisition and communication, particularly in energy constrained areas. These devices need to economize their energy while monitoring their environment properly [3–6].In fact, energy constraint is very important since the size of the sensors requires designers to reduce the size of the battery and therefore the amount of energy available. Replacing a battery is rarely possible, for reasons of cost or constraints due to the environment. This leads to the imposition of constraints on energy consumption during the operation of different network nodes. It is therefore essential to use communication protocols and routing in order to save energy during communication to increase the lifetime of the network. It is expected that WSNs are intelligent, independent experts in the context in which they are inserted. In order to achieve this, they must be autonomously managed. In fact, energy consumption of sensor nodes plays an important role in the life of the network and has become the predominant criterion of performance in this area. If one wants the network to function satisfactorily and as long as possible, these energy constraints force us to compromise between different activities, both at the node and network levels. WSNs have created many research issues to improve the performance of the network, including the maximization of its lifetime. Therefore, unlike traditional networks concerned with ensuring a good quality of service, WSNs must give importance to energy conservation. It is widely recognized that energy limitation is an unavoidable issue in the design of WSNs because it imposes strict constraints on the operation of the network. Experimental measurements have shown that, generally, data communication is very costly in terms of energy, while data processing consumes much less [7, 8]. The energy costs of transmitting a bit of information are approximately the same as that required for the processing of thousand code operations in a typical sensor node [9–12]. The lifetime of a sensor array can be extended by the application of various techniques for energy consumption. One of these techniques consists in partitioning the network into areas, such as the case in our previous work [13].Distributive characteristics of such networks and autonomous sensors have guided further work in this area to use the paradigm of MAS. Integrating this paradigm at the WSN allows more generic modeling and the ability to describe new types of intelligent sensors to solve the problems of communication and power management. Therefore, we integrated an agent into each sensor node to ensure good management of intelligent communication between the sensor nodes to increase the life of the network. Ant and spider colonies, and so forth, are examples of MAS, which are applied in WSN to process censored data, as well as routing, the detection of shortest paths, and so forth.In addition, the integration of MAs in WSNs solves several problems that may affect these networks. Indeed, instead of having each source node transfer its data to the Sink, we propose the cooperation of several source nodes to achieve this task, and we used the MAS to gather information from these nodes and send one message to the Sink [14–18].In the present work, we have used two technologies: wireless sensor network and multiagent system. We aim at designing an intelligent system capable of simulating a WSN to minimize energy dissipation. It uses the principle of MAS operation for intelligent processing of the data collected by the nodes, in terms of redundancy reduction, assessment of their importance, the elimination of nonrelevant information, and ensuring cooperation between sensor nodes neighbors. In other words, an agent was integrated into each sensor node, in such a way that each node in the network is seen as an autonomous agent with its own characteristics and attitudes towards the various events it receives. In addition, the source nodes cooperate with their neighbors in order to collect the maximum information and eliminate redundant information between sensor nodes. The MAs are used to significantly reduce the cost of communication, in particular the elimination of redundancies between the source nodes, moving information processed by an agent introduced in each node instead of bringing them in their gross state to the Sink by the node itself. Iteratively, we partitioned the network into sectors [13] where the source nodes in each area are included in an itinerary. This technique allows finding an optimal itinerary for the MA to perform data collection from multiple distributed sensor nodes. The source nodes within each sector can be obtained by selecting the angle in an adaptive manner. The main purpose of this technique is to aggregate data by an MA and to send both to minimize the transmission cost, instead of having each node send its data. For data collection in each sector, we created an algorithm itinerary, so as to allow the MA to(i)
minimize the response time, with a large number of source nodes to visit,
(ii)
browse itinerary from the farthest node from the Sink,
(iii)
start data aggregation from the furthest source node until it arrives at the Sink,
(iv)
consume less energy in its itinerary back to the Sink,
(v)
avoid energy drain during the visit of the source nodes,
(vi)
reduce the chance of being lost due to the noise in the wireless medium.The rest of the paper is organized as follows.Section2 provides an overview of the literature in which techniques for a number of studies were carried out for effective strategies for data collection in WSNs. The communication strategy and the partitioning of the network into sectors are described in Sections 3 and 4, respectively. Then, Section 5 shows the MA packet structure. Section 6 demonstrates the cooperation of source nodes with their neighbors during the data collection sessions. Next, in Section 7 we attempt to establish a system to simulate communication between a set of sensor nodes and a base station. Then, Section 8 shows the evaluation of our proposal through simulation, while Section 9 analyzes the results of our approaches compared to other approaches, according to several criteria. Finally, Section 10 summarizes and concludes this paper.


## 2. Previous Work

In WSNs, the main problem is energy consumption. Indeed, as it is not possible to recharge the energy of sensor nodes, they must remain operational as long as possible, so it is necessary to save the maximum energy consumed by these nodes [19–22].One of the characteristics of sensor networks is their ability to reduce the amount of data flow through the network to conserve energy by merging the data with particular nodes in the network. This process is called data aggregation.Aggregation not only requires the transmission of data but also imposes constraints on the network architecture. The basic idea of this architecture is to combine data from different source nodes eliminating existing redundancies and also minimizing the number of possible transmissions to save the amount of energy consumed. Below are some works conducted in this respect.At first, the proposals for the energy economy were based on the traditional Client/Server approach (C/S), to manage data fusion of multisensor nodes in the WSN. Several studies [23–30] have been made to optimize the architecture of this model. In this architecture, when a source node detects information from the environment, it sends the raw data to the Sink to be processed. Transmission of raw data requires costly construction in terms of energy.The authors of [23, 28, 29, 31–33] proposed the technology of mobile agents in WSNs for data collection. In these proposals, the MA is defined as a message that contains an application code, a list of source nodes, and a Sink predefined by an empty field to put the data. It is able to move between all the source nodes of the network by moving the data collected in a single message instead of having each node itself provide raw data to the Sink. The use of MAS enables more efficient data aggregation compared to the C/S. In these proposals, the MA visits the source nodes of the network and gradually merges sensory data, before returning to the Sink. The drawback of such solutions is the difficulty of creating a list of source nodes and setting the start time of the data collection. Another limitation is the definition of areas to be addressed by the MA. But as a solution to optimize the itinerary of MA in data fusion, some authors [34] have proposed two heuristic routing algorithms. In the Local Closest First (LCF), MA routing algorithm starts from a node and searches for the next destination with the shortest distance to its location. In the algorithm Global Closest First (GCF), the MA starts its itinerary from a node and selects the next destination closest to the center of the surveillance zone.Due to bandwidth limitation and WSN density, using a single mobile agent can lead to a very inefficient design. In addition, the use of a single MA that visits all sources nodes of large-scale network successively can have the following disadvantages:(i)
It can actually lead to a very long response time, with a large number of source nodes to visit.
(ii)
The sensor nodes in the itinerary of the MA deplete energy faster than other nodes.
(iii)
During the visit of the source nodes, the MA size increases continuously.
(iv)
MA transmission will consume more energy in its itinerary back to the Sink.
(v)
The increasing amount of data accumulated by the MA during its migration task increases its chances of being lost due to the noise in the wireless medium.The authors [34–36] have proposed the use of multiple MAs for data fusion, which also involves the extension of the network lifetime. On the other hand, when MAs are used for tasks such as data fusion, the choice of MAs itineraries is essential. Nevertheless, it is crucial to find an optimal itinerary for each MA to visit all the indicated source nodes.Researchers [27, 36] have shown that clustering is a fundamental technique, which has a significant impact on the performance of the sensor network. They proposed a hierarchical infrastructure, such as making network nodes organize themselves into groups and elect a cluster node as a leader. Each collects aggregate data from the nodes of the group and transmits them to the Sink. In this way, it achieves a significant reduction in energy consumption and enables a more equitable distribution of data traffic in the network.Chen et al. [37] proposed the centre location-based multiagents itinerary planning (CL-MIP) algorithm, and the main idea is to consider the solution of multiagents itinerary planning (MIP) as an iterative version of the solution of the single agent itinerary planning (SIP). Another algorithm, genetic algorithm-based multiagents itinerary planning (GA-MIP), is proposed in [38]. GA-MIP first proposes a new method for encoding two levels of MA to solve the MIP problem. The algorithm GA-MIP considers the MIP problem as a single problem instead of using several steps adopted by the previous algorithms. The proposal in [39] considers models of MIP problems as a total connected graph (TCG). In the TCG, the vertices are the nodes of the sensor network, and the weight of an edge is derived from estimates of the hop between the two end nodes of the edge. The authors indicate that all source nodes in a particular subtree should be considered as a group. In addition, they present a balancing factor while calculating the weight in the TCG, to form a minimum extension called a balanced minimum spanning tree (BST).Mpitziopoulos et al. [40] proposed the Near-Optimal Itinerary Design (NOID) algorithm to solve the problem of computing a near-optimal itinerary for MA. NOID algorithm was designed on the basis of rapid adaptation to changing conditions of the network, and the MA itinerary must contain only the source nodes with enough energy availability and the number of MAs should depend on number and physical location of the sources nodes to visit.Gavalas et al. [41] presented the Second Near-Optimal Itinerary Design (SNOID) algorithm to determine the number of MAs that should be used and the itinerary these mobile agents should follow. The main idea behind SNOID is to partition the area around the Sink into concentric zones and begin to build MA paths with the direction of the inside near Sink. All source nodes within the first zone are connected directly to the Sink, and these nodes are the starting points of the mobile agent itinerary.Researchers have proposed the use of a multiagent system as solutions for the distributed and complex adaptation of wireless sensor networks. Researchers [42–46] create a community of artificial intelligence with intelligent sensors by using this system. Intelligent sensor nodes operate as autonomous agents who develop a network of intelligent sensors. In our previous work [13, 36, 47], we proposed an approach of communication with MAS in a plane WSN. So with this solution we have attempted to solve the problem of density and partition the network into clusters, groups, or sectors. We even extended this work into another work [48], and we have proposed a scheme for maximum aggregate information. In this work, we have integrated an MA into each sensor node to process data and each node can cooperate with its neighbors.After analyzing the solutions presented above, we can deduce that there is still a lot of work in terms of energy efficiency with close attention to the packet delivery ratio and network density.


## 3. Communication Strategy

Our strategy ensures better management of data collection in a WSN taking into account the energy of each sensor node in order to improve network performance. With a lot of information that could be detected as redundant or not important, optimization for data collection could be a good technique for saving energy in sensor nodes and extending the network lifetime.In this work, we propose an intelligent strategy that collects and intelligently treats data. According to [49, 50] to send an amount of information in a single message is less costly than sending the same amount in several short messages. So due to network density and energy consumption at the highest level of communication, instead of having each node send its data to the Sink, we decomposed the network into sectors.Our strategy is described as follows. An agent is introduced in each node to process data locally and to judge their importance in order to eliminate any redundant or useless data and make cooperation between neighboring nodes. In addition, the source nodes cooperate with their neighbors in order to collect the maximum information.First, we grouped the sensor nodes in such areas as in our previous work [13]. Moreover, we proposed an MA in each sector to concatenate the information processed by the source nodes and neighbors to send a single message.After the Sink designates source nodes, it sends an MA in each sector, for data aggregation, with a defined list of source nodes. The list of source nodes is sorted according to an itinerary algorithm, so that the MA flows between these nodes, as shown in Algorithm2. Each node of the source list invites its one-hop neighbors to join a session of cooperation for data collection. For a node to cooperate with its neighbor node source, it must be based on two possible behaviors. The first behavior is that a node cooperates with other nodes in the network as little as possible to save energy. However, the reduction of cooperation can lead to the loss of some relevant information. For example, a node asks its neighbor to cooperate in the task of locating an object; and if the neighbor agent does not respond to the request for cooperation, the task of locating an object may fail. The second behavior is when a node agrees to cooperate with other possible network nodes. In this case, the node consumes some power in its cooperation, but it maximizes the collected information and therefore reduces the probability of losing important information.As shown in Figure1, first of all, we assume that during data aggregation a neighboring node from a source node has detected information. After processing, it is considered that the neighboring node believes that this information is important and useful. According to the remaining energy (see Algorithm 3), it takes the appropriate decision to cooperate or not. Figure 1 shows the general diagram of a data collection.Figure 1
General scheme of a data collection.


## 4. Partitioning the Network into Sectors

### 4.1. Connect the Sink with the VCL

The position and direction of the straight perpendicular on the straight central which connects the Sink and the VCL, the latter being the point of intersection, depend on the position of VCL selected and the straight which connects it to the Sink. Therefore, we distinguished several casesX
S
i
n
k > X
V
C
L and Y
S
i
n
k > Y
V
C
L, X
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L, X
S
i
n
k > X
V
C
L and Y
S
i
n
k < Y
V
C
L, X
S
i
n
k < X
V
C
L and Y
S
i
n
k < Y
V
C
L, and for each case we distinguish between several subcases.In what follows we will detail the method of a graphical tracing tool of this straight taking the caseX
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L as example, as Figure 2 shows.(i)
Obtaining angleα: we have T
g
(
α
) = (
Y
S
i
n
k
-
Y
V
C
L
)
/
(
X
S
i
n
k
-
X
V
C
L
) and then α
=
a
t
g   Y
S
i
n
k
-
Y
V
C
L
/
(
X
S
i
n
k
-
X
V
C
L
).
(ii)
Obtaining the coordinates of the first point of the perpendicular straight:(1)
X
V
C
L
-
X
d
p
=
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
V
C
L
-
Y
d
p
=
r
a
d
i
u
s
∗
cos
⁡
α
.
Thus(2)
X
d
p
=
X
V
C
L
-
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
=
Y
V
C
L
-
r
a
d
i
u
s
∗
sin
⁡
α
.
(iii)
Obtaining the coordinates of the second point of the perpendicular straight:(3)
X
d
p
′
-
X
V
C
L
=
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
′
-
Y
V
C
L
=
r
a
d
i
u
s
∗
cos
⁡
α
.
Thus(4)
X
d
p
′
=
X
V
C
L
+
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
′
=
Y
V
C
L
+
r
a
d
i
u
s
∗
cos
⁡
α
.Figure 2
Connect the Sink with the VCL.After determining the coordinates of the two points to the perpendicular straight, we can trace it.


### 4.2. Connecting an Intersection Point to the Sink

In Figure3, there are several cases to link a point of intersection of the perpendicular straight and the circle (whose center is the VCL) with the Sink, and in each case, we distinguished several subcases. What follows is an explanation of the case X
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L.Figure 3
Connect an intersection point to the Sink.Equation of a straight line is(5)
Y
=
a
X
+
b
⟶
Y
S
i
n
k
=
a
X
S
i
n
k
+
b
Y
d
=
a
X
d
+
b
⟶
a
=
Y
S
i
n
k
-
Y
V
C
L
X
S
i
n
k
-
X
V
C
L
.And b
=
Y
S
i
n
k
-
a
X
S
i
n
k.Now, to draw the straight line, it is sufficient to find the coordinates(
X
,
Y
) from a and b.


### 4.3. Check the Membership of a Node to a Sector

After the construction of the sectors, there is a need to group the nodes belonging to the same sector. Several cases are also distinguished and for each case we discern several subcases.What follows is as an example of the caseX
S
i
n
k > X
V
C
L and Y
S
i
n
k > Y
V
C
L, and then the method used is as shown in Figure 4.Figure 4
Check the membership of a node to a sector.(1)
We calculate the angles of the sector borders:α and α
′.
(2)
We calculate the angle of each node:α
1, α
2, α
3, and α
4.
(3)
For a node to belong to a sector, its angle must be (≥
α and ≤
α
′) ∥ (≤
α and ≥
α
′).Angle calculation (see Figure5) is
angleα: a
t
g
(
Y
S
i
n
k
-
Y
B
/
X
S
i
n
k
-
X
B
),
angleα
′: a
t
g
(
Y
S
i
n
k
-
Y
A
/
X
S
i
n
k
-
X
A
),
angleα1: a
t
g
(
Y
S
i
n
k
-
Y
1
/
X
S
i
n
k
-
X
1
) and then α
1
′
=
α
1,
angleα2: a
t
g
(
Y
S
i
n
k
-
Y
2
/
X
S
i
n
k
-
X
2
) and then α
2
′
=
π
+
α
2,
angleα3: a
t
g
(
Y
S
i
n
k
-
Y
3
/
X
S
i
n
k
-
X
3
) and then α
3
′
=
π
-
α
3,
angleα4: a
t
g
(
Y
S
i
n
k
-
Y
4
/
X
S
i
n
k
-
X
4
) and then α
4
′
=
-
α
4.Figure 5
Network partitioning into sector.


## 4.1. Connect the Sink with the VCL

The position and direction of the straight perpendicular on the straight central which connects the Sink and the VCL, the latter being the point of intersection, depend on the position of VCL selected and the straight which connects it to the Sink. Therefore, we distinguished several casesX
S
i
n
k > X
V
C
L and Y
S
i
n
k > Y
V
C
L, X
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L, X
S
i
n
k > X
V
C
L and Y
S
i
n
k < Y
V
C
L, X
S
i
n
k < X
V
C
L and Y
S
i
n
k < Y
V
C
L, and for each case we distinguish between several subcases.In what follows we will detail the method of a graphical tracing tool of this straight taking the caseX
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L as example, as Figure 2 shows.(i)
Obtaining angleα: we have T
g
(
α
) = (
Y
S
i
n
k
-
Y
V
C
L
)
/
(
X
S
i
n
k
-
X
V
C
L
) and then α
=
a
t
g   Y
S
i
n
k
-
Y
V
C
L
/
(
X
S
i
n
k
-
X
V
C
L
).
(ii)
Obtaining the coordinates of the first point of the perpendicular straight:(1)
X
V
C
L
-
X
d
p
=
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
V
C
L
-
Y
d
p
=
r
a
d
i
u
s
∗
cos
⁡
α
.
Thus(2)
X
d
p
=
X
V
C
L
-
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
=
Y
V
C
L
-
r
a
d
i
u
s
∗
sin
⁡
α
.
(iii)
Obtaining the coordinates of the second point of the perpendicular straight:(3)
X
d
p
′
-
X
V
C
L
=
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
′
-
Y
V
C
L
=
r
a
d
i
u
s
∗
cos
⁡
α
.
Thus(4)
X
d
p
′
=
X
V
C
L
+
r
a
d
i
u
s
∗
sin
⁡
α
,
Y
d
p
′
=
Y
V
C
L
+
r
a
d
i
u
s
∗
cos
⁡
α
.Figure 2
Connect the Sink with the VCL.After determining the coordinates of the two points to the perpendicular straight, we can trace it.


## 4.2. Connecting an Intersection Point to the Sink

In Figure3, there are several cases to link a point of intersection of the perpendicular straight and the circle (whose center is the VCL) with the Sink, and in each case, we distinguished several subcases. What follows is an explanation of the case X
S
i
n
k < X
V
C
L and Y
S
i
n
k > Y
V
C
L.Figure 3
Connect an intersection point to the Sink.Equation of a straight line is(5)
Y
=
a
X
+
b
⟶
Y
S
i
n
k
=
a
X
S
i
n
k
+
b
Y
d
=
a
X
d
+
b
⟶
a
=
Y
S
i
n
k
-
Y
V
C
L
X
S
i
n
k
-
X
V
C
L
.And b
=
Y
S
i
n
k
-
a
X
S
i
n
k.Now, to draw the straight line, it is sufficient to find the coordinates(
X
,
Y
) from a and b.


## 4.3. Check the Membership of a Node to a Sector

After the construction of the sectors, there is a need to group the nodes belonging to the same sector. Several cases are also distinguished and for each case we discern several subcases.What follows is as an example of the caseX
S
i
n
k > X
V
C
L and Y
S
i
n
k > Y
V
C
L, and then the method used is as shown in Figure 4.Figure 4
Check the membership of a node to a sector.(1)
We calculate the angles of the sector borders:α and α
′.
(2)
We calculate the angle of each node:α
1, α
2, α
3, and α
4.
(3)
For a node to belong to a sector, its angle must be (≥
α and ≤
α
′) ∥ (≤
α and ≥
α
′).Angle calculation (see Figure5) is
angleα: a
t
g
(
Y
S
i
n
k
-
Y
B
/
X
S
i
n
k
-
X
B
),
angleα
′: a
t
g
(
Y
S
i
n
k
-
Y
A
/
X
S
i
n
k
-
X
A
),
angleα1: a
t
g
(
Y
S
i
n
k
-
Y
1
/
X
S
i
n
k
-
X
1
) and then α
1
′
=
α
1,
angleα2: a
t
g
(
Y
S
i
n
k
-
Y
2
/
X
S
i
n
k
-
X
2
) and then α
2
′
=
π
+
α
2,
angleα3: a
t
g
(
Y
S
i
n
k
-
Y
3
/
X
S
i
n
k
-
X
3
) and then α
3
′
=
π
-
α
3,
angleα4: a
t
g
(
Y
S
i
n
k
-
Y
4
/
X
S
i
n
k
-
X
4
) and then α
4
′
=
-
α
4.Figure 5
Network partitioning into sector.


## 5. Mobile Agent

### 5.1. Mobile Agent Packet Structure

After the Sink uses directed diffusion to designate the source nodes, it sends to each sector a mobile agent. This, a data packet flowing through the power line, is used to collect the data collected by the source nodes and its neighbors. The information contained in a packet of MA is shown in Table1.Table 1
Mobile agentpacket structure.
MA_SeqNum
Sec_ID
Src_List
Next_Src
Int_List
Next_Node
Aggregated_dataThe two attributes MA_SeqNum and Sec_ID are used to identify an MA packet. Each time the Sink sends a new MA packet, it increments the MA_SeqNum. The list Src_List specifies the source nodes of the Sec_ID sector, which will be visited by the MA. The attribute Next_Src specifies the succession of the identifiers of attribute source nodes Src_List which must be visited by the MA. The list Int_List specifies the intermediate nodes between two source nodes; this list is filled by each source node which contains the MA. The attribute Next_Node determines specifically the succession of the identifiers of the attribute nodes Int_List which must be visited by the MA. Aggregated_data is the field of data collection, and the data size is equal to zero when an MA is generated and increases when the MA moves between source nodes.


### 5.2. MA Itinerary Planning

To plot the itinerary of MA, we created an algorithm (see Algorithm1), which can find an optimal path to manipulate lists of nodes in a consistent manner. Our algorithm allows a mobile agent to move from a source node to a further source node closest to the Sink. So the itinerary starts at the first source node with longer distance and ends with the closest source node to the Sink.Algorithm 1:Source node arrangement at the Sink.
max =L
[1];  // L: list of source nodes
Fori = 2 to N Do
Ifd(Sink, max) < d(Sink, L
[
i
]) Then  // furthest distance from the Sink
max =L
[
i
];
EndFor
MA@Src_List[1] = max; // max: the furthest node from the Sink
MA@Next_Src = max;
L
=
L
-
max
⁡;
Fori = 1 to N Do
min =L
[
i
];
Forj = 2 To N Do
Ifd(MA@Src_List[
i
], min) > d(MA@Src_List[
i
], L
[
j
])   Then
min =L
[
j
];
EndFor;
MA@Src_List[
i
+
1
] = min;
L
=
L
-
min
⁡;
N
=
N
-
1;
EndFor;Algorithm 2:The MA passage between the source nodes.
Skip the MA to MA@First_Src;
While MA arrives at a node Do
If nœud_ID in MA@Src_List Then
Fori = 1 to node@Nbr_Vois  Do // number of neighboring node
Node diffuses ReqCoop;
EndFor
If delay =D Then // the timeout for the sent to the next MA
Fori = 1 to node@Nbr_Vois_Coop + 1 Do // node neighbors cooperating
If MA@Data_cooperation is empty Then
N
=
R
1  // Set the data at packet MA
Else
If the node data does not exist in the package MA Then
N
=
N
+
Σ
ρ
⋅
R
i; // Add the data at package
EndIf;
EndIf;
EndFor;
EndIf;
EndIf;
Populate the attribute MA@Int_List // by the intermediate nodes between the two source nodes
MA@Next_Node = read the new destination for MA@Int_List;
Skip the MA to MA@Next_Node;
End.Algorithm 3:Cooperation of a neighboring node. E represents the remaining battery level; hence, the higher the E is, the more it is advisable that the node participates in cooperation.
If a node receives ReqCoop Then
If node contains important information Then
If E
>
S Then // if the remaining energy > than a predefined threshold
Transfer information;
EndIf
EndIf
EndIf


## 5.1. Mobile Agent Packet Structure

After the Sink uses directed diffusion to designate the source nodes, it sends to each sector a mobile agent. This, a data packet flowing through the power line, is used to collect the data collected by the source nodes and its neighbors. The information contained in a packet of MA is shown in Table1.Table 1
Mobile agentpacket structure.
MA_SeqNum
Sec_ID
Src_List
Next_Src
Int_List
Next_Node
Aggregated_dataThe two attributes MA_SeqNum and Sec_ID are used to identify an MA packet. Each time the Sink sends a new MA packet, it increments the MA_SeqNum. The list Src_List specifies the source nodes of the Sec_ID sector, which will be visited by the MA. The attribute Next_Src specifies the succession of the identifiers of attribute source nodes Src_List which must be visited by the MA. The list Int_List specifies the intermediate nodes between two source nodes; this list is filled by each source node which contains the MA. The attribute Next_Node determines specifically the succession of the identifiers of the attribute nodes Int_List which must be visited by the MA. Aggregated_data is the field of data collection, and the data size is equal to zero when an MA is generated and increases when the MA moves between source nodes.


## 5.2. MA Itinerary Planning

To plot the itinerary of MA, we created an algorithm (see Algorithm1), which can find an optimal path to manipulate lists of nodes in a consistent manner. Our algorithm allows a mobile agent to move from a source node to a further source node closest to the Sink. So the itinerary starts at the first source node with longer distance and ends with the closest source node to the Sink.Algorithm 1:Source node arrangement at the Sink.
max =L
[1];  // L: list of source nodes
Fori = 2 to N Do
Ifd(Sink, max) < d(Sink, L
[
i
]) Then  // furthest distance from the Sink
max =L
[
i
];
EndFor
MA@Src_List[1] = max; // max: the furthest node from the Sink
MA@Next_Src = max;
L
=
L
-
max
⁡;
Fori = 1 to N Do
min =L
[
i
];
Forj = 2 To N Do
Ifd(MA@Src_List[
i
], min) > d(MA@Src_List[
i
], L
[
j
])   Then
min =L
[
j
];
EndFor;
MA@Src_List[
i
+
1
] = min;
L
=
L
-
min
⁡;
N
=
N
-
1;
EndFor;Algorithm 2:The MA passage between the source nodes.
Skip the MA to MA@First_Src;
While MA arrives at a node Do
If nœud_ID in MA@Src_List Then
Fori = 1 to node@Nbr_Vois  Do // number of neighboring node
Node diffuses ReqCoop;
EndFor
If delay =D Then // the timeout for the sent to the next MA
Fori = 1 to node@Nbr_Vois_Coop + 1 Do // node neighbors cooperating
If MA@Data_cooperation is empty Then
N
=
R
1  // Set the data at packet MA
Else
If the node data does not exist in the package MA Then
N
=
N
+
Σ
ρ
⋅
R
i; // Add the data at package
EndIf;
EndIf;
EndFor;
EndIf;
EndIf;
Populate the attribute MA@Int_List // by the intermediate nodes between the two source nodes
MA@Next_Node = read the new destination for MA@Int_List;
Skip the MA to MA@Next_Node;
End.Algorithm 3:Cooperation of a neighboring node. E represents the remaining battery level; hence, the higher the E is, the more it is advisable that the node participates in cooperation.
If a node receives ReqCoop Then
If node contains important information Then
If E
>
S Then // if the remaining energy > than a predefined threshold
Transfer information;
EndIf
EndIf
EndIf


## 6. Cooperation for Data Collection

Figure6 illustrates the cooperation of source nodes with their neighbors during the sessions of data collection, which begins when a source node receives an MA. When the source node receives the MA, it sends a request for cooperation to its neighbors in a single hop, as shown in step (
1
). The request for cooperation is a short message, scheduled for a single hop, and the neighbors will be programmed not to reply to the message. First, we assume that a neighbor node detects important data, so that a neighboring node decides whether to cooperate in a precise energy threshold or not. After making the appropriate decision, each node sends processed data (useful and nonredundant) to the source node. Thus, the source node waits for a fixed time and then considers that nodes that do not send data nodes are not cooperating. Then the source node eliminates redundancies in its data with the information transferred by cooperating neighboring nodes. This data will be linked in the MA data cooperation attribute and sent to the source node through the next sensor nodes, as shown in step (
2
).Figure 6
Cooperation for data collection.The second source node and all nodes that are in the MA Src_List repeat the same steps above until they reach the Sink.LetN be the amount of sensed data accumulated after the MA collects the result of a node, and R
i the data size of data to be processed locally that are captured and accumulated by the MA to nodei. So we have N
=
R
1; N
=
N
+
∑
k
=
2
i
ρ
·
R
k  (
i
≥
2
).


## 7. Simulation Setup

The goal of our application is to establish a system to simulate communication between a set of sensors and a base station within a wireless sensor network. It is based on the technique of partitioning the network into sectors and the use of multiagent systems and mobile agents is seen as a mechanism to conserve the energy of a WSN. So we will make an application in terms of efficient energy consumption and the delivery rate of packets. A node calls its one-hop neighbors to reach cooperation for the data collection session [51–53].We performed our simulations on 500 m × 500 m with a random distribution of 1000 sensor nodes for 1000 seconds. Thus, we used a single base station that is located to the right of the field, and some source nodes are randomly distributed in the network. We have limited the radio range and brought the data rate of each node to 80 m and 1 Mbps, respectively, as suggested in [54–56]. Local processing time is 40 ms. The parameters of power transmission and reception, which directly affect the radio range, were selected from the ranges defined in [57–59]. The parameter values used in the simulations are presented in Table 2. The basic settings are common to all experiments.Table 2
Basic simulation parameters.
Simulation parameters
Values
Node distribution
Random
Radio range
80 m
Debit
1 Mbps
Data collection interval
10 seconds
Simulation time
1000 seconds
Local processing time
40 ms
Processing size code
0.4 Ko
MA accessing delay
10 ms
Data processing rate
50 Mbps
Raw data reduction ratio
0.8
Aggregation ratio
0.9
Fusion factor (ρ)
1
Network size
500 m × 500 m
Number of sensor nodes
1000


## 8. Proposal Evaluation

MAs have been proposed to significantly reduce the costs of communication, which have a significant impact on the WSNs reliability. Several studies that have been made, as explained in Section2, show that MAs are more efficient than the traditional architecture Client/Server-based WSN. Among these works, Local Closest First (LCF) and Global Closest First (GCF) are simple approaches [34] for itinerary planning in a single mobile agent. LCF seeks the source node and then the shortest distance from the current node, while the node source seeks GCF next, which has the shortest distance from the base station.Our paper proposes to use an intelligent strategy based on an MAS for data aggregation and intelligent processing in a WSN. The proposed strategy is called multiagent system-based wireless sensor network (MASWSN).In our simulations, we assume that the sensor nodes have limited energy, except the Sink, which is assumed to have infinite energy input [60]. We assume again that the Sink and sensor nodes are stationary. To check the scaling property of our algorithms, we select a large-scale network, with 1000 sensor nodes.


## 9. Results and Analysis

To demonstrate the performance of our approach in WSNs, we compare it with LCF and GCF approaches according to several criteria that we will use later.We examine the impact of the number of source nodes based on the criteria of energy efficiency. So energy is the parameter that defines the life of WSN. Therefore, we consider this parameter as the most important criterion, and we will evaluate the performance of our approach in this parameter in Figure7.Figure 7
Comparison of energy consumption.We fixed the number of sources nodes from 5 to 40 by steps of 4 and get a set of results for each case. We represented the results obtained in Figure7, which shows the impact of the number of nodes on energy sources, to obtain sensory data of all source nodes.Figure4 shows the performance comparison of the three approaches in terms of energy. First which is something quite normal, when the number of source nodes is increased, more energy is needed to perform the duties of each of the three approaches. We note that our approach is always better than other approaches, regardless of the number of source nodes. It may be noted again that the difference between our proposal MASWSN and the other two approaches is becoming increasingly important, and this difference increases continuously with the increase in the number of source nodes.In the beginning, there is not much difference between the three approaches, but at 12 source nodes, LCF and GCF consume energy 9.5% and 19% more than MASWSN, respectively. However, at 40 source nodes, consumption of our approach minimizes the energy consumption, more than 34.5% compared to LCF and about 47.5% in comparison with GCF. By comparison, the solution of our approach MASWSN has better energy efficiency.In addition and in another experiment, we show the performance comparison of the three approaches in terms of task duration. For LCF and GCF approaches, the task duration is equivalent to the average end-to-end reporting delay, from the time when an MA is dispatched by the Sink to the time when the agent returns to the Sink. However, the time includes data processing time by the MA to eliminate redundancies. So in our approach, since several mobile agents work in parallel, there must be an agent which is the last to return to the Sink; therefore, the duration of the task is the delay of this agent. However, the time also includes data processing time at the nodes; the more the time cooperation with its source neighboring nodes, the more the time for the MA. The results were shown in Figure8.Figure 8
Comparison of task duration.Figure9 shows the performance comparison of the three approaches in terms of task duration. We note that with our approach task duration is also always lower than that of other approaches, regardless of the number of source nodes. Compared to the energy performance, the number of source nodes has a greater impact on the delay of the task. First, when the number of source nodes is increased, longer time is required within the mobile agent to perform the tasks of each of the three approaches. The duration of a task in the LCF and GCF approaches becomes much greater for a larger number of source nodes, because, with more source nodes to visit, the size of an MA becomes bigger, and many transmissions will be made. It may be noted again that the difference between our proposal MASWSN and the two other approaches becomes increasingly important, and this difference increases continuously with the increasing number of source nodes. At first, LCF and GCF consume 21% and 52% time more than MASWSN, respectively. Our approach is advantageous when the number of source nodes reaches 40, and MASWSN minimizes delay to over 24% at LCF and about 37% at GCF.Figure 9
Energy communication in terms of size.The reason for this result is that, in a single MA itinerary as LCF and GCF, one MA moves along the entire network to collect information from all source nodes. This procedure leads to a greater latency from source nodes that can be distributed throughout the network. A multiagent approach as our approach can speed up the task, as many itineraries are applied simultaneously.In addition and in another experiment, we changed the size of the data collected at each node from 0.5 Ko to 4 Ko sources. The obtained results are shown in Figure9.After the analysis, we find that when the packet size is increased, more energy is needed to perform the duties of each of the three approaches. We note that our approach in terms of energy consumption is also always lower than the other approaches, regardless of the number of source nodes. This means that the difference between our approach and other approaches both in terms of energy consumption is evident with increase in packet size. Moreover, when the packet size is small, the energy consumption becomes less important with MASWSN compared with LCF but very large compared to GCF. In another way, from 0.5 Ko and 2.5 Ko, our approach achieves energy savings and additional 12% and 26% higher than LCF and GCF, respectively. It may be noted again from 2.5 Ko that the difference between MASWSN and the two approaches becomes increasingly important, and this difference increases continuously with increasing packet size. However, our approach is advantageous as when the size of the packets increases, with 4 Ko, MASWSN minimizes energy consumption to more than 17% with LCF and about 31% with GCF. By comparison, the advantage of our approach is better energy efficiency.


## 10. Conclusion and Future Work

In an environment where data redundancy is considerably detected, the sensor nodes generate a large amount of traffic on the wireless channel, which not only causes a loss of wireless bandwidth but also takes a lot of battery energy. Instead, the sensor nodes send censored data to the raw base station. We based our research on the cooperation of nodes to collect the maximum information and process it at the node level. Recent research has demonstrated the effectiveness of using an MA for data collection in WSNs. Using only one MA may be deficient; for example, the latency increases task completion time and unbalances energy consumption by the nodes. To remedy these problems, we partitioned the network into sectors using an MA within each sector. Therefore, we used multiple mobile agents in parallel and an MA for each sector to facilitate the simultaneous collection of censored data.In this work, we proposed a solution for data collection based on an MAS in order to increase the lifetime of a WSN. We used two types of agents, stationary and mobile. The task of the stationary agents consists in integrating an agent in each sensor node to locally process data and estimate their importance. The task of MAs consists in sending an MA to each sector, to transmit the data captured by the source nodes which are cooperating with their neighbors to the Sink in a single message. The results show that, in MA, source nodes cooperate with their neighboring nodes in order to eliminate redundancy between nodes.Our approach reduces the communication of useless data and consequently reduces the amount of traffic and energy consumption. This means a gain in the amount of data overload and in the energy needed to send them.We proved by simulations that our approach has better performance compared to the LCF and GCF approaches in terms of energy efficiency and packet delivery ratio in dense wireless sensor networks.The reason for this is that, in the LCF and GCF approaches, a single MA moves along the entire network to collect information from all source nodes. This procedure results in a longer latency and greater energy from source nodes that are distributed across the network. But our approach uses multiagents that accelerate tasks in a minimum time and with little energy consumption, because many itineraries are applied simultaneously. In the near future, the wider adoption and usage of WSN technologies are expected to bring out the significant role that MAs can play in this type of networks.



---

*Source: 708525-2015-10-11.xml*