You are on page 1of 6

Optimized Deployment Strategy of Mobile Agents in Wireless Sensor

Networks

Xue Wang, Sheng Wang, and Aiguo Jiang


State Key Laboratory of Precision Measurement Technology and Instruments
Department of Precision Instruments, Tsinghua University, Beijing 100084, P.R.China
wangxue@mail.tsinghua.edu.cn

Abstract computationally intensive tasks away from primitive


sensors to more powerful mobile agents, which enables
Energy consumption is critical and the processing energy efficient operations under severely limited
ability and memory of sensor nodes are limited in power constraints. However adequate deployment of
wireless sensor networks. Mobile agent technology can MAs remains an open problem due to constrained
decrease energy consumption and boost network bandwidth when the numbers of nodes and MAs
performance. Inadequate deployment of mobile agents increase. In this paper, a deployment strategy of MAs
might lead to network failure due to constraint in WSNs is proposed, which integrates the impacts of
bandwidth. In this paper, a deployment strategy of creation sequence, priority and energy consumption of
mobile agents in wireless sensor networks, which MAs. Genetic algorithm (GA) is engaged to optimize
integrates the creation sequence, priority and energy the deployment strategy. The simulation results show
consumption of mobile agents, is proposed. Genetic the influence of deployment strategy on energy
algorithm is engaged to optimize the strategy. Then the consumption and time delay. Finally, the deployment
energy consumption and time delay of mobile agent strategy of MAs is validated by quality inspection on
model are compared with client/server model. The manufacturing.
simulation results indicate that the optimized
deployment strategy of mobile agents can efficiently 2. Deployment problem of mobile agents
decrease the energy consumption and time delay in
wireless sensor network, and improve the real-time Spatial coverage and structural diversity of WSNs
ability. Thus, the network lifetime is prolonged and the make it fit for large-range and multiple-object
real-time ability is boosted. Finally, the performance monitoring. For WSNs, a predominant concern is
of optimized deployment strategy of mobile agents has energy efficiency. Indeed, energy efficiency is the
been validated in quality inspection on manufacturing. chief reason that the multihop ad hoc architecture that
relays packets in short distances is considered superior
1. Introduction over the one-hop network with fixed access points or
gateway nodes. In WSN, however, the bandwidth is
Wireless sensor network (WSN) is an emerging limited and the connection is easily affected by the
technology, which can be applied potentially in surrounding environments. C/S model requires
military, spatial, industrial and consumptive fields [1]. transmitting vast data, which consumes high
WSNs are critical in energy consumption and the bandwidth and needs continuous and steady
processing ability and memory of nodes are limited connection. There are a few drawbacks with C/S model
which have a finite operational life and low duty that might prevent it from being used in WSNs. First,
cycles. Client/server (C/S) paradigm is usually adopted client/server-based computing generally requires many
in WSNs, which has many flaws in practical round trips over the network in order to complete one
application [2]. Qi firstly proposed mobile agent computation. All computation consumes network
paradigm in WSNs [3]. Mobile agent (MA) is a bandwidth and communication energy. The network
computational/analytical program which can migrate connection needs to be alive and healthy the entire
between nodes and has autonomy, cooperation, et al time of the transaction, otherwise the transaction has to
[4]. MA paradigm is more suitable to energy-aware restart if it can at all. Second, there have to be some
WSN. The addition of mobile agents shifts kind of supernodes in the sensor network served as the

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006
processing centers which have large storage, high temporal sequence that the requests are received and
computing capabilities, and consume much energy. But the agent in head of TQ is firstly dispatched, named
in some automatic and homogeneous sensor networks, sequential deployment. Sequential deployment,
this is not always the case. Given the unreliability and however, neglects energy consumption and time delay,
low bandwidth of the wireless link used in sensor which are important to MAs introduced in WSNs.
networks, client/server-based computing is not Moreover, sequential deployment neglects the
appropriate to carry out the collaborative processing emergence degree of agents. Some requests have to
between multiple nodes [5]. stay overtime in TQ, which might lead to a network
MAs process data locally, which reduces the failure. Thus, a deployment strategy of MAs in WSNs,
capability of program codes and decreases the demand which synthesizes creation sequence, priority and
for network bandwidth. Uninterrupted steady energy consumption of MAs, has to be proposed.
connections between sensor nodes (SNs) are not
required and only short-time connection is needed 3. Optimized deployment strategy
when mobile agents are transferring. Mobile agent
based WSN can integrates intelligent soft-computing 3.1. Key factors of deployment
algorithms, WSN and mobile agent technology.
Lots of Sensor Nodes (SNodes) and a Central CSNode deploys the MAs in TQ with consideration
Service Node (CSNode) are randomly distributed in of three key factors: creation sequence, priority of
WSNs. Task programs are updated dynamically due to agents and energy consumption.
limited memory of SNodes. SNodes are aware of
energy consumption and usually remain in sleeping 3.1.1. Creation sequence C . Denote the sequence that
status; switch into working status when executing CSNode receives the requests from SNodes. MAs are
tasks; and automatically return to sleeping status after dispatched by creation sequence: a new MA is put in
completing tasks. CSNode stores diverse MAs which tail of task queue; the MA in head of TQ will be firstly
can deal with the requests from SNodes. dispatched.
Once receiving a request from SNodes, CSNode
initializes a MA according with the request; then the
MA is dispatched to the node where the request is from
and implements tasks; the MA returns results to 3.1.2. Priority of agents I . Denote the urgency
CSNode after completing tasks; finally, the MA is degree of requests: 0 is the highest priority, 1 is middle
destroyed locally, as depicted in Figure 1. There exist priority and 2 is the lowest priority. MAs with higher
three data transfers, including two message transfers priority should be dispatched preferentially: a new MA
and one MA transfer. The requests from SNodes to will be put in the front of MAs with lower priority, if it
CSNode and the results from MAs to CSNode are holds the higher priority than MAs in TQ [6].
transferred in message mode. Due to constraint
bandwidth, the sequence of data transfers needs
scheduling correctly. Generally, a message datagram,
which is smaller than a MA, can be ignored. Hence the
scheduling of data transfers is simplified into the 3.1.3. Energy consumption Q . Sensor nodes are
deployment of MAs in WSNs. normally composed of four basic units [7]: a sensing
unit, a processing unit, a communication unit, and a
power unit. However, since the energy consumed in
sensing and power supporting are the same for both
modes, we choose to neglect these factor. Here, we
denote the energy consumption for completing
requests, including two parts: transmission energy
Qtrans and computation energy Qcalc . The transmission
Figure 1. Deployment process of mobile agents energy is calculated by the following process.
For both two computing models, given minimum
CSNode might receive many requests from SNodes
transmission power P0,trans along a standard distance d 0 ,
in a short interval. CSNode initializes different MAs
instantaneous transmission power is in direct
according to the requests. The MAs can not be
dispatched immediately owing to constraint bandwidth. proportion to the square of transmission distance d i
CSNode puts the MAs into a Task Queue (TQ) in between CSNode and i th SNode [8]

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006
di2 (4π )2 β factors occur quite often in sensor networks because of
Pi ,trans = × × P0,trans , (1) the use of wireless link. Therefore, we develop
d02 Gt Gr λ 2
simulation modes for more accurate estimation of the
where Gt , Gr are transmission gain and receiving gain transmission time ti ,trans .
respectively. Wavelength λ is the ratio of speed of
light c and carrier frequency f and β is the system
loss factor. So the transmission energy is 3.2. Integrated metric
Qi ,trans = Pi ,trans × ti ,trans . (2)
An integrated metric R for the deployment of MAs
Assume that the network transfer rate is vn , the in WSNs is designed with synthetical consideration of
transmitted data file size is s f (the size of raw data three before-mentioned key factors C , I and Q .
each node collects), the mobile agent size sa , the Firstly, for considering the degree of urgencies of
number of sensor nodes is p , the number of agents is requests, energy consumption factor Q is revised by
m , and the number of sensor nodes is n that each
priority factor I :
agent migrates (the processing center is not included). Qi′ = Qi ,trans × I i + Qi ,calc . (9)
Notice that p = m × n . Thus, for client/server-based
Secondly, for considering the order of different MAs,
computing, the transmission time is
assign the proportional coefficients of deployment
mns f
ti ,trans = . (3) sequence of MAs in TQ, i th coefficient is
vn si = N + 1 − i , (10)
And for mobile-agent-based computing, the time where N is the number of MAs in TQ.
used to transfer the agents is Then the integrated metric of deployment of MAs
( m + n ) sa can be calculated as follows:
ti ,trans = (4)
R = ∑ i =1 si × Qi′ .
N
vn (11)
since it takes nsa / vn for the m mobile agents to
migrate among the n sensor nodes simultaneously and 3.3. Deployment optimization by genetic
it takes msa / vn for cluster head to receive agents in algorithm
sequence after they finish the migration [5].
Assume that computation power of SNodes is P0,calc 1) Chromosome: denote deployment sequence of MAs
and standard operational frequency is f 0 , the current in TQ, each gene is an agent.
operation frequency is f j . For both two computing
models, computation energy is in direct proportion to
the square of current operational frequency f j2 [9] 2) Fitness function: the reciprocal of integrated metric.
Pi ,calc = ( f j f 0 ) × P0,calc .
2 The higher the fitness is, the better the deployment
(5)
sequence of MAs is.
Fitness = R −1 = 1 ∑ i =1 si × Qi′ .
Therefore, the computation energy is N
(12)
Qi ,calc = Pi ,calc × ti ,calc . (6)
3) Genetic operators:
We assume that the data processing rate is vd with
− Reproduction: copy optimal individuals from
standard operational frequency f 0 . Thus, for last generation to next generation.
client/server-based computing, the computation time − Crossover: choose an old individual from last
ti ,calc can be calculated as follows: generation randomly and then exchange its two genes
mns f and put it into next generation.
ti ,calc = (7)
vd − Mutation: create a new sequence of MAs as an
And for mobile-agent-based computing, the time used individual in next generation.
Arrange MAs in TQ according to the optimal
to execute the processing code locally is [5]:
individual of GA and dispatch the MA in head of TQ to
( m + n ) sa the node where the request comes from.
ti ,calc = (8)
vd
We must notice that the model described above is 4. Performance evaluation
analytical. Actually, however, some of the components
are difficult to measure in practice. The most difficult Adequate deployment strategy of MAs can ensure
one is transmission time, where retransmission and the requests from SNodes are responded rapidly and
error control are not considered. Unfortunately, these decrease the energy consumption in WSNs. Two

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006
performance metrics are adopted to evaluate the Thus, MA paradigm can effectively ensure that
deployment strategy of MAs: CSNode respond rapidly the requests from SNodes.
− Energy consumption: include transmission
energy and computation energy.
− Time delay: denote the interval from the time
that CSNode receives the request from SNode to the
time that CSNode dispatches the relevant MA.

