<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>International Conference on Advanced Aspects of Software Engineering
ICAASE, December</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Time Petri Net model for CL-MAC with Packet Loss Protocol in Wireless Sensor Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ahmed Louazani</string-name>
          <email>ahmedlouazani@yahoo.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Larbi Sekhri</string-name>
          <email>larbi.sekhri@univ-oran.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Department, University of Oran1, Ahmed Benbella, Algeria, Industrial Computing and Networking Laboratory</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <volume>0</volume>
      <fpage>1</fpage>
      <lpage>02</lpage>
      <abstract>
        <p>Wireless Sensor Networks (WSN) are expected to operate as long time as possible in all applications and environments. Facing energy challenge, software developers' have to design save-energy programs. In this paper, an extended version of CL-MAC (CrossLayer-MAC) is slightly presented dealing with packet loss problem modeled using Time Petri net (TPN). TiNA (Time Net Analyzer) tool is used to validate the proposed model. The obtained properties such liveness, boundedness and reversibility prove the correct behavior of the new version of CLMAC where lost packets problem is solved. Basically, CL-MAC protocol was designed to reduce both energy and latency. Its main engine is to wake-up only nodes within the routing path.</p>
      </abstract>
      <kwd-group>
        <kwd>- Wireless Sensor Networks</kwd>
        <kwd>Crosslayer Optimization</kwd>
        <kwd>CL-MAC Protocol</kwd>
        <kwd>Energy consumption</kwd>
        <kwd>Delay sensitive</kwd>
        <kwd>Time Petri net</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In literature, many WSN protocols have been proposed
to decrease energy wastage resources such as idle
listening, over emitting, and collision. CL-MAC
[Kec 13], [Kec 10] is one of them and it was designed
for delay sensitive application such as forest fire
detection and chemical industry monitoring. It’s an
energy efficient cross layer protocol, where MAC and
network layers share control information variables to
build routing table, neighbor list, and reserve a low
latency path from the source to
the sink. As mentioned in [Kec 08], [Kec 10], we have
described CL-MAC protocol and compared it with
concurrent solutions. The two adjacent layers MAC and
network exchange control information to find the
shortest path to the sink so that all nodes belonging to
the same path relying initiator node to the sink must be
ready to route packets at the right moment. Any other
node which is a neighbor to one path-node not
belonging to the path has to turn off its transceiver from
the beginning to the end of the routing process.
CLMAC considerably reduces energy consumption using
only three communication packets (CTS, DATA, ACK)
instead of four ones (RTS, CTS, DATA, ACK) unlike
other MAC protocols. Referring to energy consumption
model [Est 99], [Kyu 14], and according to the node
radio characteristics, for each hop, CL-MAC saves the
amount of needed energy to communicate RTS packet
(in [24], RTS packet size is equal to 118 bits). Hence,
for only one hop communication, the amount of saved
energy is calculated as follow (we assume that nodes
are 10 meters distant):
(1)
(2)
CL-MAC protocol has good performances under the
following hypotheses: A safe network, pleasant
environment, flat topology and using control
information of two adjacent networks’ layers (network
and MAC). These hypotheses bring us to spell out its
vulnerability face to security issue [Yas 12]. In [Lou 14]
a defense mechanism for the CL-MAC protocol against
wormhole attacks is presented. Another communication
issue remains hidden by the second hypothesis that our
paper deals with. In real environment field deployment,
many other communication handicaps occurs leading to
process or checks for an alternative one. Then, the
interrupted communication will restart from the
beginning on the new calculated path (see figure 2).
Delay
DIFS
)
S
T
C
(
v
a</p>
      <p>N
M
L
packet loss like: interference, obstacle, impediment, and
nodes’ moving. So, to promise packet delivery, the
source node will retransmit to destination the
noacknowledged packet. The next section deals with
packet loss problem in CL-MAC.</p>
      <p>The remainder of this paper is structured as follows.
Section 2 covers the new CL-MAC version reviews
with packet loss problem. Section 3 uses TPN model for
the proposed solution and experimental results are
given. Section 4 is reserved for the conclusion to
summarize the paper and propose futures works.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Proposed Solution</title>
      <p>To overcome the lost packet problem, two variables are
added to CL-MAC algorithm: (i) Nb_transmission
variable to count the lost packet retransmission tentative
number, (ii) Waiting_delay a countdown variable to
measure the estimated needed packet propagation time.
When a source node wants to communicate with
another one (destination), four packets are exchanged
between both nodes as shown in figure 1. Before
sending its first packet “RTS”, node “A” sets
waiting_delay variable to the estimated RTS packet
propagation time value. This duration is the elapsed
time from the injection of the first RTS bit in the
network by node “A” till the reception of the last CTS
bit by the same node as a replay. Hence, we formalize
the packet propagation time by equation (3).</p>
      <p>(
)
(
)
(3)
Where  is the time for equation adjustment.</p>
      <p>Nb_transmission variable is set to one indicating that’s
the first packet transmission. Then node “A” waits until
waiting_delay variable expire. When it elapsed
(waitin_delay = 0), node “A” concludes that his packet
was lost (didn’t reach node “B”), then will fetch
whether Nb_transmission didn’t exceed a given
threshold retransmission number. In our proposed
solution, we fix the threshold to 3 retransmissions of the
same lost packet (here it’s fixed to 3 just to test the
proposed solution behavior). If Nb_transmission is
equal or less than 3, then node “A” re-sets
waiting_delay, increments Nb_transmission and
retransmits the packet. If Nb_transmission exceeds 3
transmissions temptations, the source node halts the
current communication and start finding new path</p>
      <sec id="sec-2-1">
        <title>Page 93</title>
        <p>y )
