# Energy Efficient MAC for QoS Traffic in Wireless Body Area Network

Authors: Anil K. Jacob; Lillykutty Jacob
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Lifetimes and latencies of devices in wireless body area networks (WBANs) that monitor the health conditions of patients largely determine their utility under such a setup. It
is seen that the medium access method used in the body area
network can play a significant role in determining the quality of
service such medical devices can provide. IEEE 802.15.6 standard
for WBAN includes different types of medium access, namely,
CSMA/CA, scheduled, and polling access schemes, or a combination of these techniques.
In this paper, medium access methods proposed in IEEE
802.15.6 standard are investigated to assess their effectiveness
in meeting the lifetime and quality of service requirements of
WBANs. We then propose sleeping schedules for contention and
polling access schemes to extend the device lifetime. Simulation
studies are done for the investigation using a typical configuration
of the medical devices found in a hospital setting. It is found that
priority polling technique can give a combination of high lifetime
and a low latency. Various other results offer important insights
into the behaviour of these techniques under WBAN conditions.


---

## Body

## 1. Introduction

Wireless body area network (WBAN), based on IEEE 802.15.6 standard, is used for wireless communication of sensor nodes placed on or within the human body with an external coordinator. A typical WBAN configuration consists of a collection of medical devices and a coordinator that collects information from the devices and sends it to the remote unit for monitoring and assessment by the concerned health service personnel. WBAN can play an active role in providing health care for patients in hospital or at home by helping in the diagnosis of diseases, by providing quick responses to emergency conditions, and by constantly collecting and disseminating medical information of patients [1].Medical devices have energy constraints. Some implantable devices should run for years before their batteries requirements get exhausted. Also, medical applications have latency requirements that are typical of the services they are providing. ISO/IEEE 11073 specifies some classes of medical applications, their required data rates, and latencies [2]. Broadly, medical applications can be classified into low, medium, and high data rate categories. Data rate requirements of low data rate applications like blood saturation, blood pressure, heart rate, and temperature measurements are less than 10 kbps; those of medium data rate applications like EEG (12 leads) and motion sensor are less than 100 kbps and those of high data rate applications like EMG, audio, and video are greater than 100 kbps. The important challenges faced by WBAN are reliability, energy efficiency, and latency [3]. These QoS parameters that determine the performance of the network are influenced to a great extent by the type of medium access method that is used.In 802.15.6 standard the hub coordinates medium access by establishing one of the following three modes for WBAN. Mode 1 access has beacons with superframes and Mode 2 access has superframes without beacons, while Mode 3 access has neither frames nor beacons [4]. The access mechanisms used in each superframe period are of three categories: (i) contention access that uses either CSMA/CA or S-Aloha, (ii) improvised and unscheduled access (connectionless contention free) which uses polling/posting, and (iii) scheduled access (connection oriented contention free), also called 1-periodic or m-periodic allocations.Several works on medium access for WBAN have been reported recently. Throughput and delay limits of IEEE 802.15.6 are discussed in [5], where they are given as a function of payload size. Only one sender-receiver pair is considered, and therefore, no specific medium access control (MAC) scheme is involved. It is a deterministic analysis to assess the impact of physical and MAC layer overheads on the throughput and delay limits. A study on contention versus polling to investigate the impact of the unique WBAN channel characteristics on the trade-offs in the packet delivery versus latency versus consumed energy has been made in [6] using simulation. They do not address the effectiveness of these MAC methods in meeting the QoS requirements of heterogeneous traffic and the lifetimes of the devices/network. The performance of WBAN with beacon mode and superframes and CSMA/CA as the random access method has been done in [7]. This is a simulation study to evaluate the impact of different channel models on the performance of WBAN with the same user priority for all nodes.Energy analysis of IEEE 802.15.6 in scheduled access mode was done for superframes with beacon mode in [8], where an analytical model for finding out the device lifetime is given. The same authors [9] have done an extensive analysis using integer programming to find out the lifetime of applications mentioned in ISO/IEEE 11073 using Type I scheduled access. Their analysis does not give cases where applications of different types are run as a WBAN setup. A flexible polling-based access scheme is proposed in [10] for WBAN with QoS capability that switches from cyclic polling to a priority polling when the nodes need more data acquistion in an emergency situation. They obtain transfer delay for regular and emergency modes using classical results available on polling. The study does not give the lifetime of medical applications when polling access is used.A polling access mechanism is used in [11] where nodes with different traffic types are used to study the variation of packet losses and queueing sizes with respect to buffer sizes. Their study concludes that a big buffer size is not necessary for lossless transmission of packets and a restrictive method of transmitting required packets saves energy. Their study does not give the lifetimes of the nodes. Authors [12] show that the performance of polling mechanism in baseline BAN MAC can be improved by sending the polling message within the ACK packet. Energy scavenging as a means to mitigate the problems arising from limited battery capacities of body sensor nodes is discussed in [13] where a combination of polling and probabilistic contention is used for random access. Their work uses the same data rates for all nodes and focuses on the energy harvesting results rather than the performance of the medium access protocol.In this paper, the CSMA/CA based random access scheme and the connectionless contention free access scheme using polling, as specified in IEEE 802.15.6 standard, are investigated to assess their effectiveness in meeting the latency and lifetime constraints of WBAN. Simulation studies are done using Castalia simulator [14] for a typical configuration of the medical devices with different priority data, as found in a hospital setting. We propose sleeping mechanisms for both contention and polling access schemes for extending the device lifetime (Algorithm 1). The priority contention scheme and priority polling scheme with the proposed sleeping mechanisms are then evaluated for their comparitive performance in terms of packet latency and energy efficiency.Algorithm 1:
Algorithm for the sleeping mechanism of node i.
Initialize:P
0
=
{
N
}
for  k
≔
1
,
…
,
7
P
k
≔
P
k
-
1
∪
{
N
-
k
}
for  m
≔
4
,
…
,
∞
for  j
≔
1
,
…
,
N
if  s
j
∈
P
K
sleepTime(i, s
j, c
m) = (1 − g) * sleepTime(i, s
j, c
m
-
1)
+g * ActualSleepTime(i, s
j, c
m
-
1) 0 ≤ g ≤ 1
t
′
≔
t
^ + sleepTime(i, s
j, c
m)
if (1
≤
j
≤
N
-
1)
s
w = s
j
+
1
else if (j == N)
s
w = s
N
-
K
if  t
′
≤
t
hub
hub sends  EPOLL immediately
else
hub waits for t
′ − t
hub for sending EPOLL
neglecting state transition times.The rest of the paper is organized as follows: Section2 describes the MAC techniques investigated in this paper which include the basic schemes proposed in 802.15.6 standard as well as their extensions newly proposed in this paper so as to extend the device lifetimes and to support QoS traffic. Section 3 presents the simulations performed and discussion of the results obtained. Section 4 concludes the paper.


## 2. MAC Techniques for WBAN

The IEEE 802.15.6 standard specifies one-hop star and two-hop restricted tree topologies. In the one-hop topology, frames are exchanged between nodes and hub, while in the two-hop restricted tree, hub and nodes may use a relay node to exchange frames. In this paper, we consider the one-hop topology. Each node stands for a medical device which can be a sensor device that transmits the measured data to the hub.We consider CSMA/CA based random access in Mode 1 (superframe with beacon) and the contention free access using polling in Mode 3 (nonbeacon mode without superframe), as specified in IEEE 802.15.6 standard. We then propose sleeping mechanisms for both contention and polling access schemes for extending the device lifetime.


### 2.1. Superframe with Beacon Access

