8
Research Article Modeling and Analyzing CSMA/CA Protocol for Energy-Harvesting Wireless Sensor Networks Zhi Chen, 1,2,3 Ya Peng, 1,2 and Wenjing Yue 2,4 1 College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 210023, China 2 Institute of Computer Technology, Nanjing University of Posts and Telecommunications, Nanjing 210023, China 3 School of Computer Science, e University of Adelaide, Adelaide, SA 5005, Australia 4 College of Telecommunications and Information Engineering, Nanjing University of Posts and Telecommunications, Nanjing 210003, China Correspondence should be addressed to Wenjing Yue; [email protected] Received 5 March 2015; Revised 3 May 2015; Accepted 10 June 2015 Academic Editor: George P. Eſthymoglou Copyright © 2015 Zhi Chen et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Well-designed wireless sensor networks (WSNs) usually provide vital support for collecting, processing, and forwarding the real- time information in mission-critical applications where medium access control (MAC) protocols determine the channel access control capabilities and the energy consumption properties of these networks. is paper models the MAC protocol of CSMA/CA using timed automata on the message communication and the energy harvesting and analyzes the protocol through model checking of the major CTL properties. e modeling and analysis of CSMA/CA protocol with the comparative experiments give some performance results and also reveal that timing error may cause deadlock, and the accessibility is satisfied if no deadlock exists. 1. Introduction Wireless sensor networks (WSNs) are multihop self-organ- izing networks consisting of sensor nodes through wireless communication and usually provide vital support for collect- ing, processing, and forwarding the real-time information in mission-critical applications, but the networks face many challenges for the limit energy, memory, and computing power in the sensor nodes [1]. One of these challenges is to design the effective medium access control (MAC) protocols, which determine the channel access control capabilities and the energy consumption properties of WSNs [2]. e MAC protocol of CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) for carrier transmission in WSNs avoids collisions by transmitting only when checking to be sure the channel is idle [3]. Bertocco et al. [4] analyzed the performance of CSMA/ CA-based sensor networks for industrial monitoring using the experimental tests on a test bed, which consisted of a wireless sensor network, one personal computer, and a digital oscilloscope. Zhu et al. [5] presented a slotted CSMA/CA scheme MultiCSMA for WSNs and simulated the proposed scheme to validate the performance improvement using the NS2 network simulator. Youn et al. [6] presented a QoS mech- anism supporting CSMA/CA for WSNs and theoretically analyzed the proposed method. Chen et al. [7] presented an analytical model for evaluating the CSMA/CA protocol and used NS2 to evaluate the protocol performance in the small- scale application of WSNs. e above-mentioned researches have many interesting discoveries on the CSMA/CA protocol, but we still need to be sure that all explicitly stated properties are satisfied in WSNs. To more accurately verify the CSMA/CA protocol in energy-harvesting WSNs [8], this paper models CSMA/CA using timed automata and analyzes the protocol using the UPPAAL model checker [9]. e rest of the paper is organized into four sections. Section 2 briefly introduces related work on energy harvesting for WSNs. Section 3 proposes the timed automata models of the CSMA/CA protocol in energy- harvesting WSNs. Section 4 gives the results of UPPAAL model checking and the TinyOS-based comparative experi- ments. Finally, the conclusions are presented in Section 5. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 257157, 7 pages http://dx.doi.org/10.1155/2015/257157

Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

Research ArticleModeling and Analyzing CSMA/CA Protocol forEnergy-Harvesting Wireless Sensor Networks

Zhi Chen,1,2,3 Ya Peng,1,2 and Wenjing Yue2,4

1College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 210023, China2Institute of Computer Technology, Nanjing University of Posts and Telecommunications, Nanjing 210023, China3School of Computer Science, The University of Adelaide, Adelaide, SA 5005, Australia4College of Telecommunications and Information Engineering, Nanjing University of Posts and Telecommunications,Nanjing 210003, China

Correspondence should be addressed to Wenjing Yue; [email protected]

Received 5 March 2015; Revised 3 May 2015; Accepted 10 June 2015

Academic Editor: George P. Efthymoglou

