You are on page 1of 6

Byzantine Algorithms in Wireless Sensors Network

Ryszard Klempous Jan Nikodem


Faculty of Electrical Engineering Faculty of Electrical Engineering
Wroclaw University of Technology Wroclaw University of Technology
Wroclaw, Poland Wroclaw, Poland
ryszard.klempousgpwr.wroc.pl jan.nikodem gpwr.wroc.pl

Lukasz Radosz Norbert Raus


Faculty of Electrical Engineering Faculty of Electrical Engineering
Wroclaw University of Technology Wroclaw University of Technology
Wroclaw, Poland Wroclaw, Poland
lukasz.radoszgpwr.wroc.pl norbert.rausgstudent.pwr.wroc.pl

Abstract- In this paper we discuss classic concepts of possible to apply such algorithms to reduce influence of faulty
Byzantine Failure Tolerance that can be applied in fault-tolerant sensors or disturbances only to a small group of sensor. It is
system design. Through replication of services (algorithmic possible that using the Byzantine algorithms may cause greater
computations) in a Wireless Sensors Network, the system can power consumption and hardware usage, however in this work
operate in a reasonably correct manner even in presence of we aim to propose efficient algorithms that can manage these
errors (e.g. faults). In distributed systems similar to Wireless disadvantages and offer more reliable solutions for WSN based
Sensors Networks - local disturbances or distortion problems can systems.
be resolved locally without involving the whole infrastructure.
Our proposition is to demonstrate suitability of variants of The research presented in this paper does not correspond to
Byzantine Algorithms based on additional information flow for any safety features or fault tolerance of a single sensor. We
solving such problems locally. By using Byzantine Algorithms we tried to focus on using the Byzantine Algorithms to solve local
can ensure reduction of disturbances and fake or invalid alarms distortion problems (detecting fake or false events). In our
in a sensors field as well limit their range to a minimum. Whole future work however we intend to extend our field of interests
problem is presented using a simulator that shows this algorithms to other system-wide issues..
during operation.
Keywords-component, formatting, style, styling, insert (key II. BYZANTINE GENERALS PROBLEM
words) Lamport, Shostak and Pease first introduced the concept of
the Byzantine Failure or the Byzantine Generals Problem in
I. INTRODUCTION 1982 in their "The Byzantine Generals Problem" research work
Over the past few years distributed wireless sensor [6][8].
networks (WSN) have been the focus of considerable research Figure 1. Byzantine Generals Problem
for both civil and military applications. Sensors are generally
constrained in on-board energy supply therefore efficient
management of the network is crucial to extend the life of the Generai 1
system. Failures and disturbance are inevitable in sensor
networks executing in hostile environments and due to their General 2
unattended deployment [1]. Faulty sensors or data distortion
can cause network infrastructure to needlessly transfer
erroneous or even totally false information through the entire
system. Such events usually cost additional power consumption |3 Genral 3
of key elements of WSN (e.g. Cluster Heads). The main aim of
this project is to explore and propose innovative computational
algorithmic solutions that can produce agreeable results in
presence of uncertainties thus reducing influence of sensors In a fault-tolerant distributed computing system, a
that work incorrectly or sensors which capture fake events due Byzantine failure is defined as an arbitrary fault that occurs
to disturbance or other environmental factors [8][3]. The during the execution of an algorithm by a distributed system. It
explored algorithms are based on general concepts used in the encompasses classes of faults that are commonly referred to as
Byzantine Fault Tolerance. Locally, a Wireless Sensors "crash failures" or/and "send and omission failures." When a
Network can be treated like a set of replicas; hence it is Byzantine failure occurs, the element of a system may respond