The superframe structure is as shown in Figure1. The superframe is divided into exclusive access phase (EAP), random access phase (RAP), Type I/II access phases, and contention access phase (CAP). EAP is accesssed by Priority 7 frames, while RAP can be accessed by frames of all priorities. The standard allows setting access phases other than RAP1 to zero. Type I/II access phases can use polling or scheduled access. All access phases other than EAP and RAP are set to zero. A beacon is broadcasted by the hub to all nodes at the beginning of each superframe. The basic access mode of CSMA/CA (i.e.; no RTS-CTS) is used.Figure 1
Superframe structure of 802.15.6 standard.The nodes are given user priorities (UP’s) ranging from 7 to 0, where 7 denotes the highest user priority and 0 the lowest user priority (see Table1). This data has been taken from [15]. Each priority is associated with a characteristic contention window range shown in Table 2.Table 1
Nodes and their parameters (UP: user priority, NN: number of nodes, PR: packet rate, PS: payload size (bytes)).
UP
Node
NN
PR
PS
7
ECG
1
2 p/s
150 B
7
EEG
1
2 p/s
150 B
6
ECG
2
2 p/s
150 B
6
Blood pressure
1
2 p/s
150 B
5
EEG
3
2 p/s
150 B
4
Glucose
1
1 p/s
50 B
4
Oxygen saturation
1
1 p/s
50 B
4
Physical activity
4
1 p/s
50 B
3
EMG
2
4 p/s
500 B
2
Temperature
1
0.25 p/s
20 B
2
Respiration rate
1
0.25 p/s
20 B
1
ECG
5
0.5 p/s
600 B
0
EEG
8
0.5 p/s
600 BTable 2
WBAN traffic and priorities.
UP
C
W
min
⁡
C
W
max
⁡
Traffic
0
16
64
Background
1
16
32
Best effort
2
8
32
Excellent
3
8
16
Video
4
4
16
Voice
5
4
8
Medical data
6
2
8
High priority medical data
7
1
4
Emergency reportDuring the start of a frame transmission by a node, a backoff counter is set with a value that is randomly chosen from the contention window[
1
,
CW
min
⁡
] depending on the priority of the node. When the counter value becomes zero, frame is transmitted. If a collision occurs the node goes to the next backoff stage with a new contention window, where the upper limit of the contention window is chosen as per the following rule.For theith backoff stage,CW
i
=
CW
min
⁡, i
=
0,
CW
i
=
min
⁡
2
*
CW
i
-
1
,
CW
max
⁡, 2
≤
i
≤
B and for even values of i,
CW
i
=
CW
i
-
1, 1
≤
i
≤
B  and for odd values of i,where CW
0
=
CW
min
⁡. B is the maximum backoff stage possible after which the frame is dropped. During each backoff stage, the medium is sensed and the counter is decremented if the medium is idle. The counter is frozen, if the medium is busy due to transmission or if there is not sufficient time for the current frame transmission to finish before the end of the current access phase.The superframe structure is defined by the following relations.T
SF
=
N
slots
*
T
slot.
T
slot
=
(
A
l
l
o
c
a
t
i
o
n
S
l
o
t
M
i
n
i
m
u
m
+
L
*
A
l
l
o
c
a
t
i
o
n
S
l
o
t
R
e
s
o
l
u
t
i
o
n
).
T
SF
=
superframe
duration.
N
slots
=
number
of
slots
in
a
superframe.
T
slots
=
duration
of
a
slot.
A
l
l
o
c
a
t
i
o
n
S
l
o
t
R
e
s
o
l
u
t
i
o
n
=
1
ms
(
narrowband
physical
layer
).
A
l
l
o
c
a
t
i
o
n
S
l
o
t
M
i
n
i
m
u
m
(
minimum
slot
duration
) = 1
ms
(
narrowband
physical
layer
).
L
=
number
between
0
and
255.Hence slot duration can vary from 1 ms to 256 ms. N
slots can vary from 1 to 256.


#### 2.1.1. Energy Analysis for CSMA/CA Access

To find the device lifetime with contention access, we provide a simple analysis of energy consumption of a node. We consider the energy consumption, while the tagged node is in backoff, is experiencing collisions, and is successfully transmitting. Accordingly, we define several parameters first.LetT
S
B = average backoff time for a packet successfully transmitted,
T
C = average collision time,
T
T
X = average time to transmit a packet,
T
D = average time for a packet to be dropped,
T
D
B = average backoff time for a packet dropped,
N
C = average number of collisions for a packet succesfully transmitted,
p
d = probability that a packet is dropped,
p
s = probabilty that a packet is succesfully transmitted,
E
D = average energy consumed by a node due to a packet dropped,
E
D
B = average energy consumed during backoff for a packet dropped,
E
D
C = average energy consumed due to collision for a packet dropped,
E
S = average energy consumed during successful transmission of packet,
R = maximum number of retransmissions of a packet,
E
S
B = average energy comsumed during backoff for a successful transmission,
E
S
C = average energy consumed during collision for a successful transmission,
E
T
X = average energy consumed when transmitting a packet,
T
S = average service time = time interval from beginning of backoff to successful transmission of a packet =
T
S
B
+
T
C
*
N
C
+
T
T
X.The various energy consumption can be specified in terms of the corresponding time durations defined above and the power levels specified in Table 5. E
D
B
=
P
I
D
L
E
*
T
D
B.
E
D
C
=
(
R
+
1
)
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
D
=
E
D
B
+
E
D
C.
E
S
B
=
P
I
D
L
E
*
T
S
B.
E
S
C
=
N
C
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
T
X
=
T
T
X
*
P
T
X.
E
S
=
E
S
B
+
E
S
C
+
E
T
X.
E
B
=
initial
energy
of
battery.
T
node = LifeTime of a node = (energy of battery/average energy consumed per packet successfully transmitted or dropped) * (average time for a packet to be successfully transmitted or dropped) = E
B
*
(
p
s
*
T
S
+
p
d
*
T
D
)
/
(
p
s
*
E
S
+
p
d
*
E
D
).


### 2.2. Superframe with Beacon Access and Nodes Sleeping

The packet arrival process will cause time intervals where the buffer holding the arriving packets could be empty. If the radio receiver is powered off during these periods there can be savings in energy consumption. The switching off and on of the radio receiver can be done by predicting the interarrival times of the packets, provided the interarrival time is greater than the state transition times. This method will have a softening effect on the latency values, but it can increase the energy consumption by the frequent transitions from the on to off state and vice versa. Therefore, we propose a sleep schedule in which a predefined limit on the buffer occupancy given byb
limit determines the time at which a node’s transceiver should go from the off state to on state. The node wakes up when the number of packets in the buffer equals or exceeds b
limit. Thereafter, the node transmits packets till the buffer becomes empty. When the buffer becomes empty the transceiver goes to sleep.


### 2.3. Medium Access with Polling

The polling process begins with the nodes getting connected to the hub. The hub sends a polling packet to the node that is being polled. The node that receives the polling packet transmits data packets stored in its buffer according to the type of polling service implemented, which is exhaustive in our case. When the transmission of data is over, the polled node sends a poll finish packet to the hub. The hub on receiving the packet starts polling the next consecutive node in the cycle and the process is repeated. If no packets are present in a node’s buffer, the hub switches the poll to the next node immediately. In exhaustive polling service [16], all packets present in the node from the beginning of poll and packets that arrive while polling takes place will be transmitted. After the last node in the network is polled, the cycle starts again with the predetermined sequence of polling.The Following Assumptions Are Used for the Polling Process. (i) Energy consumption in each node takes place in the transceiver only. (ii) The polling process stops if the battery of one or more nodes becomes depleted or if a node fails. (iii) No acknowledgements are used during the polling process.EPOLL and EPOLLFINISH are the two control packets used by the hub and node, respectively. When a node receives EPOLL packet from the hub, it starts transmitting packets from its buffer. After transmitting packets, the node transmits EPOLLFINISH packet to the hub informing that its transmission is over. After polling one node there is a switch over time after which the hub polls the next node. This switchover time is the time interval from the moment an EPOLLFINISH packet is sent by a node after transmitting packets and the moment an EPOLL packet sent by the hub reaches the next node.Priority in Polling. The priority hierarchy of the nodes is implemented by varying the polling frequency of the nodes. Each cycle consists of a collection of subcyles in which nodes are polled with increasing frequency according to their priorities in each subcycle. With all the eight user priorities shown in Table 1, the sequence of subcycles is formed as shown below where the priorities of nodes are given:1st subcycle: 7
2nd subcycle: 7 6
3rd subcycle: 7 6 5
4th subcycle: 7 6 5 4
5th subcycle: 7 6 5 4 3
6th subcycle: 7 6 5 4 3 2
7th subcycle: 7 6 5 4 3 2 1
8th subcycle: 7 6 5 4 3 2 1 0At the end of subcycle 1, when the last node among those of UP7 sends EPOLLFINISH packet to hub, the latter sends EPOLL packet to node 1 in the beginning of the second subcycle. This process continues for each subcycle and finally at the end of the cycle, that is, at the end of eighth subcycle the last node among those of UP0 sends EPOLLFINISH to hub. The cycle again starts with hub sending EPOLL packet to node 1.


### 2.4. Medium Access with Polling and Nodes Sleeping

#### 2.4.1. Brief Explanation of the Sleeping Mechanism