Copyright © 2015 Zhi Chen et al.This is an open access article distributed under theCreative CommonsAttribution License, whichpermits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Well-designed wireless sensor networks (WSNs) usually provide vital support for collecting, processing, and forwarding the real-time information in mission-critical applications where medium access control (MAC) protocols determine the channel accesscontrol capabilities and the energy consumption properties of these networks. This paper models the MAC protocol of CSMA/CAusing timed automata on themessage communication and the energy harvesting and analyzes the protocol throughmodel checkingof the major CTL properties. The modeling and analysis of CSMA/CA protocol with the comparative experiments give someperformance results and also reveal that timing error may cause deadlock, and the accessibility is satisfied if no deadlock exists.

1. Introduction

Wireless sensor networks (WSNs) are multihop self-organ-izing networks consisting of sensor nodes through wirelesscommunication and usually provide vital support for collect-ing, processing, and forwarding the real-time informationin mission-critical applications, but the networks face manychallenges for the limit energy, memory, and computingpower in the sensor nodes [1]. One of these challenges is todesign the effective medium access control (MAC) protocols,which determine the channel access control capabilities andthe energy consumption properties of WSNs [2]. The MACprotocol of CSMA/CA (Carrier Sense Multiple Access withCollisionAvoidance) for carrier transmission inWSNs avoidscollisions by transmitting only when checking to be sure thechannel is idle [3].

Bertocco et al. [4] analyzed the performance of CSMA/CA-based sensor networks for industrial monitoring usingthe experimental tests on a test bed, which consisted of awireless sensor network, one personal computer, and a digitaloscilloscope. Zhu et al. [5] presented a slotted CSMA/CA

scheme MultiCSMA for WSNs and simulated the proposedscheme to validate the performance improvement using theNS2 network simulator. Youn et al. [6] presented aQoSmech-anism supporting CSMA/CA for WSNs and theoreticallyanalyzed the proposed method. Chen et al. [7] presented ananalytical model for evaluating the CSMA/CA protocol andused NS2 to evaluate the protocol performance in the small-scale application of WSNs. The above-mentioned researcheshavemany interesting discoveries on theCSMA/CAprotocol,but we still need to be sure that all explicitly stated propertiesare satisfied in WSNs.

To more accurately verify the CSMA/CA protocol inenergy-harvesting WSNs [8], this paper models CSMA/CAusing timed automata and analyzes the protocol using theUPPAALmodel checker [9].The rest of the paper is organizedinto four sections. Section 2 briefly introduces related workon energy harvesting forWSNs. Section 3 proposes the timedautomata models of the CSMA/CA protocol in energy-harvesting WSNs. Section 4 gives the results of UPPAALmodel checking and the TinyOS-based comparative experi-ments. Finally, the conclusions are presented in Section 5.

Hindawi Publishing CorporationInternational Journal of Distributed Sensor NetworksVolume 2015, Article ID 257157, 7 pageshttp://dx.doi.org/10.1155/2015/257157

Page 2: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

2 International Journal of Distributed Sensor Networks

bk[id]

Clear(id),

Clear(id),

Idle

Sent Send

Down

Waiting0

ldle?

Sync!

Col?a[id] == −1 &&

energy[id] = PDown + PListen

energy[id] = PListen

energy[id] = PSnd + PRcv

t = 0

ActivePeriod

ActivePeriod

counter = i ∗ backup,t = 0

i: backup_t

Counter = 0,energy[id] = PListen

t = 0energy[id] = PRcv,

2 ∗ counter

j: nodeid_t

Neighbor (id, j)t <=

t <=

t <=

ActivePeriodt >=

Figure 1: Timed automata model of message sending 𝑆𝑒𝑛𝑑𝑒𝑟(𝑖𝑑).

Down

Idle

Receive

Sync?

Sync?

Col!

ldle?energy[id] = PDown + PListen

energy[id] = PListen

ActivePeriod

ActivePeriod

energy[id] = PSnd

a[id]== NODES

Clear(id),collisions = col_count,

energy[id] = PListen + PRcv

Col_count++,

rcv++,energy[id] = PListen + PRcv,

t = 0

t <=

t >=

Figure 2: Timed automata model of message receiving 𝑅𝑒𝑐𝑒𝑖V𝑒𝑟(𝑖𝑑).

