Internati
o
nal
Journal of Ele
c
trical
and Computer
Engineering
(IJE
CE)
V
o
l.
4, N
o
. 2
,
A
p
r
il
201
4, p
p
.
16
2
~
16
8
I
S
SN
: 208
8-8
7
0
8
1
62
Jo
urn
a
l
h
o
me
pa
ge
: h
ttp
://iaesjo
u
r
na
l.com/
o
n
lin
e/ind
e
x.ph
p
/
IJECE
Modelin
g and Simulation
of
NF
C Logi
cal Layer P
e
er-t
o-P
e
er
Mode using CPN and TA
Sa
eed Gha
s
emi*
, Leili Moha
mma
d
Khanli*
,
Mina Z
o
lfi*
, Gha
d
er
Ta
hma
s
ebpour*
* Depart
em
ent o
f
El
ectr
i
c
a
l
and Computer
Engin
eering
,
Un
iv
ersity o
f
Tab
r
iz, Tab
r
iz, Iran.
Article Info
A
B
STRAC
T
Article histo
r
y:
Received Nov 17, 2013
Rev
i
sed
Au
g
20
, 20
14
Accepted Aug 26, 2014
Network communication
tech
nologies hav
e
b
een
growing explosively
du
e to
the in
creasing
demand on fas
t
er
a
nd simpler communicatio
n; hen
c
e,
providing new
communication technolog
ie
s is a challenging tas
k
. To mak
e
this
tas
k
eas
y,
m
a
n
y
res
e
arch
ers
have
d
e
velop
e
d
differen
t
n
e
twor
k modeling
and simulation tools with differ
e
nt char
ac
terist
i
c
s. In this paper
,
sim
u
lation
of Near Field
Communication (NFC) l
ogical lay
e
r con
t
rol
protocol is
proposed to inv
e
stigate eff
i
cien
cy
of
NFC device in peer-to-p
e
er mode. For
this purpose, Co
lored Petr
i Net (
C
PN)
and Timed Automata (TA
)
have b
e
en
us
ed for anal
ys
es
. According t
o
the res
u
lts
, C
P
N was
better than TA for
simulating NFC logical lay
e
r
con
t
rol prot
o
c
ol b
e
cause it could
pro
v
ide more
details on
complex co
mmunication network.
Keyword:
App
licatio
n layer
Co
lo
red
p
e
tri net
Lo
gi
cal
l
a
y
e
r c
ont
rol
pr
ot
oc
ol
Near
fi
el
d c
o
m
m
uni
cat
i
on
T
i
me
d
a
u
t
o
ma
t
a
Copyright ©
201
4 Institut
e
o
f
Ad
vanced
Engin
eer
ing and S
c
i
e
nce.
All rights re
se
rve
d
.
Co
rresp
ond
i
ng
Autho
r
:
Saeed Ghasemi,
Depa
rtem
ent of Electrical a
nd Co
m
p
u
t
er
Engin
eer
ing
,
Un
i
v
ersity of
Tab
r
iz,
Tab
r
iz, Ir
an.
Em
a
il: ghasemi.saeed@gm
a
il
.com
1.
INTRODUCTION
RFID (rad
i
o
frequ
e
n
c
y id
en
tificatio
n
)
is
new typ
e
of te
chnology t
h
at trans
f
ers
power a
n
d data
wi
t
h
o
u
t
a
n
y
c
ont
act
a
n
d st
o
r
ed
dat
a
i
n
si
l
i
con c
h
i
p
.
It
u
s
es m
a
gnet
i
c
and
el
ect
rom
a
gnet
i
c
t
e
c
h
n
o
l
ogy
t
o
t
r
ans
f
er dat
a
bet
w
ee
n dat
a
-
carry
i
n
g devi
c
e
s.
T
h
e
ad
va
ntages of this t
echnology
in
com
p
are with othe
r
identification s
y
ste
m
s
make it growi
ng too fast and c
o
nque
r
ing huge m
a
rk
et place [1]. Im
provem
e
nt of RFID
resul
t
e
d i
n
dev
e
l
opm
ent
of so
m
e
t
echnol
o
g
i
e
s such as Ne
ar Fi
el
d C
o
m
m
uni
cat
i
on (N
FC
) t
h
at
wo
rk
s i
n
t
h
e
ran
g
e
o
f
13
.5
6
M
h
z.
NFC
i
s
si
m
i
l
a
r t
o
I
n
f
r
are
d
a
n
d
B
l
uet
oot
h t
e
c
h
n
o
l
o
gi
es,
b
u
t
t
h
e
r
e a
r
e s
o
m
e
di
ffere
nce
s
.
I
n
the Infrare
d
te
chnology da
ta
trans
f
ers
from
one
de
vice to t
h
e ot
he
r
de
vice whe
n
two int
e
rfaces
was
placed i
n
direct line,
but in NFC technol
ogy
, c
o
mmunication occurre
d
whe
n
two de
vices clos
e to each
other not
ex
actly in
th
e
straig
h
t
lin
e.
Mo
reo
v
e
r, Bl
ueto
o
t
h
was i
n
t
r
oduced t
h
e
device that com
m
unicates with eac
h
ot
he
r i
n
a f
u
rt
her
di
st
ance.
Ho
we
ver
,
ease
of
use, est
a
bl
i
s
hi
n
g
sec
u
re c
h
an
nel
f
o
r c
o
m
m
uni
cat
i
on,
usa
g
e i
n
di
ffe
re
nt
si
t
u
at
i
on an
d al
so
hi
gh s
p
ee
d t
h
at
n
eeds ve
ry
l
o
w
ener
gy
t
o
t
r
ans
f
er dat
a
a
nd s
o
m
e
ot
her ad
va
nt
ages
m
a
de NFC
t
e
c
h
n
o
l
o
gy
gr
o
w
i
n
g
t
o
o
fast
[2]
an
d m
a
ke s
o
m
e
fam
ous co
m
p
ani
e
s suc
h
as S
ony
,
Sam
s
un
g a
n
d
Ap
pl
e
use
d
t
h
i
s
t
ech
nol
ogy
i
n
t
h
ei
r
de
vi
ces.
The N
F
C
spe
e
d t
r
a
n
sfe
r
rat
e
i
s
10
6,
21
2
or
42
4
kb
ps
[3]
.
NFC
o
p
e
rat
e
s i
n
di
ffe
rent
m
odes:
reade
r
/writer,
peer-to-pee
r
, a
nd ca
rd em
ulation. Co
mm
unication in the Peer-t
o-Peer
m
ode occurs between
t
w
o
NFC
de
vi
ces an
d t
h
ey
sho
u
l
d
be
wo
r
k
ed i
n
t
h
e act
i
v
e m
ode.
Wh
en t
w
o de
vi
ce
s want
t
o
est
a
bl
i
s
h
connection
between each ot
her,
one of
t
h
em conside
r
s as a
n
initiator or a
master
and
the othe
r device ge
ts
the
featu
r
e
o
f
target o
r
slav
e m
o
d
e
.
Th
e m
a
ste
r
d
e
v
i
ce alway
s
in
itiates co
mm
u
n
i
catio
n
and
after co
m
p
lete th
e
in
itializat
io
n
between
two
p
a
rts th
ey co
u
l
d
b
e
ab
le to
ex
ch
ang
e
d
a
ta. They co
u
l
d
b
e
able to
tran
sfer virtu
a
l
busi
n
ess
car
ds
, di
gi
t
a
l
ph
ot
o
s
, an
d
som
e
o
t
her
ki
n
d
of
d
a
t
a
. The
arc
h
i
t
ect
ure
of t
h
e
R
F
com
m
uni
cat
i
on
pr
ot
oc
ol
i
n
pee
r-t
o
-
peer m
ode
i
s
re
prese
n
t
e
d
by
ISO/
IEC
1
8
0
9
2
as
NFC
I
P-1
[
4
]
.
T
h
e
N
F
C
I
P-
1
st
an
dar
d
i
z
e
d
Evaluation Warning : The document was created with Spire.PDF for Python.
I
S
SN
:
2
088
-87
08
IJEC
E V
o
l
.
4, No
. 2, A
p
ri
l
20
14
:
16
2 – 1
6
8
16
3
Anal
og a
nd
di
gi
t
a
l
prot
ocol
s
t
h
at
descri
be l
o
wer l
a
y
e
r.
N
F
C
appl
i
cat
i
ons
t
h
at
C
o
m
m
unicat
e i
n
t
w
o di
r
ect
i
ons,
need
LLC
P
l
a
y
e
r. L
L
C
P
i
n
c
r
e
a
ses f
u
nct
i
onal
i
t
y
pro
v
i
d
e
d
by
NFC
I
P-
1
[
5
]
.
Fi
gu
re 1.
O
S
I m
odel
s
fo
r NF
C
peer
-t
o
-
pee
r
m
ode
[5]
The
up
pe
r h
a
l
f
of
t
h
e
OS
I da
t
a
l
i
nk l
a
y
e
r
w
a
s nam
e
d LLC
l
a
y
e
r an
d t
h
e
l
o
we
r hal
f
wa
s
nam
e
d t
h
e
M
e
di
um
Access an
d C
ont
rol
(
M
AC
) l
a
y
e
r
w
h
i
c
h act
a
s
m
a
ppi
ng
f
o
r
s
p
eci
fi
es bi
ndi
ng
re
qui
rem
e
nt
t
o
L
L
C
P
(see Figure
1). LLCP includes connec
t
i
o
nl
ess t
r
an
sp
ort
,
co
nnect
i
o
n
ori
e
n
t
ed
tran
sp
ort, lin
k
acti
v
atio
n,
sup
e
r
v
i
s
i
o
n a
n
d
deact
i
v
at
i
o
n
and
asy
n
c
h
r
o
n
ous
b
a
l
a
nce
d
c
o
m
m
uni
cat
i
on.
C
o
n
n
ect
i
o
nl
ess
t
r
ans
p
o
r
t
p
r
ov
i
d
es an
u
n
ac
kn
owl
e
dge
d
dat
a
t
r
ansm
i
ssi
on s
e
rvi
ce a
n
d
has
m
i
nim
u
m
o
v
e
rh
ead. Conn
ectio
n or
ien
t
ed
tr
an
sp
or
t pr
ov
id
es a d
a
ta
t
r
a
n
sm
i
ssi
on ser
v
i
ce wi
t
h
se
que
nced
an
d
gu
ara
n
t
e
e
d
del
i
v
ery
of
se
rvi
ce
dat
a
uni
t
s
. LLC
P
by
usi
n
g l
i
n
k a
c
t
i
v
at
i
on
kn
o
w
s
whet
her
t
w
o
N
F
C
de
vi
ces i
n
co
mm
u
n
i
catio
n
rang
e and
reco
gn
ize co
m
p
atib
ility o
f
th
o
s
e d
e
v
i
ces. Su
perv
ision
sup
e
rv
ises th
e co
nnectio
n
to
t
h
e rem
o
t
e
pee
r
devi
ce a
n
d
de
act
i
v
at
i
on
deac
t
i
v
at
es l
i
nk
when
request
from
one of the
devices. L
L
CP
enables
Asy
n
c
h
r
o
no
us
B
a
l
a
nced M
o
d
e
(AB
M
)
bet
w
een se
rvi
ce e
n
dp
oi
nt
s
i
n
eac
h
peer
de
vi
ces
by
usi
n
g
a sy
m
m
e
t
r
y
mech
an
ism
.
Using
ABM serv
ice end
poin
t
s m
a
y in
iti
alize, supe
r
v
ise, rec
ove
r f
r
o
m
erro
rs a
n
d
sen
d
in
fo
rm
atio
n
at
an
y ti
m
e
[6
, 7
]
. Co
mm
uni
cat
ion
sy
st
em
I
m
pl
em
ent
a
t
i
on m
u
st
be ass
o
ciated
with a
n
alyses the
Correctness
and C
h
ecki
n
g the
eve
n
t se
que
nc
e of the
system.
In
t
h
is article, An
alysis
o
f
NFC
p
r
o
t
o
c
o
l
in
p
e
er-t
o
-
p
e
er m
o
d
e
is inv
e
stig
ated. LLCP layer is
ch
eck
ed
with
Ti
m
e
Petri Nets (TPN) and
Ti
m
e
d
Au
t
o
mata (TA). T
h
es
e two m
e
thods
are wi
dely us
ed for
m
odel
i
ng a
n
d
anal
y
s
i
s
o
f
c
o
m
m
uni
cat
i
on s
y
st
em
s.
2.
METHO
D
OL
OGY
2.
1. T
i
med
A
u
tom
a
ta
Tim
e
d autom
a
ton is a fi
nite state
m
achine extende
d
w
i
t
h
a s
e
t
of
real
-
v
al
ue
d cl
oc
ks.
C
l
oc
ks i
n
c
r
ea
s
e
in
th
e sam
e
ra
te an
d
syn
c
h
r
on
ou
sly and
con
s
tru
c
t fro
m
i
n
teg
e
r v
a
lu
e t
h
at in
d
i
cate real ti
m
e
. Th
e tra
n
sitio
n
p
u
t
s so
m
e
co
n
s
train
t
s on
gu
ard, wh
ich
ind
i
cate wh
eth
e
r
tran
sitio
n
is en
ab
led
or d
i
sab
l
ed
, an
d
tran
sitio
ns
m
a
y
i
n
cl
ude s
o
m
e
cl
ock reset
.
T
A
m
odel
s
and an
al
y
zes t
h
e
t
i
m
i
ng
beha
vi
o
r
an
d chec
ks t
h
e sa
fet
y
and l
i
v
el
i
n
ess of
th
e syste
m
. TA d
e
fin
ition
wou
l
d
b
e
sim
p
le
b
u
t
p
o
werfu
l an
d
con
s
id
ered
as form
al
lan
g
u
a
g
e
t
h
eory. Hen
ce, i
t
has cl
os
ure p
r
o
p
ert
i
e
s, d
eci
si
on p
r
obl
em
s, and s
ubcl
a
s
s
es and al
so
i
t
cont
ai
ns no
ndet
e
rm
i
n
i
s
t
i
c
an
d
d
e
term
in
istic tr
an
sitio
n stru
ctures.
In Ti
m
e
d Aut
o
m
a
t
on A i
s
a tupl
e (L
, l
0
, X,
Σε
, E, Inv
,
F, R) wh
ere: L is
a fin
ite set o
f
lo
catio
ns; l
0
is
th
e in
itial lo
catio
n
;
X is a
fin
i
te set o
f
po
sitiv
e real-v
al
u
e
d
clo
c
k
s
;
Σε
=
Σ
{
ε
} is a fin
ite set o
f
action
s
an
d
ε
is th
e silen
t
act
io
n
;
E
L×C (X)×
Σε
×
2
X
×
L
i
s
a
f
i
n
i
t
e
s
e
t
o
f
e
d
g
e
s
,
e
=
l,
γ
, a, R, l
′
E represents a
n
edge
fro
m
th
e lo
cati
o
n
l to
th
e l
o
catio
n
l
′
with
t
h
e g
u
a
rd
γ
, th
e
lab
e
l a an
d
the reset set R
X; In
v
C (X) L
assig
n
s
an
inv
a
rian
t to an
y lo
catio
n
[8
]. Th
ey restrict t
h
e invarian
ts t
o
co
nju
n
c
ts of term
s
o
f
th
e
fo
rm
x
r
for
x
X and r c
N and
{<,
≤
}. F
L is th
e set o
f
fin
a
l lo
catio
n
s
and
R
L is th
e set
o
f
rep
eated
lo
catio
n
s
[8]
.
Th
e sem
a
n
tics o
f
a tim
ed
au
tomato
n
A =
(L,
l0
, C,
Σε
, E,
Act, In
v, F, R) is a ti
m
e
d
transitio
n
syste
m
SA=(Q,
q
0
,
Σε
,
→
, F
′
, R
′
) with
Q=L×(R
≤
0)
X
,
q
0
=(
l
0
, 0) is th
e i
n
itial state, F
′
={
(l,
ν
)| l
F} a
n
d R
′
={(l,
Evaluation Warning : The document was created with Spire.PDF for Python.
I
J
ECE
I
S
SN
:
208
8-8
7
0
8
Mo
del
i
n
g
a
n
d
si
mul
a
t
i
o
n
of
N
F
C
l
ogi
c
a
l
l
a
yer peer
-t
o
-
pee
r
m
ode
u
s
i
n
g C
P
N
a
n
d
TA
(
S
a
eed
Gh
ase
m
i
)
16
4
ν
)|l
R}, and
→
is d
e
fi
n
e
d
by: th
e d
i
screte tran
sitio
ns relatio
n
(l,
v
)
→
(l
, v) if
f
(l,
γ
, a,
R, l)
E, v
′
= v
[
R
→
0]
an
d In
v (l
′
)(
v
′
) = tt.
2.
2. T
i
me
Petr
i
Net
Tim
e
Pet
r
i
net
i
s
used
f
o
rm
al
m
e
t
hod f
o
r
s
i
m
u
l
a
t
i
on, m
odel
i
ng a
n
d v
a
l
i
d
at
i
on
of c
o
n
c
ur
rent
a
n
d
di
st
ri
b
u
t
i
o
n
sy
st
em
and ha
s
gra
p
hi
cal
not
at
i
on.
Fo
rm
al
met
h
o
d
s are
m
a
them
ati
cal
l
y
t
e
chni
que
s det
e
r
m
i
n
ed
sy
nt
ax an
d se
m
a
nt
i
c
s for t
h
e speci
fi
cat
i
o
n
and
veri
fi
cat
i
on
of s
o
ft
war
e
and
har
d
wa
re sy
st
em
s. Form
al
sp
ecification
is u
s
ed
t
o
remo
v
e
the am
b
i
g
u
ities in
th
e in
fo
rm
al sp
ecificatio
n
.
Fo
rm
a
l
v
e
rificatio
n
d
e
fi
n
e
s
sy
nt
ax a
n
d se
m
a
nt
i
c
s of
s
o
ft
ware
an
d
ha
rd
ware
sy
st
em
s a
n
d checks
the
correctness
of
syste
m
. TPN i
n
cludes
transition for pr
esent e
v
e
n
ts t
h
at could oc
cur a
n
d places
t
o
show c
o
ndition of the
system
.
Ti
m
e
Petri Net
N is a t
u
p
l
e
(P, T,
Σε
,
I,
O
,
M
0
,
Λ
,
I, F, R) where:
P is a
fi
nite set of
places
and T
is a
fin
ite set o
f
tran
sitio
n
s
an
d
P
∩
T = Ø;
Σ
is a
fin
ite set
o
f
actio
n
s
I
(NP)T is the backward incidence
m
a
ppi
n
g
;
O
(NP )
T
i
s
t
h
e for
w
ar
d i
n
ci
de
n
ce
m
a
ppi
ng;
M
0
NP is
th
e in
itial
m
a
rk
i
n
g
;
Λ
: T
→
Σε
is th
e
l
a
bel
i
ng fu
nct
i
on;
I
:
T
→
I(
Q
≥
0
)
asso
ciates with
each
tran
sitio
n
a firi
n
g
in
terv
al; R
NP is th
e set of final
mar
k
ing
s
an
d
F
NP is th
e
set o
f
rep
eated
mark
ing
s
[8
].
A m
a
rki
n
g
M
of a
TP
N i
s
a m
a
ppi
ng i
n
NP a
n
d
M
(
p
i
) is the
num
b
er of toke
ns i
n
place
p
i
. A
tran
sitio
n
t is en
ab
led
in
a m
a
rk
i
n
g
M iff M
≥
•t. W
e
d
e
no
t
e
En
(M) th
e set o
f
en
ab
led
t
r
an
sition
s
in
M. To
decide
whethe
r a tra
n
sition t c
a
n
be
fire
d
we
need to kno
w for how long it
has
bee
n
e
n
abl
e
d: if t
h
is am
ount
of
ti
m
e
lays in
to
th
e in
terv
al
I
(t), t can
act
u
a
lly b
e
fired,
o
t
herwise it can
n
o
t
. Th
e
k
e
y
p
o
in
t in
th
e sem
a
n
tics i
s
to
d
e
fin
e
wh
en a tran
sitio
n is
n
e
wly en
ab
led
an
d on
e
h
a
s to
reset its clo
c
k
.
In
th
is article, it is wo
rk
ed
o
n
i
n
term
ed
iat
e
se
m
a
n
tics o
f
TPN and
u
s
ed
Co
lor Petri
Net (CPN)
soft
ware to implem
ent s
y
ste
m
according to TPN. CPN
tool provide
s
sim
u
lation,
state space analysis and
v
i
su
alize th
e beh
a
v
i
o
r
of th
e
syste
m
[9
]. Al
so
,
Up
p
aal is t
h
e
o
t
h
e
r too
l
bo
x th
at
u
s
e in
th
is article and it is
bui
l
d
base
on
TA t
h
e
o
ry
t
o
veri
fi
e
d
real
-t
i
m
e sy
st
em
s. It
pr
ovi
des i
n
t
e
ger
vari
a
b
l
e
s,
st
ruct
u
r
e
d
dat
a
t
y
pes,
user
de
fi
ne
d
fu
nct
i
o
n
s
, a
n
d c
h
annel
sy
nc
hr
on
i
zat
i
on [
1
0]
.
3.
E
X
PRE
M
ENT AND
RESULTS
The
NFC
pee
r
-
t
o-
peer
m
ode a
r
chi
t
ect
u
r
e i
n
cl
ude
s a
n
a
ppl
i
c
at
i
on l
a
y
e
r,
l
o
g
i
cal
l
i
nk c
ont
ro
l
pr
ot
oc
ol
,
MA
C m
a
p
p
i
ng
an
d RF layer
.
Th
e R
F
layer
h
a
s
b
u
i
l
d
up
on
t
h
e
I
S
O
18
092
,
wh
ich
pr
ov
id
e NFCI
P-1
N
F
C
Interface
a
n
d Prot
oc
ol. NFC
I
P-1 desc
ribes
active
co
mm
unication m
ode
and
passi
ve
c
o
mm
unication
m
ode.
Any
a
p
pl
i
cat
i
on c
oul
d
be
us
ed t
h
e
NFC
p
eer-t
o
-
peer
p
r
o
t
ocol
t
o
c
o
m
m
uni
cat
e
bet
w
ee
n t
w
o
de
vi
ces.
T
h
e
MAC layer
p
r
esen
t
o
n
th
e ISO/IEC
18
092
sp
ecification
.
Th
is stan
d
a
rd
MAC layer is
u
s
ab
le on
ly for LLC
P
layer of NFC
peer-to-peer m
ode.
A
se
t of mappi
ngs
would be
use
as i
n
terface to tra
n
sfe
r
data
betwee
n
MAC
l
a
y
e
rs and
LL
C
P
. Al
s
o
, t
h
e
bi
n
d
i
n
g t
h
at
e
ach m
a
ppi
ng
m
a
de are spec
i
f
i
e
s LLC
P t
o
one e
s
peci
al
l
y
M
A
C
Layer.
Fi
gu
re
2.
C
o
m
m
uni
cat
i
on o
f
LLC
P P
r
ot
ocol
NFC
d
e
v
i
ce tran
sfer
d
a
ta b
e
t
w
een
t
w
o d
e
v
i
ces, in
itiato
r st
arts co
mm
u
n
i
catio
n
an
d
targ
et respo
n
ses
to
in
itiato
r
requ
est.
Figu
re
2
i
llu
strates th
e
gen
e
ral
v
i
ew of
th
e LLCP pro
t
o
c
o
l
con
n
ecti
o
n
.
Evaluation Warning : The document was created with Spire.PDF for Python.
I
S
SN
:
2
088
-87
08
IJEC
E V
o
l
.
4, No
. 2, A
p
ri
l
20
14
:
16
2 – 1
6
8
16
5
Fi
gu
re
3.
C
o
m
m
uni
cat
i
on o
f
LLC
P l
a
y
e
r
wi
t
h
T
A
m
e
t
hod
Gen
e
rally, p
e
er-to-p
eer m
o
d
e
session
sp
lit in to
4
p
h
a
ses:
Initialize pha
se
: The i
n
itiator send re
quest pa
cket pe
riodically and i
f
target
receive it,
send bac
k
ack
nowledg
e.
On th
e
o
t
h
e
r
han
d
, th
is ph
ase h
a
s a m
ech
an
ism
to
av
o
i
d con
f
lict wh
en
in
it
iato
r
wan
t
s
to
estab
lish commu
n
i
catio
n
with
si
n
g
l
e targ
et.
Activ
atio
n
p
h
a
se: Th
e in
itiato
r
b
e
g
i
n
s
a n
e
w session
b
y
d
e
t
ectin
g
targ
et an
d sen
d
sp
ecific m
e
ssag
e
t
o
activ
e co
mm
u
n
i
catio
n
between
targ
et an
d in
i
tiato
r.
Exc
h
ange
pha
s
e: Data tra
n
s
f
ers
from
one
side
t
o
othe
r side a
n
d c
ontain sending
a
n
d recei
ving
pr
oce
d
u
r
e.
Deactivation phase: After tra
n
sfe
rri
ng
data
betwee
n de
vic
e
s. Initiator se
nds
deactivate
m
e
ssage to
target a
n
d rece
ive release
res
p
onse
.
Th
e co
mm
u
n
i
catio
n
b
e
tween
in
itiato
r and
targ
et is
au
to
m
a
tically started
wh
en
t
h
e
d
i
stan
ce
b
e
tween
t
h
e t
w
o
NFC
devi
ces
w
o
ul
d
be
sm
all
eno
u
g
h
,
b
u
t
c
o
nn
ect
i
on i
n
t
h
e
M
A
C
l
a
y
e
r st
op
w
h
e
n
t
h
e
di
st
ance
b
e
tween
th
em
is no
t su
fficien
t
or
th
e op
er
ati
o
n
is end
.
Fo
llowing
th
e in
itializatio
n
an
d an
ti-co
llisio
n
p
r
o
c
edu
r
e, th
e in
itiato
r
d
e
v
i
ce
send
s t
h
e
Attribu
t
e
R
e
quest
ATR
_
R
E
Q com
m
and.
ATR
_
R
E
Q
com
m
a
nd c
ont
ai
ns de
vi
ce i
d
,
t
h
e ve
rsi
o
n t
h
at
can su
p
p
o
r
t
,
l
i
n
k
tim
e
out and s
o
m
e
other pa
ra
m
e
ter that are
created
by M
A
C c
o
m
pone
nt. Target MAC com
pone
nt
receives
and
veri
fi
es
A
T
R
_
R
E
Q i
f
t
h
e seque
nce i
s
equal
t
o
t
h
e
NF
C
For
u
m
LLCP
m
a
gi
c num
ber an
d ot
he
r fi
el
d have
ap
pro
p
riate v
a
lu
es, it respon
ds th
e in
itiato
r b
y
send
ing
ATR_
RES. Th
en
, th
e in
itiato
r an
d
targ
et MAC layer
shoul
d
be a
b
le
to accept
LLC
PDUs.
The LLC
P pac
k
et conations t
h
ree c
r
itical fields,
DSAP (Destin
ation
Serv
i
ce Access Point),
SSAP
(Source Servic
e Access Point
)
and PT
YP
E
(Pro
t
o
co
l d
a
ta u
n
it typ
e
field)
. The
r
e are sixteen types of
LLCP
packet
s
,
i
d
ent
i
f
i
e
d by
PT
YPE
val
u
es
ran
g
i
n
g
bet
w
ee
n 0 a
nd
15
. He
re, i
t
wa
s used
o
n
l
y
t
h
e part
o
f
P
DUs
suc
h
as Sy
m
m
e
try
(SYM
M
)
,
Co
n
n
ect (C
O
NNE
CT),
Disc
on
ne
ct (DISC
)
,
Dis
c
onnected Mode
(DM
)
, C
onnection
Com
p
lete (CC), Inform
ation
(I), Receive Re
ady (RR), Rec
e
ive Not Rea
dy (RNR).
Evaluation Warning : The document was created with Spire.PDF for Python.
I
J
ECE
I
S
SN
:
208
8-8
7
0
8
Mo
del
i
n
g
a
n
d
si
mul
a
t
i
o
n
of
N
F
C
l
ogi
c
a
l
l
a
yer peer
-t
o
-
pee
r
m
ode
u
s
i
n
g C
P
N
a
n
d
TA
(
S
a
eed
Gh
ase
m
i
)
16
6
Fig
u
re
4
.
In
itiato
r si
d
e
o
f
NFC LLCP Pro
t
oco
l
with Petri
Net m
e
th
o
d
The LLC li
nk activation
procedure starts
afte
r th
e MAC lin
k activatio
n
p
r
o
cedure h
a
s
b
e
en
success
f
ully com
p
leted, then the lo
cal LLC com
pone
nt in a peer de
vice
able to exec
ute LLCP. LLC PDUs
t
r
ansm
i
t
s
SSAP, DS
AP a
n
d PTYP
E i
n
b
o
t
h
si
des a
nd set
s
sou
r
ce an
d
d
e
st
i
n
at
i
on ad
d
r
ess of t
h
e
de
vi
ce and
pre
p
are
s
sy
st
em
s for ne
xt
p
h
ase
of c
o
m
m
uni
cat
i
o
n.
Ei
t
h
er
pa
rt
co
ul
d
be a
b
l
e
t
o
e
s
t
a
bl
i
s
h a
dat
a
l
i
n
k
con
n
ect
i
o
n
by
sen
d
i
n
g t
h
e
C
O
N
N
EC
T
P
D
U
.
Not
e
t
h
at
, t
h
e l
o
cal
LL
C
m
i
ght
n
o
t
s
e
nd
m
o
re t
h
a
n
one
CONNECT
PDU with th
e
sa
m
e
SSAP
add
r
ess
v
a
lu
e
b
e
fore
g
e
ttin
g CC o
r
DM
PDU with
t
h
e
DSAP v
a
l
u
e
that the sam
e
as the SSAP
value in the
pe
ndi
ng
C
O
NNE
CT PDU.
If t
h
e LLC receive
s a CC PDU
with
a
DS
AP val
u
e equal
t
o
t
h
e SS
AP val
u
e of a
sent
but
do
es
n
o
t
yet ack
nowledg
ed
CONNECT PDU, it sets th
e
state variables
send state va
riable (V
(S)),
re
ceive state va
riable (V(R
)),
se
nd acknowle
d
ge
m
e
nt state variable
(V (SA)), receive acknowledge
m
e
nt state variable (V
(RA)) to zero and se
nds CC PDU to destination. In the
othe
r ha
nd, the DM PDU re
turns to
ot
her
side if the loc
a
l LLC r
eceives a CONNEC
T PDU but could not
pr
ocess
t
h
e c
o
nnect
i
o
n
re
que
st
. I
n
t
h
e i
n
f
o
r
m
at
i
on t
r
an
sfe
r
phase
LLC
u
s
es t
h
e
Se
nd
S
e
que
nce
N
u
m
b
er
(
N
(S)), Receive
Sequence
Num
b
er (N (R
)), V (S),
V(R)
, V (SA), R
W
(R) and V
(RA) va
riables to
cont
rol
sending and
re
ceiving data
be
tween eac
h
si
de, if V
(S) is e
qual t
o
the
V (S
A) pl
us the
re
m
o
te receive window
size R
W
(R
), t
h
e LLC
no
t
b
e
ab
le to sen
d
an
I PDU on
t
h
at d
a
ta link
con
n
ection
.
Wh
en
th
e LLC send
s an
I
PD
U, N
(S)
fi
e
l
d sh
oul
d eq
ual
t
o
t
h
e cur
r
e
n
t
val
u
e
of t
h
e
V
(S) a
nd t
h
e N (
R
) set
t
o
t
h
e cu
rre
nt
val
u
e
of t
h
e V
(R).
A
f
ter se
n
d
i
ng t
h
e
I P
D
U,
the LLC
i
n
cre
m
ents the
V (S)
by one.
In the
receive
r part,
I PDU is receive
d with t
h
e N (S
) a
nd it
would
be equa
l to V (R), the
LLC passes
th
e serv
ice
d
a
t
a
un
it con
t
ain
e
d
i
n
th
e informatio
n
field
to the s
e
rvice ac
cess poi
n
t
and
increm
ents its by one
V(R). Moreover, ev
en
o
n
e I
PDU ex
ists for sen
d
i
n
g
on
th
i
s
d
a
ta lin
k
conn
ectio
n, th
e
receiv
e
d
I PDU
will b
e
acknowledged. If there is no
I PDU is available and the
data link conne
c
tion is not presently in the receiver
b
u
s
y
cond
itio
n, th
e LLC sends an RR PDU,
o
t
h
e
rwise, if t
h
e d
a
ta link
conn
ectio
n is
p
r
esen
tly in
th
e receiv
er
busy condition, the LLC sends an RNR
PDU. In the de
vic
e
that receiving
Ac
knowledge
m
e
nt, the N(R) field
value indicates that I PDUs num
b
ered
u
p
t
h
ro
u
gh N
(
R
)
-1
have
been rece
iv
ed
correctly an
d
Th
is N(R
)
v
a
lu
e
becom
e
s
the new value of
the
sen
d
V (S
A).
Evaluation Warning : The document was created with Spire.PDF for Python.
I
S
SN
:
2
088
-87
08
IJEC
E V
o
l
.
4, No
. 2, A
p
ri
l
20
14
:
16
2 – 1
6
8
16
7
Fi
gu
re 5.
Tar
g
et
si
de of NFC
LLC
P
P
r
ot
ocol
wi
t
h
Pet
r
i
Net
m
e
t
hod
Th
e LLC link d
eactiv
ation
p
h
a
se
u
s
ed to term
in
ate n
o
r
mal o
p
e
ration
b
e
tween
th
e l
o
cal and
t
h
e
rem
o
te LLC.
Each side
of LLC
m
a
y
initiat
e
link deactiv
a
tion that occ
u
rs base on re
quest from
the rem
o
te
LLC, or as the
result of a link
tim
e
out.
W
h
en executing the link deacti
v
ati
on
proce
d
ure, t
h
e local LLC s
h
oul
d
p
a
ss
d
i
sconn
ect in
d
i
catio
n
s
t
o
th
e serv
ice layer and
th
en
ex
ecu
te t
h
e MAC lin
k
d
eactiv
atio
n. Deactiv
ation
p
h
a
se in
itiates b
y
send
ing
a
DISC
PDU and
after send
ing
th
e
DISC
PDU, th
e LLC
th
at in
itiates th
e link
d
eactiv
ation
,
deactiv
at
e the local link.
In
t
h
is section
,
we illu
strate t
h
e arch
itectu
r
e
o
f
LLCP
with CPN and
UPPAAL too
l
s
[11
]
. LLCP i
s
essen
tial fo
r
d
e
v
i
ces th
at t
r
an
sfer
d
a
ta in b
i
-directio
n
a
l co
mm
u
n
i
catio
n
s
.
In
TA m
e
th
o
d
we talk
abo
u
t
th
e ov
erall
v
i
ew of
the system
, analyze eac
h side
and
inv
e
stig
ate o
n
the
b
e
h
a
v
i
or of initiato
r an
d
targ
et sid
e
s (Fi
g
u
r
e
3
)
. Th
e initiato
r sid
e
sen
d
s
con
n
ection
sign
al and
waits for
receiving connection si
gnal
from
target side. The
n
initiator sends
connection com
p
le
te and re
ceives
sy
mm
e
t
ry co
mman
d
fro
m
o
t
h
e
r sid
e
. Th
ey co
n
tinu
e
send
ing
d
a
ta un
til no
m
o
re d
a
ta ex
ist
to
send
.
Petri Net h
e
l
p
s u
s
to
stud
y log
i
cal layer co
ntro
l pr
ot
ocol
(
LLC
P)
wi
t
h
m
o
re
det
a
i
l
.
So
, we co
nsi
d
er
LLCP wit
h
5
maj
o
r pro
c
edures.
We illu
strate th
e m
a
n
n
e
r o
f
pro
cedu
r
e co
mm
u
n
i
catio
n
in
th
e
figu
res 4 and
5
in
m
o
re d
e
tails.
4.
DIS
C
USSI
ON
Th
is sectio
n
prov
id
es a co
m
p
ariso
n
b
e
tw
een
tw
o
m
o
d
e
ls an
d
talk
about cap
ab
ility an
d
ab
ility t
o
verify
sy
stem
.
Evaluation Warning : The document was created with Spire.PDF for Python.
I
J
ECE
I
S
SN
:
208
8-8
7
0
8
Mo
del
i
n
g
a
n
d
si
mul
a
t
i
o
n
of
N
F
C
l
ogi
c
a
l
l
a
yer peer
-t
o
-
pee
r
m
ode
u
s
i
n
g C
P
N
a
n
d
TA
(
S
a
eed
Gh
ase
m
i
)
16
8
Tab
l
e
1
.
C
o
m
p
arison
b
e
tween Tim
e
Petri Net an
d Tim
e
Au
to
m
a
ta
Easy to learn
Wo
rk
f
l
o
w
sy
ste
m
s
Dyna
m
i
c
Syste
m
Concise for
Uncertainly
Suppor
t high-
level
gr
aphical for
aggregate syste
m
Deadlock
Ti
m
e
Petr
i Nets
No
Powerf
ul
Weak
Good
No
Never
T
i
m
e
d Auto
m
a
ta
Yes
W
eak
W
eak
Not
Good
No
So
m
e
tim
e
s
4.
1. T
i
med
A
u
tom
a
ta
Tim
e
d aut
o
m
a
t
a
are used t
o
m
odel
form
al
sy
st
em
, wh
i
c
h has p
o
we
r
f
ul
t
h
e
o
ry
an
d
al
so has a
veri
fi
cat
i
o
n t
o
ol
s nam
e
d UP
PA
AL. Ti
m
e
d aut
o
m
a
t
a
are usef
ul
f
o
rm
ali
s
m
m
e
t
hod
f
o
r
desi
g
n
i
n
d
u
st
ri
al
sy
stem
and the
UPP
A
AL s
o
ft
ware
was e
n
ou
gh m
a
ture f
o
r
m
o
d
e
lin
g
ti
m
e
au
to
m
a
t o
f
syste
m
. Also
, th
e syn
t
ax
and sem
a
nt
i
c
of UPP
A
LL i
s
t
h
e sam
e
as
C
lang
ua
ge an
d m
a
ke i
t
pro
p
e
r
app
r
oach f
o
r m
odel
i
n
g an
d
ve
ri
fy
i
n
g
the system
need tim
e.
Thi
s
m
odel
i
ng
has s
o
m
e
weakness
on
w
o
r
k
fl
ow sy
st
em
t
h
at need c
r
eat
e ne
w co
n
d
i
t
i
on
dy
nam
i
call
y
.
In t
h
e
wo
rk
fl
o
w
sy
st
em
, i
t
woul
d be bet
t
e
r
t
o
use col
o
r pe
t
r
i
net
(C
PN) t
ool
s a
nd TP
N.
B
r
i
e
fl
y
,
TPN m
o
re
concise t
h
an
T
A
and the
size of T
P
N m
ode
l for
uncerta
inly larg
e system
mig
h
t
b
e
smaller th
an
TA. Tim
e
au
to
m
a
ta also
do
es
n
o
t
supp
ort h
i
g
h
-lev
el g
r
ap
h
i
cal m
o
d
e
l
for agg
r
eg
ate system
s.
In
add
itio
n, TA
u
s
e
co
nstan
t
v
a
riable ex
p
licitly an
d
it cau
se so
meti
m
e
d
ead
lo
ck h
a
pp
en
in
th
e
syste
m
an
d
in
co
n
s
isten
c
y e
m
erg
e
.
Ho
we
ver
,
i
n
c
o
nsi
s
t
e
ncy
m
i
ght
not
be a
b
l
e
t
o
occ
u
r
i
n
T
P
N
.
4.
2. T
i
me
Petr
i
Nets
Ti
m
e
Petri Nets m
o
d
e
ls d
i
v
e
rse nu
m
b
er of real ti
m
e
syste
m
specially netw
or
k and
w
o
rkf
l
ow
system.
It
hel
p
s t
o
a
voi
d t
h
e m
i
sbehavi
o
r t
h
at
o
ccurs i
n
c
onst
r
uct
i
o
n o
f
t
h
e
sy
st
em
and bu
gs re
veal
b
e
fo
re
i
m
p
l
e
m
en
tatio
n
.
Un
lim
ited
TPN is
no
t p
r
o
p
e
r for au
t
o
matic v
e
rificatio
n
an
d no
t practical to
i
m
p
l
e
m
en
t in
real syste
m
, so
we u
s
ed
limit
TPN fo
r
v
e
rifi
catio
n
.
In
ad
di
t
i
on, TP
N co
ul
d n
o
t
cr
eate new state dynamically
because the structure of
net is limited and it is not flex
ible. At the end, the syntax
of TPN is base on ML
language
and
s
o
m
e
tim
e realiz
es the c
o
ncept
of
t
h
e sy
st
em
wo
ul
d
be
ha
r
d
.
5.
CO
NCL
USI
O
N
I
n
t
h
i
s
st
udy
,
t
w
o p
o
pul
a
r
m
odel
s
f
o
r si
m
u
l
a
t
i
ng Near Fi
el
d C
o
m
m
uni
cat
i
on (N
FC
) l
o
gi
cal
l
a
y
e
r
cont
rol
p
r
ot
oc
ol
were i
n
t
r
o
d
u
ced a
nd c
o
m
p
are
d
t
h
e feat
u
r
es o
f
t
h
em
. Al
t
hou
g
h
, t
h
ese
t
w
o m
e
t
hods h
a
ve t
h
e
sam
e
featu
r
es, it see
m
s Ti
med
Petri Net (TPN) is
m
o
re p
o
werfu
l
to
sim
u
la
te th
e b
e
h
a
v
i
o
r
of th
e
syste
m
.
Here
,
we face with
com
p
lex network
sy
ste
m
that has a num
b
er of states
; we can use
TPN t
o
m
odel syste
m
and a
n
alyze s
y
ste
m
accordi
ng t
o
th
at
design. Moreove
r
, two
fam
ous
m
odeling tools fo
r TPN a
nd
Tim
e
d
Aut
o
m
a
ta (TA) we
re int
r
o
d
u
ced.
UPP
A
AL
was a t
ool
fo
r
m
odelin
g T
A
sy
stem
and Co
lor Pet
r
i Net (
C
PN)
was
de
vel
o
ped
f
o
r
desi
gn
sy
st
em
base
on
TP
N.
REFERE
NC
ES
[1]
Hardgrave, Bill C, Alo
y
s
i
us, J
ohn, Go
y
a
l, Sandeep.
“Does RFID improve inventor
y a
ccur
a
c
y
?
A pr
el
im
inar
y
anal
ys
is
”
.
In
tern
ational
Journal
of RF Tec
hnolog
ies: Research an
d Applications
. 2
009; 1(1): 45–56
.
[2]
Mario Munoz Organero, Samu
el King Opoku. “Using NFC Technolog
y
fo
r
Fast-Track
ing Large-Size Multi-Tou
ch
S
c
reens
”
.
Cyber
Journals: Multidisciplinar
y Jou
r
nals in Science and Technolog
y,
Journal of S
e
lected
Areas in
Telecommunica
tions (
J
SAT)
. 2011.
[3]
Klaus Finkenzeller.
”RFID
HANDBOOK”
. John Wiley
& Sons, L,
THIRD
EDITI
ON. 2010.
[4]
Vedat coskun
, Kerem Ok and Bu
sra ozdenizci.
“
N
ear Field Communitcation”
. fir
s
t published 201
2, John Wiley
&
Sons Ltd
[5]
Logical Link C
ontrol Protocol
,
Technical Sp
ec
ifica
tion NFC
ForumTM LLCP 1.1 ,N
FCFor
u
m-TS-LLCP_1.1.
2011-06-20.
[6]
Vedat Coskun, Kerem Ok
, Busr
a Ozdenizci.
Near Field Communication (
N
FC)
:
From Theory to Practic
e
. W
ile
y.
2011.
[7]
Kevin Curran, Am
anda M
illar, C
onor Mc Garvey
.
Near Field Co
mmunication.
In
stitute of Advan
ced Engin
eering
and Science. Apr 24
, 2012
.
[8]
Bérard B, F Cassez, et al. “Compa
rison of the Expressiveness of Time
d Autom
a
ta and Tim
e
Petr
i Nets”.
Forma
l
Modeling
and
Analysis of Timed
Systems
Lecture
Notes in
Computer Science
. 2005
; 3829: 211-225.
[9]
K Jensen,
LM Kristensen.
Colou
r
ed Petri N
e
ts,
DOI 10.1007/b9
5112,
Springer-
Verlag
Berlin
H
e
idelberg.
2009.
[10]
Akshay
Uttama
Nambi SN,
Prab
hakar
TV, Jamadagni HS, Kishan Ganapath
i,
Pramod BK, Rakesh CM, and San
j
ay
Naik R.
Near
F
i
eld Com
m
unicat
ion.
Application
s
and Performan
ce S
t
udies
. 2012
.
[11]
Larsen KG,
Pettersson P,
Yi W
. Uppaal in a N
u
tshell. International J
ournal on
Software Tools for Technology
Transfer
. 1997;
1(1–2): 134–152
.
Evaluation Warning : The document was created with Spire.PDF for Python.