Each node in the network sleeps most of its lifetime. A node wakes up only to transmit packets. As soon as a node finishes transmitting packets, it starts sleeping again. The time at which a packet wakes up is determined by the hub. The hub sends a poll packet to a node according to the poll schedule stored in the hub. Ideally, a node need wake up just at the moment it should receive the poll packet from the hub. If the node wakes up earlier, it will have to stay awake to receive the poll packet from the hub causing unwanted energy losses. If the node wakes up after the poll packet is sent by the hub, the poll packet will be lost and the polling mechanism fails. The hub has to ensure that the node receives the poll packet. The hub therefore sets a sleeping time for each node after the transmission of the packets. The node should sleep for the time specified by the hub after which it wakes up at the right moment to receive the poll packet. However, due to variations in times for which packets are transmitted and because of clock synchronization problems, the node may wake up before or after the stipulated time for sending the poll packet by the hub. This calls for corrective action. The hub tries to predict the future sleeping time of a node from the past predicted value and the current sleeping time or an exponential moving average method is used. The smoothing coefficient can then be tuned so that energy consumption by the nodes is minimum. An earlier waking up does not jeopardize the polling process, but a late waking up has to be taken care of by the hub by delaying the transmission of the poll packet.Our aim is to create a mechanism whereby a sleeping node wakes up to receive the EPOLL packet from the hub at the right moment so that it can begin transmitting packets. An earlier wakeup will decrease the lifetime of the node, while a dealyed wakeup will increase the latency.Figure2 shows the subcycles and cycles of the polling model at some arbitrary time after the first two cycles, where polling is assumed to start at time t
=
0. During the first two cycles all nodes are awake. The initial sleep times of nodes are estimated from the first two cycles. The nodes start sleeping and waking up from the third cycle onwards. Let us consider node i
=
2 of Priority 7 in subcycle 1 of cycle c. Node 2 wakes up, transmits packets, and then sleeps during subcycles 1,2
,
3
,
…
,
8. This process is repeated again in cycle c
+
1. Consider the following.i = arbitrary node of priority K where K
∈
{
0,1
,
2
,
…
,
7
}.
N = number of subcycles in a cycle.
s
j
=
jth subcycle.
c
m
=
mth cycle.
P
k = set of subcycles in a cycle a node of priority k is part of.
t
^ = time at which node i starts sleeping in mth cycle, jth subcycle.
t
′ = wakeup time of node i.
s
w = subcycle in which node i wakes up.
t
hub = time at which hub computes new sleep time of node i to be sent via EPOLL packet.
sleepTime = duration of sleep time.
ActualSleepTime = ideal sleep duration.Figure 2
Polling schematic with nodes sleeping.Computation of Sleep Time. Figure 2 shows node i
-
1
=
1 transmitting its packets in subcycle s of cycle c when it receives EPOLL packet from the hub and then sending EPOLLFINISH packet to the hub after transmitting its packets. Hub processes EPOLLFINISH packet and then determines the sleep time of node 2 using moving averages. This sleep time is encapsulated in the EPOLL packet sent by the hub to node 2, which is then extracted by node 2 to find the duration for which it can sleep till it wakes up in the s
+
1 subcycle. The waking up of nodes in consecutive subcycles will not occur for all nodes. For example, the last node in UP0 after sleeping in a cycle wakes up only in the seventh subcycle of the next cycle.It is to be noted that the hub computes the sleep time of each node with reference to its clock. When the time for sending EPOLL packet to a waking node arrives, the hub checks the sleep time of the impending waking node against its clock. If the node has already awakened, hub sends EPOLL packet immediately, or else, it calculates the time it should wait for the node to wake up for sending the EPOLL.Again referring to Figure2, during subcycles, node 2 transmits packets and sleeps. In subcycle s
+
1, node 1 after transmitting data packets sends EPOLLFINISH to hub. Let t
′ be the time when the hub receives EPOLLFINISH packet from node 1. Hub estimates the next sleeping time for node 2 in subcycles of cycle c
+
1 by using the following equation:
(1)
N
e
w
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
=
1
-
g
*
O
l
d
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
+
g
*
A
c
t
u
a
l
S
l
e
e
p
T
i
m
e
.
OldEstimateOfSleepTime is the current sleeping time of node 2 during subcycles of cyclec.ActualSleepTime is sleeping time node 2 could have ideally made. This is determined by finding out the time the node starts sleeping with respect to time t
′. The new sleep time for node 2 in subcycles of cycle c
+
1 is found out. If node 2 actually wakes up before t
′, hub can send the EPOLL packet with the new sleeping time to node 2. Otherwise, the hub will have to wait till node 2 wakes up for sending the EPOLL packet to node 2 with the new sleep time encapsulated within the EPOLL packet for node 2.Optimum Value of
g. Given a configuration of nodes, its data rates, and type of traffic, it would be worthwhile to find the value of the smoothing coefficient g that results in the highest lifetimes for the nodes. The basic mechanism that is being used in this particular polling method causes the devices to sleep when they are not transmitting packets and wakes them up when the device’s turn comes up for transmitting packets. The sleeping time should be optimum for each device in order that the lifetime of the device is maximized. In each cycle, we can assume that each node belongs to a phase j, where the value of j is determined by the priority of the node. For example, the highest priority nodes with priority 7 can belong to phases 0 to 7, the lowest priority nodes can have only phase 0, and the intermediate priority nodes can have a proportionate number of phases. The sleeping time of a node during phase j in each cycle is estimated from its sleeptime in the previous cycle using the exponential weighted moving average. The smoothing coefficient has an optimum value for each each node and each phase. To find out this value we use least squares method.Figure3 shows the sleepTimes and estimated sleepTimes for the t
-
1 and tth cycles during phase j for a node. E
(
t
) and E
(
t
-
1
) are the estimated sleepTimes at t and t
-
1th cycles. Sp
(
t
) and Sp
(
t
-
1
) are the sleepTimes at t and t
-
1th cycles. Using exponential weighted moving average we can write
(2)
E
t
=
1
-
g
*
E
t
-
1
+
g
*
Sp
t
-
1
.Figure 3
Sleep times during phasej.Using least squares method we require that(3)
S
(
g
)
=
∑
t
=
m
n
Sp
t
-
E
t
2
should be a minimum. This condition necessitates that
(4)
∂
S
(
g
)
∂
g
=
0
.Solving that we get(5)
g
opt
=
∑
t
=
m
n
‍
E
t
-
1
2
-
Sp
t
*
E
t
-
1
+
Sp
t
Sp
t
-
1
∑
t
=
m
n
‍
Sp
t
-
1
-
E
t
-
1
2
.Hence by recording the measurements over a number of cycles we can find the optimum valueg
opt that produces the maximum lifetimes for each node and each phase.Energy Analysis for Polling Access.To find the device lifetime with polling access, we compute the average energy consumed by a node per polling cycle.Let us consider the following.t
DATA = time to transmit a data packet.
t
EPOLL = time to transmit EPOLL packet.
t
EPOLLFINISH = time to transmit EPOLLFINISH packet.
N
PKTS = average number of packets transmitted during a subcycle time.
N
SUBCYCLE = number of subcycles a node participates.
t
VISIT = remaining intervisit time in the subcycle.
E
SUBCYCLE = energy consumed by node during a subcycle E
SUBCYCLE
=
P
R
X
*
t
EPOLL
+
P
R
X
-
T
X
*
t
R
X
-
T
X + t
DATA
*
N
PKTS
*
P
T
X + P
T
X
*
t
EPOLLFINISH
+
P
T
X
-
SLEEP
*
t
T
X
-
SLEEP + P
SLEEP
*
t
VISIT
+
P
SLEEP
-
R
X
*
t
SLEEP
-
R
X.
Energy consumed by a node during a cycle =E
SUBCYCLE
*
N
SUBCYCLE.
Lifetime of a node = (energy of battery/average energy consumed per cycle)* average cycle time.


## 2.1. Superframe with Beacon Access

The superframe structure is as shown in Figure1. The superframe is divided into exclusive access phase (EAP), random access phase (RAP), Type I/II access phases, and contention access phase (CAP). EAP is accesssed by Priority 7 frames, while RAP can be accessed by frames of all priorities. The standard allows setting access phases other than RAP1 to zero. Type I/II access phases can use polling or scheduled access. All access phases other than EAP and RAP are set to zero. A beacon is broadcasted by the hub to all nodes at the beginning of each superframe. The basic access mode of CSMA/CA (i.e.; no RTS-CTS) is used.Figure 1
Superframe structure of 802.15.6 standard.The nodes are given user priorities (UP’s) ranging from 7 to 0, where 7 denotes the highest user priority and 0 the lowest user priority (see Table1). This data has been taken from [15]. Each priority is associated with a characteristic contention window range shown in Table 2.Table 1
Nodes and their parameters (UP: user priority, NN: number of nodes, PR: packet rate, PS: payload size (bytes)).
UP
Node
NN
PR
PS
7
ECG
1
2 p/s
150 B
7
EEG
1
2 p/s
150 B
6
ECG
2
2 p/s
150 B
6
Blood pressure
1
2 p/s
150 B
5
EEG
3
2 p/s
150 B
4
Glucose
1
1 p/s
50 B
4
Oxygen saturation
1
1 p/s
50 B
4
Physical activity
4
1 p/s
50 B
3
EMG
2
4 p/s
500 B
2
Temperature
1
0.25 p/s
20 B
2
Respiration rate
1
0.25 p/s
20 B
1
ECG
5
0.5 p/s
600 B
0
EEG
8
0.5 p/s
600 BTable 2
WBAN traffic and priorities.
UP
C
W
min
⁡
C
W
max
⁡
Traffic
0
16
64
Background
1
16
32
Best effort
2
8
32
Excellent
3
8
16
Video
4
4
16
Voice
5
4
8
Medical data
6
2
8
High priority medical data
7
1
4
Emergency reportDuring the start of a frame transmission by a node, a backoff counter is set with a value that is randomly chosen from the contention window[
1
,
CW
min
⁡
] depending on the priority of the node. When the counter value becomes zero, frame is transmitted. If a collision occurs the node goes to the next backoff stage with a new contention window, where the upper limit of the contention window is chosen as per the following rule.For theith backoff stage,CW
i
=
CW
min
⁡, i
=
0,
CW
i
=
min
⁡
2
*
CW
i
-
1
,
CW
max
⁡, 2
≤
i
≤
B and for even values of i,
CW
i
=
CW
i
-
1, 1
≤
i
≤
B  and for odd values of i,where CW
0
=
CW
min
⁡. B is the maximum backoff stage possible after which the frame is dropped. During each backoff stage, the medium is sensed and the counter is decremented if the medium is idle. The counter is frozen, if the medium is busy due to transmission or if there is not sufficient time for the current frame transmission to finish before the end of the current access phase.The superframe structure is defined by the following relations.T
SF
=
N
slots
*
T
slot.
T
slot
=
(
A
l
l
o
c
a
t
i
o
n
S
l
o
t
M
i
n
i
m
u
m
+
L
*
A
l
l
o
c
a
t
i
o
n
S
l
o
t
R
e
s
o
l
u
t
i
o
n
).
T
SF
=
superframe
duration.
N
slots
=
number
of
slots
in
a
superframe.
T
slots
=
duration
of
a
slot.
A
l
l
o
c
a
t
i
o
n
S
l
o
t
R
e
s
o
l
u
t
i
o
n
=
1
ms
(
narrowband
physical
layer
).
A
l
l
o
c
a
t
i
o
n
S
l
o
t
M
i
n
i
m
u
m
(
minimum
slot
duration
) = 1
ms
(
narrowband
physical
layer
).
L
=
number
between
0
and
255.Hence slot duration can vary from 1 ms to 256 ms. N
slots can vary from 1 to 256.