2. Energy Harvesting forWireless Sensor Networks

Sensor nodes with limited energy usually preventWSNs usedin many different application areas and may use energy-harvesting technologies to make WSNs perform their func-tions in long lifetimes [8]. Energy harvesting is a process ofobtaining energy from renewable environmental resourcessuch as solar, wind, heat, and vibration. In energy-harvestingWSNs, each sensor node is equipped with one or morecollectors to harvest energy from the environment [10]. Forexample, when using the solar panels as an energy collector,each node can continuously gain energy during the day,which can effectively prolong the network lifetime [11, 12].In only battery-powered WSNs, the energy of one sensornode gradually decreases over time, while the energy ofone sensor node in energy-harvesting WSNs has sustainablepower supply in a certain period of time until the node stopsor fails.

The MAC protocols for energy-harvesting WSNs maybe different from conventional battery-powered WSNs andneed some different design criteria, such as environmentaladaptability, backlog estimation, and frame length selection[13, 14]. CSMA/CA requires a delay in network activity aftereach transmission, which is proportionate to the priority levelof each device. CSMA/CA may improve access control andserve to reduce collisions in carrier transmission of energy-harvesting WSNs.

3. Modeling CSMA/CA Using Timed Automata

We model CSMA/CA for energy-harvesting WSNs usingtime automata, which are finite state automata with clock

constraints, can be seen as the abstract models of the real-time systems, and are widely used in verifying the correctnessof the real-time systems [15].

3.1. Message Communication. In energy-harvesting WSNsusing CSMA/CA, one sensor node senses the informationand transmits it to the sink node via multihop, during whichthe listen and sleep mechanism reduces the probability ofpacket collisions [3]. We set up a set of cursors 𝑛𝑜𝑑𝑒𝑖𝑑 𝑡to record all nodes. For each 𝑖𝑑 ∈ 𝑛𝑜𝑑𝑒𝑖𝑑 𝑡, its action canbe described with the timed automata models of 𝑆𝑒𝑛𝑑𝑒𝑟(𝑖𝑑)and the 𝑅𝑒𝑐𝑒𝑖V𝑒𝑟(𝑖𝑑). 𝑆𝑒𝑛𝑑𝑒𝑟(𝑖𝑑) means message sendingand 𝑅𝑒𝑐𝑒𝑖V𝑒𝑟(𝑖𝑑) means message receiving. Additionally, atimed automata model of 𝐶𝑙𝑜𝑐𝑘 is given for describing a timeperiod.

The timed automata model of message sending is shownin Figure 1. In themodel, the initial sleep state is𝐷𝑜𝑤𝑛; whenreceiving the signal 𝐼𝑑𝑙𝑒?, the node goes into the 𝐼𝑑𝑙𝑒 state,𝐴𝑐𝑡𝑖V𝑒𝑃𝑒𝑟𝑖𝑜𝑑 represents the time period of one node activity,and we use an array 𝑎[𝑖] to identify if the channel is idle.𝑎[𝑖] == −1 indicates that the channel of a neighbor node 𝑖is idle, and 𝑎[𝑖] == 𝑁 shows that there is a collision betweenthe node and its neighbor node 𝑖; that is, the channel is busy.If the channel is busy, the node returns to the state 𝐼𝑑𝑙𝑒 andcontinues to listen to the channel. If the channel is idle, thenodewaits for a random time and then sends datawithweightvalue 𝑏𝑘[𝑖𝑑] to represent a random time. Here, using theweight value can reduce the probability of packet collisionswhen sending one message.

Figure 2 shows the timed automata model of messagereceiving. In the model, 𝑆𝑦𝑛𝑐? indicates the synchronizationwith 𝑆𝑒𝑛𝑑𝑒𝑟(𝑖𝑑). 𝑐𝑜𝑙 𝑐𝑜𝑢𝑛𝑡 records the number of collisionsthe node sends.There are two branches from the 𝐼𝑑𝑙𝑒 state to

Page 3: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

International Journal of Distributed Sensor Networks 3

Idle

ldle!

t = 0 t = 0

ActivePeriod

ActivePeriod

t == ActiveCyclet ==

