Sunteți pe pagina 1din 72

A

Mini Project Report on

SIMPLE: Stable Increased Throughput Multi-hop Link Efficient


Protocol For WBANs
Submitted in partial fulfillment of the requirement for the award of degree of

BACHELOR OF TECHNOLOGY
In

ELECTRONICS AND COMMUNICATION ENGINEERING

Submitted By
K.SAI RAM (148R1A04A4)
K.PRANITH CHANDER (148R1A04A5)
L.BHAVANI (148R1A04A7)
M.SOWMYA (148R1A04B1)

Under the Guidance of


Mr.Bhasker Dappuri, Associate Professor
ECE DEPT

CMR ENGINEERING COLLEGE


(Approved by AICTE, Affiliated to JNTU Hyderabad, Accredited by NBA)
Kandlakoya (V), Medchal Road, Hyderabad - 501 401
2017-18

CMR ENGINEERING COLLEGE


(Approved by AICTE, Affiliated to JNTU Hyderabad, Accredited by NBA)
Kandlakoya (V), Medchal Road, Hyderabad - 501 401

Department Of Electronics and Communication Engineering

CERTIFICATE
This is to certify that the industry oriented mini-project work entitled “SIMPLE: Stable
Increased Throughput Multi-hop Link Efficient Protocol For WBANs” is being submitted
by K.SAI RAM bearing Roll No 148R1A04A4, K.PRANITH CHANDER bearing Roll
No:148R1A04A5, L.BHAVANI bearing Roll No: 148R1A04A7, M.SOWMYA bearing Roll
No:148R1A04B1 in B.Tech IV-I semester, Electronics and Communication Engineering is a
record bonafide work carried out by them during the academic year 2017-18. The results
embodied in this report have not been submitted to any other University for the award of any
degree.

INTERNAL GUIDE HEAD OF THE DEPARTMENT


Mr. BHASKER DAPPURI Prof C.ASHOK KUMAR

EXTERNAL EXAMINER
ACKNOWLEDGEMENT

We sincerely thank the management of our college CMR Engineering College for providing
required facilities during our project work.

We derive great pleasure in expressing our sincere gratitude to our principal Dr. A.S.Reddy
for his timely suggestions, which helped us to complete the project work successfully.

It is the very auspicious moment we would like to express our gratitude to Prof C. Ashok
Kumar, Head of the Department, ECE for his consistent encouragement during the progress of this
project.

We take it as a privilege to thank our project coordinator Mr.T.Satyanarayana Associate


professor, Department of ECE for the ideas that led to complete the project work and we also thank
him for his continuous guidance, support and unfailing patience, throughout the course of this work.

We sincerely thank our project internal guide Mr.Bhasker Dappuri, Associate Professor,
Department of ECE for guidance and encouragement in carrying out this project work.
DECLARATION

We hereby declare that the project entitled “SIMPLE: Stable Increased Throughput
Multi-hop Link Efficient Protocol For WBANs” is the work done by us in campus at CMR
ENGINEERING COLLEGE, Kandlakoya during the academic year 2017 and is submitted
as Industry oriented Mini Project in partial fulfillment of the requirements for the award of
degree of BACHELOR OF TECHNOLOGY in ELECTRONICS AND
COMMUNICATION ENGINEERING from JAWAHARLAL NEHRU
TECHNOLOGICAL UNIVERSITY, HYDERABAD.

K.SAI RAM (148R1A04A4)


K.PRANITH CHANDER (148R1A04A5)
L.BHAVANI (148R1A04A7)
M.SOWMYA (148R1A04B1)
CONTENTS
TITLE Page no

List of Figures i
List of Tables ii
Abstract iii

Chapter-1 INTRODUCTION 1
Chapter-2 RELATED WORK 2
Chapter-3 MOTIVATION 4
Chapter-4 RADIO MODEL 5
Chapter-5 SIMPLE PROTOCOL DETAIL 6
Chapter-6 PERFORMANCE METRICS 9
Chapter-7 SIMULATION RESULTS AND ANALYSIS 10
Chapter-8 PATIENTS MONITORING 15
Chapter-9 TAXONOMY AND REQUIREMENTS 18
9.1 TYPES OF DEVICES 18
9.2 DATA RATES 19
9.3 ENERGY 19
9.4 QUALITY OF SERVICE AND RELIABILITY 20
9.5 USABILITY 20
9.6 SECURITY AND PRIVACY 21

Chapter-10 POSITIONING WBANS 22

Chapter-11 PHYSICAL LAYER 27


11.1.RFCOMMUNICATION 27
11.2 MOVEMENT OF THE BODY 31
11.3 NON RF COMMUNICATION 32

Chapter-12 MAC 33
12.1 IEEE 802.15.4 35
12.2 WBAN SPECIFIC PROTOCOLS 36
12.3 IEEE 802.15.6 37

Chapter-13 NETWORK LAYER 38

Chapter-14 SECURITY 39

Chapter-15 EXISTING PROJECTS 42

CONCLUSIONS 44

REFERENCES 45

Appendix-1 Code 46

Appendix-2 Snapshots 59
ABSTRACT

In this work, we propose a reliable, power efficient and high throughput routing protocol for
Wireless Body Area Networks (WBANs). We use multi-hop topology to achieve minimum
energy consumption and longer network lifetime. We propose a cost function to select parent
node or forwarder. Proposed cost function selects a parent node which has high residual
energy and minimum distance to sink. Residual energy parameter balances the energy
consumption among the sensor nodes while distance parameter ensures successful packet
delivery to sink. Simulation results show that our proposed protocol maximize the network
stability period and nodes stay alive for longer period. Longer stability period contributes
high packet delivery to sink which is major interest for continuous patient monitoring.

Keywords: Wireless body Area Network, Cost Function, Residual Energy


LIST OF FIGURES

Fig name Page no

Fig 1 Node Deployment 6

Fig 2 Analysis of Network lifetime 9

Fig 3 Analysis of Throughput 10

Fig 4 Analysis of remaining energy 11

Fig 5 Network path loss 11

Fig 6 Patient monitoring in WBAN 14

Fig 7 Intra-body&extra-body communication in WBAN 21

Fig 8 Positioning of WBAN in the realm of Wireless network 22

Fig 9 Characteristics of WBAN 23


LIST OF TABLES
Table No Table name Page no
Table 1 Schematic Overview of WBAN 27

Table 2 Schematic Overview of MAC Protocol 29


CHAPTER 1
INTRODUCTION

Wireless Sensor Networks (WSNs) are used to monitor certain parameters in many
applications like environment monitoring, habitant monitoring, battle field, agriculture field
monitoring and smart homes. These wireless sensors are dispersed in sensing area to monitor
field. WBAN is new emerging sub-field of WSN. A key application of WBAN is health
monitoring. Wireless sensors are placed on the human body or implanted in the body to
monitor vital signs like blood pressure, body temperature, heart rate, glucose level etc. Use of
WBAN technology to monitor health parameters significantly reduces the expenditures of
patient in hospital. With the help of WBAN technology, patients are monitored at home for
longer period. Sensors continuously sense data and forward to medical server.

In WBANs, sensor nodes are operated with limited energy source. It is required to use
minimum power for transmitting data from sensor nodes to sink. One of the major obstacles
in WBAN is to recharge the batteries. An efficient routing protocol is required to overcome
this issue of recharging batteries. Many energy efficient routing protocols are proposed in
WSN technology . However, WSNs and WBANs have different architectures, applications
and operate in different conditions. It is impossible to port WSN routing protocols to WBAN.
Therefore, energy efficient routing protocol for WBAN is required to monitor patients for
longer period.

We propose a high throughput, reliable and stable routing protocol for WBAN. We deploy
sensor nodes on the body at fixed places. We place sink at waist. Sensors for ECG and
Glucose level are placed near the sink. Both these sensors have critical data of patient and
required minimum attenuation, high reliability and long life therefore; these sensors always
transmit their data directly to sink. Other sensors follow their parent node and transmit their
data to sink through forwarder node. It saves energy of nodes and network works for longer
period.

1
The rest of the paper is organized in following order. In section 2, we review related work,
while Section 3 describes motivation for this work. Radio model is presented in section 4,
while detail of the SIMPLE protocol is presented in section 5. Performance metrics and
simulation results are presented in section 6 and 7 respectively. Finally, section 8 gives
conclusion

2
CHAPTER 2
RELATED WORK

In WBAN technology, large numbers of routing schemes are proposed. In this section, we
present some proposed routing protocols. In the author presented a thermal aware routing
protocol. Each node selects a minimum hop rout to sink. When a parent node gets heated, the
children nodes select another optimal route.

Latre et al. proposed A Secure Low-Delay Protocol for Multi-hop Wireless Body Area
Networks (CICADA) routing protocol which consists of a spanning tree structure. CICADA
used Time Division Multiple Access (TDMA) protocol to schedule transmission of nodes.
The nodes near the root act as forwarder nodes or parent nodes, these nodes collect data from
their associated children nodes and relay to sink. Due to extra traffic load of children nodes on
parent nodes causes parent nodes to deplete their energy fast.

In Quwaider et al. presented a routing protocol which tolerates to changes in network. They
used store and forward mechanism to increase the likelihood of a data packet to reach
successfully to sink node. Each sensor node has the capability to store a data packet. In source
to destination route, each node stores data packet and transmits to next node. Storing a data
packet and then retransmitting causes more energy to consume and longer end to end delay.

Ehyaie et al. proposed a solution to minimize energy consumption. They deploy some non-
sensing, dedicated nodes with additional energy source. This technique minimizes energy
consumption of nodes and enhances the network lifetime, however, additional hardware
required for relay nodes increase the cost of the network.

A clustering based protocol A Self-Organization Protocol for Body Area Networks


(ANYBODY) is proposed in . The objective of this protocol is to restrict the sensor nodes to
transmit data direct to sink. It improves the efficiency of network by changing the selection
criteria of CHs.

3
In Nabi et al. proposed a protocol similar to store and forward mechanism. They integrate
this store and forward scheme with Transmit Power Adaption (TPA). To control transmission
power consumption, all nodes know their neighbours. Nodes transmit data with minimum
power and with a stable link quality.

A similar method was proposed by Guo et al. in . They also used Transmission Power Control
(TPC) scheme as Nabi et al. proposed. When link quality of a node decreased, an Automatic
Repeat Request (ARR) is transmitted and retransmit the drop packet. Retransmission of lost
packet increases the throughput of the network with the expense of energy consumption.