### 2.1.1. Energy Analysis for CSMA/CA Access

To find the device lifetime with contention access, we provide a simple analysis of energy consumption of a node. We consider the energy consumption, while the tagged node is in backoff, is experiencing collisions, and is successfully transmitting. Accordingly, we define several parameters first.LetT
S
B = average backoff time for a packet successfully transmitted,
T
C = average collision time,
T
T
X = average time to transmit a packet,
T
D = average time for a packet to be dropped,
T
D
B = average backoff time for a packet dropped,
N
C = average number of collisions for a packet succesfully transmitted,
p
d = probability that a packet is dropped,
p
s = probabilty that a packet is succesfully transmitted,
E
D = average energy consumed by a node due to a packet dropped,
E
D
B = average energy consumed during backoff for a packet dropped,
E
D
C = average energy consumed due to collision for a packet dropped,
E
S = average energy consumed during successful transmission of packet,
R = maximum number of retransmissions of a packet,
E
S
B = average energy comsumed during backoff for a successful transmission,
E
S
C = average energy consumed during collision for a successful transmission,
E
T
X = average energy consumed when transmitting a packet,
T
S = average service time = time interval from beginning of backoff to successful transmission of a packet =
T
S
B
+
T
C
*
N
C
+
T
T
X.The various energy consumption can be specified in terms of the corresponding time durations defined above and the power levels specified in Table 5. E
D
B
=
P
I
D
L
E
*
T
D
B.
E
D
C
=
(
R
+
1
)
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
D
=
E
D
B
+
E
D
C.
E
S
B
=
P
I
D
L
E
*
T
S
B.
E
S
C
=
N
C
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
T
X
=
T
T
X
*
P
T
X.
E
S
=
E
S
B
+
E
S
C
+
E
T
X.
E
B
=
initial
energy
of
battery.
T
node = LifeTime of a node = (energy of battery/average energy consumed per packet successfully transmitted or dropped) * (average time for a packet to be successfully transmitted or dropped) = E
B
*
(
p
s
*
T
S
+
p
d
*
T
D
)
/
(
p
s
*
E
S
+
p
d
*
E
D
).


## 2.1.1. Energy Analysis for CSMA/CA Access

To find the device lifetime with contention access, we provide a simple analysis of energy consumption of a node. We consider the energy consumption, while the tagged node is in backoff, is experiencing collisions, and is successfully transmitting. Accordingly, we define several parameters first.LetT
S
B = average backoff time for a packet successfully transmitted,
T
C = average collision time,
T
T
X = average time to transmit a packet,
T
D = average time for a packet to be dropped,
T
D
B = average backoff time for a packet dropped,
N
C = average number of collisions for a packet succesfully transmitted,
p
d = probability that a packet is dropped,
p
s = probabilty that a packet is succesfully transmitted,
E
D = average energy consumed by a node due to a packet dropped,
E
D
B = average energy consumed during backoff for a packet dropped,
E
D
C = average energy consumed due to collision for a packet dropped,
E
S = average energy consumed during successful transmission of packet,
R = maximum number of retransmissions of a packet,
E
S
B = average energy comsumed during backoff for a successful transmission,
E
S
C = average energy consumed during collision for a successful transmission,
E
T
X = average energy consumed when transmitting a packet,
T
S = average service time = time interval from beginning of backoff to successful transmission of a packet =
T
S
B
+
T
C
*
N
C
+
T
T
X.The various energy consumption can be specified in terms of the corresponding time durations defined above and the power levels specified in Table 5. E
D
B
=
P
I
D
L
E
*
T
D
B.
E
D
C
=
(
R
+
1
)
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
D
=
E
D
B
+
E
D
C.
E
S
B
=
P
I
D
L
E
*
T
S
B.
E
S
C
=
N
C
*
[
P
R
X
-
T
X
*
t
R
X
-
T
X
+
T
C
*
P
T
X
+
P
T
X
-
R
X
*
t
T
X
-
R
X
].
E
T
X
=
T
T
X
*
P
T
X.
E
S
=
E
S
B
+
E
S
C
+
E
T
X.
E
B
=
initial
energy
of
battery.
T
node = LifeTime of a node = (energy of battery/average energy consumed per packet successfully transmitted or dropped) * (average time for a packet to be successfully transmitted or dropped) = E
B
*
(
p
s
*
T
S
+
p
d
*
T
D
)
/
(
p
s
*
E
S
+
p
d
*
E
D
).


## 2.2. Superframe with Beacon Access and Nodes Sleeping

The packet arrival process will cause time intervals where the buffer holding the arriving packets could be empty. If the radio receiver is powered off during these periods there can be savings in energy consumption. The switching off and on of the radio receiver can be done by predicting the interarrival times of the packets, provided the interarrival time is greater than the state transition times. This method will have a softening effect on the latency values, but it can increase the energy consumption by the frequent transitions from the on to off state and vice versa. Therefore, we propose a sleep schedule in which a predefined limit on the buffer occupancy given byb
limit determines the time at which a node’s transceiver should go from the off state to on state. The node wakes up when the number of packets in the buffer equals or exceeds b
limit. Thereafter, the node transmits packets till the buffer becomes empty. When the buffer becomes empty the transceiver goes to sleep.


## 2.3. Medium Access with Polling

The polling process begins with the nodes getting connected to the hub. The hub sends a polling packet to the node that is being polled. The node that receives the polling packet transmits data packets stored in its buffer according to the type of polling service implemented, which is exhaustive in our case. When the transmission of data is over, the polled node sends a poll finish packet to the hub. The hub on receiving the packet starts polling the next consecutive node in the cycle and the process is repeated. If no packets are present in a node’s buffer, the hub switches the poll to the next node immediately. In exhaustive polling service [16], all packets present in the node from the beginning of poll and packets that arrive while polling takes place will be transmitted. After the last node in the network is polled, the cycle starts again with the predetermined sequence of polling.The Following Assumptions Are Used for the Polling Process. (i) Energy consumption in each node takes place in the transceiver only. (ii) The polling process stops if the battery of one or more nodes becomes depleted or if a node fails. (iii) No acknowledgements are used during the polling process.EPOLL and EPOLLFINISH are the two control packets used by the hub and node, respectively. When a node receives EPOLL packet from the hub, it starts transmitting packets from its buffer. After transmitting packets, the node transmits EPOLLFINISH packet to the hub informing that its transmission is over. After polling one node there is a switch over time after which the hub polls the next node. This switchover time is the time interval from the moment an EPOLLFINISH packet is sent by a node after transmitting packets and the moment an EPOLL packet sent by the hub reaches the next node.Priority in Polling. The priority hierarchy of the nodes is implemented by varying the polling frequency of the nodes. Each cycle consists of a collection of subcyles in which nodes are polled with increasing frequency according to their priorities in each subcycle. With all the eight user priorities shown in Table 1, the sequence of subcycles is formed as shown below where the priorities of nodes are given:1st subcycle: 7
2nd subcycle: 7 6
3rd subcycle: 7 6 5
4th subcycle: 7 6 5 4
5th subcycle: 7 6 5 4 3
6th subcycle: 7 6 5 4 3 2
7th subcycle: 7 6 5 4 3 2 1
8th subcycle: 7 6 5 4 3 2 1 0At the end of subcycle 1, when the last node among those of UP7 sends EPOLLFINISH packet to hub, the latter sends EPOLL packet to node 1 in the beginning of the second subcycle. This process continues for each subcycle and finally at the end of the cycle, that is, at the end of eighth subcycle the last node among those of UP0 sends EPOLLFINISH to hub. The cycle again starts with hub sending EPOLL packet to node 1.


## 2.4. Medium Access with Polling and Nodes Sleeping

### 2.4.1. Brief Explanation of the Sleeping Mechanism