ActiveCyclet <=

t <=

Figure 3: Time automata model of 𝐶𝑙𝑜𝑐𝑘.

the 𝑅𝑒𝑐𝑒𝑖V𝑒 state, in which the one branch indicates that thebusy channelwill increase the number of collisions, empty thechannel𝐶𝑙𝑒𝑎𝑟(𝑖𝑑), and update the energy consumption valueat the same time, and the other branch indicates the messagewill be received in a correct way.

As shown in Figure 3, 𝐶𝑙𝑜𝑐𝑘 simulates a clock cycle,including the activity time and sleep time of one node, inwhich sending and receiving messages need to be completed.𝐼𝑑𝑙𝑒! represents the synchronization with 𝑆𝑒𝑛𝑑𝑒𝑟(𝑖𝑑) and𝑅𝑒𝑐𝑒𝑖V𝑒𝑟(𝑖𝑑).

3.2. Energy Harvesting. In energy-harvestingWSNs, the sen-sor nodes may have five states, including 𝐷𝑜𝑤𝑛, 𝐶ℎ𝑎𝑟𝑔𝑖𝑛𝑔,𝐿𝑖𝑠𝑡𝑒𝑛𝑖𝑛𝑔, 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑖𝑛𝑔, and 𝑅𝑒𝑐𝑒𝑖V𝑒. As shown in Figure 4,in the initial state, the battery energy is the total energy ofone node, and the node goes into 𝐶ℎ𝑎𝑟𝑔𝑖𝑛𝑔 at a certainprobability. When the energy of the node reaches a standardvalue, energy charging is stopped and the node enters the𝐿𝑖𝑠𝑡𝑒𝑛𝑖𝑛𝑔 state to detect if the channel is idle. If the channel isidle, the node sends data; otherwise, it goes into the waitingstage and listens again after a random time.

The energy-harvesting WSNs obtain energy from theenvironment; so when modeling the energy harvesting ofthe sensor nodes, we need to consider the energy-harvestingrates, which are not uniformly changing as they may beaffected by the changes of environmental factors and humaninterventions, such as the light intensity, the local climateconditions, and the buildings and trees in the shade. Inthe CSMA/CA using energy harvesting, we focus upon thecharging process in energy harvesting and give the timedautomata model of energy acquisition 𝐻𝑎𝑟V𝑒𝑠𝑡𝑒𝑟(𝑖𝑑) shownin Figure 5.

In Figure 5, the initial state of one node is 𝐷𝑜𝑤𝑛 for thesleep status and it goes into 𝑆1 with the probability 𝐷𝐶 andinto 𝑆2 with the probability 𝐷𝐼. If the state of one node goesinto 𝑆1 and the node receives the broadcast message 𝐺𝑜𝐼𝑑𝑙𝑒at the same time, the node will go into the 𝐼𝑑𝑙𝑒 state and theresidual energy 𝑒𝑛𝑒𝑟𝑔𝑦[𝑖𝑑] is updated, and if 𝑒𝑛𝑒𝑟𝑔𝑦[𝑖𝑑] < 0,the node will die. After the node enters the 𝑆2 state, due tothe different rate of energy harvesting, the node periodicallygoes into the𝐶ℎ𝑎𝑟𝑔𝑖𝑛𝑔 state and updates the energy collectedfrom the environment, and when the collected energy fromenvironment 𝑠[𝑖𝑑] reaches a certain value defined as𝑀𝐴𝑋,the node goes into the 𝐼𝑑𝑙𝑒 state; if 𝑠[𝑖𝑑] < MAX, thenode continues to harvest energy from the environment tocharge. In Figure 6, the message 𝑐ℎ𝑎𝑛𝑔𝑒! is broadcasted every

Table 1: Parameters used in analyzing CSMA/CA.

Parameter ValueNetwork size in real experiments ≤100Network size in UPPAAL model checking ≤10Communication radius 10m∼30mPacket length: 𝐾 100 bitsNode initial energy: 𝐸

0100000mJ

𝜆𝐻

1𝐸elec 100 nJ/bit𝜀𝑓𝑠

200 pJ/bit/m2