4.1. Experiment parameter setup

The range of WSN is 400m × 300m , the coordinates


of 20 SNodes are ( xi , yi ) respectively and CSNode is (a)
placed in (200,150) . Parameters of WSNs are listed in
Table 1. The priority of MAs is divided into 0, 1 and 2,
including 1, 5 and 4 MAs respectively, whose size and
standard execution time are listed in Table 2. MAs with
higher priority can request ones with lower priority.
The requests are stochastically created with total
probability ρ = 0.8 . The requests with 0, 1 and 2
priorities hold the proportion 0.4, 0.3 and 0.3
respectively. Parameters of GA: the number of
individuals is 50 and the probabilities of reproduction, (b)
crossover and mutation are 0.1, 0.6 and 0.3 Figure 2. Comparison of different paradigms: (a)
respectively; the max generation is 400 and the Energy consumption (b) Time delay.
evolution is terminated once the optimal individuals of
successive 20 generations remain the same.

Table 1. Parameters setup of WSNs


B Gt Gr β f P0,trans f0 P0, calc
2KB/s 2 2 1 2.4GHz 25mW 10MHz 25mW

Table 2. Size and standard execution time of MAs


Priority Size / bytes Standard time / seconds
0 200 0.162 (a)
1 400 0.187, 0.208, 0.297, 0.578, 1.218
2 600 1.632, 1.895, 1.712, 1.883