Each node in the network sleeps most of its lifetime. A node wakes up only to transmit packets. As soon as a node finishes transmitting packets, it starts sleeping again. The time at which a packet wakes up is determined by the hub. The hub sends a poll packet to a node according to the poll schedule stored in the hub. Ideally, a node need wake up just at the moment it should receive the poll packet from the hub. If the node wakes up earlier, it will have to stay awake to receive the poll packet from the hub causing unwanted energy losses. If the node wakes up after the poll packet is sent by the hub, the poll packet will be lost and the polling mechanism fails. The hub has to ensure that the node receives the poll packet. The hub therefore sets a sleeping time for each node after the transmission of the packets. The node should sleep for the time specified by the hub after which it wakes up at the right moment to receive the poll packet. However, due to variations in times for which packets are transmitted and because of clock synchronization problems, the node may wake up before or after the stipulated time for sending the poll packet by the hub. This calls for corrective action. The hub tries to predict the future sleeping time of a node from the past predicted value and the current sleeping time or an exponential moving average method is used. The smoothing coefficient can then be tuned so that energy consumption by the nodes is minimum. An earlier waking up does not jeopardize the polling process, but a late waking up has to be taken care of by the hub by delaying the transmission of the poll packet.Our aim is to create a mechanism whereby a sleeping node wakes up to receive the EPOLL packet from the hub at the right moment so that it can begin transmitting packets. An earlier wakeup will decrease the lifetime of the node, while a dealyed wakeup will increase the latency.Figure2 shows the subcycles and cycles of the polling model at some arbitrary time after the first two cycles, where polling is assumed to start at time t
=
0. During the first two cycles all nodes are awake. The initial sleep times of nodes are estimated from the first two cycles. The nodes start sleeping and waking up from the third cycle onwards. Let us consider node i
=
2 of Priority 7 in subcycle 1 of cycle c. Node 2 wakes up, transmits packets, and then sleeps during subcycles 1,2
,
3
,
…
,
8. This process is repeated again in cycle c
+
1. Consider the following.i = arbitrary node of priority K where K
∈
{
0,1
,
2
,
…
,
7
}.
N = number of subcycles in a cycle.
s
j
=
jth subcycle.
c
m
=
mth cycle.
P
k = set of subcycles in a cycle a node of priority k is part of.
t
^ = time at which node i starts sleeping in mth cycle, jth subcycle.
t
′ = wakeup time of node i.
s
w = subcycle in which node i wakes up.
t
hub = time at which hub computes new sleep time of node i to be sent via EPOLL packet.
sleepTime = duration of sleep time.
ActualSleepTime = ideal sleep duration.Figure 2
Polling schematic with nodes sleeping.Computation of Sleep Time. Figure 2 shows node i
-
1
=
1 transmitting its packets in subcycle s of cycle c when it receives EPOLL packet from the hub and then sending EPOLLFINISH packet to the hub after transmitting its packets. Hub processes EPOLLFINISH packet and then determines the sleep time of node 2 using moving averages. This sleep time is encapsulated in the EPOLL packet sent by the hub to node 2, which is then extracted by node 2 to find the duration for which it can sleep till it wakes up in the s
+
1 subcycle. The waking up of nodes in consecutive subcycles will not occur for all nodes. For example, the last node in UP0 after sleeping in a cycle wakes up only in the seventh subcycle of the next cycle.It is to be noted that the hub computes the sleep time of each node with reference to its clock. When the time for sending EPOLL packet to a waking node arrives, the hub checks the sleep time of the impending waking node against its clock. If the node has already awakened, hub sends EPOLL packet immediately, or else, it calculates the time it should wait for the node to wake up for sending the EPOLL.Again referring to Figure2, during subcycles, node 2 transmits packets and sleeps. In subcycle s
+
1, node 1 after transmitting data packets sends EPOLLFINISH to hub. Let t
′ be the time when the hub receives EPOLLFINISH packet from node 1. Hub estimates the next sleeping time for node 2 in subcycles of cycle c
+
1 by using the following equation:
(1)
N
e
w
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
=
1
-
g
*
O
l
d
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
+
g
*
A
c
t
u
a
l
S
l
e
e
p
T
i
m
e
.
OldEstimateOfSleepTime is the current sleeping time of node 2 during subcycles of cyclec.ActualSleepTime is sleeping time node 2 could have ideally made. This is determined by finding out the time the node starts sleeping with respect to time t
′. The new sleep time for node 2 in subcycles of cycle c
+
1 is found out. If node 2 actually wakes up before t
′, hub can send the EPOLL packet with the new sleeping time to node 2. Otherwise, the hub will have to wait till node 2 wakes up for sending the EPOLL packet to node 2 with the new sleep time encapsulated within the EPOLL packet for node 2.Optimum Value of
g. Given a configuration of nodes, its data rates, and type of traffic, it would be worthwhile to find the value of the smoothing coefficient g that results in the highest lifetimes for the nodes. The basic mechanism that is being used in this particular polling method causes the devices to sleep when they are not transmitting packets and wakes them up when the device’s turn comes up for transmitting packets. The sleeping time should be optimum for each device in order that the lifetime of the device is maximized. In each cycle, we can assume that each node belongs to a phase j, where the value of j is determined by the priority of the node. For example, the highest priority nodes with priority 7 can belong to phases 0 to 7, the lowest priority nodes can have only phase 0, and the intermediate priority nodes can have a proportionate number of phases. The sleeping time of a node during phase j in each cycle is estimated from its sleeptime in the previous cycle using the exponential weighted moving average. The smoothing coefficient has an optimum value for each each node and each phase. To find out this value we use least squares method.Figure3 shows the sleepTimes and estimated sleepTimes for the t
-
1 and tth cycles during phase j for a node. E
(
t
) and E
(
t
-
1
) are the estimated sleepTimes at t and t
-
1th cycles. Sp
(
t
) and Sp
(
t
-
1
) are the sleepTimes at t and t
-
1th cycles. Using exponential weighted moving average we can write
(2)
E
t
=
1
-
g
*
E
t
-
1
+
g
*
Sp
t
-
1
.Figure 3
Sleep times during phasej.Using least squares method we require that(3)
S
(
g
)
=
∑
t
=
m
n
Sp
t
-
E
t
2
should be a minimum. This condition necessitates that
(4)
∂
S
(
g
)
∂
g
=
0
.Solving that we get(5)
g
opt
=
∑
t
=
m
n
‍
E
t
-
1
2
-
Sp
t
*
E
t
-
1
+
Sp
t
Sp
t
-
1
∑
t
=
m
n
‍
Sp
t
-
1
-
E
t
-
1
2
.Hence by recording the measurements over a number of cycles we can find the optimum valueg
opt that produces the maximum lifetimes for each node and each phase.Energy Analysis for Polling Access.To find the device lifetime with polling access, we compute the average energy consumed by a node per polling cycle.Let us consider the following.t
DATA = time to transmit a data packet.
t
EPOLL = time to transmit EPOLL packet.
t
EPOLLFINISH = time to transmit EPOLLFINISH packet.
N
PKTS = average number of packets transmitted during a subcycle time.
N
SUBCYCLE = number of subcycles a node participates.
t
VISIT = remaining intervisit time in the subcycle.
E
SUBCYCLE = energy consumed by node during a subcycle E
SUBCYCLE
=
P
R
X
*
t
EPOLL
+
P
R
X
-
T
X
*
t
R
X
-
T
X + t
DATA
*
N
PKTS
*
P
T
X + P
T
X
*
t
EPOLLFINISH
+
P
T
X
-
SLEEP
*
t
T
X
-
SLEEP + P
SLEEP
*
t
VISIT
+
P
SLEEP
-
R
X
*
t
SLEEP
-
R
X.
Energy consumed by a node during a cycle =E
SUBCYCLE
*
N
SUBCYCLE.
Lifetime of a node = (energy of battery/average energy consumed per cycle)* average cycle time.


## 2.4.1. Brief Explanation of the Sleeping Mechanism