𝐶𝐻𝐴𝑁𝐺𝐸 𝑃𝐸𝑅𝐼𝑂𝐷 time and synchronizes with 𝑐ℎ𝑎𝑛𝑔𝑒? in𝐻𝑎𝑟V𝑒𝑠𝑡𝑒𝑟(𝑖𝑑).

4. Analyzing CSMA/CA Using UPPAAL

We analyze the CSMA/CA protocol in energy-harvestingWSNs using the UPPAAL model checker [9] about the CTLproperties such as no deadlock, reachability, and perfor-mance factors. The performance is also comparatively evalu-ated through experiments on TOSSIM simulator [16], whichsimulates the state-of-the-art TinyOS-based CSMA/CA realapplications [13, 14, 17, 18] with the SolarCastalia energy-harvesting model [19]. In the following UPPAAL modelchecking and experiments, the amount of energy harvested𝐸𝐻is calculated by (1) [19]; the transmission energy 𝐸

𝑇𝑋for

transmitting𝐾 bits of information between two sensor nodesis calculated by (2) [20]; the consumed energy𝐸

𝑅𝑋for receiv-

ing𝐾 bits of information by one sensor node is calculated by(3) [20]. The parameters in analyzing CSMA/CA are shownin Table 1:

𝐸𝐻= ∫

𝑡2

𝑡1

𝜆𝐻𝐷𝑡𝑑𝑡, (1)

𝐸𝑇𝑋= 𝐾 × 𝐸elec + 𝜀𝑓𝑠 × 𝐾 × 𝑑

2, (2)

𝐸𝑅𝑋= 𝐾 × 𝐸elec, (3)

where 𝐷𝑡is the actual measurement energy value, 𝜆

𝐻

is the energy-harvesting weighting value [18], [𝑡1, 𝑡2] is the

energy-harvesting time interval,𝐸elec is the energy consumedby the electronics in the transmitter or receiver, and 𝜀

𝑓𝑠is the

energy consumption of the signal power amplifier per squaremeter.

4.1. No Deadlock. Deadlock refers to blocking between pro-cesses. In UPPAAL, the property can be specified by the CTLformula as

𝐴 [] not 𝑑𝑒𝑎𝑑𝑙𝑜𝑐𝑘 or 𝐴 []!deadlock. (4)

In the energy-harvesting WSNs, we verify the prop-erty of CSMA/CA with different timing strategies, whichdecide the parameter values of 𝐴𝑐𝑡𝑖V𝑒𝑃𝑒𝑟𝑖𝑜𝑑, 𝑀𝐴𝑋, and

Page 4: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

4 International Journal of Distributed Sensor Networks

Charging

Down

Receive

Listening

Transmitting

Charging

Intercept the channel

Channel busy

Transfer complete

Intercept the channel

Collision

Channel freetransport message

Close thecommunication

module

Figure 4: State transformations of energy harvesting.

D1

DC

S1

S2

Idle

ChargingDie

Down

GoIdle?

change?

GoIdle?

energy[id] < 0s[id] == MAX

energy[id] = W∗ s[id] + (1 − W)b[id] – Pdown − PIdle

t = 0

energy[id] = W∗ s[id] + (1 − W) ∗ b[id] − PDown

s[id] < MAX

ActivePeriodt <=

ActivePeriodt >=

Figure 5: Time automata model of energy acquisition𝐻𝑎𝑟V𝑒𝑠𝑡𝑒𝑟(𝑖𝑑).

Change!

x == CHANGE_PERIOD

x = 0

CHANGE_PERIODx<=

Figure 6: Time automata model of periodically harvesting energy.

𝐶𝐻𝐴𝑁𝐺𝐸 𝑃𝐸𝑅𝐼𝑂𝐷 in our proposed models. The UPPAALand experimental results show that when setting up the cor-rect timing strategies, CSMA/CAhas no deadlock; otherwise,the timing errors may cause deadlock.

4.2. Reachability. Reachability refers to the fact that if thereare sensor nodes sending message, the nodes receiving the

messagemust exist. InUPPAAL, the property can be specifiedby the CTL formula as

𝐴 [] forall (𝑖 : Nodes) forall (𝑗 : Nodes)

Sender (𝑖) .Sent && Neighbor (𝑖, 𝑗)