4.2. Effect of different paradigms

Analyze the performance of C/S paradigm and MA


paradigm in WSNs. SNode transmits 2250 bytes of data
to CSNode whenever a request is processed in C/S
paradigm; CSNode transfers an agent of 200-600 bytes
to SNode in MA paradigm. 10s simulations with the (b)
same parameters are carried out and the results are
depicted in Figure 2. Energy consumptions vs. time of Figure 3. Comparison of different deployment
two paradigms are linear and energy consumption in strategies: (a) Energy consumption (b) Time delay.
C/S paradigm is far more than in MA paradigm.
Compared with C/S paradigm, MA paradigm can save 4.3. Effect of deployment strategies
energy and is more suitable to WSNs with constrained
energy. Time delay vs. time of C/S paradigm increases Compare the sequential deployment and the
quickly while that of MA paradigm remains stable. optimized deployment of MAs in WSNs. 10s
simulations with the same parameters are carried out

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006
and the results are shown in Figure 3. Energy where RGB denotes three primary colors, m, n are the
consumption vs. time of two deployment strategies is height and width of PCB in pixels respectively. Take
linear and energy consumption in the former strategy is Y = M × 0.8 as the threshold. Confirm a rectangle that
a little more than in the latter one at the same time. surrounds all pixels whose difference value is over Y
Time delay of optimized deployment is steady while and calculate the number of pixels in the rectangle S1 ;
that of sequential deployment fluctuates heavily, which or count the number of all pixels whose difference
makes some MAs fail. Therefore, the optimized value is over Y as S2 . Compare S1 with S2 , if
deployment can stabilize the response time of CSNode S 2 < S1 × 0.5 , let the number of pixels of the defect
to requests from SNodes. S = S1 ; otherwise S = S2 . Let location accuracy
ϕ = S×4/3 .
5. Quality inspection on manufacturing − Location agents with 1 priority: locate the
positions of defects, divided into five grades with
WSNs are inherently suitable to a distributed system different accuracy:
for quality inspection. Quality inspection of printed Accuracy/pixels 64×48 32×24 16×12 8×6 4×3
circuit board (PCB) in electronic equipments is utilized Time/seconds 0.187 0.208 0.297 0.578 1.218
to validate the performance of deployment strategy of Location agents locate defects in low accuracy, the
MAs, as depicted in Figure 4. center O1 and then do in high accuracy, the center O2 .
Compare d =| O1O2 | with ϕ / 2 , if d ≤ ϕ / 2 , the
location result is accurate; otherwise, inaccurate.
− Identification agents with 2 priorities: engage a
feedforward neural network with one-hidden-layer of
10 neurons to identify defect types. Six inputs of the
neural network denote average of RGB of defect
region in standard PCB and pending PCB respectively
and one output is defect type. The training set consists
of 40 samples with 10 samples every type. Let
maximum training error δ = 0.01 and train the neural
network. The trained neural network is embedded into
Figure 4. Quality inspection by mobile agents on identification agents and used to identify defect types.
manufacturing. The priority and type of MAs are decided by
requests instead of stochastical creation. The
The production of PCB passes through three deployment process of MAs has been analyzed in
successive phases when some unpredictable defects simulation experiment. Accuracy of defect location in
might occur: different phases and identification of defect types in
− Bare Board Phase: open circuit, short circuit, bare board are evaluated in the following experiments.
missing hole and missing footprint.
− Surface Mounting Device (SMD) Phase: 5.2. Accuracy of defect location and
position decline, missing device and wrong type. identification
− Dual-in-Line-Package (DIP) Chip Phase:
position decline, missing chip, inversion, wrong type Take three phases of PCBs without defects as
and rosin joint. standard PCBs respectively. Location agents with
different accuracy are dispatched to SNodes to locate
5.1. Inspection agents with different priorities 200 defects in bare boards, 200 defects in SMD boards
and 100 defects in DIP chip boards, and the results are
− Estimation agents with 0 priority: estimate the listed in Table 3.
size of defects. Defects with less than 4 pixels are
neglected. The estimation process can be described as Table 3. Accuracy of defect location
follows: take a PCB without defects as standard PCB, PCB Bare SMD DIP chip
and then compare the RGB value of each pixel of the Num. of 200 200 100
pending PCB with that of standard PCB and determine Num.l of 170 180 192
the maximum difference value M : lAccuracy
i 87.5% 90% 96%
( )
M = max R ija − R bij + G ija − G ijb + Bija − Bijb
. (13) Take bare board without defects as standard PCB
i = 1 ~ m, j = 1 ~ n
and then dispatch identification agents to SNodes to

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006
identify 200 defects in bare boards. 191 defects are
identified into correct types and identification accuracy [4] D. B. Lange and M. Oshima, “Seven good reasons for
is up to 95.5%. mobile agents”, in Communications of the ACM, 1999, pp.
88-89.
6. Conclusions [5] H. Qi, Y. Xu, and X. Wang, “Mobile-agent-based
collaborative signal and information processing in sensor
Mobile agent technology can boost the performance networks”, Proceedings of the IEEE, vol.91, August 2003,
on energy consumption and cooperation in wireless pp. 1172-1183.
sensor networks. The poor ability and memory are
compensated with the cooperation among mobile [6] V. Raghunathan, C. Schurgers, S. Park, and M. B.
agents. The optimized deployment strategy of mobile Srivastava, “Energy-aware wireless micro-sensor networks”,
IEEE Signal Processing Mag., March 2002, pp. 40-50.
agents in wireless sensor networks synthesizes the
creation sequence, priority and energy consumption of [7] J. Liu, “Agent-based load balancing on homogeneous
mobile agents. It can address the deployment of mobile minigrids: macroscopic modeling and characterization”,
agents in terms of constraint bandwidth when the IEEE Transactions on Parallel and Distributed Systems,
numbers of nodes and mobile agents increase. The vol.16, July 2005, pp. 586-598.
simulation results show the optimized strategy
decrease the energy consumption and time delay in [8] Q. Wu, N. S. V. Rao, and J. Barhen, “On computing
wireless sensor network. Thus, the network lifetime is mobile agent routes for data fusion in distributed sensor
prolonged and the real-time ability is boosted. Finally, networks”, IEEE Transactions on Knowledge and Data
Engineering, vol.16, June 2004, pp. 740-753.
the performance of optimized deployment strategy of
mobile agents has been validated in quality inspection [9] T. Okuma, T. Ishihara, and H. Yasuura, “Real-time task
on manufacturing. scheduling for a variable voltage processor”, in Proceedings
of 12th International Symposium on System Synthesis, 1999,
Acknowledgement pp. 24-29.