Each node in the network sleeps most of its lifetime. A node wakes up only to transmit packets. As soon as a node finishes transmitting packets, it starts sleeping again. The time at which a packet wakes up is determined by the hub. The hub sends a poll packet to a node according to the poll schedule stored in the hub. Ideally, a node need wake up just at the moment it should receive the poll packet from the hub. If the node wakes up earlier, it will have to stay awake to receive the poll packet from the hub causing unwanted energy losses. If the node wakes up after the poll packet is sent by the hub, the poll packet will be lost and the polling mechanism fails. The hub has to ensure that the node receives the poll packet. The hub therefore sets a sleeping time for each node after the transmission of the packets. The node should sleep for the time specified by the hub after which it wakes up at the right moment to receive the poll packet. However, due to variations in times for which packets are transmitted and because of clock synchronization problems, the node may wake up before or after the stipulated time for sending the poll packet by the hub. This calls for corrective action. The hub tries to predict the future sleeping time of a node from the past predicted value and the current sleeping time or an exponential moving average method is used. The smoothing coefficient can then be tuned so that energy consumption by the nodes is minimum. An earlier waking up does not jeopardize the polling process, but a late waking up has to be taken care of by the hub by delaying the transmission of the poll packet.Our aim is to create a mechanism whereby a sleeping node wakes up to receive the EPOLL packet from the hub at the right moment so that it can begin transmitting packets. An earlier wakeup will decrease the lifetime of the node, while a dealyed wakeup will increase the latency.Figure2 shows the subcycles and cycles of the polling model at some arbitrary time after the first two cycles, where polling is assumed to start at time t
=
0. During the first two cycles all nodes are awake. The initial sleep times of nodes are estimated from the first two cycles. The nodes start sleeping and waking up from the third cycle onwards. Let us consider node i
=
2 of Priority 7 in subcycle 1 of cycle c. Node 2 wakes up, transmits packets, and then sleeps during subcycles 1,2
,
3
,
…
,
8. This process is repeated again in cycle c
+
1. Consider the following.i = arbitrary node of priority K where K
∈
{
0,1
,
2
,
…
,
7
}.
N = number of subcycles in a cycle.
s
j
=
jth subcycle.
c
m
=
mth cycle.
P
k = set of subcycles in a cycle a node of priority k is part of.
t
^ = time at which node i starts sleeping in mth cycle, jth subcycle.
t
′ = wakeup time of node i.
s
w = subcycle in which node i wakes up.
t
hub = time at which hub computes new sleep time of node i to be sent via EPOLL packet.
sleepTime = duration of sleep time.
ActualSleepTime = ideal sleep duration.Figure 2
Polling schematic with nodes sleeping.Computation of Sleep Time. Figure 2 shows node i
-
1
=
1 transmitting its packets in subcycle s of cycle c when it receives EPOLL packet from the hub and then sending EPOLLFINISH packet to the hub after transmitting its packets. Hub processes EPOLLFINISH packet and then determines the sleep time of node 2 using moving averages. This sleep time is encapsulated in the EPOLL packet sent by the hub to node 2, which is then extracted by node 2 to find the duration for which it can sleep till it wakes up in the s
+
1 subcycle. The waking up of nodes in consecutive subcycles will not occur for all nodes. For example, the last node in UP0 after sleeping in a cycle wakes up only in the seventh subcycle of the next cycle.It is to be noted that the hub computes the sleep time of each node with reference to its clock. When the time for sending EPOLL packet to a waking node arrives, the hub checks the sleep time of the impending waking node against its clock. If the node has already awakened, hub sends EPOLL packet immediately, or else, it calculates the time it should wait for the node to wake up for sending the EPOLL.Again referring to Figure2, during subcycles, node 2 transmits packets and sleeps. In subcycle s
+
1, node 1 after transmitting data packets sends EPOLLFINISH to hub. Let t
′ be the time when the hub receives EPOLLFINISH packet from node 1. Hub estimates the next sleeping time for node 2 in subcycles of cycle c
+
1 by using the following equation:
(1)
N
e
w
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
=
1
-
g
*
O
l
d
E
s
t
i
m
a
t
e
O
f
S
l
e
e
p
T
i
m
e
+
g
*
A
c
t
u
a
l
S
l
e
e
p
T
i
m
e
.
OldEstimateOfSleepTime is the current sleeping time of node 2 during subcycles of cyclec.ActualSleepTime is sleeping time node 2 could have ideally made. This is determined by finding out the time the node starts sleeping with respect to time t
′. The new sleep time for node 2 in subcycles of cycle c
+
1 is found out. If node 2 actually wakes up before t
′, hub can send the EPOLL packet with the new sleeping time to node 2. Otherwise, the hub will have to wait till node 2 wakes up for sending the EPOLL packet to node 2 with the new sleep time encapsulated within the EPOLL packet for node 2.Optimum Value of
g. Given a configuration of nodes, its data rates, and type of traffic, it would be worthwhile to find the value of the smoothing coefficient g that results in the highest lifetimes for the nodes. The basic mechanism that is being used in this particular polling method causes the devices to sleep when they are not transmitting packets and wakes them up when the device’s turn comes up for transmitting packets. The sleeping time should be optimum for each device in order that the lifetime of the device is maximized. In each cycle, we can assume that each node belongs to a phase j, where the value of j is determined by the priority of the node. For example, the highest priority nodes with priority 7 can belong to phases 0 to 7, the lowest priority nodes can have only phase 0, and the intermediate priority nodes can have a proportionate number of phases. The sleeping time of a node during phase j in each cycle is estimated from its sleeptime in the previous cycle using the exponential weighted moving average. The smoothing coefficient has an optimum value for each each node and each phase. To find out this value we use least squares method.Figure3 shows the sleepTimes and estimated sleepTimes for the t
-
1 and tth cycles during phase j for a node. E
(
t
) and E
(
t
-
1
) are the estimated sleepTimes at t and t
-
1th cycles. Sp
(
t
) and Sp
(
t
-
1
) are the sleepTimes at t and t
-
1th cycles. Using exponential weighted moving average we can write
(2)
E
t
=
1
-
g
*
E
t
-
1
+
g
*
Sp
t
-
1
.Figure 3
Sleep times during phasej.Using least squares method we require that(3)
S
(
g
)
=
∑
t
=
m
n
Sp
t
-
E
t
2
should be a minimum. This condition necessitates that
(4)
∂
S
(
g
)
∂
g
=
0
.Solving that we get(5)
g
opt
=
∑
t
=
m
n
‍
E
t
-
1
2
-
Sp
t
*
E
t
-
1
+
Sp
t
Sp
t
-
1
∑
t
=
m
n
‍
Sp
t
-
1
-
E
t
-
1
2
.Hence by recording the measurements over a number of cycles we can find the optimum valueg
opt that produces the maximum lifetimes for each node and each phase.Energy Analysis for Polling Access.To find the device lifetime with polling access, we compute the average energy consumed by a node per polling cycle.Let us consider the following.t
DATA = time to transmit a data packet.
t
EPOLL = time to transmit EPOLL packet.
t
EPOLLFINISH = time to transmit EPOLLFINISH packet.
N
PKTS = average number of packets transmitted during a subcycle time.
N
SUBCYCLE = number of subcycles a node participates.
t
VISIT = remaining intervisit time in the subcycle.
E
SUBCYCLE = energy consumed by node during a subcycle E
SUBCYCLE
=
P
R
X
*
t
EPOLL
+
P
R
X
-
T
X
*
t
R
X
-
T
X + t
DATA
*
N
PKTS
*
P
T
X + P
T
X
*
t
EPOLLFINISH
+
P
T
X
-
SLEEP
*
t
T
X
-
SLEEP + P
SLEEP
*
t
VISIT
+
P
SLEEP
-
R
X
*
t
SLEEP
-
R
X.
Energy consumed by a node during a cycle =E
SUBCYCLE
*
N
SUBCYCLE.
Lifetime of a node = (energy of battery/average energy consumed per cycle)* average cycle time.


## 3. Simulation Results

### 3.1. Arrival of Packets

Data generation can be intermittent or periodic depending on the type of application. We are assuming a nonsaturation condition, with the arrival of packets following a Bernoulli process. Time is slotted and the probabilty of arrival of the packets during each slot determines the average data rate. Probability of arrival is varied, which in turn results in a change of the system load, thereby creating varying data rates.


### 3.2. System Configuration