Tsouri et al. in , used creeping waves to relay data packet. They proposed this protocol to
minimize energy consumption of nodes while keeping the reliable on body link. Authors in ,
analyze delay in WBANs and different medium access techniques for WBAN. In author
proposed a delay tolerant protocol. They compare their protocol with different existing
protocols

4
CHAPTER 3
MOTIVATION
Wireless Body Area Sensors are used to monitor human health with limited energy resources.
Different energy efficient routing schemes are used to forward data from body sensors to
medical server. It is important that sensed data of patient reliably received to medical
specialist for further analysis. In author presented a opportunistic protocol. Proposed scheme
facilitate mobility at cost of low throughput and additional hardware cost of relay node. They
deploy sink at wrist. Whenever sink node goes away from transmission range of nodes, it uses
a relay node which collect data from sensor nodes. In opportunistic protocol, whenever
patient moves his hands, the wireless link of sink with sensor nodes disconnects. Link failure
consumes more power of sensor nodes and relay node also more packets will drop, which
causes important and critical data to loss.

To minimize energy consumption and to increase the throughput, we propose a new scheme.

Our contribution includes:

Our proposed scheme achieves a longer stability period. Nodes stay alive for longer period
and consume minimum energy.

Large stability period and minimum energy consumption of nodes, contribute to high
throughput

5
CHAPTER 4
RADIO MODEL
Many radio models are proposed in literature. We use first order radio model proposed in.
This radio model consider d, the separation between transmitter and receiver and d2, the loss
of energy due to transmission channel. First order radio model equations are given as.

ETx(k,d) = ETx−elec(k)+ ETx−amp(k,d)

ETx(k,d) = ETx−elec × k + Eamp × k × d2 (1)

ERx(k) = ERx−elec(k)ERx(k) = ERx−elec × k

ERx(k) = ERx−elec × k (2)

where ETx is the energy consumed in transmission, ERx is the energy consumed by receiver,
ETx−elec and ERx−elec are the energies required to run the electronic circuit of transmitter and
receiver, respectively. Eamp is the energy required for amplifier circuit, while k is the packet
size.

In WBAN, the communication medium is human body which contributes attenuation to radio
signal. Therefore, we add path loss coefficient parameter n in radio model. Equation 2 of
transmitter can be rewritten as.

ETx(k,d) = Eelec × k + Eamp × n × k × dn (3)

The energy parameters given in equation 3 depend on the hardware. We consider two
transceivers used frequently in WBAN technology. The Nordic nRF 2401A is a single chip,
low power transceiver and other transceiver is Chipcon CC2420. The bandwidth of both
transceivers is 2.4GHz. We use the energy parameter of The Nordic nRF 2401A transceiver
because it consumes less power than Chipcon CC2420. The energy parameters for this
transceiver are given in Table 1.

6
CHAPTER 5

SIMPLE: PROTOCOL DETAIL


In this section, we present a novel routing protocol for WBANs. The limited numbers of
nodes in WBANs give opportunity to relax constraints in routing protocols. Keeping routing
constrains in mind, we improve the network stability period and throughput of the network.
Next subsections give detail of the system model and detail of SIMPLE protocol

A. System Model
In this scheme, we deploy eight sensor nodes on human body. All sensor nodes have equal
power and computation capabilities. Sink node is placed at waist. Node 1 is ECG sensor and
node 2 is Glucose sensor node. These two nodes transmit data direct to sink. Fig 1 shows the
placement of nodes and sink on the human body

B. Initial Phase
In this phase, sink broadcast a short information packet which contains the location of the
sink on the body. After receiving this control packet, each sensor node stores the location of
sink.

Parameters nRF CC2420 Units


2401A
Current(Tx) 10.5 17.4 mA
Current(Rx) 18 19.7 mA
Supply 1.9 2.1 V
Voltage(min)
Etx−elec 16.7 96.9 nJ/bit
Erx−elec 36.1 172.8 nJ/bit
Eamp 1.97e- 2.71e-7 j/b
9

TABLE I: Radio Parameters

7
Fig 1 : Node Deployment
Each sensor node broadcasts an information packet which contains node ID, location of node
on body and its energy status. In this way, all sensor nodes are updated with the location of
neighbours and sink.

C. Selection of next hop

In order to save energy and to enhance network throughput, we proposed a multi hop scheme
for WBAN. In this section, we present selection criteria for a node to become parent node or
forwarder. To balance energy consumption among sensor nodes and to trim down energy

8
consumption of network, SIMPLE protocol elects new forwarder in each round. Sink node
knows the ID, distance and residual energy status of the nodes. Sink computes the cost
function of all nodes and transmit this cost function to all nodes.

On the basis of this cost function, each node decides whether to become forwarder node or
not. If i is number of nodes than cost function of i nodes is computed as follows:

(4)

Where di is the distance between the node i and sink, R.Ei is the residual energy of node i and
is calculated by subtracting the current energy of node from initial total energy. A node with
minimum cost function is preferred as a forwarder. All the neighbor nodes stick together with
forwarder node and transmit their data to forwarder. Forwarder node aggregates data and
forward to sink. Forwarder node has maximum residual energy and minimum distance to
sink; therefore, it consumes minimum energy to forward data to sink. Nodes for ECG and
Glucose monitoring communicate direct to sink and do not participate in forwarding data.

D. Scheduling

In this phase, forwarder node assigns a Time Division Multiple Access (TDMA) based time
slots to its children nodes. All the children nodes transmit their sensed data to forwarder node
in its own scheduled time slot. When a node has no data to send, it switches to idle mode.
Nodes wake up only at its transmission time. Scheduling of sensor nodes minimize the energy
dissipation of individual sensor node

9
CHAPTER 6
PERFORMANCE METRICS

We evaluated key performance metrics for proposed protocol. Definition of performance


metrics is given in following subsections.

1) Network lifetime: It represents the total network operation time till the last node die.

2) Stability period: Stability period is the time span of network operation till the first
node die. The time period after the death of first node is termed as unstable period.

3) Throughput: Throughput is the total number of packets successfully received at sink.

4) Residual Energy: In order to investigate the energy consumption of nodes per round,
we consider residual energy parameter to analyze energy consumption of network.