imply Receiver (𝑗) .Receive.

(5)

Page 5: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

International Journal of Distributed Sensor Networks 5

13 17 21 25 29 33 37 41 45 49Time

Prob

abili

ty0.10

0.09

0.08

0.07

0.06

0.05

0.04

0.03

0.02

0.01

0

Figure 7: Case 1 of collision probability versus time.

The UPPAAL and experimental results of our proposedmodels show that these models satisfy the reachability if nodeadlock exists.

4.3. Collision Probability over Time. The property of collisionprobability over time can be specified inUPPAAL by the CTLformula as

Pr [𝑡𝑖𝑚𝑒 ≤ 160] (< >𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛 𝑡𝑖𝑚𝑒𝑠 > 0) (6)

which shows the probability of the fact that there are morethan zero collisions if the time is shorter than 160 s.

After 738 times, the confidence value is 0.95 when theprobability is in 0.0713, 0.1705. In Figures 7 and 8, the linecharts of UPPAAL results show two cases of the collisionprobability versus time in two different backoff times repre-sented by 𝑏𝑘[𝑖𝑑] in our proposedmodels and indicate that thecollision probability is growing over time and has differentvalues in different backoff times, which are also presented bythe scattered plots of the experimental results.

4.4. Probability of Collision Times. The property of the prob-ability of collision times can be specified in UPPAAL by theCTL formula as

Pr [𝑐𝑜𝑙𝑙𝑖𝑠𝑖𝑜𝑛𝑠 ≤ 50000] (< >𝑡𝑖𝑚𝑒 ≥ 1000) (7)

which shows the probability of the collision times is smallerthan 50000 and time is longer than 1000 s.

After 738 times, the confidence value is 0.95 when theprobability is in 0.95, 1. In Figure 9, the line chart of UPPAALresults shows one case of the probability distribution ofdifferent collision times and indicates that the probability isgrowing over collision times and the probability of having onecollision at least is less than 96%,which are also verified by thescattered plots of the experimental results.

13 17 21 25 29 33 37 41 45 49Time

Prob

abili

ty

0.11

0.12

0.10

0.09

0.08

0.07

0.06

0.05

0.04

0.03

0.02

0.01

0

Figure 8: Case 2 of collision probability versus time.

0 0.7 1.4 2.1 2.8 3.5 4.2 4.9 5.6Collisions

Prob

abili

ty

0.60

0.54

0.48

0.42

0.36

0.30

0.24

0.18

0.12

0.06

0

0.66

0.72

0.78

0.84

0.90

0.96

Figure 9: One case of the probability of collision times.

4.5. Probability of Energy Consumption. The property ofthe probability of energy consumption can be specified inUPPAAL by the CTL formula as

Pr [𝑝𝑜𝑤𝑒𝑟 ≤ 50000] (< >𝑡𝑖𝑚𝑒 ≥ 1000) , (8)

where 𝑝𝑜𝑤𝑒𝑟 = 𝑠𝑢𝑚(𝑒𝑛𝑒𝑟𝑔𝑦[𝑖] | 𝑖 : 𝑛𝑜𝑑𝑒𝑖𝑑 𝑡).The property shows the probability of the power is smaller

than 50000 and time is longer than 1000 s. In Figures 10and 11, the line charts of UPPAAL results show two casesof the probability distribution of energy consumption in twodifferent backoff times represented by 𝑏𝑘[𝑖𝑑] in our proposedmodels and indicate that the probability is growing overenergy consumption and has different values in different

Page 6: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

6 International Journal of Distributed Sensor Networks

Energy33360 33670 33980 34290 34600 34910

Prob

abili

ty

0.60

0.54

0.48

0.42

0.36

0.30

0.24

0.18

0.12

0.06

0

0.66

0.72

0.78

0.84

0.90

0.96

Figure 10: Case 1 of probability distribution of energy consumption.

Energy33590 33860 34130 34400 34670 34940

Prob

abili

ty

0.60

0.54

0.48

0.42

0.36

0.30

0.24

0.18

0.12

0.06

0

0.66

0.72

0.78

0.84

0.90

0.96

Figure 11: Case 2 of probability distribution of energy consumption.