The WBAN is made up of 32 nodes, with data rates and type of application given in Table1 and reported in [15]. Out of the 32 nodes used, one node behaves as the hub whose function is to collect information transmitted by the other nodes. The rest of the nodes monitor conditions of the heart and brain or measure vital physiological parameters like blood pressure, temperature, and glucose content in the blood. The nodes are placed on different parts of the body and slight movements of the body are taken into account by the channel model. The hub is assumed to be awake all the time. Hub can have a power supply more than it can be replenished without much difficulty.IEEE 802.15.6 specifies three different physical (PHY) layers, namely, narrow band (NB), ultra wide band (UWB), and human body communications (HBC). For this study, the NB PHY is considered, specifically, ISM 2.4 GHz.The model CM3 A, specified in the 802.15.6 standard, is taken as the channel model. The path loss is given by(6)
PL
d
=
PL
d
0
+
10
η
log
⁡
⁡
d
d
0
+
X
σ
,
where d is the distance between transmitter and receiver in metres, PL
(
d
0
) is known path loss at a reference distance d
0, η is path loss coefficient, and X
σ is a random Gaussian variable, with zero mean and standard deviation equal to σ. The values for different parameters of the path loss model are given in Table 3. The modulation scheme used in the transceiver is DQPSK with noise floor equal to −87 dBm. Slot duration is taken as 1 ms for the simulation studies. The buffer size for the packets is 1000 bytes which means that it can hold at the most 10 packets at any given time.Table 3
Path loss parameters.
d
0
1.0 m
PL
(
d
0
)
55 dBm
η
2.4
σ
4 dBSimulation parameters chosen for the study are as shown in Table4 and the parameters assumed for the transceiver are listed in Table 5.Table 4
Simulation parameters.
Application payload per packet
100 bytes
Allocation Slot length
1 ms
Battery capacity
560 mAhTable 5
Transceiver characteristics.
Tx-Rx, Rx-Tx (transition time)
0.02 ms
Rx-Sleep, Tx-Sleep (transition time)
0.194 ms
Sleep-Rx, Sleep-Tx (transition time)
0.05 ms
Transmit power level
−10 dBm
Tx (power consumed)
3 mW
Rx (power consumed)
3.1 mW
Tx-Rx, Rx-Tx (power consumed)
3 mW
Sleep-Rx, Sleep-Tx (power consumed)
1.5 mW
Rx-Sleep, TX-Sleep (power consumed)
1.5 mW
Sleep power level
0.05 mWThe simulation studies were done using Castalia WSN simulator [14] which has a framework for WBAN.The simulation was performed for different beacon period lengths with varying ratio of EAP to total beacon length. Latency of a packet is defined as the time from the moment it arrives at the node’s input buffer to the time when it is successfully received at the hub. Lifetime was also found out for each node.The latencies of nodes are shown in Figures4 and 5 for superframe lengths 50 msec and 100 msec, respectively.Figure 4
Latency using CSMA/CA with superframe length = 50 msec and priorities 0–7.Figure 5
Latency using CSMA/CA with superframe length = 100 msec and priorities 0–7.As expected, the UP7 nodes have the lowest latencies while the lowest priority nodes have the highest latencies with intermediate priority nodes lying inbetween. It is seen that for a particular superframe length the latencies and lifetimes of nodes increase with the increase in ratio of EAP/superframe length. The increase in EAP has a lesser effect on the increase in latency for UP7 nodes compared to other nodes. More priority 7 nodes now get an oppurtunity to access the medium during EAP. Since majority of the packets of nodes with priority 7 are still using RAP for medium access, their latencies increase with EAP length for the ratios shown in the figures. At higher ratios (not shown in Figures4 and 5) the latencies of low priority nodes become abnormally high due to decreased RAP length which in turn results in more number of collisions and backoffs continuing in the next superframe. The increased superframe length has a detrimental effect on the latencies of the nodes because there are more packets to compete now with longer RAP and EAP lengths. The latencies of UP3 nodes and UP0 nodes are the same. UP3 nodes have the highest data rates with the result that delay time of packets in the input buffer increases.The lifetimes of nodes shown in Figure6 are not substantial with appreciable amount of energy being lost with the transceiver switched on even when the buffer is empty. The lifetimes are almost independent of the superframe lengths and the priority of nodes. This is because the nodes are always switched on with similar values for transmit and idle power. It is possible to improve the lifetimes of nodes while using CSMA/CA for packet transmission by allowing the nodes to sleep when there are no packets to be transmitted in the buffer, as proposed in Section 2.2.Figure 6
Lifetimes of nodes using CSMA/CA with superframe length = 50 msec, 100 msec, and Priorities 0–7.The transceiver sleeps when the buffer is empty and wakes up whenb
limit number of packets arrive. Figure 7 shows the latencies of nodes with superframe length = 100 msec and b
limit = 1, and Figure 8 shows the lifetimes of nodes. The UP7 node lifetime is practically constant for different EAP/RAP ratios. For the rest of the nodes, the collisions and retransmissions will increase as length of EAP increases. This will cause the nodes to stay awake for longer periods of time thereby causing a decrease in lifetime with increase in EAP. It is seen that UP3 nodes have the lowest lifetimes followed by UP5 and UP6 nodes. These nodes can transmit only in the RAP phase and have higher data rates compared to other nodes which can transmit only in the RAP phase. The increasing data rates will result in nodes sleeping for lesser amount of time. This is more pronounced for nodes with priority 3 which have the highest data rate.Figure 7
Latency of nodes using CSMA/CA with superframe length = 100 msec,b
limit
=
1, and Priorities 0–7.Figure 8
Lifetimes of nodes using CSMA/CA with superframe length = 100 msec, EAP = 20 msec andb
limit
=
1 and Priorities 0–7.Figure9 shows the latencies of the nodes for buffer limits 2, 3, and 4 with superframe length = 100 msec and EAP/RAP = 1 : 4. The latencies of nodes with low data rates increase with buffer limit, while higher data rate nodes have latencies that increase nominally with the buffer limit which is quite intuitive. Figure 10 shows that lifetimes of nodes irrespective of the priorities are independent of buffer limits.Figure 9
Latency of nodes using CSMA/CA with superframe length = 100 msec, EAP = 20 msec, andb
limit
=
1, 2, 3, 4.Figure 10
Life of nodes using CSMA/CA with superframe length = 100 msec andb
limit
=
1, 2, 3, 4.Since nodes sleep all the time except when they transmit, a change in buffer limit will not affect their lifetimes. When the buffer limit increases, the number of packets to be transmitted at a time increases. This will increase contention among the nodes causing the nodes to stay awake for a longer time. However, energy consumption due to state transition changes may decrease when buffer limit increases. Therefore, the net energy consumed is almost the same for buffer limits 1, 2, 3, and 4 due to the above reasons. The lifetimes of nodes increase with decrease in data rates. When data rate decreases a node can sleep for longer periods of time. The lifetime of the lowest data rate node is almost double that of highest data rate node. The rest of the nodes have lifetimes between these extremes. Although UP5, UP6, and UP7 nodes have the same data rates, nodes with higher priorities have higher lifetimes when compared to lower priority nodes. The effect of priorities on lifetimes of nodes is offset by increase in data rates.It can be concluded that by making the node to sleep while it is not transmitting packets the lifetimes can be increased. A buffer limit of unity would be ideal in terms of energy consumption and latency. Increasing the buffer limit to values above one causes the latency to increase abnormally without any improvement in lifetimes compared to a buffer limit of one.Let us see how the lifetimes and latencies vary if the nodes are polled by the hub cyclically without any beacons or superframes as described in Section2.3. Table 6 shows the results obtained for latencies and lifetimes using the polling technique. Latencies show similar values to CSMA/CA with lifetimes longer than CSMA/CA. Obviously, the lifetimes are almost the same for all nodes since all nodes are awake all the time. This priority polling technique has an edge over CSMA/CA techniques proposed in the 802.15.6 standard in terms of lifetimes.Table 6
Latencies and lifetimes for polling without sleep.
Node
Priority
Latency (msec)
Lifetime (days)
1
7
3.6
7.42
2
7
3.6
7.42
3
6
3.7
7.42
4
6
3.7
7.42
5
6
3.7
7.42
6
5
3.9
7.42
7
5
3.9
7.42
8
5
3.9
7.42
9
4
4.1
7.41
10
4
4.1
7.41
11
4
4.1
7.41
12
4
4.1
7.41
13
4
4.1
7.41
14
4
4.1
7.41
15
3
8.3
7.42
16
3
8.3
7.42
17
2
6.1
7.41
18
2
6.1
7.41
19
1
12.9
7.41
20
1
12.9
7.41
21
1
12.9
7.41
22
1
12.9
7.41
23
1
12.9
7.41
24
0
16.6
7.41
25
0
16.6
7.41
26
0
16.6
7.41
27
0
16.6
7.41
28
0
16.6
7.41
29
0
16.6
7.41
30
0
16.6
7.41
31
0
16.6
7.41The results of polling with sleep show that energy consumption can be reduced substantially by allowing a node to sleep after transmitting its packets in the buffer and then waking up when its turn to transmit packets arrives. For example, node 6 in the 3rd subcyle after transmitting its packets sends EPOLLFINISH packet to the hub. Node 6 then sleeps and wakes up in the 4th subcycle to receive the EPOLL packet.Figure11 shows the latencies of nodes. The latencies have values comparable to that of CSMA/CA when the value of g equals 0. However, as value of g increases the latencies of all categories of nodes increase. The delay brought about by hub waiting for a node to wake up for sending the EPOLL packet could be the reason for higher values of latencies as g increases. However, contrary to the other methods described, latencies of nodes decrease strictly with priority independent of data rates. Figure 12 shows the phenomenal increase in lifetimes of nodes for this polling method. Low priority nodes have the highest lifetimes while increasing sleep wake transitions causes a decrease in lifetime with increase in priority.Figure 11
Latency using polling with nodes sleeping.Figure 12
Lifetime using polling and nodes sleeping.Table7 shows that latency requirements of common medical devices as per IEEE 11073 are satisfied by the polling method described as well as by the CSMA/CA without sleep.Table 7
Latencies for some IEEE 11073 applications.
Type of application
Latency (sec)
Telemetry (real-time)
≤0.3
Physiologic Parameters (real-time)
≤3
Patient State
≤3


## 3.1. Arrival of Packets

Data generation can be intermittent or periodic depending on the type of application. We are assuming a nonsaturation condition, with the arrival of packets following a Bernoulli process. Time is slotted and the probabilty of arrival of the packets during each slot determines the average data rate. Probability of arrival is varied, which in turn results in a change of the system load, thereby creating varying data rates.


## 3.2. System Configuration