1-4244-0555-6/06/$20.00 (©2006 IEEE Page 319 ICIA 2006


in any unpredictable way and can spread fake (invalid) let vj = value Lieutenant, received from Lieutenantj in
information. The adjective Byzantine refers to the Byzantine step (4) or vdef if no value received.
Generals' Problem, an agreement problem in which generals of Lieutenant, uses the value majority(v1,...,v.-j)
the Byzantine Empire's army must decide unanimously
whether or not to attack a certain army of an enemy as depicted
in Figurel. The problem is complicated by the fact of In Byzantine General Problem Shostak, Lamport and Pease
geographic separation of the generals, who have to proposed similar algorithms (e.g. signed messages algorithm)
communicate by sending messengers to each other, and by the however in our work we consider a solution with "oral
presence of traitors amongst the generals. These traitors can act messages" only [6]. In general, discussed algorithms are based
arbitrarily in order to achieve the following aims: trick some on original solutions proposed to solve Byzantine Generals
generals into attacking; force a decision that is not consistent Problem that we call the Byzantine Algorithms. The main idea
with the generals' desires, e.g. forcing an attack when no that we propose is to add an additional information layer to
general wished to attack; or so confusing some generals that message passing protocol in Wireless Sensor Network in order
they could never make up their minds. If traitors actually to decrease influence of disturbances that cause detection of
succeed in any of these goals, any resulting attack is likely to fake events.
be doomed, as only a concerted effort can result in a victory. In
their seminal work Shostak, Lamport and Pease introduced III. BYZANTINE ALGORITHMS IN WSN
algorithms that can tolerate Byzantine Failures. Those Why should one add Byzantine algorithms to the Wireless
innovative algorithms are based on additional information flow Sensors Network? Trying to explain this question - let us
and can be generally described following the below presented imagine a situation in which we have large area covered by
scenario. sensors network, the network is divided into clusters, and
whole routing is established. In such a wireless sensors network
Byzantine Generals Problem some elements spread fake information through our network.
A commanding general must send an order to his n- 1 There could be many reasons why such a situations may occur
lieutenant generals such that: for example: a low battery level, environmental influences or
some electro-magnetic disturbances could have a detrimental
IC1. All loyal lieutenants obey the same order, effect to quality of information [1]. The process of spreading
IC2. If the commanding general is loyal, then every loyal fake information through the network causes additional power
lieutenant obeys the order he sends. consumption of key elements of the network (e.g. cluster
heads) that are crucial for proper communication in WSN. To
Conditions IC 1 and IC2 are called the interactive reduce or even eliminate influence of such faulty sensors the
consistency conditions. Note, that if the commander is loyal, Byzantine Algorithms can be applied.
then IC1 follows from IC2. However, the commander need not
be loyal. To solve our original problem, the i-th general sends Worth noting is the fact that due to a hard environmental
his value of v(i) by using a solution to the Byzantine Generals factors and high density of sensors' deployment wireless
Problem to send the order "use v (i) as my value", with the sensors networks usually use redundancy to ensure system's
other generals acting as the lieutenants. The algorithm to solve robustness and availability of data. Hence, in WSN every part
this problem can be defined as follows: of a given field area is covered by sensing range of several
sensors. If that is not the case we can intentionally deploy
Require default value vdef if traitorous commander does not sensors to gain greater sensors' density and required a
send a message (e.g.RETREAT) redundancy level, as the cost of sensors is comparatively low.
Define function majority(v1,...,v11l) = v if a majority of the Locally some sensors can by treated as a set of replicas and it is
values vi = v. feasible to add algorithms tolerating Byzantine Failures to
solve problem presented above.
Algorithm UM(n,O) # no traitors case
In normal distributed wireless sensors network when an
(1) The Commander sends v to every lieutenant. event occurs all sensors that detect this event send information
(2) Each lieutentent uses the value received from to cluster head and then further to the base station through
the commander or vdef if he receives no value. cluster heads using some routing rules. After adding the
Byzantine Algorithms properties the sensors may decide not to
Algorithm UM(n,m) # m-traitors case send information about certain events further into the network.
(3) The Commander sends v to every lieutenant.
(4) For each Lieutenant.,
let vi = value received from commander or vdef if no
value received.
send vi to n-2 other lieutenants using UM(n- l,m- 1)
(5) For each i & each j # i,

Page 320
zEm063g-F'W4ext1;H>jwNM.,5i!ECr&D@zIev6-B;l3*N
Sending information to HQ Sending information to HO
(let's call it the Agreement Range - Ar ) as depicted in Figure
4.
Sending information to CH

Sending information to CH I?

Byzantine Algorithms

Detection of an event Detection of an evernt

Figure 2. Standard WSN vs. WSN with


Byzantine Algorithms
Figure 3. Detection of an event
In order to decide if to send information, a set of nearby
sensors should possess capability to communicate with one
another. Potentially, there could be a problem occurring with
selecting only sensors in neighborhood, which can be solved by
using radio communication at a required transmission power
level. Using these properties we can adjust radius of
communication to a desired range. Summing up, the proposed
wireless sensors network should fulfill the following
requirements:
X Every part of sensor field should by covered by
several sensors (redundancy).
X Sensors should be able to communicate with one
another in a flexible manner (ad-hoc communication) Figure 4. Sending information to nearby sensors

X A sensor in a network should be able to find other In the following step sensor waits some time T for answer
sensors in same given radius from other sensor and gathers received information in some
Adding Byzantine Algorithms to Wireless Sensors Network table (lets call it agreement matrix AM), if there is no answer -

should provide a local tolerance for disturbances, distortions from a sensor it means there is no detection of an object or
event. A sensor also has knowledge about quantity of sensors
and false alarms. This requirement is essential in distributed in his Agreement Range (Ar) so after using a majority function
systems, as it enables to reduce spread of fake or invalid it can decide what to do. If a majority of sensors detects an
information through the entire network. Since decisions are event then information will be send to the cluster head and then
made locally then only small part of network actively take part to the base. If this is not the case then no information will be
in communication. Our rime objective is to solve problems
with local disturbances and thus increase the system reliability send through the network. In our model, we introduce an
at the local level. Additionally, by addressing local issues at the
additional requirement that only sensors with highest energy
local level, without involving global mechanisms that usually level can send information to cluster head (see Figure 5). This
require usage of additional resources we are able to generate allows reduction of the communication load.
significant savings. .....
6'i3 i'8

So how does it work? i

3
i'
i''

.,,,. W "' '","'i .,jB .,,.0

At first to simplify our algorithm it is assumed that sensors


detect only presence of an event, and they send only
information about detection of an object (information about ?
,,,
" '6 ?
t
1,w,
,, 6 .. T.

localization or similar data can be skipped). Sending more


information about a given event is not a problem, but it is ,_E, ,, BS,

necessary to use more complex function to decide upon


common consensus.
i h (
Worth nothings is the fact that in a case with sensor
Figure 5. Sending information to Cluster Head after Byzantine Agreement
detecting fake event can be parallel to a case with traitorous
commander described in chapter 2 and a case when a sensor is
detecting true event and is parallel to a case when we deal with
a loyal commander. In our version of the algorithm a sensor
detects an event, fake or true (see Figure 3) and then sends
information to other sensors in a given communication range

Page 321
IV. DESCRIPTION OF THE ALGORITHM
The algorithm that we that we have used to perform
simulation in Matlab environment can described as follows:
1) Wait for: sensor detected an event or received information --

If (detected an event ) go to step 2 ---------- --------------------- ...........

else go to step 4
2) Find sensors in Agreement Range Ar, go to step 3
3) For each sensor found in step 2: send an information
about an event and about power level; go to step 4
4) While (timeout < T) receive information from other
sensors and put them to Agreement matrix Ama; go to step
5
5) Majority(Ama); go to step 6 //decide if an event has
occurr ed using basic majority function
6) Find sensor in Am with highest energy level, if sensor's
ID ==current ID send information to Cluster Head
Figure 6. Main simulator's window