backoff times, which are also verified by the scattered plotsof the experimental results.

According to the verification results shown in Table 2, wemay get the reasonable retreat backoff time through continualadjustments, which cannot only reduce the probability ofcollision but also reduce energy consumption.

5. Conclusions

The CSMA/CA protocol in energy-harvesting WSNs deter-mines the distribution of channel and communicationresources and constructs the underlying network structurewhich has a great influence upon the network performance.

Table 2: Verification results.

Property Verification result

(1) It is satisfied when setting up the correct timingstrategies.

(2) It is satisfied if no deadlock exists.

(3) Collision probability is growing over time and hasdifferent values in different backoff time.

(4)Probability is growing over collision times and theprobability of having one collision at least is lessthan 96%.

(5) Probability is growing over energy consumptionand has different values in different backoff times.

We propose the timed automata models of message sending,message receiving, and energy acquisition in CSMA/CAof energy-harvesting WSNs. The results of analyzing theprotocol through UPPAAL model checking reveal someperformance trends and show that timing error may causedeadlock, and the accessibility is satisfied if no deadlockexists. In the future work, we will verify and analyze otheraspects of the CSMA/CA protocol, such as the collision pro-cesses, and help researchers to model, automatically verify,and evaluate the performance more comprehensively.

Conflict of Interests

The authors declare no conflict of interests.

Acknowledgments

The authors would like to thank the reviewers for thevaluable comments and suggestions, which have helped toimprove the paper. This work was supported by the NationalNatural Science Foundation of China (Grant nos. 61501253,60905040, and 61300239), the Basic Research Program ofJiangsu Province (Natural Science Foundation) (Grant nos.BK20131382, BK20151506), the 11th Six Talent Peaks Programof Jiangsu Province (Grant no. XXRJ-009), China Postdoc-toral Science Foundation (Grant no. 2013M531393), JiangsuPlanned Projects for Postdoctoral Research Funds (Grant no.1102102C), and JiangsuGovernment Scholarship forOverseasStudies (Grant no. JS-2013-209).

References