The WBAN is made up of 32 nodes, with data rates and type of application given in Table1 and reported in [15]. Out of the 32 nodes used, one node behaves as the hub whose function is to collect information transmitted by the other nodes. The rest of the nodes monitor conditions of the heart and brain or measure vital physiological parameters like blood pressure, temperature, and glucose content in the blood. The nodes are placed on different parts of the body and slight movements of the body are taken into account by the channel model. The hub is assumed to be awake all the time. Hub can have a power supply more than it can be replenished without much difficulty.IEEE 802.15.6 specifies three different physical (PHY) layers, namely, narrow band (NB), ultra wide band (UWB), and human body communications (HBC). For this study, the NB PHY is considered, specifically, ISM 2.4 GHz.The model CM3 A, specified in the 802.15.6 standard, is taken as the channel model. The path loss is given by(6)
PL
d
=
PL
d
0
+
10
η
log
⁡
⁡
d
d
0
+
X
σ
,
where d is the distance between transmitter and receiver in metres, PL
(
d
0
) is known path loss at a reference distance d
0, η is path loss coefficient, and X
σ is a random Gaussian variable, with zero mean and standard deviation equal to σ. The values for different parameters of the path loss model are given in Table 3. The modulation scheme used in the transceiver is DQPSK with noise floor equal to −87 dBm. Slot duration is taken as 1 ms for the simulation studies. The buffer size for the packets is 1000 bytes which means that it can hold at the most 10 packets at any given time.Table 3
Path loss parameters.
d
0
1.0 m
PL
(
d
0
)
55 dBm
η
2.4
σ
4 dBSimulation parameters chosen for the study are as shown in Table4 and the parameters assumed for the transceiver are listed in Table 5.Table 4
Simulation parameters.
Application payload per packet
100 bytes
Allocation Slot length
1 ms
Battery capacity
560 mAhTable 5
Transceiver characteristics.
Tx-Rx, Rx-Tx (transition time)
0.02 ms
Rx-Sleep, Tx-Sleep (transition time)
0.194 ms
Sleep-Rx, Sleep-Tx (transition time)
0.05 ms
Transmit power level
−10 dBm
Tx (power consumed)
3 mW
Rx (power consumed)
3.1 mW
Tx-Rx, Rx-Tx (power consumed)
3 mW
Sleep-Rx, Sleep-Tx (power consumed)
1.5 mW
Rx-Sleep, TX-Sleep (power consumed)
1.5 mW
Sleep power level
0.05 mWThe simulation studies were done using Castalia WSN simulator [14] which has a framework for WBAN.The simulation was performed for different beacon period lengths with varying ratio of EAP to total beacon length. Latency of a packet is defined as the time from the moment it arrives at the node’s input buffer to the time when it is successfully received at the hub. Lifetime was also found out for each node.The latencies of nodes are shown in Figures4 and 5 for superframe lengths 50 msec and 100 msec, respectively.Figure 4
Latency using CSMA/CA with superframe length = 50 msec and priorities 0–7.Figure 5
Latency using CSMA/CA with superframe length = 100 msec and priorities 0–7.As expected, the UP7 nodes have the lowest latencies while the lowest priority nodes have the highest latencies with intermediate priority nodes lying inbetween. It is seen that for a particular superframe length the latencies and lifetimes of nodes increase with the increase in ratio of EAP/superframe length. The increase in EAP has a lesser effect on the increase in latency for UP7 nodes compared to other nodes. More priority 7 nodes now get an oppurtunity to access the medium during EAP. Since majority of the packets of nodes with priority 7 are still using RAP for medium access, their latencies increase with EAP length for the ratios shown in the figures. At higher ratios (not shown in Figures4 and 5) the latencies of low priority nodes become abnormally high due to decreased RAP length which in turn results in more number of collisions and backoffs continuing in the next superframe. The increased superframe length has a detrimental effect on the latencies of the nodes because there are more packets to compete now with longer RAP and EAP lengths. The latencies of UP3 nodes and UP0 nodes are the same. UP3 nodes have the highest data rates with the result that delay time of packets in the input buffer increases.The lifetimes of nodes shown in Figure6 are not substantial with appreciable amount of energy being lost with the transceiver switched on even when the buffer is empty. The lifetimes are almost independent of the superframe lengths and the priority of nodes. This is because the nodes are always switched on with similar values for transmit and idle power. It is possible to improve the lifetimes of nodes while using CSMA/CA for packet transmission by allowing the nodes to sleep when there are no packets to be transmitted in the buffer, as proposed in Section 2.2.Figure 6
Lifetimes of nodes using CSMA/CA with superframe length = 50 msec, 100 msec, and Priorities 0–7.The transceiver sleeps when the buffer is empty and wakes up whenb
limit number of packets arrive. Figure 7 shows the latencies of nodes with superframe length = 100 msec and b
limit = 1, and Figure 8 shows the lifetimes of nodes. The UP7 node lifetime is practically constant for different EAP/RAP ratios. For the rest of the nodes, the collisions and retransmissions will increase as length of EAP increases. This will cause the nodes to stay awake for longer periods of time thereby causing a decrease in lifetime with increase in EAP. It is seen that UP3 nodes have the lowest lifetimes followed by UP5 and UP6 nodes. These nodes can transmit only in the RAP phase and have higher data rates compared to other nodes which can transmit only in the RAP phase. The increasing data rates will result in nodes sleeping for lesser amount of time. This is more pronounced for nodes with priority 3 which have the highest data rate.Figure 7
Latency of nodes using CSMA/CA with superframe length = 100 msec,b
limit
=
1, and Priorities 0–7.Figure 8
Lifetimes of nodes using CSMA/CA with superframe length = 100 msec, EAP = 20 msec andb
limit
=
1 and Priorities 0–7.Figure9 shows the latencies of the nodes for buffer limits 2, 3, and 4 with superframe length = 100 msec and EAP/RAP = 1 : 4. The latencies of nodes with low data rates increase with buffer limit, while higher data rate nodes have latencies that increase nominally with the buffer limit which is quite intuitive. Figure 10 shows that lifetimes of nodes irrespective of the priorities are independent of buffer limits.Figure 9
Latency of nodes using CSMA/CA with superframe length = 100 msec, EAP = 20 msec, andb
limit
=
1, 2, 3, 4.Figure 10
Life of nodes using CSMA/CA with superframe length = 100 msec andb
limit
=
1, 2, 3, 4.Since nodes sleep all the time except when they transmit, a change in buffer limit will not affect their lifetimes. When the buffer limit increases, the number of packets to be transmitted at a time increases. This will increase contention among the nodes causing the nodes to stay awake for a longer time. However, energy consumption due to state transition changes may decrease when buffer limit increases. Therefore, the net energy consumed is almost the same for buffer limits 1, 2, 3, and 4 due to the above reasons. The lifetimes of nodes increase with decrease in data rates. When data rate decreases a node can sleep for longer periods of time. The lifetime of the lowest data rate node is almost double that of highest data rate node. The rest of the nodes have lifetimes between these extremes. Although UP5, UP6, and UP7 nodes have the same data rates, nodes with higher priorities have higher lifetimes when compared to lower priority nodes. The effect of priorities on lifetimes of nodes is offset by increase in data rates.It can be concluded that by making the node to sleep while it is not transmitting packets the lifetimes can be increased. A buffer limit of unity would be ideal in terms of energy consumption and latency. Increasing the buffer limit to values above one causes the latency to increase abnormally without any improvement in lifetimes compared to a buffer limit of one.Let us see how the lifetimes and latencies vary if the nodes are polled by the hub cyclically without any beacons or superframes as described in Section2.3. Table 6 shows the results obtained for latencies and lifetimes using the polling technique. Latencies show similar values to CSMA/CA with lifetimes longer than CSMA/CA. Obviously, the lifetimes are almost the same for all nodes since all nodes are awake all the time. This priority polling technique has an edge over CSMA/CA techniques proposed in the 802.15.6 standard in terms of lifetimes.Table 6
Latencies and lifetimes for polling without sleep.
Node
Priority
Latency (msec)
Lifetime (days)
1
7
3.6
7.42
2
7
3.6
7.42
3
6
3.7
7.42
4
6
3.7
7.42
5
6
3.7
7.42
6
5
3.9
7.42
7
5
3.9
7.42
8
5
3.9
7.42
9
4
4.1
7.41
10
4
4.1
7.41
11
4
4.1
7.41
12
4
4.1
7.41
13
4
4.1
7.41
14
4
4.1
7.41
15
3
8.3
7.42
16
3
8.3
7.42
17
2
6.1
7.41
18
2
6.1
7.41
19
1
12.9
7.41
20
1
12.9
7.41
21
1
12.9
7.41
22
1
12.9
7.41
23
1
12.9
7.41
24
0
16.6
7.41
25
0
16.6
7.41
26
0
16.6
7.41
27
0
16.6
7.41
28
0
16.6
7.41
29
0
16.6
7.41
30
0
16.6
7.41
31
0
16.6
7.41The results of polling with sleep show that energy consumption can be reduced substantially by allowing a node to sleep after transmitting its packets in the buffer and then waking up when its turn to transmit packets arrives. For example, node 6 in the 3rd subcyle after transmitting its packets sends EPOLLFINISH packet to the hub. Node 6 then sleeps and wakes up in the 4th subcycle to receive the EPOLL packet.Figure11 shows the latencies of nodes. The latencies have values comparable to that of CSMA/CA when the value of g equals 0. However, as value of g increases the latencies of all categories of nodes increase. The delay brought about by hub waiting for a node to wake up for sending the EPOLL packet could be the reason for higher values of latencies as g increases. However, contrary to the other methods described, latencies of nodes decrease strictly with priority independent of data rates. Figure 12 shows the phenomenal increase in lifetimes of nodes for this polling method. Low priority nodes have the highest lifetimes while increasing sleep wake transitions causes a decrease in lifetime with increase in priority.Figure 11
Latency using polling with nodes sleeping.Figure 12
Lifetime using polling and nodes sleeping.Table7 shows that latency requirements of common medical devices as per IEEE 11073 are satisfied by the polling method described as well as by the CSMA/CA without sleep.Table 7
Latencies for some IEEE 11073 applications.
Type of application
Latency (sec)
Telemetry (real-time)
≤0.3
Physiologic Parameters (real-time)
≤3
Patient State
≤3


## 4. Conclusion

The simulation results show that the polling technique described gives the highest lifetimes for all nodes. We can vary the value ofg in the adaptive sleeping mechanism and get suitable lifetime and latency that satisfy the application’s requirements. The latencies are within the requirements of most WBAN applications. WBAN applications are normally low data rate applications and the lifetimes of such devices can be increased substantially by causing the node to sleep through multiple cycles and then waking up when the data arrives. Though the latency performance of CSMA/CA is within the WBAN requirements, device lifetimes are not significant. With sleeping mechanism added, lifetimes improve. But then latency degrades substantially. Analytical results for latency and lifetime for these schemes are future work.



---

*Source: 404182-2015-02-03.xml*