5) Path Loss: Path loss is the difference between the transmitted power of transmitting
node and received power at receiving node. It is measured in decibels(d

10
CHAPTER 7
SIMULATION RESULTS AND ANALYSIS
To evaluate proposed protocol, we have conducted an extensive set of experiments using
MATLAB R2009a. We studied the performance of the SIMPLE protocol by comparisons
with the existing protocol M-ATTEMPT.

Fig 2 shows the average network lifetime of proposed scheme. The proposed new cost
function to elect forwarder node play an important role to balance the energy consumption
among the sensor nodes. New forwarder in each round is selected based on computed cost
function. Fig 2 clearly depicts that the proposed protocol has longer stability period. This is
expected, due to the appropriate selection of new forwarder in each round. Hence, each node
consumes almost equal energy in each round and all the nodes die almost at the same time. In
M-ATTEMPT, as temperature of forwarder nodes increases, nodes select alternate longer
path which consumes more energy. Hence, these nodes die early. Our proposed protocol
achieves 31% more stability period and 0.4% longer network lifetime.

Fig. 2: Analysis of network lifetime

B. Throughput

11
Throughput is the successful packet received at the sink. As WBAN has critical and
important data of patient, so it requires a protocol which has minimum packet drop and
maximum successful data received at sink. SIMPLE protocol achieves high throughput than
M-ATTEMPT, as shown in fig 3. Number of packets send to sink depends on the number of
alive nodes. More alive nodes send more packets to sink which increases the throughput of
network. The stability period of M-ATTEMPT is shorter than SIMPLE protocol which means
number of packets sent to sink decreased. Hence, throughput of M-ATTEMPT decreased. On
the hand, SIMPLE protocol achieves high throughput due to longer stability period

C. Residual energy

The average energy of network consumed in each round is presented in fig 4. The proposed
model use multi hop topology, in which each farthest node transmits its data to sink through a
forwarder node. Forwarder node is elected using aforementioned cost function. Selection of
appropriate forwarder in each round contributes to save energy. To

Fig. 3: Analysis of Throughput

transfer packets to sink, our multi hop topology use different forwarder node in each round,
this restricts over loading of particular node. Simulation results show that SIMPLE protocol

12
consumes minimum energy till 70% of simulation time. It means, in stability period, more
nodes have enough energy and they transmit more data packet to sink. It also improves the
throughput of the network. On the other hand, in M-ATTEMPT, some nodes exhaust early
due to heavy traffic load.

Fig4 : Analysis of remaining energ

D. Path Loss

distance. Path loss shown in figure 5 is function of distance. It is calculated from its distance
to sink with constant frequency 2.4GHz. We use path loss coefficient 3.38 and 4.1 for
standard deviation σ. Proposed multi hop topology reduces the path loss as shown in figure 5.
It is due to the fact that multi hop transmission reduces the distance, which leads to minimum
path loss. Fig 5 represents the results of both topologies. Initially SIMPLE protocol performs
well. However, after 2000 rounds, path loss of M-ATTEMPT dramatically decreased because
some nodes Fig 5 presents the path loss of different sensors. Path loss is a function of
frequency and of M-ATTEMPT topology die. Minimum number of alive nodes has minimum
cumulative path loss. As our proposed protocol has longer stability period and more alive
nodes has more cumulative path loss.

13
Fig. 5: network path los

E. Path loss model

Path loss represents the signal attenuation and is measured in decibels (dB). Signal power is
also degraded by Additive White Gaussian Noise (AWGN) [19]. Path loss is the difference
between the transmitted power and received power whereas antenna gain may or may not be
considered. Path loss occurs due to the increasing surface area of propagating wave front.
Transmitting antenna radiates power outward and any object between transmitter and receiver
causes destruction of radiated signal. In WBAN, different human postures, movement of
body, hands and cloths, affects the transmitted signal. Path loss is related to the distance and
frequency and expressed as [20].

PL(f,d) = PL(f)× PL(d) (5)

The relation of frequency with path loss is expressed as

pPL(f) ∝ fk (6)

14
Where k is frequency dependent factor and it is related to the geometry of the body. The
relation of distance with path loss is given as

(7)

Where PL is received power, d is the distance between transmitter and receiver, do is the
reference distance, n is the path loss coefficient and its value depends on the propagation
environment. In free space its value is 2, for WBAN, n varies from 3-4 for line of sight (LOS)
communication and 5-7.4 for non line of sight (NLOS) communication. X is gaussian random
variable and σ is standard deviation [21]. PLo is received power at reference distance do and it
is expressed as:

(8)

Where f is frequency, c speed of light and d is distance between transmitter and receiver. The
value of reference distance do is 10cm. In reality it is difficult to predict strength of signal

15
CHAPTER 8

PATIENTS MONITORING

The main cause of death in the world is Cardio Vascular Disease (CVD), representing
30% of all global deaths. According to the World Health Organization, worldwide about
17.5 million people die of heart attacks or strokes each year; in 2015, almost 20 million
people will die from CVD. These deaths can often be prevented with proper health care.
Worldwide, more than 246 million people suffer from diabetes, a number that is expected
to rise to 380 million by 2025 [15]. Frequent monitoring enables proper dosing and
reduces the risk of fainting and in later life blindness, loss of circulation and other
complications.

These two examples already illustrate the need for continuous monitoring and the
usefulness of WBANs. Numerous other examples of diseases would benefit from
continuous or prolonged monitoring, such as hypertension, asthma, Alzheimer's disease,
Parkinson's disease, renal failure, post-operative monitoring, stress-monitoring,
prevention of sudden infant death syndrome etc. These applications can be considered as
an indicator for the size of the market for WBANs. The number of people suffering from
diabetics or CVD and the percentage of people in the population age 60 years and older
will grow in the future. Even without any further increase in world population by 2025
this would mean a very large number of potential customers. WBAN technology could
provide the connectivity to support the elderly in managing their daily life and medical
conditions. A WBAN allows continuous monitoring of the physiological parameters.
Whether the patient is in the hospital, at home or on the move, the patient will no longer
need to stay in bed, but will be able to move around freely. Furthermore, the data
obtained during a large time interval in the patient's natural environment offers a clearer
view to the doctors than data obtained during short stays at the hospital.

16
An example of a medical WBAN used for patient monitoring is shown in Figure 1.
Several sensors are placed in clothes, directly on the body or under the skin of a person
and measure the temperature, blood pressure, heart rate, ECG, EEG, respiration rate,
SpO2 levels etc. Next to sensing devices, the patient has actuators which act as drug
delivery systems. The medicine can be delivered on predetermined moments, triggered
by an external source (i.e. a doctor who analyzes the data) or immediately when a sensor
notices a problem. One example is the monitoring of the glucose level in the blood of
diabetics. If the sensor monitors a sudden drop of glucose, a signal can be sent to the
actuator in order to start the injection of insulin. Consequently, the patient will experience
fewer nuisances from his disease. Another example of an actuator is a spinal cord
stimulator implanted in the body for long-term pain relief.

A WBAN can also be used to offer assistance to the disabled. For example, a paraplegic
can be equipped with sensors determining the position of the legs or with sensors
attached to the nerves. In addition, actuators positioned on the legs can stimulate the
muscles. Interaction between the data from the sensors and the actuators makes it
possible to restore the ability to move. Another example is aid for the visually impaired.
An artificial retina, consisting of a matrix of micro sensors, can be implanted into the eye
beneath the surface of the retina. The artificial retina translates the electrical impulses
into neurological signals. The input can be obtained locally from light sensitive sensors
or by an external camera mounted on a pair of glasses.

Another area of application can be found in the domain of public safety where the
WBAN can be used by fire fighters, policemen or in a military environment.

17
Fig 1. Patient monitoring in a Wireless Body Area Network

The WBAN monitors for example the level of toxics in the air and warns the fire fighters
or soldiers if a life threatening level is detected. The introduction of a WBAN further
enables to tune more effectively the training schedules of professional athletes. Next to
purely medical applications, a WBAN can include appliances such as an MP3-player,
head-mounted (computer) displays, a microphone, a camera, advanced human-computer
interfaces such as a neural interface etc.

18
CHAPTER 9

TAXONOMY AND REQUIREMENTS

The applications described in the previous section indicate that a WBAN consists of
several heterogeneous devices. In this section an overview of the different types of
devices used in a WBAN will be given. Further the requirements and challenges are
discussed. These include the wide variability of data rates, the restricted energy
consumption, the need for quality of service and reliability, ease-of-use by medical
professionals and security and privacy issues

9.1 Types of Devices

(Wireless) Sensor node:


A device that responds to and gathers data on physical stimuli processes the data if
necessary and reports this information wirelessly. It consists of several components:
sensor hardware, a power unit, a processor, memory and a transmitter or transceiver.

(Wireless) Actuator node:

A device that acts according to data received from the sensors or through interaction with
the user. The components of an actuator are similar to the sensors: actuator hardware (e.g.
hardware for medicine administration, including a reservoir to hold the medicine), a
power unit, a processor, memory and a receiver or transceiver.

(Wireless) Personal Device (PD):

A device that gathers all the information acquired by the sensors and actuators and
informs the user (i.e. the patient, a nurse, a GP etc.) via an external gateway, an actuator
or a display/LEDS on the device. The components are a power unit, a (large) processor,
memory and a transceiver. This device is also called a Body Control Unit (BCU), body
gateway or a sink. In some implementations, a Personal Digital Assistant (PDA) or smart
phone is used Many different types of sensors and actuators are used in a WBAN. The

19
main use of all these devices is to be found in the area of health applications. In the
following, the term nodes refer to both the sensor as actuator nodes. The number of nodes
in a WBAN is limited by nature of the network. It is expected that the number of nodes
will be in the range of 20. 9.2 Data Rate of Due to the strong heterogeneity of the
applications, data rates will vary strongly, ranging from simple data at a few Kbit/s to
video streams of several Mbit/s. Data can also be sent in bursts, which means that it is
sent at higher rate during the bursts.

The data rates for the different applications are given in Table 1 and are calculated by
means of the sampling rate, the range and the desired accuracy of the measurements.
Overall, it can be seen that the application data rates are not high. However, if one has a
WBAN with several of these devices (i.e. a dozen motion sensors, ECG, EMG, glucose
monitoring etc.) the aggregated data rate easily reaches a few Mbps, which is a higher
than the raw bit rate of most existing low power radios. The reliability of the data
transmission is provided in terms of the necessary Bit Error Rate (BER) which is used as
a measure for the number of lost packets. For a medical device, the reliability depends on
the data rate. Low data rate devices can cope with a high BER (e.g. 104), while devices
with a higher data rate require a lower BER. The dependent on the criticalness of the
data.

9.3 Energy

Energy consumption can be divided into three domains: sensing, (wireless)


communication and data processing. The wireless communication is likely to be the most
power consuming. The power available in the nodes is often restricted. The size of the
battery used to store the needed energy is in most cases the largest contributor to the
sensor device in terms of both dimensions and weight. Batteries are, as a consequence,
kept small and energy consumption of the devices needs to be reduced. In some
applications, a WBAN's sensor/actuator node should operate while supporting a battery
life time of months or even years without intervention. For example, a pacemaker or a
glucose monitor would require a lifetime lasting more than 5 years. Especially for
implanted devices, the lifetime is crucial. The need for replacement or recharging induces

20
a cost and convenience penalty which is undesirable not only for implanted devices, but
also for larger ones.

The lifetime of a node for a given battery capacity can be enhanced by scavenging energy
during the operation of the system. If the scavenged energy is larger than the average
consumed energy, such systems could run eternally. However, energy scavenging will
only deliver small amounts of energy. A combination of lower energy consumption and
energy scavenging is the optimal solution for achieving autonomous Wireless Body Area
Networks. For a WBAN, energy scavenging from on-body sources such as body heat and
body vibration seems very well suited. In the former, a thermo electric generator (TEG)
is used to transform the temperature difference between the environment and the human
body into electrical energy. The latter uses for example the human gait as energy source.

9.4 Quality of Service and Reliability


Proper quality of service (QoS) handling is an important part in the framework of risk
management of medical applications. A crucial issue is the reliability of the transmission
in order to guarantee that the monitored data is received correctly by the health care
professionals. The reliability can be considered either end-to-end or on a per link base.
Examples of reliability include the guaranteed delivery of data (i.e. packet delivery ratio),
inorder-delivery... Moreover, messages should be delivered in reasonable time. The
reliability of the network directly affects the quality of patient monitoring and in a worst
case scenario it can be fatal when a life threatening event has gone undetected

9.5 Usability
In most cases, a WBAN will be set up in a hospital by medical staff, not by
ICTengineers. Consequently, the network should be capable of configuring and
maintaining itself automatically, i.e. self-organization and self maintenance should be
supported. Whenever a node is put on the body and turned on, it should be able to join the
network and set up routes without any external intervention. The self-organizing aspect
also includes the problem of addressing the nodes. An address can be configured at

21
manufacturing time (e.g. the MAC address) or at setup time by the network itself. Further,
the network should be quickly reconfigurable, for adding new services. When a route fails,
a backup path should be set up.

The devices may be scattered over and in the whole body. The exact location of a device
will depend on the application, e.g. a heart sensor obviously must be placed in the
neighbourhood of the heart, a temperature sensor can be placed almost anywhere.
Researchers seem to disagree on the ideal body location for some sensor nodes, i.e. motion
sensors, as the interpretation of the measured data is not always the same. The network
should not be regarded as a static one. The body may be in motion (e.g. walking, running,
twisting etc.) which induces channel fading and shadowing effects

The nodes should have a small form factor consistent with wearable and implanted
applications.

This will make WBANs invisible and unobtrusive

9.6 Security and Privacy

The communication of health related information between sensors in a WBAN and


over the Internet to servers is strictly private and confidential and should be encrypted to
protect the patient's privacy. The medical staffs collecting the data needs to be confident
that the data is not tampered with and indeed originates from that patient. Further, it cannot
be expected that an average person or the medical staff is capable of setting up and
managing authentication and authorization processes. Moreover the network should be
accessible when the user is not capable of giving the password (e.g. to guarantee
accessibility by paramedics in trauma situations). Security and privacy protection
mechanisms use a significant part of the available energy and should there for be energy
efficient and lightweight.

22
CHAPTER 10

POSITIONING WBANs

The development and research in the domain of WBANs is only at an early stage. As a
consequence, the terminology is not always clearly defined. In literature, protocols
developed for WBANs can span from communication between the sensors on the body to
communication from a body node to a data centre connected to the Internet. In order to
have clear understanding, we propose the following definitions: intra-body communication
and extrabody communication. An example is shown on Figure 2. The former controls the
information handling on the body between the sensors or actuators and the personal device,
the latter ensures communication between the personal device and an external network.
Doing so, the medical data from the patient at home can be consulted by a physician or
stored in a medical database. This segmentation is similar to the one defined in where a
multi-tiered telemedicine system is presented. Tier 1 encompasses the intra-body
communication, tier 2 the extra-body communication between the personal device and the
Internet and tier 3 represents the extrabody communication from the Internet to the medical
server. The combination of intra-body and extra-body communication can be seen as an
enabler for ubiquitous health care service provisioning. An example can be found in where
Utility Grid Computing is combined with a WBAN. Doing so, the data extracted from the
WBAN is sent to the grid that provides access to appropriate computational services with
high bandwidth and to a large collection of distributed time varying resources.

To date, development has been mainly focused on building the system architecture and
service platform for extra-body communication. Much of these implementations focus on
the repackaging of traditional sensors (e.g. ECG, heart rate) with existing wireless
devices. They consider a very limited WBAN consisting of only a few sensors that are
directly and wirelessly connected to a personal device. Further they use transceivers with
a large form factor and large antennas that are not adapted for use on a body.

In Figure 3, a WBAN is compared with other types of wireless networks, such as Wireless

23
Personal (WPAN), Wireless Local (WLAN), Wireless Metropolitan (WMAN) and Wide
Area Networks (WAN). A WBAN is operated close to the human body and its
communication range will be restricted to a few meters

Fig. 2 Intra-body and extra-body communication in a WBAN.

with typical values around 1-2 meters. While a WBAN is devoted to interconnection of
one person's wearable devices, a WPAN is a network in the environment around the person.
The communication range can reach up to 10 meters for high data rate applications and up
to several dozens of meters for low data rate applications. A WLAN has a typical
communication range up to hundreds of meters. Each type of network has its typical
enabling technology, defined by the IEEE. A WPAN uses IEEE 802.15.1 (Bluetooth) or
IEEE 802.15.4 (ZigBee), a WLAN uses IEEE
802.11 (WiFi) and a WMAN IEEE 802.16 (WiMax). The communication in a WAN can
be established via satellite links.

24
Fig. 3 positioning of a Wireless Body Area Network in the realm of wireless networks.

In several papers, Wireless Body Area Networks are considered as a special type of a
Wireless Sensor Network or a Wireless Sensor and Actuator Network (WSAN) with its
own requirements1. However, traditional sensor networks do not tackle the specific
challenges associated with human body monitoring. The human body consists of a
complicated internal.

environment that responds to and interacts with its external surroundings, but is in
a way separate and self contained. The human body environment not only has a smaller
scale, but also requires a different type and frequency of monitoring, with different
challenges than those faced by WSNs. The monitoring of medical data results in an
increased demand for reliability. The ease of use of sensors placed on the body leads to a
small form factor that includes the battery and antenna part, resulting in a higher need for
energy efficiency. Sensor nodes can move with regard to each other, for example a sensor
node placed on the wrist moves in relation to a sensor node attached to the hip. This requires
mobility support. In brief, although challenges faced by WBANs are in many ways similar
to WSNs, there are intrinsic differences between the two, requiring special attention. An

25
overview of some of these differences is given in Table 2. A schematic overview of the
challenges in a WBAN and a comparison with WSNs and WLANs is given in Figure 4.

Fig. 4 Characteristics of a Wireless Body Area Network compared with

Wireless Sensor Networks (WSN) and Wireless Local Area Network (WLAN)

26
CHAPTER 11

PHYSICAL LAYER

The characteristics of the physical layer are different for a WBAN compared to a regular
sensor network or an ad-hoc network due to the proximity of the human body. Tests with
TelosB motes (using the CC2420 transceiver) showed lack of communications between
nodes located on the chest and nodes located on the back of the patient. This was
accentuated when the transmit power was set to a minimum for energy savings reasons.
Similar conclusions were drawn with a CC2420 transceiver when a person was sitting on
a sofa; no communication was possible between the chest and the ankle. Better results were
obtained when the antenna was placed 1 cm above the body. As the devices get smaller
and more ubiquitous, a direct connection to the personal device will no longer be possible
and more complex network topologies will be needed. In this section, we will discuss the
characteristics of the propagation of radio waves in a WBAN and other types of
communication.

11.1 RF communication
Several researchers have been investigating the path loss along and inside the
human body either using narrowband radio signals or Ultra Wide Band (UWB). All of
them came to the conclusion that the radio signals experience great losses. Generally in
wireless networks, it is known that the transmitted power drops off with dn where d
represents the distance between the sender and the receiver and n the coefficient of the path
loss (aka propagation coefficient). In free space, n has a value of 2. Other kinds of losses
include fading of signals due to multipath propagation. The propagation can be classified
according to where it takes place: inside the body or along the body.

11.1.1 in the Body


The propagation of electromagnetic (EM) waves in the human body has been investigated.
The body acts as a communication channel where losses are mainly due to absorption of

27
power in the tissue, which is dissipated as heat. As the tissue is lossy and mostly consists
of water, the EM-waves are attenuated considerably before they reach the receiver. In order
to determine the amount of power lost due to heat dissipation, a standard measure of how
much power is absorbed in tissue is used: the specific absorption rate (SAR). It is concluded
that the path loss is very high and that

compared to the free space propagation, an additional 30-35 dB at small distances is


noticed. A simplified temperature increase prediction scheme based on SAR is presented.
It is argued that considering energy consumption is not enough and that the tissue is
sensitive to temperature increase. The influence of a patient's body shape and position on
the radiation pattern from an implanted radio transmitter has been studied. It is concluded
that the difference between body shapes (i.e. male, female and child) are at least as large
as the impact of a patient's arm movements

11.1.2 along the Body


Most of the devices used in a WBAN however are attached on the body. The
propagation along the human body can be divided into line of sight (LOS) and non line of
sight (NLOS) situations. In the former, the curvature effects of the body are not taken into
account as simulations are performed on a phantom or experiments are done at one side of
the body. In the latter, the effect of propagation from the front of the body to the side or
back is evaluated.

The channel model for line of sight (LOS) propagation along the human body was studied
both by simulations and experiments. The studies were done for both narrowband and
UWB signals. However, the results can be compared as the studies for UWB signals were
performed in a band between 3 to 6 GHz and the narrowband system around 2.4 GHz is
relatively close to the band of 3 GHz. It was found that the path loss exponent is between
3 and 4, depending on the position of the device, e.g. the path loss on the arm is lower than
the one on the trunk. It is claimed that this is probably due to the higher absorption in the
larger volume of the trunk, and because the surface of the trunk is less at than the surface

28
of the stretched arm. The study shows a significant impact of the antenna height on the
path loss. The closer the antenna is to the body, the higher the path loss: a difference of
more than 20 dB is found for an antenna placed at 5 mm and 5 cm. As the sensors and
antennas of a Wireless Body Area Network will be designed to be as small as possible, the
antenna will be close to the body which will result in a higher path loss.

In non-line of sight (NLOS) situations, there is no direct view between the sender and
receiver. The EM waves are diffracting around the body rather than having a direct path
through the body. A path loss exponent ranging from 5 to 6 was found. Thus a higher path
loss along the NLOS channel than along the LOS channel was observed, due to diffraction
around the human body2 and absorption of a larger amount of radiation by the body. The
dominant propagation mechanism for the ear-to-ear link, which can be regarded as a worst
case scenario at the head due to the missing line-of-sight component, was identified. It was
shown that for transmission from one side of the head to the opposite direct transmission
can be neglected due to reactions and the strong attenuation of the head.

29
Graph 1 measured path loss versus the distance around (NLOS) and along the torso
(LOS). It can be clearly seen that line of sight communication experiences a lower
path loss

The results above show that it is not always possible to assume single-hop communication
along the body. Figure 5 shows the measured path loss for a LOS

Table 1 Schematic overview of differences between Wireless Sensor Networks and


Wireless Body Area Networks

11.2 Movement of the Body


The movement of the body plays an important role in the strength of the received
signal. It is shown that arm motions to the front and side of the body can have a small
impact on the received power. More significant variations are found when the arms are
moved so that they block the line of sight between the two antennas. A preliminary system
model for gait analysis has been proposed. It is concluded that significant attenuation can
occur (up to 20 dB) when a body limb is moved in between the Tx and Rx antenna.

30
According to the movement of the limbs can induce an attenuation of 30 dB or more. A
similar conclusion was found in an actual implementation where the sensors communicate
directly with the personal device using an RFradio operating at 868 MHz. Loss rates of
more than 50% where found when the body was in motion.

11.3 Non-RF Communication


Next to the propagation of radio waves, several researchers have investigated the
possibility to transfer electronic data by capacitive and galvanic coupling, also called
bodycoupled communication (BCC). These radios work at low frequencies (ranging from
10 kHz to 10 MHz). Zimmerman first showed the potential of interference-free ultra low
power data communication through the human body. High variations of the transmission
attenuation have been observed at different locations of the body. Galvanic coupling
promises to be a potential communication technology for sensor application on the thorax
and for short distances on the limbs. This technology can also be used to exchange data
from one body to another by for example shaking hands. In Osteo Conduct is presented,
where the human musculoskeletal system is used to transmit data and information in a low-
power, secure, non intrusive fashion.
Although this research looks promising, only very low data rates can be achieved (5 bits/s).

The idea of BCC is further exploited by for bootstrapping WBANs. They argue to equip
the nodes with both RF and BCC capabilities. As a BCC is restricted to a person's body,
the BCC can be used to discover and identify sensor nodes on the same body and for
waking up RF radios from low-power sleep mode.

31
CHAPTER 12

MAC
Layer the number of MAC-protocols specifically developed for WBANs is limited.

As networking in Wireless Sensor Networks has some points in common with networking
in WBANs, it is useful to consider the research in MAC-protocols designed for WSNs. An
overview can be found. Two major categories are contention based and schedule-based.
For the former, CSMA/CA is a typical example, while TDMA is a typical scheme for the
latter. The advantages of contention-based approaches are the simplicity, its infrastructure-
free adhoc feature and good adaptability to traffic fluctuation, especially for low load.
Schedulebased approaches on the other hand are free of idle listening, overhearing and
packet collisions because of the lack of medium competition, but require tight time
synchronization. The most commonly used technique for reducing energy consumption in
contention-based protocols is controlling the power and duty cycle of the radio.

Some implementations of WBANs use Bluetooth (IEEE 802.15.1). This was developed as
a cable replacement and does not support (or only very limited) multi-hop communication.
It has a complex protocol stack and high energy consumption compared to IEEE 802.15.4.
It is therefore not suited to be used in a WBAN.

Most current implementations of WBANs use IEEE 802.15.4 or ZigBee as enabling


technology. As most of the radios used in a WBAN are based on an IEEE 802.15.4
compliant chip set, some researchers have adapted the IEEE 802.15.4 MAC-protocol to
make it more suitable for WBANs. We will therefore first discuss the usefulness of IEEE
802.15.4 for medical networking. In a second part, other MAC-protocols for WBANs will
discussed. An overview is given in Table 3. It can be noticed that all proposed MAC-
protocols use slotted communication and assume a star topology by using master-slave
communication. However, in the previous section it has been shown that single-hop
communication is not always possible.

32
Table 2 Schematic overview of MAC protocols in a WBAN

12.1 IEEE 802.15.4


The star network configuration of the IEEE 802.15.4 standard at 2.4 GHz was considered for
a WBAN. The analysis considers quite extensively a very low data rate star network with 10
body implanted sensors transmitting data 1 to 40 times per hour. The analysis focuses on the
effect of crystal tolerance, frame size and the usage of IEEE 802.15.4 Guaranteed Time Slots
(GTS) on a node lifetime. The main consideration in this work was the long-term power
consumption of devices. The results show that IEEE 802.15.4 provides a limited answer for
medical sensor networking when configured in non-beacon mode with low data rate
asymmetric traffic. Beacon mode can also be used, but with even more severe restrictions on
data rate and crystal tolerance. Another adaptation is BSN-MAC. The coordinator controls
the communication by varying the super frame structure of IEEE 802.15.4. This divides the
time axis in a contention-free and contention-based period. The sensors provide real-time
feedback to a BSN coordinator with application-specific and sensor-specific information.
Hence, based on the feedback the BSN coordinator can make dynamic adjustments for the
length of the contention-free and contention-based period to achieve better performance in
energy efficiency and latency. Both come to the conclusion that although 802.15.4 can
provide QoS, the technology is not scalable in terms of power consumption and cannot be
used as a single solution for all WBAN applications. It can be concluded that IEEE 802.15.4

33
is not the best solution for supporting communication in WBANs. Although it can be used
for a quick (and easy) implementation, the results are rather poor. IEEE 802.15.4 was not
designed to support WBANs. Specialized MAC protocols are needed.

12.2 WBAN Specific Protocols


One of the few MAC-protocols for WBANs was proposed by Lamprinos et al. They
use master-slave architecture and, to avoid idle listening, all slaves are locked in the Rx-
slot of the master and go in standby at the same time. The main drawback of this protocol
is that some slaves will have a low duty cycle whereas the nodes that are serviced later
have a higher duty cycle. The protocol was neither implemented nor simulated. An
adaptation of this protocol was used. This protocol divides time into frames in which only
one node is allowed to transmit. The scheduling order is derived by applying the Earliest
Deadline First algorithm. Omeni et al. propose a MAC protocol for a star-networked
WBAN that supports TDMA to reduce the probability of collision and idle listening. Each
slave node is assigned a slot by the central node. When an alarm occurs at one of the nodes,
the node can be assigned an extra slot for direct communication. The protocol has been
evaluated on a Sensium platform. The H-MAC protocol uses the human heartbeat rhythm
information to perform time synchronization for TDMA. The biosensors can thus achieve
time synchronization without having to turn on their radio. The algorithm is verified with
real world data but assumes a certain buffer. The simulations do not show the energy gain
and the protocol is designed for a star-topology WBAN only.

12.3 IEEE 802.15.6


Started as a Study Group in 2006 and motivated by the increasing research and
industry interest in WBANs, the IEEE Standards Association decided to form the IEEE
802.15 Task Group 6 in November 2007. It describes itself as follows: The IEEE 802.15
Task Group 6 (BAN) is developing a communication standard optimized for low power
devices and operation on, in or around the human body (but not limited to humans) to serve
a variety of applications including medical, consumer electronics / personal entertainment
and other. Project Authorization Request (PAR) 07-0575 presents an extended description

34
of the task group. It stresses the fact that current WPANs do not meet medical
communication guidelines, because of the proximity to human tissue. Moreover, WPAN
technology is said not to support Quality of Service, low power operation and non
interference, all required supporting WBAN applications. Based on the responses to the
Call for Applications, the PAR also outlines a large number of applications that can be
served by the proposed standard, going from classical medical usage, e.g. EEG and ECG
monitoring, to personal entertainment systems.

In 2008, a Call for Proposals on physical layer and MAC layer protocols was issued. The
large number of responses, 64 in total, confirmed the industry interest. Currently, the
responses are being evaluated at monthly meetings, while some proposals are merged. The
creation of the IEEE 802.15 Task Group 6 and the work on an IEEE 802.15.6 standard
stresses the importance of the research with respect to WBANs.

35
CHAPTER 13

NETWORK LAYER

Developing efficient routing protocols in WBANs is a nontrivial task because of


the specific characteristics of the wireless environment. First of all, the available bandwidth
is limited, shared and can vary due to fading, noise and interference, so the protocol's
amount of network control information should be limited. Secondly, the nodes that form
the network can be very heterogeneous in terms of available energy or computing power.

Although a lot of research is being done toward energy efficient routing in ad hoc networks
and WSNs, the proposed solutions are inadequate for WBANs. For example, in WSNs
maximal throughput and minimal routing overhead are considered to be more important
than minimal energy consumption. Energy efficient adhoc network protocols only attempt
to find routes in the network that minimize energy consumption in terminals with small
energy resources, thereby neglecting parameters such as the amount of operations
(measurements, data processing, access to memory) and energy required to transmit and
receive a useful bit over the wireless link. Most protocols for WSNs only consider networks
with homogeneous sensors and a many-to-one communication paradigm. In many cases
the network is considered as a static one. In contrast, a WBAN has heterogeneous mobile
devices with stringent real-time requirements due to the sensor-actuator communication.
Specialized protocols for WBANs are therefore needed.

In the following, an overview of existing routing strategies for WBANs is given. They can
be subdivided in two categories: routing based on the temperature of the body and cluster
based

36
CHAPTER 14

SECURITY

The communication of health related information between sensors in a WBAN is subject


to the following security requirements: data confidentiality, data authenticity, data integrity
and data freshness. Data confidentiality means that the transmitted information is strictly
private and can only be accessed by authorized persons, e.g. the doctor attending the
patient. It is usually achieved by encrypting the information before sending it using a secret
key and can be both symmetrically and asymmetrically. Data authenticity provides a means
for making sure that the information is sent by the claimed sender. For this, a Message
Authentication Code (MAC3) is calculated using a shared secret key. Data integrity makes
sure that the received information has not been tampered with. This can be inspected by
verifying the MAC. Data freshness guarantees that the received data is recent and not a
replayed old message to cause disruption. A much used technique is to add a counter which
is increased every time a message is sent.

The security mechanisms employed in WSNs do generally not offer the best solutions to
be used in WBANs for the latter have specific features that should be taken into account
when designing the security architecture. The number of sensors on the human body, and
the range between the different nodes, is typically quite limited. Furthermore, the sensors
deployed in a WBAN are under surveillance of the person carrying these devices. This
means that it is difficult for an attacker to physically access the nodes without this being
detected. When designing security protocols for WBANs, these characteristics should be
taken into account in order to define optimized solutions with respect to the available
resources in this specific environment. Although providing adequate security is a crucial
factor in the acceptance of WBANs, little research has been done in this specific field. One
of the most crucial components to support the security architecture is its key management.
Further, security and privacy protection mechanisms use a significant part of the available
resources and should therefore be energy efficient and lightweight.

37
A solution for data integrity and freshness was proposed. Their integrity algorithm is
based on the measurement of a permissible round trip time threshold and is
computational feasible. Authentication is done by calculating a MAC with a random
sequence of numbers. This sequence is determined at the initialization phase.

A security mechanism was added to CICADA. Doing so, CICADA-S became one of the
first protocols where appropriate security mechanisms are incorporated into the
communication protocol while addressing the life-cycle of the sensors. It was shown that
the integration of key management and secure, privacy preserving communication
techniques has low impact on the power consumption and throughput.

Another promising solution for key management is the use of biometrics. Biometrics is a
technique commonly known as the automatic identification and verification of an
individual by his or her physiological and/or behavioural characteristics. An algorithm
based on biometric data is described that can be employed to ensure the authenticity,
confidentiality and integrity of the data transmission between the personal device and all
other nodes. Algorithms that use the heartbeat to generate a key are proposed.

Body-coupled communication (BCC) is used to associate new sensors in a WBAN. As


BCC is limited to the body, these techniques can be used to authenticate new sensors on
the body.

The developers of WBANs will have to take into account the privacy issues. After all, a

WBAN can be considered as a potential threat to freedom, if the applications go beyond


“secure" medical usage, leading to a Big Brother society. Social acceptance would be the
key to this technology finding a wider application. Therefore, considerable effort should
be put in securing the communication and making sure that only authorized persons can
access the data.

38
CHAPTER 15

EXISTING PROJECTS

Several research groups and commercial vendors are already developing the first prototypes
of WBANs. However, this research mainly focuses on building a system architecture and
service platform and in lesser extent on developing networking protocols. In this section, we
provide a non-exhaustive overview of projects for WBANs.

Otto et al and Jovanov et al. present a system architecture which both handles the
communication within the WBAN and between the WBANs and a medical server in a multitier
telemedicine system. The communication between the sensors and the sink is single-hop,
slotted and uses ZigBee or Bluetooth. The slots are synchronized using beacons periodically
sent by the sink. They use off-the-shelf wireless sensors to design a prototype WBAN such as
the Tmote sky platform from formerly Moteiv, now sentilla.

The Tmote sky platform is also used in the Code Blue-project where WBANs are used in rapid
disaster response scenarios. A wearable computer attached to the patient's wrist, i.e. a Tmote
Sky mote, forms an ad hoc wireless network with a portable tablet PC. They developed a
wireless two-lead ECG, a wireless pulse oximeter sensor and a wireless electromyogram
(EMG).

Ayushman is a sensor network based medical monitoring infrastructure that can collect, query
and analyze patient health information in real-time. A wireless ECG, gait monitoring and
environment monitoring was developed using off-the-shelf components with a Mica2 wireless
transceiver. Further, the necessary software for consulting the data at a remote client was
developed.

The Human++ project by IMEC-NL aims to achieve highly miniaturized and autonomous
sensor systems that enable people to carry their personal body area network. An ambulatory

39
EEG/ECG system with a transmitter working on 2.4 GHz was developed. This system can run
for approximately 3 months using 2 AA batteries. In order to obtain a longer autonomy, the

project also investigates energy scavenging with thermoelectric generators (TEG). In 2006, a
wireless pulse oximeter was presented, fully powered by the patient's body heat.

Further, the project investigates new wireless technologies such as UWB to make an ultralow
power transmitter.

The European MobiHealth project provides a complete end-to-end mHealth platform for
ambulant patient monitoring deployed over UMTS and GPRS networks. The MobiHealth
patient/user is equipped with different sensors that constantly monitor vital signals, e.g. blood
pressure, heart rate and electrocardiogram (ECG). Communication between the sensors and
the personal device is Bluetooth or ZigBee based and is single-hop. The major issues
considered are security, reliability of communication resources and QoS guarantees.

The French project BANET aims to provide a framework, models and technologies to design
optimized wireless communication systems targeting the widest range of WBAN-based
applications, in the consumer electronics, medical and sport domains. They focus on the study
of the WBAN propagation channel, MAC protocols and coexistence of WBANs and other
wireless networks. The German BASUMA-project (Body Area System for Ubiquitous
Multimedia Applications) aims at developing a full platform for WBANs. As communication
technique, a UWB-frontend is used and a MAC-protocol based on IEEE 802.15.3. This
protocol also uses time frames divided into contention free periods (with time slots) and
contention access periods (CSMA/CA). An exible and efficient WBASN solution suitable for
a wide range of applications is developed. The focus lies on posture and activity recognition
applications by means of practical implementation and on-the-field testing. The sensors are
WiMoCA-nodes, where sensors are represented by tri-axial integrated MEMS accelerometers.
The Flemish IBBT IM3-project (Interactive Mobile Medical Monitoring) focuses on the
research and implementation of a wearable system for health monitoring. Patient data is

40
collected using a WBAN and analyzed at the medical hub worn by the patient. If an event (e.g.
heart rhythm problems) is detected, a signal is sent to a health care practitioner who can view
and analyze the patient data remotel

41
CHAPTER 16

CONCLUSION

In this paper, we propose a mechanism to route data in WBANs. The proposed scheme use a
cost function to select appropriate route to sink. Cost function is calculated based on the
residual energy of nodes and their distance from sink. Nodes with less value of cost function
are elected as parent node. Other nodes become the children of that parent node and forward
their data to parent node. Two nodes for ECG and Glucose monitoring forward their data
direct to sink as they are placed near sink, also these two nodes can not be elected as parent
node because both sensor node has critical and important medical data. It is not required that
these two node deplete their energy in forwarding data of other nodes. Our simulation results
shows that proposed routing scheme enhance the network stability time and packet delivered
to sink. Path loss is also investigated in this protocol and in future work, we will implement
Expected Transmission Count (ETX) link metrics as demonstrated in.

42
CHAPTER 17

REFERENCES

[1] Mainwaring, Alan, et al. “Wireless sensor networks for habitat monitoring.”
Proceedings of the 1st ACM international workshop on Wireless sensor networks and
applications. ACM, 2002.

[2] N. Javaid, U. Qasim, Z. A. Khan, M. A. Khan, K. Latif and A. Javaid, “On Energy
Efficiency and Delay Minimization in Reactive Protocols in Wireless Multi-hop
Network”, 2nd IEEE Saudi International Electronics, Communications and Photonics
Conference (SIECPC 13), 2013, Riyadh, Saudi Arabia.

[3] B. Manzoor, N. Javaid, O. Rehman, M. Akbar, Q. Nadeem, A. Iqbal, M. Ishfaq, “Q-


LEACH: A New Routing Protocol for WSNs”, International Workshop on Body Area
Sensor Networks (BASNet-2013) in conjunction with 4th International Conference on
Ambient Systems, Networks and Technologies (ANT 2013), 2013, Halifax, Nova Scotia,
Canada, Procedia Computer Science, Volume 19, 2013, Pages 926-931, ISSN 1877-0509

[4] N. Javaid, R. D. Khan, M. Ilahi, L. Ali, Z. A. Khan, U. Qasim, ”Wireless Proactive


Routing Protocols under Mobility and Scalability Constraints”, J. Basic. Appl. Sci. Res.,
3(1)1187-12001, 2013

[5] N. Javaid, Z. Abbas, M. S. Farid, Z. A. Khan and N. Alrajeh, “M-ATTEMPT: A New


Energy-Efficient Routing Protocol for Wireless Body Area Sensor Networks”, The 4th
International Conference on Ambient Systems, Networks and Technologies (ANT 2013),
2013, Halifax, Nova Scotia, Canada, Procedia Computer Science, Volume 19, 2013,
Pages 224-231, ISSN 1877-0509, http://dx.doi.org/10.1016/j.procs.2013.06.033.
Procedia Computer Science.

43
[6] Latre, Benoit, et al. “A low-delay protocol for multihop wireless body area networks.”
Mobile and Ubiquitous Systems: Networking and Services, 2007. MobiQuitous 2007.
Fourth Annual International Conference on. IEEE, 2007.

[7] Quwaider, Muhannad, and Subir Biswas. “On-body packet routing algorithms for
body sensor networks.” Networks and Communications, 2009. NETCOM’09. First
International Conference on. IEEE, 2009.

[8] Ehyaie, Aida, Massoud Hashemi, and Pejman Khadivi. “Using relay network to
increase life time in wireless body area sensor networks.” World of Wireless, Mobile and
Multimedia Networks and Workshops, 2009. WoWMoM 2009. IEEE International
Symposium on a. IEEE,

[9] Watteyne, Thomas, et al. “Anybody: a self-organization protocol for body area
networks.” Proceedings of the ICST 2nd international conference on Body area
networks. ICST (Institute for Computer Sciences, Social-Informatics and
Telecommunications Engineering), 2007.

[10] Nabi, Majid, et al. “A robust protocol stack for multi-hop wireless body area networks
with transmit power adaptation.” Proceedings of the Fifth International Conference on
Body Area Networks. ACM, 2010.

[11] Guo, Cheng, R. Venkatesha Prasad, and Martin Jacobsson. “Packet forwarding with
minimum energy consumption in body area sensor networks.” Consumer
Communications and Networking Conference (CCNC), 2010 7th IEEE. IEEE, 2010.

[12] Tsouri, Gill R., Adrian Sapio, and Jeff Wilczewski. “An investigation into relaying of
creeping waves for reliable low-power body sensor networking.” Biomedical Circuits
and Systems, IEEE Transactions on 5.4 (2011): 307-319.

44
[13] Sapio, Adrian, and Gill R. Tsouri. “Low-power body sensor network for wireless ecg
based on relaying of creeping waves at 2.4 ghz.” Body Sensor Networks (BSN), 2010
International Conference on. IEEE, 2010. [14] N. Javaid, M. Yaqoob, M. Y. Khan, M. A.
Khan, A. Javaid, Z. A. Khan, “Analyzing Delay in Wireless Multi-hop Heterogeneous
Body Area Networks”, Research Journal of Applied Sciences, Engineering and
Technology, 2013

[15] N. Javaid, I. Israr, M. A. Khan, A. Javaid, S. H. Bouk, Z. A. Khan, “Analyzing


Medium Access Techniques in Wireless Body Area Networks”, Research Journal of
Applied Sciences, Engineering and Technology, 2013

[16] Quwaider, Muhannad, and Subir Biswas. “Probabilistic routing in onbody sensor
networks with postural disconnections.” Proceedings of the 7th ACM international
symposium on Mobility management and wireless access. ACM, 2009.

[17] Maskooki, Arash, et al. “Opportunistic routing for body area network.” Consumer
Communications and Networking Conference (CCNC), 2011 IEEE. IEEE, 2011.

[18] Heinzelman, Wendi Rabiner, Anantha Chandrakasan, and Hari Balakrishnan.


“Energy-efficient communication protocol for wireless microsensor networks.” System
Sciences, 2000. Proceedings of the 33rd Annual Hawaii International Conference on.
IEEE, 2000.

[19] Manzoor, B. et al. “Noise Filtering, Channel Modeling and Energy Utilization in
Wireless Body Area Networks.” High Performance Computing and Communication and
2012 IEEE 9th International Conference on Embedded Software and Systems (HPCC-
ICESS), 2012 IEEE 14th International Conference on. IEEE, 2012

45
APPENDIX-1
CODE
%------------------------------------------------------------
%Protocol Name : SIMPLE: Stable Increased Throughput Multihop
Link %Effecient for WBAN.
Clc
closeall
clearall
Prop_delay_SUM = 0;
path_loss_SUM = 0 ;
packet_to_BS_SUM=0;
packet_drop_SUM =0;
dead_SUM = 0 ;
E_SUM = 0;
allive_SUM = 0;
packet_rcvd_AVG =0;
P_loss_SUM = 0 ;
PACKETS_DROPD_SUM=0;
PKTS_TO_BS_SUM=0;
DEAD_SUM=0;
E_TOTAL_SUM=0;
Pro_delay_SUM = 0 ;
% packet_to_BS_SUM = 0;
% packet_drop_SUM = 0;
% dead_SUM = 0 ;
% E_SUM = 0;
% allive_SUM = 0;
%packet_rcvd_AVG =0;
for i = 1:1:5
xylabel=20;
legendsize=18;
sink.x =.25;
sink.y = 1 ;
n = 8;
Eo = 0.5 ;
% energy parameters
ETX=16.7*0.000000001;
ERX=36.1*0.000000001;

46
Emp=1.97*0.000000;
EDA=5*0.000000001;
do = 0.1;
lambda=.125 ;
%f=2.4GHz speed = 299792458;
flag_first_dead=0;
flag_teenth_dead=0;
flag_all_dead=0;
dead=0;
first_dead=0
teenthdead=0
all_dead=0;
flagfirstdead1=0;
flagteenthdead1=0
flag_all_dead1=0;
dead1=0;
firstdead1=0;
teenthdead1=0
all_dead1=0;
dead2=0;
thr=0.1;
C=299792458;
packettoBS=0;
packettoCH =0;
Packet_to_BS_total = 0 ;
% path_loss_round = 0 ;
% Prop_delay_round = 0;
% total_delay_round = 0;
packet_drop = 0;
rmax=8000;
allive=n;
%-------------------------------------------------------------
---------
---
% ATTEMP Data
%-------------------------------------------------------------
---------
xm=0.8;%2.5 feet
ym=1.8;%6 feet

44
%xandyCoordinate
sof the Sink
sink1.x=0.4;
sink1.y=0.9;
%Number of Nodes in the
field node=8;
alliveA=node;
%x and y Coordinates of the
Sink sink1.x=0.4;
sink1.y=0.9;
th=0.7;
P_loss_round = 0 ;
P_delay_round = 0 ;
P_loss = 0 ;
th_temp=98;
rng=0.8062;
% Network establishment
SA(1).xd=0.2;
SA(1).yd=1.2;
SA(2).xd=0.6;
SA(2).yd=1.1;
SA(3).xd=0.7;
SA(3).yd=0.8;
SA(4).xd=0.5;
SA(4).yd=0.6;
SA(5).xd=0.1;
SA(5).yd=0.8;
SA(6).xd=0.3;
SA(6).yd=0.5;
SA(7).xd=0.5;
SA(7).yd=0.3;
SA(8).xd=0.3;
SA(8).yd=0.1;
%for i = 1:1:node
%plot(S(i).xd, S(i).yd,'*r');
%hold on
%end
%plot(sink.x ,sink.y, 'bo' );
%hold on ;
for i=1:1:node

45
distanceA(i)=sqrt((SA(i).xd-(sink1.x) )^2 + (SA(i).yd-
(sink1.y) )^2 );
end
% figure(1)
%% Energy eqquipment and type identification
for i=1:1:node
SA(i).type='N';
SA(i).E=Eo;
end
SA(node+1).
xd=sink1.x;
SA(node+1).yd=sink1.y;
countCHs=0;
%the number of Stateflow objects in the current context.
cluster=1;
%first cluster is selected
dead=0;
allive=node;
%counter for bit transmitted to Bases Station and to Cluster
Headspackets_TO_BS=0;
packets_TO_CH=0;
Paskets_TO_BS_total=0
pd=0;
d=0;

s=0;
%----------------------------------------------------------
node deployment

S(1).xd=0.3;
% calf
S(1).yd=0.1;
S(1).P = 1; %
S(2).xd=0.5;
% knee
S(2).yd=0.3;
S(2).P = 1;
S(3).xd=0.3;
% lactic acid(thigh) 2.5
S(3).yd=0.55;

46
S(3).P = 1;
S(4).xd= .5;
%temp(thigh)2.5
S(4).yd=.55;
S(4).P =1;
S(7).xd= .37;
% glucose
S(7).yd=.75;
S(7).P = 2;
S(8).xd= .45;
% ECG
S(8).yd= .9;
S(8).P = 2;
S(5).xd= .7;
% left PALM 4.3 feet
S(5).yd= .8;
S(5).P = 1;
S(6).xd= .1;
%rite palm 5.4
S(6).yd= .8;
S(6).P = 1;

%-------------------------------------------------------------
------
-------
for i = 1:1:n
S(i).E = Eo ;
S(i).id = i;
S(i).g = 0 ;
%axis on ;
%axis ([0 0.8 0 2]) ;
%plot(S(i).xd ,S(i).yd, 'r*' );
%hold on ;
%grid on ;
end
%-------------------------------------------------------------
---------
----
%plot(sink.x ,sink.y, 'bo' );
a = 1;

47
b = 1;
x0 = [];
x1 = [];
for i = 1:1:n
if S(i).P ==1
x0{a} = S(i).id;
a = a+1;
end
end
for i=1:1:n
% for j=1:1:n
distance1(i,j)=sqrt((S(i).xd(S(j).xd))^2+(S(i).yd(S(j).yd))^2;

distance(i)=sqrt((S(i).xd-(sink.x) )^2 + (S(i).yd(sink.y))^2);


%end
end
pd1 = 0;
PacketstoBS=0;
totaldelay
for r=1:1:rmax
rpath_loss = 0;
P_loss=0;
PL = 0 ;
delay =0;
dead = 0;
E =0 ;
E1 = 0;
for i=1:1:n
if (S(i).E<=0)
dead=dead+1;
if (dead==1)
if(flag_first_dead==0)
first_dead=r;
flag_first_dead=1;
end
end
if(dead==n)
if(flag_all_dead==0)
all_dead=r;
flag_all_dead=1 ;

48
end
end
if S(i).E>0
S(i).g = 0;
E = E+S(i).E ;
End
end
%E1 = E/(Eo*8) *100;
Prop_delay =0 ;
packet_to_BS_per_round = 0;
packet_to_BS = 0 ;
Dead(r+1)=dead;
Allive(r+1)=n-dead;
energy(r+1)=E;
% cost function calculation to select
forwarder cost_function = 0;
%cost_function1 = 0;
for i=1:1:length(x0)
if(S(i).E > 0 )
cost_function(i) = distance(i)/(S(i).E);
end
end
%-------------------------------------------------------------
---------
fori=1:1:length
%node with minimum cost function elected as forwarder
[min_node,I] = min(cost_function);
node_num = I ;
node_sel(r) = node_num ;
end
% if energy of node is greater then threshold energy
if (S(node_num).E>thr )
S(node_num).g = 1;
% forwarder
packet_to_BS = packet_to_BS+1 ;
distanceCH=sqrt( (S(node_num).xd-(sink.x) )^2 +
(S(node_num).yd-(sink.y) )^2 );
S(node_num).E = S(node_num).E - ((ETX+ERX+EDA)*(4000)+
Emp*3.38*4000*(distanceCH^3.38));

49
PL(node_num)=10*log(((4*pi*do)/lambda)^2+10*4*log(distanceCH/d
o))+4.1 ;
delay(node_num) = distanceCH/C ;
end
% node forwading data to neighboure
faorwarder for i=1:1:length(x0)
if ( S(i).g == 0) && (S(i).E>thr && S(i).P ==1 )
temp = sqrt((S(i).xd - S(node_num).xd)^2 +
(S(i).ydS(node_num).yd)^2 ) ;
temp2 = sqrt((S(i).xd - sink.x)^2 + (S(i).yd-sink.y)^2 ) ;
if (temp <temp2)
S(i).E = S(i).E - ( (ETX)*(4000) +
Emp*3.38*4000*(temp^3.38));
% 3.38 => human body path loss exponent
packet_to_CH = packet_to_CH+1;
PL(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(temp/do))+4.1 ;
path_loss = path_loss + PL(i);
delay(i) = temp/C ;
Prop_delay = Prop_delay + delay(i);
else
(i).E = S(i).E - ( (ETX)*(4000) +
Emp*3.38*4000*(temp2^3.38));
% 3.38 => human body path loss exponent
packet_to_BS = packet_to_BS+1;
PL(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(temp2/do))+4.1 ;
path_loss = path_loss + PL(i);
delay(i) = temp2/C ;
Prop_delay = Prop_delay + delay(i) ;
end
end
end
%------------------------------------------------------------
---------
for i = 1:1:n
if (S(i).E > 0 && S(i).P == 2 )
d1 = sqrt((S(i).xd - sink.x)^2 + (S(i).yd-sink.y)^2 ) ;
S(i).E = S(i).E - ( (ETX)*(4000) +
Emp*3.38*4000*(d1^3.38));% 3.38 => human body path loss
packet_to_BS = packet_to_BS+1 exponent

50
PL(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(d1/do))+4.1 ;
path_loss = path_loss+PL(i) ;
delay(i) = d1 /C ;
Prop_delay = Prop_delay + delay(i) ;
end
end
%direct transmission if energy of nodes decreses below
threshold
for i = 1:1:length(x0)
if (S(i).E < thr && S(i).E > 0 )
d = sqrt((S(i).xd - sink.x)^2 + (S(i).yd-sink.y)^2 ) ;
S(i).E =S(i).E - ( (ETX)*(4000) + Emp*3.38*4000*(d^3.38)); %
3.38 => human body path loss exponent packet_to_BS
= packet_to_BS+1 ;packet_to_BS = packet_to_BS+1 ;
PL(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(d/do))+4.1 ;
delay(i) = d/C ;
Prop_delay = Prop_delay + delay(i);
end
end
%-----------
------------
------------
------------
---
% SIMPLE Protocol
path_loss_round(r+1) = path_loss ;
Prop_delay_round(r+1) = Prop_delay ;
packet_to_BS_per_round(r+1)=packet_to_BS;
Packet_to_BS_total=Packet_to_BS_total+packet_to_BS;
packet_to_BS1(r+1)=Packet_to_BS_total;
pkts_ lnk_status_flag1='bad';
pkts_drpd1=pkts_drpd1+1;
end
end
pd1 = pd1+pkts_drpd1;
packet_drop(r+1) =pd1;
%-------------------------------------------------------------
-
--
%Random uniformed model of packet drops ends here

51
%-------------------------------------------------------------
---------
----
% ATTEMPT
%-------------------------------------------------------------
---------
----
deadA=0
E_total=0;
for i=1:1:node
if (SA(i).E<=0)
deadA=deadA+1;
end
if(SA(i).E>0)
SA(i).type='N';
E_total=E_total+SA(i).E;
end
end
%E_ for i=1:1:node
ct=90+(rand*10);
%ct is between 90 to 100
if (SA(i).E>0 ) % && ct<th_temp
cv=rand;
if
(cv>th)distA=sqrt((SA(i).xd(SA(node+1).xd))^+(SA
(i).yd-(SA(node+1).yd) )^2 );
Emp*3.38*4000*(distA^3.38));
if(distA > 0)
ATTM = E_total/(Eo*8) *100;
E_TOTAL(r+1)=E_total;
DEADA(r+1)=deadA;
ALLIVEA(r+1)=alliveA-deadA;
packets_TO_BS_per_round=0;
packets_TO_BSA=0;
rcvd1=0;
pkts_drpd1=0;
P_opt1=0.3;
%Optimal probability to determine link status

52
for j=1:1: packet_to_BS_per_round(r+1)
pr=rand(1,1);
if(pr>=P_opt1)
lnk_status_flag1='good';
pkts_rcvd1=pkts_rcvd1+1;
else
delay_ATT = 0 ;
total_delay = 0;
PL_ATT(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(distA/do)).1;
P_loss = P_loss + PL_ATT(i);
delay_ATT(i) = distA/C ;
total_delay = total_delay+delay_ATT(i) ;
end
%S(i).E=S(i).E- ( (ETX)*(4000) + Emp*4000*(dist*dist));
d=i;
packets_TO_BSA=packets_TO_BSA+1;
end
if(cv<=th)
min_dis=Inf;
min_dis_cluster=0;
for c=1:1:node
if i~= ctempA=min(min_dis,sqrt( (SA(i).xd-
SA(c).xd)^2 +(SA(i).yd-SA(c).yd)^2 ) );
if ( tempA<min_dis )
min_dis=tempA;
min_dis_cluster=c;
end
end
end
disA=sqrt( (SA(i).xd-(SA(node+1).xd) )^2
+(SA(i).(SA(node+1).yd) )^2 );
if (min_dis<disA)
disA=sqrt( (SA(i).xd-(SA(min_dis_cluster).xd) )^2 + (SA(i).yd-
(SA(min_dis_cluster).yd) )^2 );
SA(i).E=SA(i).E- ( (ETX)*(4000) +
Emp*3.38*4000*(disA^3.38)PL_ATT(i)=10*log(((4*pi*do)/lambda)^2
+10*4*log(disA/do))+4
P_loss = P_loss + PL_ATT(i);
delay_ATT(i) = disA/C ;
total_delay = total_delay+delay_ATT(i) ;

53
%S(i).E=S(i).E- ( (ETX)*(4000) + Emp*4000*(dis*dis));
s=i;
end
if(min_dis>disA)disA=sqrt(
(SA(i).x(SA(n+1).xd))^2+(SA(i).yd(SA(n+1).yd))^2 );
SA(i).E=SA(i).E- ( (ETX)*(4000) +
Emp*3.
PL_ATT(i)=10*log(((4*pi*do)/lambda)^2+10*4*log(disA/do))+4.1 ;
P_loss = P_loss + PL_ATT(i);
delay_ATT(i) = disA/C ;
total_delay = total_delay+delay_ATT(i) ;
%S(i).E=S(i).E- ( (ETX)*(4000) + Emp*4000*(dis*dis ));
packets_TO_BSA=packets_TO_BSA+1;
end
end
end
end
if (SA(4).E>0)
SA(4).E=SA(4).E- ( (ERX+EDA)*(4000) );
end
if (SA(5).E>0)
SA(5).E=SA(5).E- ( (ERX+EDA)*(4000) );
end
if (SA(7).E>0)
SA(7).E=SA(7).E- ( (ERX+EDA)*(4000) );
end
P_loss_round(r+1) = P_loss ;
total_delay_round(r+1)= total_delay ;
%Prop_delay_round(r+1) = Prop_delay ;
packets_TO_BS_per_round(r+1)=packets_TO_BSA;
Paskets_TO_BS_total=Paskets_TO_BS_total+packets_TO_BSA;
PKTS_TO_BS(r+1)=Paskets_TO_BS_total;
%%Random uniformed model of packet drops starts from here
pkts_rcvd=0;
pkts_drpd=0;
P_opt=0.3;
%Optimal probability to determine link statusfor
j=1:1:packets_TO_BS_per_round(r+1)
p_r=rand(1,1);

54
if(p_r>=P_opt)lnk_status_flag='good';
pkts_rcvd=pkts_rcvd+1;
else
lnk_status_flag='bad';
pkts_drpd=pkts_drpd+1;
end
pd=pd+pkts_drpd;
PACKETS_DROPPED(r+1)= pd;
% Random uniformed model of packet drops ends here
end
%Adding five times simulation resuts(Proposed)
Prop_delay_SUM = Prop_delay_round+Prop_delay_SUM ;
path_loss_SUM = path_loss_round+ path_loss_SUM ;
packet_to_BS_SUM=packet_to_BS1+packet_to_BS_SUM;
packet_drop_SUM=packet_drop+packet_drop_SUM;
dead_SUM=Dead+dead_SUM;
E_SUM=E_SUM+energy;
allive_SUM = allive_SUM +Allive ;
%-------------------------------------------------------------
---------
---
% my code Ends here
%------------------------------------------------------------
---------
----

%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Adding five times simulation resuts
ddd(i,r) = total_delay_round(r) ;
Pro_delay_SUM = total_delay_round+Pro_delay_SUM ;
P_loss_SUM = P_loss_round+ P_loss_SUM ;
PKTS_TO_BS_SUM=PKTS_TO_BS+PKTS_TO_BS_Sum
PACKETS_DROPD_SUM=PACKETS_DROPPED+PACKETS_DROP
DEAD_SUM=DEADA+DEAD_SUM;
E_TOTAL_SUM=E_TOTAL_SUM+E_TOTAL;
%ALIVE_SUM = ALIVE_SUM + end
%% Calculating average values(PROPOSED)
path_loss_AVG = path_loss_SUM/5;
Pro_delay_AVG = Pro_delay_SUM/5

55
packet_to_BS_AVG=5
packet_to_BS_SUM/5;
packet_drop_AVG=5
packet_drop_SUM/5;
packet_rcvd_AVG = packet_to_BS_AVG-packet_drop_AVG;
dead_AVG = dead_SUM/5;
E_AVG = E_SUM/5;
Allive_AVG = allive_SUM/5 ;
% pr = 1:300:rmax ;
% E_AVG = E_AVG(pr);
%% Calculating average values (ATTEMPT)
Prop_delay_AVG = Prop_delay_SUM/5 ;
P_loss_AVG = P_loss_SUM/5 ;
PKTS_TO_BS_AVG=PKTS_TO_BS_SUM/5;
PACKETS_DROPD_AVG=PACKETS_DROPD_SUM/5;
PACKETS_RCVD_AVG=PKTS_TO_BS_AVG-PACKETS_DROPD_AVG;
DEAD_AVG=DEAD_SUM/5;
E_TOTAL_AVG=E_TOTAL_SUM/5;
% pat = 1:305:rmax ;
% E_TOTAL_AVG = E_TOTAL_AVG(pat);
%% plotting
r=0:
figure(1
)
plot(r,dead_AVG,'r-',r,DEAD_AVG,'b-','linewidth',2);
legend('SIMPLE','ATTEMPT');
xlabel('Rounds
(r)','FontSize',xylabel,'FontName','Arial');
ylabel('No.deadnodes','FontSize',xylabel,'FontName','Arl')
axis([0 8000 0 12]);
grid on figure(2)
plot(r,packet_to_BS_AVG,'r-
',r,PKTS_TO_BS_AVG,'b.','linewidth',2);
legend('SIMPLE','ATTEMPT');
xlabel('Rounds (r)','FontSize',xylabel,'FontName','Arial');
ylabel('Packets sent to
sink','FontSize',xylabel,'FontName','Arial');
grid on
figure(3)

56
plot(r,packet_drop_AVG,'r-',r,PACKETS_DROPD_AVG,'b-
.','linewidth',2); legend('SIMPLE','ATTEMPT');
xlabel('Rounds
(r)','FontSize',xylabel,'FontName','Arial');
ylabel('Packets
dropped','FontSize',xylabel,'FontName','Arial'); grid on
figure(4)
plot(r,packet_rcvd_AVG,'r-',r,PACKETS_RCVD_AVG,'b-
.','linewidth',2);
legend('SIMPLE','ATTEMPT');
xlabel('Rounds (r)','FontSize',xylabel,'FontName','Arial');
ylabel('Packets received at
sink','FontSize',xylabel,'FontName','Arial')
grid on
%figure(5)
% % x = r;
% % [E_AVG]= hist(x);
% % bar(E_AVG)
% Y = [pr,E_AVG] ;
% bar(Y);
% % bar(pr,E_AVG)
% %E_TOTAL_AVG,.05,'r')%'r-','linewidth',2);
% hold on
% %bar(pat,E_TOTAL_AVG, .05,'b')
% % legend('PROPOSED','ATTEMPT');
% % xlabel('No. of rounds (r)');
% % ylabel('Residual energy of the network (J)');
% axis ([0 800 0 100 ]);
% % grid on
% %
figure(5
)
plot(r,E_AVG,'r-',r,E_TOTAL_AVG,'b-.','linewidth',2);
legend('SIMPLE','ATTEMPT');
xlabel('Rounds (r)','FontSize',xylabel,'FontName','Arial');
ylabel('Residual
energy(J)','FontSize',xylabel,'FontName','Arial'); grid on
figure6)
plot(r,path_loss_AVG,'r',r,P_loss_AVG,'b');

57
xlabel('Rounds (r)','FontSize',xylabel,'FontName','Arial')
ylabel('Path Loss(dB)','FontSize',xylabel,'FontName','Arial')
legend1=legend('SIMPLE','ATTEMPT');
set(legend1,'FontSize',legendsize)
figure(7)
plot(r,Prop_delay_AVG,'r',r,Pro_delay_AVG,'b');
xlabel('Rounds(r)','FontSize',xylabel,'FontName','Aral')
ylabel('delay','FontSize',xylabel,'FontName','Arial')
legend1=legend('Proposed','ATTEMPT');
set(legend1,'FontSize',legendsize)
%
figure(8)
plot(r,Pro_delay_AVG,'b');
xlabel('Rounds (r)','FontSize',xylabel,'FontName','Arial')
ylabel('delay','FontSize',xylabel,'FontName','Arial')
legend1=legend('Proposed','ATTEMPT');
set(legend1,'FontSize',legendsize)

%{
%-------------------------------------------------------------
--------
----
% ATTEMP Ends here
%-------------------------------------------------------------
--------
----
r=0:rmax
;
%plot(r,STAT.P,'r');
figure(2)
plot(r,STATISTICS.DEAD,'r',r,DEADA,'b');
xlabel('Rounds','FontSize',xylabel,'FontName','Arial')
ylabel('Dead','FontSize',xylabel,'FontName','Arial')
legend1=legend('Proposed','ATTEMPT');
set(legend1,'FontSize',legendsize)
figure(3)
plot(r,STATISTICS.ALLIVE,'r',r,ALLIVEA,'b');
xlabel('rounds','FontSize',xylabel,'FontName','Arial')
ylabel('Percent of Allive
Nodes','FontSize',xylabel,'FontName','Arial')

58
legend1=legend('Proposed','ATTEMPT');
set(legend1,'FontSize',legendsize) ;
plot(r,STATISTICS.ENERGY,'r',r,E_TOTAL,'b');
xlabel('Rounds','FontSize',xylabel,'FontName','Arial')
ylabel('Remaining
Energy','FontSize',xylabel,'FontName','Arial')
legend1=legend('Proposed','ATTEMPT');
set(legend1,'FontSize',legendsize)
%}
38*4000*(disA^3.38));

59
51

S-ar putea să vă placă și