a S
l T
eD (
R
v
a</p>
        <p>N
DIFS
D
A
B
C
DIFS
RTS</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Modeling CL-MAC</title>
    </sec>
    <sec id="sec-4">
      <title>Packets Loss</title>
      <p>In order to formally prove and verify the correct
behavior of our proposed solution, we have chosen a
suitable mathematical model according to
communication protocol specifications. The protocol</p>
    </sec>
    <sec id="sec-5">
      <title>Protocol</title>
    </sec>
    <sec id="sec-6">
      <title>With</title>
      <p>operating mechanism is a time discret events so Time
Petri nets (TPN) seem more attractable and suitable for
both their ability to easily model temporal constraints of
communication scenarios, and the existence of TiNA
tool [Ber 04]. TiNA is a software tool for TPN and
automatons properties’ verification like boundedness,
liveness, deadlock-freeness, reversibility, etc. [Ber 83].</p>
      <sec id="sec-6-1">
        <title>3.1 Model Hypothesis</title>
        <p>CL-MAC with packet loss TPN model works under the
following hypothesis: DIFS duration = SIFS duration =
1 time unit, control packets RTS, CTS and ACK
consume 3 time units each one, DATA packet requires
10 time units for its transmission. One unit time is
added (reserved) for packet processing (a new packet
generation, received packet reading) and also for some
environment’s handicap. M is the initial marking.
Initially, only the places p1, p8, p14 and p17 are marked
by one token each one.</p>
      </sec>
      <sec id="sec-6-2">
        <title>3.2 Model explanation</title>
        <p>In this section we give a TPN model for the proposed
solution. The lost packet event may occur when node
sends RTS, CTS, DATA, or ACK packet that didn’t
reach its destination (one hop neighbor). After waiting
the replay a sufficient time needed for packet and
packet replay propagation, the sender node retransmits
the packet again (the lost one). Whatever is the packet,
the process is the same. A packet is retransmitted at
most four times. After the fourth packet transmission
fail, then chronologically node will interrupt this
communication, looks for a new path and restarts the
communication on the new path. So, to model this idea,
we first describe TPN model transitions (see table 1).
Neighbor node, not belonging to the routing path, switches to sleep mode
Neighbor node, not belonging to the routing path, switches to weak-up mode after communication
completion.</p>
        <p>CTS packet sent by next hope node
Receiver sends DATA packet to the next hope node.</p>
        <p>Next hope node switches to sleep mode
DATA packet losing.</p>
        <p>DATA packet retransmission after (
(
)
)
t16 et t18
t17</p>
        <p>Empty retransmission counter after a successful transmission</p>
        <p>Sender initialization for a new communication after failures (after 4 retransmission fails).</p>
        <sec id="sec-6-2-1">
          <title>Page 94</title>
          <p>t19, t20
The communication nature in such networks is a
multi-hop scenario. An end-to-end packet
communication is a replication of the same atomic
communication between two neighbors node. So that
the destination node in the ith communication will be
the source of the (i+1)th one. For this reason, our
model is restricted to only one hop communication.
As illustrated in Figure 3, each node in the network is
modeled as follow:
Sender: Transitions t1, t2, t3, t4, t14, t15, t16, t17 and
t18.The first transitions t1 stands for RTS packet
sending process at precise moments modeled by
temporal intervals associated to the transitions (RTS
packet is sent after a DIFS and DATA packet is sent
after reception of a CTS within 3 to 4 time units).
Place p3 models node waiting state for CTS packet.
After sending a packet, the sender node will wait for a
replay from his path member neighbor as shown in
figure 1 (from the receiver). Whenever the sender
didn’t receive a replay to its initial sent packet,
retransmit it again and increments the counter
retransmission number. This action is modeled by
transition t14. Place p22 models the counter variable,
will then get one more token after t14 was getting
fired. If four token will be gathered in place p22,
transition t17 will then be fired (arc linking p22 to t17
is 4 weights). This situation means that DATA packet
is retransmitted four times. So the node has to halt this
communication and checks for another alternative
path taken into consideration that the actual
destination node is broken. Transition t3 depicts node
switching from waiting state to sleep state (p19).
Transition t15 is fired when ACK packet is received</p>
        </sec>
        <sec id="sec-6-2-2">
          <title>Page 95</title>
          <p>(as a replay to DATA packet reception) and t16 then
empties the place p22 (resets the retransmission
counter variable) if there are still tokens in. Transition
t4 allows node to switch to weak-up mode after a half
communication frame. In CL-MAC, a frame is
modeled by 44 time’s unit.</p>
          <p>Receiver is represented by four transitions, t5, t6, t7,
and t19. Transition t5 represents RTS packet
reception. Here, the receiver is ready to start a new
communication according to the exchanged schedule
in neighbor discovery phase (place p8 is marked by
one token). After receiving RTS packet, the receiver
node will then generates and transmits a CTS packet
as a replay to the sender node. Place p9 will be then
marked by one token as indication of the waiting state
to DATA packet. Whenever t6 is fired indicates
reception of DATA packet from the sender node.
ACK packet will be sent by the same transition t6
represented by the token injected in place p7.
Transition t19 forces the receiver node to switch to
sleep mode after staying a long time waiting for
DATA packet. Also t7 allows the receiver to switch to
sleep mode but is fired when place p12 gets one token
representing a communication completion (ACK is
received from the next hope node). This allows the
communication process re-initialization on the side of
the destination receiver; the second one is the part of
the network between the receiver and the next-hope
node.</p>
          <p>Network is modeled by two parts. The first one
describes the neighborhood of both sender and
receiver. Places p18, p17 and, transitions t8 and t9
represent a neighbor node not belonging to the routing
path. Place p17 is marked by one token telling that the
node is ready to take part of the communication.
When it receives a packet not addressed to it (p17 will
get the second token), immediately it turns its
transceiver and switches to sleep mode. Transition t8
is fired and p18 gets one token as indicator of node
sleep state. Place p2 models the RTS packet
propagation in the network while p5 stands for the
propagation of the RTS packet replay (CTS) sent from
the receiver. As mentioned, a packet may be lost due
to the environment nature where the network is
deployed. Transition t13 here models all the obstacles
causing the loss of the packet. In our TPN model, both
transitions t6 and t13 have the same firing time’s
intervals drawing the competitively of these two
transitions. Only one will be fired (a packet will be
either received by the receiver as its intermediate
destination (here t6 is fired) or lost (t13 is fired)).
Place p7 stands for ACK packet propagation.</p>
        </sec>
      </sec>
      <sec id="sec-6-3">
        <title>3.3 CL-MAC with packet loss TPN Model Results</title>
        <p>Figure 4 illustrates the reachability analysis results of
the time Petri net using TiNA tool. The results reveal
that the TPN model, of the new version of CL-MAC
with packet loss protocol, has effectively good
properties:
i. Boundedness: the number of tokens in every place
is limited to one token except the place p22 witch
can get four token inside (that is 4-bounded).The
K-bounded property describes the well operating
of the CL-MAC protocol with packet loss. In our
solution, we have proposed that a lost packet will
be retransmitted again and again at most four
times (line 22 in the algorithm above reflects this
situation).
ii. Liveness: the net is deadlock freeness and each
transition is always able to be fire infinitely. This
property tells us that our solution ensures packet
delivery even if some communication handicap or
obstacles are present in the deployment
environment.
iii. Reversibility: the return of the TPN to its initial
state shows that the CL-MAC TPN model is
reversible. This last property confirms that the
new CL-MAC version didn’t halt whenever is lost
elsewhere, and the protocol tries to find other
alternative path after a communication fails.</p>
        <sec id="sec-6-3-1">
          <title>Page 96 Time Petri Net model for CL-MAC with Packet Loss Protocol in Wireless Sensor Networks ICAASE'2018</title>
          <p>After running several times, TiNA generates 1137
classes and 21 transitions. This great number of
classes makes impossible to represent the class graph
in this paper.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>4. Conclusion And Future Work</title>
      <p>In this paper, a new version of CL-MAC protocol
recovering the packet loss problem is presented. The
proposed solution is based on retransmitting the lost
packet until it will be received by destination or the
retransmission fails four successive times. We have
proposed a time Petri net based approach to model the
solution depicted by the given algorithm. Formal
analysis using TiNA tool allows proving some
properties of the TPN model. The obtained results
illustrate clearly the well operating of the new
extended version of CL-MAC protocol.</p>
      <p>In order to strengthen theoretical results, this work is
now under² implementation using OMNET++/Castalia
simulator to obtain empirical preliminary results in
order to enhance TPN model properties. As future
work, we try to secure this version of CL-MAC with
packet loss protocol against wormhole attacks.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [Yas 12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Yasir</surname>
          </string-name>
          .
          <article-title>An Outline of Security in Wireless Sensor Networks Threats, Countermeasures and Implementations</article-title>
          .
          <source>Wireless Sensor Networks and Energy Efficiency. Protocols, Routing and Management Book</source>
          , pp.
          <fpage>507</fpage>
          -
          <lpage>527</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [Est 99]
          <string-name>
            <given-names>D.</given-names>
            <surname>Estrin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Govindan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Heidemann</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Kumar</surname>
          </string-name>
          .
          <article-title>Next century challenges: Scalable coordination in sensor networks</article-title>
          ,
          <source>in Proceedings of the 5th IEEE/ACM Annual Conference on Mobile Computing and Networks(MobiCOM'99)</source>
          , Seattle, pp.
          <fpage>263</fpage>
          -
          <lpage>270</lpage>
          .
          <year>August 1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [Kyu 14]
          <string-name>
            <surname>Shi-Kyu Bae</surname>
          </string-name>
          .
          <article-title>Power Consumption Analysis of Prominent Time Synchronization Protocols for Wireless Sensor Networks</article-title>
          .
          <source>In (JIPS) Journal of Information Processing Systems</source>
          , vol.
          <volume>10</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>300</fpage>
          -
          <lpage>313</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [Kec 13]
          <string-name>
            <given-names>B.</given-names>
            <surname>Kechar</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.</given-names>
            <surname>Sekhri</surname>
          </string-name>
          .
          <article-title>CL-MAC: Cross-layer MAC Protocol for Delay Sensitive Wireless Sensor Network Applications</article-title>
          . in Petri NetsApplications, Book chapter, pp.
          <fpage>181</fpage>
          -
          <lpage>208</lpage>
          , May 14,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Kec 08]
          <string-name>
            <given-names>B.</given-names>
            <surname>Kechar</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Louazani</surname>
          </string-name>
          .
          <article-title>CL-MAC: An Energy Efficient Cross-Layer MAC Protocol with Latency Improvement in Wireless Sensor Network, in 17th International Conference on Computer Communication and etworks (ICCCN)</article-title>
          .
          <source>Virginia Institute</source>
          , USA,
          <fpage>3</fpage>
          -
          <lpage>7</lpage>
          Aug.
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [Kec 10 ]
          <string-name>
            <given-names>B. Kechar. L.</given-names>
            <surname>Sekhri</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.K.</given-names>
            <surname>Rahmouni</surname>
          </string-name>
          . CLMAC:
          <article-title>Energy Efficient and Low Latency CrossLayer MAC Protocol for Delay Sensitive Wireless Sensor Network Applications</article-title>
          .
          <source>In The Mediterranean Journal of Computers and Networks</source>
          , Vol.
          <volume>6</volume>
          , No.1. pp.
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [Ber 04]
          <string-name>
            <given-names>B.</given-names>
            <surname>Berthomieu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.O.</given-names>
            <surname>Ribet</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Vernadat</surname>
          </string-name>
          .
          <article-title>The tool TINA - Construction of abstract state spaces for Petri Nets and Time Petri Nets</article-title>
          . In
          <source>International Journal of Production Research</source>
          , Vol.
          <volume>42</volume>
          , No.
          <volume>14</volume>
          , pp.
          <fpage>2741</fpage>
          -
          <lpage>2756</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [Ber 83]
          <string-name>
            <given-names>B.</given-names>
            <surname>Berthomieu</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Menasche</surname>
          </string-name>
          .
          <article-title>An Enumerative Approach for Analyzing Time Petri Nets</article-title>
          . In FIP Congress Series, Elsevier Science Publishers, Vol.
          <volume>9</volume>
          , Amsterdam, Netherland, pp.
          <fpage>41</fpage>
          -
          <lpage>46</lpage>
          .
          <year>1983</year>
          ,
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [Lou 14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Louazani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Sekhri</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Kechar</surname>
          </string-name>
          .
          <article-title>A Security Scheme Against Wormhole Attack in MAC Layer for Delay Sensitive Wireless Sensor Networks</article-title>
          . In
          <source>International Journal of Information Technology and Computer Science (IJITCS)</source>
          , Vol.
          <volume>6</volume>
          , No.
          <volume>12</volume>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          ,
          <year>November 2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>