4.1 Energy Consumption Model
To determine the energy consumption, the modelling
power of GSPN-s was used, which can describe the
overall network behaviour. The model developed by
the authors the Places in the Petri net represent the
packet storage queues of the nodes, while
Transitions simulate the sending of packets. During
the creation of the model, we assumed that each
node spends zero time for processing packets. In
addition, the nodes send the aggregated packet
immediately, when they collected as many packets
as their specific aggregation number. In addition,
each node generates packets itself, generated
according to an exponential distribution. According
to previous description, the transitions either have an
exponential delay, or fire immediately. We also
assumed, that the nodes in the network are possess
the same parameters, so the network is
homogeneous. The weight of the edges in the graph
created by the model is the same as the actual node’s
aggregation number, with the default of one.
The developed model actually describes a single
chain network topology. This is sufficient, because
in any network topology a route is required in order
to achieve communication between two nodes,
which route consists of a chain of nodes.
To illustrate our model, let us take a chain
topology consisting of five nodes. Consequently,
assume, that the sensor data reaches the data centre
(sink) in five hops. The graphical appearance of the
model can be seen in Figure 1.
In Figure 1, the nodes of the network are marked
by different colours. It can be seen, that apart from
the first node and the data collector unit (called
sink), all the other nodes are composed of two parts.
The first part consists of the places and transitions
responsible for the data coming from the node’s own
sensors. The second group represents the data
coming from the previous node. The own arrivals
(i.e. the measured values read from the local
sensors) are modelled by transitions with
exponential distribution, which are illustrated by
rectangles containing ‘T’. The arrival of the
neighbour nodes is represented by the immediately
firing transitions. The other transitions of the nodes
immediately fire, when the predefined number of
tokens is available.
The vector of aggregation numbers required to
achieve minimum power consumption of the chain
can be calculated with the previously presented
model. To determine how much energy consumption
a combination of aggregation numbers represent for
the entire chain topology, we have to calculate the
stationary distribution of the system, i.e., the amount
of packets sent to each node in percentage
distribution. Using this result, we can determine the
total power consumption of the chain, if the energy
consumption parameters of the nodes are known.
4.2 PetriDotNet
PetriDotNet (PetriDotNet, 2011) is a software, that
runs on Windows and Mac OS X with a graphical
user interface and can be used for editing, simulate
and analyse Petri nets.
The software was developed by the Department
of Measurement and Information Systems of BUTE.
It was created with the aim of being easy to use in
education. Their aim is to implement the latest
verification and model checking algorithms for this
easily extendable framework, and make it available
to a larger user community. The program is able to:
Saturation-based symbolic state-space
generation, representation, and fixed-point
computation based CTL model checking
Transform the model checking problem to a
linear programming task making it capable of
examining infinite state space Petri nets
Management and analysis of complex data
structures is under development. The program is
able to determine the long-term behaviour of Petri
nets with its "Large Scale Statistics" module. The
user can view the percentage distribution of the
firing of transitions.
4.3 Simulation of Energy Consumption
The determination of the equilibrium distribution
was carried out by the previously presented
PetriDotNet software, because according to our
tests, it was the fastest and it generated the best
output results. To determine the optimal aggregation
number vector, a preparation was needed, so that
PetriDotNet calculates the long-term behaviour of
the appropriate Petri net. This task was performed by
Matlab (Mathworks, 2013).
As shown in
Figure 2, MATLAB was used to
generate all possible permutations of the aggregation
number vector and the associated .pnml Petri net
descriptions. Matlab sequentially calls (can be
parallel) the PetriDotNet software with different
aggregation number combinations. The PetriDotNet
software’s Large Scale Statistics module was used to
simulate 1,000,000 firings to determine the long-
term behaviour. Using the output of the application
and a predefined consumption function was given to
calculate the total consumption of the chain. The
developed consumption function in case of one
EvaluationofEnergyEfficiencyofAggregationinWSNsusingPetriNets
291