This paper is sponsored by National Natural [10] L. Tong, Q. Zhao, and S. Adireddy, “Sensor networks
with mobile agents”, in Military Communications
Science Foundation of China (No. 60373014; No.
Conference (MILCOM), vol. 1, 2003, pp. 688-693.
50175056).
[11] D. Estrin, R. Govindan, and J. Heidemann, and S.
References Kumar, “Next century challenges: scalable coordination in
sensor networks”, in Int. Conf. Mobile Computing and
[1] I.F. Akyildiz and S. Weilian, et al., “A survey on sensor Networking (MobiCom), 1999, pp. 263-270.
networks”, IEEE Communications Magazine, vol. 40, August
2002, pp. 102-114. [12] S. Lindsey, C. Raghavendra, and K. Sivalingam, “Data
gathering in sensor networks using the energy*delay metric”,
[2] H. Qi, S.S. Iyengar, and K. Chakrabarty, “Distributed in Proceedings of Parallel and Distributed Processing
sensor networks: a review of recent research”, Journal of the Symposium, 2001, pp. 2001-2008.
Franklin Institute, vol. 338, June 2001, pp. 655-668.
[13] A. Woo and D. Culler, “A transmission control scheme
[3] H. Qi, S.S. Iyengar, and K. Chakrabarty, “Distributed for medium access in sensor networks”, in Proc. ACM/IEEE
multi-resolution data integration using mobile agents”, in Conference on Mobile Communication and Networking,
Proceedings of IEEE Conference on Aerospace, 2001, pp. 2001, pp. 221-235.
1133-1141.

Proceedings of the Sixth International Conference on Intelligent


Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 $20.00 © 2006