Zigbee Body Sensor
Zigbee Body Sensor
Zigbee Body Sensor
|
Total back-off period time
\
Probability of access the channel
c
Probability of channel being idle
!/
Probability of packet transmitting
2427
2. General IEEE 802.15.4 MAC protocol
In the CSMAICA algorithm in Fig. 2.1, a random
back-of period easily causes an unnecessary waste
of bandwidth and increases power consumption.
Therefore, ZigBee suggests that the initial BE value
(Bm=macMinBE) is set to 3. However, if the network
load is heavy, this approach leads to high collision
rate, high power consumption and low network
throughput. Non-beacon enabled Zigbee network
systems use an un-slotted CSMA-CA channel access
mechanism. Our proposed system uses it for sound
transmission of human heart beat monitoring. In
CSMA-CA, each time a device needs to transmit data,
it waits for a random number of unit back-of periods
in the range {O, 2
Bt
- I} before performing a CCA
(Clear Channel Assessment) step, where BE can have
a value between s_and BM=macMaBE. By default,
they are 3 and 5, respectively.
Initially, the back-of exponent (BE) is set to 03.
One symbol period is equal to 16 us at 204 GHz
IEEE 802.1504IZigBee standards. The CCA time
period (TCCA) is defned as 8 symbol periods and
aUnitBackoferiod (T_
B
_) is defned as 20 symbol
periods. Note that a back-off period is the time
required to transmit 20 symbols, where a symbol is
equivalent to 4 bits, on a 250 Kbps channel. Using
the default value and assuming that the channel is
found to be idle by the frst channel access attempt,
an idle channel access time can be calculated as:
J * Initia/backerioas
!+
* ? 20s)mbo/s8s)mbo/s
* ? 320)s I28)s * 2.368ms
(1)
Note that Intialbackoferiods is defned by the
product of a random number fom [0, (2
Bt
- 1)] and
T ___. In (1), the random number is selected as 7 to
derive the maximum time delay.
Afer the CSMA wait is over, the node determines if
the channel is idle. This CCA is performed over the
time duration of 8 symbols. If the channel is busy
(CCA fails), the node increments BE value up to a
pre-defned s,,and repeats the CSMA procedure and
CCA to transmit data packets. If the available
channel cannot be found (CCA fails) even afer
predefned macMaCSMBackof reattempts, a
CAF (channel access failure) is declared and frther
attempt is not processed to transmit data packets.
ZigBee provides a variable "macMaCSMBackof
(O5)" that regulates the number of transmission
trials. It sets macMaCBackof to 4, i.e., a
transmitter is allowed to access the channel 4 times
consecutively before it declares access failure and
drops the packet.
If CCA succeeds, the node changes the mode fom
transmit to receive (TX-to-R turnaround to obtain
the ACK packet fom a coordinator. Also, afer the
latter receives the data packet fom a node, it changes
the mode fom receive to transmit (R-to-TX
turnaround to send the ACK packet to the former.
Typically, ZigBee uses the halduplex system. In
other words, it cannot perform both transmit (TX
and receive (R operations at the same time. The
R-to-TX and TX-to-R turnaround time is defned
as 12 symbols.
Fig. 2.1 IEEE 802.15.4 CSMA-CAprotocol fow
In the CSMA-CA algorithm, each node shall
maintain three parameters for each transmission
attempt i.e., NB, CW, and BE. NB is the Number of
Back-ofs with initial value of zero. The algorithm is
required to back-of before attempting the current
transmission. NB value should be initialized to "0"
before each new transmission attempt. CW is the
Contention Window length, defning the number of
back-of slots that need to be clear of channel activity
before the transmission can commence. This value is
initialized to 2 before each transmission attempt and
reset to 2 when the channel is assessed to be busy. BE
is the Back-of Exponent, which is the variable that
determines the number of back-off slots a device
shall wait before attempting to assess a channel's
status. It is chosen randomly in the range of 0 to (2
_
1
- 1). For a non-beacon mode, un-slotted CSMA-CA
is used. Thus MAC sub-layer initializes NB and BE
without Cw
The next step is to decide random waiting delay for
collision avoidance. It is the product of the back-of
period and a random number fom [0, 2
Bt
- 1]. If BE
set to 0, the collision avoidance procedure is disabled
at the frst iteration, and the node performs the CCA
2428
directly without waiting. BE is incremented each
attempt for the channel is sensed busy. If more nodes
join the same network area, the trafc becomes
heavier. Then BE must increase to reduce data
collision in CSMA-CA operations. It cannot exceed a
predetermined s,value, which can be reached by the
competing nodes at most afer 5 (s, = 5, default
value) transmissions of other nodes. If s,is set as 5
by default, the back-of period is a random number in
[0, 31] multiplied by aUnitBackoieriod in all
remaining nodes waiting to access the channel.
In this process, s,is more critical than s_ for the
backof delay distribution. Its impact can change
with diferent network environments as characterized
by trafc, interference, size, and data payloads. If a
channel is available in un-slotted CSMA-CA, MAC
sub-layer begins transmitting a packet fame. If s,is
set as a smaller value, e.g., 4, the average back-of
delay can decrease and MAC processing time is so.
Consequently, power consumption can be reduced
The maximum effective data capacity, denoted as
Cmax, is defned as the maximum achievable data rate
for a user application in the absence of any kind of
cross trafc or interference by other systems with
diferent communication standards and those using
same fequency range (2.40Hz). We can calculate
and test the effective data capacity, denoted as C,
under several conditions. Short addresses are used to
reduce the size of a packet. Optional acknowledge
fames (ACK are enabled and the back-of exponent
BE is set to "0". At 2.40Hz PHY layer, the
transmission duration of 1 byte = 2 symbols = 32 S.
Cmax can be calculated for a single hop connection
between two devices, under the ideal conditions. For
the MAC layer to process the data received fom the
PHY layer, each data packet is followed by an inter
fame spacing (IFS). Depending on the size of the
MPDU (MAC protocol data unit), LIFS (a long IFS)
and SIFS (a short IFS) can be used for fame spacing.
If it is larger than 20 bytes, LIFS is used. Otherwise,
SIFS is selected. An LIFS takes 640 fs (40 symbols)
and an SIFS 192 fs (12 symbols). From Fig. 2.2, the
space between a data fame and its corresponding
acknowledgement (ACK is same as the Rx-to-Tx
turaround time calculated before, i.e., 192 fs.
From ZigBee, ACK is an optional fame for
transmission. Thus we can have diferent results. If
NACK (No ACK) is applied, the receiver does not
need to send ACK packet to the transceiver for
confrmation. Therefore, the receiver skips the
turaround (Rx to TX) time (12 symbols), and
transceiver does not wait for ACK (22 symbols).
Packet maximum size is 133 bytes long, which is the
peak size allowed and includes 6 byte overhead. Its
packet transmission takes the channel time of 340
symbols (266 symbols packet transmission + 12
symbols for tuaround time (Rx-Tx) + 22 symbols
for ACK transmission + 40 symbols for TUFS). Hence
it can take at most 183.8 (62500/340) packets per
second with a 2.4 OHz channel of 250 Kbps (62500
symbols/sec) capacity.
To calculate C for a single-hop connection network,
the size of an MPDU is set to 127 bytes (its
maximum size). We can set an MPDU's size as 113
bytes (MSDU = 100 bytes) for heartbeat sound. The
ACK fame size is 11 bytes. For this scenario, there is
no back-of delay and BE=O.
133D}lcS {WuX| 11D}lcS
L0ug [uLKcl luWc {LL| Lug QuLKcl lumc(L|
Iaraaratttal
t/trie-[
(I92,sJ
t
IFS
(64s)
lu u W
Fig. 2.2 Duration for one data fame by LIFS with ACK.
As shown in Fig 2.2, the total time between two long
packet fames Total is given by
Total =Tlongrame+Ttlimarlilldtime + Tackjrame + T = 3. ms
(2)
where
.,,
!ooZoZ
P
+.Z0Um-
|..,, ''
ZoZ
P
U.o0Zm-
and [_U.U+m
I1 bytes (fOl' HB. Sound data)
Long packet frame (PPDU) Long packet frame (PPDU)
Ots
40 S
l.Duration fOI'IIB. Sound data 4.J84 ris>
Fig.2.3 Duration for one data fame without ACK.
As shown in Fig.2.3, the total time between two long
packet fames with NACK, Ttotal for heart beat sound
data with NACK is given by
(3)
By applying NACK to access the heart beat sound
data, we can reduce the duration time of one data
packet transmission.
According to [Sun, et a!., 2006]
C
T
a
pp
licationdata
C 167 65 /|
(4)
m8
` I
Is .....
otal
where Ta
pp
lcatiolldata = 114 ^ 32fs = 3648 fs, the time it
takes to send the application data via the PHY layer,
2429
3.
and CPY = 250kbps.
The theoretical maximum heart beat sound data
throughput for single-hop transmission is given by
HB
kb
CHB
=
x CP
H
Y =1 82. 48 's (5)
.
where THB= 100 ^ 321s = 3200 Is.
Therefore, the maximum efective data capacity
available for a user is only 67% of the PHY data rate
(250 kbps) via theoretical analysis. For heart beat
sound data, it is only 72% of the PHY data rate.
In the real test using CC2430 sensor modules for
continuous sound data (100 byte payload), the packet
period time is 12 ms (with ACK) and 9 ms (without
ACK) for reliable transmission of sound data. This is
because that the modules have a low-performance
processing unit, i.e., 8051 MCU. Therefore, the
achievable maximum throughput for continuous
sound data is only 79 Kbps or 84 packet/sec with
ACK, and 105 Kbps or 112 packet/sec without ACK.
Analysis of un-slotted CSMA/CA
3.1 Packettransmissiontimeanddelay
For the uplink process between a node and
coordinator, we consider its packet transmission
delay (Tpd). It includes the back-of period, packet
transmission time, coordinator's tuaround time
switching fom transmitting to receiving, ACK
transmission time, and IFS time with SIFS = 12 and
LIFS = 40 symbols.
The average back-of time of each transmISSIOn
attempt consists of several back-of periods. The
number of back-off attempts is limited up to the
predefned macMaCBackoj, and depends on
the network traffc. Clear Channel Assessment time
TCCA = 8 symbols transmission time. TTA is
transceiver's transmitting to receiving turaround
time (12 symbols).
-....-.,
where i..-.,is data sampling time, i.e.,
T
L
p
ay l o
>
$
(11)
..... (12)
samPl
in"
a
mpling
..... (13)
In our BSN, we apply 4 KHz as the sampling rate
and a sample has one byte data.
TARj is the sum of the average back -of times. It may
consist of several back-of periods and depends on
both parameters of a node and trafc load.
Because each back-of attempt delay period is
calculated fom a random number between u and (2
r
_, ______,______ ___________
-
__ -
_,
_
-
a-z
.Z
a-zu |
. . . . . .. . . . ,._. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..... . . . . . ....... . . . . . ....... . . . ..
a-!u
a-
a-!
a-aumoeciaetcsoevces
20 40 60 30 J00
a,caos,.es,
2
Fig.3.2 Impact of L
p
ayloa
d and H on the average number of
back-off attempts
Fig. 3.2 shows that the average number of back-off
attempts is smaller for a longer payload fame than a
shorter one. The number of average back-of
attempts increases with n. The advantage of small
average back-of attempts is to reduce the
transmission delay by transmitting a long data fame
instead of separated small data fames.
If just one node is communicating with the
coordinator, it does not need to compete the channel
access and is not affected by its payload size. Thus
average number of back-off attempts is 1. As n
increases, they have to compete for the channel
access with each other. For this reason, the average
number of back-of attempts approaches
macMaCSMBackof. Because a long data fame
occupies the periods on the channel longer than a
small one during its transmission, other devices
waiting for channel access have more back-off
attempts ofen than the case with the transmission of
a short data fame. By increasing back-of attempts,
back-of exponent increases for each such attempt.
This leads to longer back-of delays. From Fig. 3.2,
we can reason that the payload size once over 40
bytes afects the average back-of attempts only
slightly. A large n leads to the maximum back-of
attempts regardless of payload.
3.2 Egecto/8Eandnontotalback-ogtime
The back-of exponent BE is a critical parameter in
the back-of algorithm of CSMA-CA. It is used as an
estimate of the random back-of delay before trying
to access the channel. As described before, in MAC
operation, the CSMA channel access wait time
depends on BE. For every transmission attempt, BE
is initialized to be s_and each CCA failure increases
BE by 1 until it reaches s, Therefore, the channel
access wait duration depends on how many CCA
failures have already been processed prior to the
current attempt. It is related to the number of
back-of period times and TCCA'
The back-of delay time is determined by a
random number fom 0 (2
BE
1). Thus, we use the mean value of back
of delay (14, 15) for TB in the following discussions.
Total back-of period time is
'
[I
]
+s ]
"
]
+si+lI
[(
_
islI __
J
_
U.oZm
1
V
_
_
|(J/(lIl
I__ _
U.oZm
(16)
where average R's integer part = H and faction part =
1 (If R = 3.5, then H = 3 and 1 = 0.5).
Total back-of time for channel access and da t a
transmission is sum of all back-of attempt times.
Thus, TT
B
is afected by R and BE. To simplit our
calculation, we set macMaCSMBackof as 5. Table
2 shows BE for each back-off attempt as diferent s_
(08) and s,(38). If average back-off time in each
range i s applied and R is 5, the shortest T is
achieved as (0,1,2,3,3) for each back-of attempt BE
when s_= 0 and s, = 3. TB increases with s_and s
@ Afer BE reaches s,, each back-of attempt keeps
the same s,. The reason is that CSMA-CA compares
Em and 8,for each back-of attempt. If they are equ
aI, afer several CCA failures, Em has to keep the
same value as s,for any remaining back-of attempt.
Fig. 3.3 shows the total back-off time periods for
different parameters. Fig. 3.3(a) shows the impact of
increasing s_fom 0 to 8 on TB as payload increases.
Note that n=5, macMaCBackof=5, and E8.
Decreasing BE can reduce T. Increasing payload
size can reduce it as well. However, afer certain size
(5 15 bytes), reducing TT with increasing payload
size becomes less signifcant.
2431
Table 2. Diferent BE value for each back-of attempt depends on aMaBE (where macMaxCSMABackof 5)
lIIacMinBE aMaxBE-3 aMaxBE-4 aMaxBE-5 aMaxBE-6 aMaxBE-7 aMaxBE-8
.
2
"
d
,
3"
,
/'
.
5
"
rl
,
211(
,
3Il
,
'
,
5
'
1 r
'
,
2m
,
3Il
,
.II
,
511 rl
_u
.
3'Y
,
/'
,
5/1
t
,
211(
,
3"
,
-11
,
5" __.__.
,
l'
,
511
0 0,1,2,3,3 0,1,2 3,4
1 1,2,3,3,3 1,2,3,4,4
2 2,3,3,3,3 2,3,4,4,4
3 3,3,3,3,3 3,4,4,4,4
4 4,3,3,3,3 4,4,4,4,4
5 5,3,3,3,3 5,4,4,4,4
6 6,3,3,3,3 6,4,4,4,4
7 7,3,3,3,3 7,4,4,4,4
8 8,3,3,3,3 8,4,4,4,4
x
M
" MnEE=J
=5
mucmuCWmAHuckg=5
umuHT=
MnEE=3
x R 1 M x
Pay|oad(Dytes)
(a)
\
\ '
.........,.
A1/tr!I1 3
ufl.- 3
3
!
x
oMoxEE=4
-oMoxEE=6
x
oMoxEE=0
1
..
1\ }:\
f
d
.
x
U
.
1
x
1 x
Pay|oad (Dytes)
(b)
mutCNMAHutko]5
MnH
uAltoH-6
!t4
!t6
!t^
!t46
!t?0
0,1,2,3,4
1,2,3,4.5
2,3,4,5,5
3 4 , , ,
4,5,5,5,5
5, 5, 5, 5, 5
6,5,5,5,5
7,5,5,5,5
8,5,5,5,5
0,1,2,3,4 0,1,2,3,4 0,1,2,3,4
1,2,3,4,5 1,2,3,4,5 1,2,3,4,5
2,3,4,5,6 2,3,4,5,6 2,3,4,5,6
3,4,5,6,6 3,4,5,6,7 3,4,5,6,7
4,5,6,6,6 4,5,6,7,7 4,5,6,7,8
5,6,6,6,6 5,6,7,7,7 5,6,7,8,8
6,6,6,6,6 6,7,7,7,7 6,7,8,8,8
7,6,6,6,6 7,7,7,7,7 7,8,8,8,8
8,6,6,6,6 8,7,7,7,7 8,8,8,8,8
joins a coordinator, it does not need to compete for
channel access. Hence it takes only one back-off
attempt to access channel and transmit the data
packet. However, as n increases, the number of
devices competing for channel access at certain time
interval could be large and leads to multiple back-of
attempts as a result of channel access failure.
3.3 Egect o/ Lpay
load, n, and macMrC5MA-
8ackogsony
The label Ma. back-of attempts in Fig. 3.4 refers to
macMaCSMBackof. Here The probability of a
node's accessing the channel successflly is affected
by macMaCSMBackof , L_j__ , and n. From it,
increasing macMaCSMBackof increases Ps more
CCA failures are accepted in a transmission attempt
before a fnal channel access failure is declared.
Three cases of n 5, 10, and 20 are shown as
macMaCSMBackof changes fom 1 to 5.
Increasing n reduces Ps because nodes' competition
for the channel.
Larger payload packet leads to higher Ps. The reason
is that a large data packet occupies the channel
longer than a small one. When a large one occupies
the channel, small data packets must wait until it is
done. Thus, they need more back-off attempts and
have more collision probability, which in tu
implies more retransmissions of a packet and higher
latency. The analysis results show that setting the
macMaCSMBackof to value 5, long data packet,
and a small number of devices leads to higher Ps.
4. Conclusion
x 1
Pay|oad [Byes)
(c)
Fig 3.3 Impact of macMinBE, macMaBE, and n.
on ps.
1x
Fig 3.3(b) represents the impact of increasing s,
fom 3 to 8 on total back-of time as payload varies.
Increasing s, increases I,,, but not signifcantly.
Also, once payload size exceeds 20 bytes, there is
minimal impact on I,,for diferent s,Figure 3.3(c)
shows the impact of n on I,
r
,. I,
r
,increases as n. It
can be explained as follows. If just one device
IEEE 802.15.4/ZigBee devices are used for many
sensor network applications because of ZigBee's
advantages for low power consumption, multiple
access, low cost and easy expansion of a network.
However, for the wireless healthcare monitoring
application, it sufers fom low data rate. Small size
data like temperature and humidity are not a problem
in real-time and reliable monitoring system. But large
and continuous data like sound data need more
communication capacity. When ZigBee medical
sensors are applied to some patients, real-time
transmission and data reliability are critically
2432
important. For example, emergency data have to be
transmitted reliably without delay in any kinds of
situations including heavy network trafc. This poses
a signifcant challenge to researchers and engineers.
It will require more research. The fture work also
includes setting up a testbed to verif our analysis
results.
1.2
f
_ 1.0
0.8
_ 0.S
E
0.4
0.2
=
0.0
=
0.8
0.8
0.1
7
0.S
@ 0.5
0.4
=j:=5,+t=5
M p=1u,+t=5
=:=2u,1 =5
R j=5u,1 =5
=:=1uu,1 =5
ax. back-off attcmts
(a)
0.3
0.2
0.1
0.0
o
0.3
C
0.30
_0.2
@ 0.20
0.1
0.10
0.0
Nn. bnck-offnttempts
(b)
_--
~
- " "
==== 0.00
a
nx. bnck-on11emj1s
(c)
Fig 3.4 Impact of L_j__, n, and macMaCSMABackof
Reference
1. Burchfeld, T. R., Venkatesan, S., and Einer, D.,
"Maximizing throughput in Zigbee wireless networks
through analysis, simulations and implementations,"
in Proc. of the Int. Workshop on Localized
Algorithms and Protocols for Wireless Sensor
Networks, 2007, pp. 15-29.
2. Chakravorty, R., "A programmable service
architecture for mobile medical care," in Proc. of the
4th Annual IEEE Int. Conf. on Pervasive Computing
and Communications Workshops (PerCom '06), pp.
532-536, Pisa, Italy, March 2006.
J. Dagtas, S., Pekhteryev, and L, Sahinoglu, Z., "Multi
stage Real Time Health Monitoring via ZigBee in Sma
rt Homes", 21 st Int Conf
on Advanced Information Networking and Applicati
ons Workshops/Symposia, 2007, Article number 4224
200, Pages 782-786.
4. IEEE, Wireless medium access control (MAC) and
physical layer (PHY) specifcations for low-rate
wireless personal area networks (WPANs)," IEEE Std
802.15.4-2006, 2006.
5. Iiyas, M., and Mahgoub, I., Handbook of Sensor
Netork: Compact Wireless and Wired Sensing
Systems, Boca Raton, CA: CRC, 2005 .
6. Kohvakka, M., Kuorilehto, M., Hannikainen, M., and
Hamalainen, T.D.,"Performance analysis of IEEE
802.15.4 and ZigBee for large-scale wireless sensor
network applications", Proc.
_rJ
ACM Int. Workhop
on Performance Evaluation of Wireless Ad Hoc,
Sensor and Ubiquitous Network, Terromolinos,
Spain, 2006, Page 48-57.
7. Misic, J., and Misic, N B. "Access delay for nodes
with fnite bufers in IEEE 802.15.4 beacon enabled
PAN with uplink transmissions," Comput. Commun.,
vol. 28, pp. 1152, lun. 2005.
8. Malan, D., Fulford-lones, T., Welsh, M., and Moulton,
S., "Codeblue: an ad-hoc sensor network
infastructure for emergency medical care," in Proc.
of the 1st Int. Workhop on Wearable and Implantable
Body Sensor Network, London, UK, 2004.
9. Mangharam, R., Rowe, A., Rajkumar, R., and Suzki,
R.. "Voice over sensor networks". In Proc. O
f the 27th IEEE Int. Real-Time Systems Symposium,
Rio de laneiro, Brazil, 2006
10. Park, T. R., Kim, T. H., Choi, J. X, Choi, S., and
Kwon, V H. "Throughput and energy consumption
analysis of IEEE 802.15.4 slotted CSMAlCA,"
Electron. Lett., vol. 41, pp. 1017, 2005.
11. S. Pollin, M. Ergen, S. C. Ergen, B. Bougard, L.v.
Perre, I. Moerman, A. Bahai, P. Varaiya and F.
Catthoor, "Performance Analysis of Slotted Carrier
Sense IEEE 802.15.4 Medium Access Layer , IEEE
Transactions on Wireless Communication, vol. 7, no.
9, pp. 3359-3371, 2008 .
12. Sun, Tony, Chen, Ling, Han, Chih, Yang, Guang, and
Gerla, Mario, "Measuring Efective Capacity of IEEE
802.15.4 Beaconless Mode", i n Pr oc. of IEEE
Wireless Communications and Netorking Conference,
Volume 1, 2006, pp. 493-498.
13. Wang, F., I, L., and Zhao, X "Analysis and
Comparison of Slotted and Un slotted CSMA in IEEE
802.15.4", in Proc. of 2009 Int. Con! on Wireless
Communications, Networking and Mobile Computing,
2009. pp. 1-5, 2009.
2433