The most important thing in this algorithm is to set optimal B. Simulation Results
value of Agreement Range and optimal majority function. The
majority function depends on several factors like density of The main problem and risk is situation in which an true
deployment of sensors, type of information send by sensors, event will by recognized as fake. In our simulation we tried to
detection range of sensors. set parameters in such a value that will guaranty that real event
will be corr ectly detected. During simulation using some fixed
Setting an Agreement range is a great deal, if it is to large value of Agreement and Sensor's Range there was no situation
there will be too much additional communication and too many in which true event was incorr ectly recognized. We suggest
sensors will be taking part in an agreement. If it is too small it that ratio of Agreement and Sensor's Range should be about
is possible that sensors will not find any nearby sensors. Our 0,5-0,6. That guaranties proper work of sensors without high
proposition is to set this value to a half of detecting sensors' increase of additional communication. During test using such
range, but the density of deployment of sensor should by settings we noticed that:
enough.
11 Non of the true events were recognized incorrectly
We should also add that this algorithm does not depend on
routing and clustering, it is based on a different layer of 11 Only about lOOo of fake events ware treated as true
abstraction. Working of Byzantine Algorithms is transparent events and spread across the network.
for clustering and routing algorithms. There is no problem if Below we presented some of simulation results. The bigger
sensors that are taking part in Byzantine Agreement belong to circle shows the detection range (Sensors Range) of Sensors,
different clusters. and the smaller one shows an Agreement Range. The chart
below an picture of simulation show an decision process for
V. SIMULATION chosen sensor.
A. About the Simulator An fake event has been recognized correctly
In this chapter an simulation results are shown. Simulator
was written using Matlab environiment. The main simulator
window is presented.
As it is seen on the figure 6, simulator has numerous ---------------------------------