[1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci,“Wireless sensor networks: a survey,” Computer Networks, vol.38, no. 4, pp. 393–422, 2002.

[2] P. Suriyachai, U. Roedig, and A. Scott, “A survey of MACprotocols for mission-critical applications in wireless sensornetworks,” IEEE Communications Surveys & Tutorials, vol. 14,no. 2, pp. 240–264, 2012.

[3] M. Khanafer, M. Guennoun, and H. T. Mouftah, “A surveyof beacon-enabled IEEE 802.15.4 MAC protocols in wirelesssensor networks,” IEEE Communications Surveys & Tutorials,vol. 16, no. 2, pp. 856–876, 2014.

Page 7: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

International Journal of Distributed Sensor Networks 7

[4] M. Bertocco, G. Gamba, A. Sona, and S. Vitturi, “Performancemeasurements of CSMA/CA-based wireless sensor networksfor industrial applications,” in Proceedings of the Instrumenta-tion and Measurement Technology Conference (IMTC ’07), pp.1–6, May 2007.

[5] J. Zhu, Z. Tao, and C. Lv, “Performance improvement for IEEE802.15.4 CSMA/CA scheme in large-scale wireless multi-hopsensor networks,” IET Wireless Sensor Systems, vol. 3, no. 2, pp.93–103, 2013.

[6] M. J. Youn, Y.-Y. Oh, J. Lee, and Y. Kim, “IEEE 802.15.4based QoS support slotted CSMA/CAMAC for wireless sensornetworks,” in Proceedings of the International Conference onSensor Technologies and Applications (SENSORCOMM ’07), pp.113–117, Valencia, Spain, October 2007.

[7] Z. Chen, C. Lin, H. Wen, and H. Yin, “An analytical modelfor evaluating IEEE 802.15.4 CSMA/CA protocol in low-ratewireless application,” in Proceedings of the 21st InternationalConference on Advanced Information Networking and Appli-cationsWorkshops/Symposia (AINAW ’07), pp. 899–904, May2007.

[8] R. J. M. Vullers, R. V. Schaijk, H. J. Visser, J. Penders, andC. Hoof, “Energy harvesting for autonomous wireless sensornetworks,” IEEE Solid-State Circuits Magazine, vol. 2, no. 2, pp.29–38, 2010.

[9] G. Behrmann, A. David, and K. G. Larsen, “A tutorial onUPPAAL,” in Formal Methods for the Design of Real-TimeSystems, vol. 3185 of Lecture Notes in Computer Science, pp. 200–236, Springer, Berlin, Germany, 2004.

[10] S. W. Arms, J. H. Galbreath, C. P. Townsend et al., “Energyharvesting wireless sensors and networked timing synchroniza-tion for aircraft structural health monitoring,” in Proceedingsof the 1st International Conference on Wireless Communication,Vehicular Technology, Information Theory and Aerospace andElectronic Systems Technology (Wireless VITAE ’09), pp. 16–20,May 2009.

[11] P. Corke, P. Valencia, P. Sikka, T. Wark, and L. Overs, “Long-duration solar-powered wireless sensor networks,” in Proceed-ings of the 4th Workshop on Embedded Networked Sensors(EmNets ’07), pp. 33–37, June 2007.

[12] P. Sikka, P. Corke, P. Valencia, C. Crossman, D. Swain, and G.Bishop-Hurley, “Wireless adhoc sensor and actuator networkson the farm,” in Proceedings of the 5th International Conferenceon Information Processing in Sensor Networks (IPSN ’06), pp.492–499, April 2006.

[13] F. Iannello, O. Simeone, and U. Spagnolini, “Medium accesscontrol protocols for wireless sensor networks with energyharvesting,” IEEE Transactions on Communications, vol. 60, no.5, pp. 1381–1389, 2012.

[14] X. Fafoutis and N. Dragoni, “Analytical comparison of MACschemes for energy harvesting—wireless sensor networks,” inProceedings of the 9th International Conference on NetworkedSensing Systems (INSS ’12), pp. 1–6, IEEE, Belgium, June 2012.

[15] J. Bengtsson andW.Yi, “Timed automata: semantics, algorithmsand tools,” in Lectures on Concurrency and Petri Nets, W. Reisigand G. Rozenberg, Eds., vol. 3098 of Lecture Notes in ComputerScience, pp. 87–124, Springer, Berlin, Germany, 2004.

[16] E. Perla, A. O. Cathain, R. S. Carbajo et al., “PowerTOSSIMz: realistic energy modelling for wireless sensor networkenvironments,” in Proceedings of the 3nd ACM Workshop onPerformance Monitoring and Measurement of HeterogeneousWireless and Wired Networks, pp. 35–42, October 2008.

[17] J. H. Hauer, R. Daidone, R. Severino et al., “An open-sourceIEEE 802.15. 4 MAC implementation for TinyOS 2.1,” inProceedings of the 8th European Conference on Wireless SensorNetworks (EWSN ’11), pp. 1–2, February 2011.

[18] D. Mantri, N. R. Prasad, and R. Prasad, “Scheduled CollisionAvoidance in wireless sensor network using Zigbee,” in Proceed-ings of the International Conference on Advances in Computing,Communications and Informatics (ICACCI ’14), pp. 2129–2134,Delhi, India, September 2014.

[19] J. M. Yi, M. J. Kang, and D. K. Noh, “SolarCastalia: solar energyharvesting wireless sensor network simulator,” InternationalJournal of Distributed Sensor Networks, vol. 2015, Article ID415174, 10 pages, 2015.

[20] Z. Chen, S. Li, and W. Yue, “Memetic algorithm-based multi-objective coverage optimization for wireless sensor networks,”Sensors, vol. 14, no. 11, pp. 20500–20518, 2014.

Page 8: Research Article Modeling and Analyzing CSMA/CA Protocol for …downloads.hindawi.com/journals/ijdsn/2015/257157.pdf · 2015-11-24 · Research Article Modeling and Analyzing CSMA/CA

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Journal ofEngineeringVolume 2014

Submit your manuscripts athttp://www.hindawi.com

VLSI Design

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

The Scientific World JournalHindawi Publishing Corporation http://www.hindawi.com Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Modelling & Simulation in EngineeringHindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

DistributedSensor Networks

International Journal of