options to set. An amount of deployed sensor and size of filed


can be set. Also a sensors' fault and communication err ors ratio - -

is settable. It is possible to adjust an Agreement and Sensor's


Range. - - - -

----------- -------------------
--------- ---------

Figure 7. A fake event simulation

Page 322
Incorrect recognition of a fake event.
a) An event
a) recognized
Co as tru e
(U ----------------------------

a)
0
U1) An event --------- --------- -------------------

Co recognized as
fake
a)
(I)
-------------

U)

L--------- L---- L--------- L

01 60 ------------------

Sensors that haven't detected an event ------------------------------ ---------

Figure 8. A fake event simulation


A true event has been recognized coff ectly:
'0I

---------------------------------------------------------- An event
a)
recognized
---------------------------- U1) as true

--------- --------- --------


An event
-------------------

recognized as
a)
-------------------

U1)
fake
a)
----------------------------

- --

0 1A
------------------- --------- --------- -----------------------------------------
Sensors that haven't detected an event

Figure 10. A fake event simulation


,o,'z.
An event CONCLUSIONS
VI.
-a. recognized Our work is to add an algorithm that could help us to
a) as true
a) reduce influence of a single disturbance or false alarms in field
co
of sensors. This task should be made locally not globally.
An event Problems of reliability of detection can be only solved locally
cu
-a recognized as using proposed Byzantine Algorithms. This idea can be
U1)
a)
fake compared to a society that locally copes with problems using
basics of democracy. To perform this task we used an
algorithm's known form false tolerance commonly named the
Byzantine False Tolerance. Despite of a rather high cost of
additional communication we attempted to add these properties
to Wireless Sensors Networks, Our intuitive approaches and
PI positive results of our initial simulation gives us a certain level
0
A

Sensors that haven't detected an event of confidence that we are on a right track however further real-
life experiments are requires. In our future work we are
Figure 9. Detection of true event thinking about adding some additional requirements for our

Page 323
algorithmic solutions. For example, by passing some additional [4] B. Liskov, R. Rodrigues, "Tolerating Byzantine Faulty Clients in a
infornation about information reliability i.e. confidence levels Quorum System", ICDCS'06, Lisbon, 2006
of intelligence or by building reliability maps of sensors. We [5] V. Drabkin, R. Friedman, Marc Segal, "Efficient Byzantine Broadcast in
are continuously working on reducing of additional Wireless Ad-Hoc Networks", DSN'05, Israel, 2005
communication and power consumption levels. [6] L. Lamport, R. Shostak, M. Pease, "The Byzantine Generals Problem."
ACM Transactions on Programming Languages and Systems, 1982.
[7] C. Liskov, "Practical Byzantine Fault Tolerance". In OSDI: Symposium
VII. REFERENCES on Operating Systems Design and Implementation (1999), USENIX
[1] Z. Chaczko,F. Ahmad, "Wireless Sensor Network Based System for Fire
Association, Co-sponsored by IEEE TCOS and ACM SIGOPS.
Endangered Areas", ICITA 2005, Sydney, July 2005. [8] M. Pease, R Shostak, and L. Lamport,"Reaching Agreement in Presence
[2] Z. Chaczko, S. Sinha, "SAFE Model Approach to Construction of of Faults," JACM, vol. 27, no. 2, pp. 228234, April 1980.
Intelligent Security Systems", ICITA 2005, Sydney, July 2005.
[3] S.C. Wang K.Q. Yan H.C. Hsieh, "The Byzantine Agreement under
Mobile Network", International Conference on Networking, Sensing &
Control ,Taipei. Taiwan. March 2004

Page 324

You might also like