RESULTS AND EVALUATION
To implement this algorithm, I have used Cooja -2.7-
simulator, which is a sensor network simulator runs on Contiki OS.
Implementation requires three major components to be set: (a) Server nodes
which are responsible for sending update messages to the RD, (b) RPL border
router; a bridge between server nodes and the resource directory, and (c)
Resource Directory which is a server keeps listening on a certain port for
update messages. However, to implement (a) and (b) I have used ‘Sky mote’
sensors. The deployed code on (a) is an implementation of a simple resource,
energy consumption using Joule’s law and ‘Energest’ function -which will be
discussed later in this paper- for each module, and finally, ‘update messages’
code that initialize and send those messages to the Resource Directory every
number of seconds according to the proposed algorithm. The deployed code on (b)
is the default border router code ‘rpl-border-router.c’. We need to connect the
Cooja border router to the external network outside Cooja See Fig. 2.
Fig. 2. Connecting Cooja border router to the
To implement (c) I have used an external JAVA
framework called Californium (cf); a JAVA Implementation of CoAP clients,
servers and resource directory. I only used the resource directory executable
jar. Now, the communication between CoAP server nodes in Cooja and the resource
directory needs the border router to have a place in our network. However, to
start the Resource Directory, we only need to run the executable jar called
(cf-rd-1.1.0-SNAPSHOT), See Fig. 3.
Fig. 3. Starting the Resource Directory server using
Californium JAVA implementation
After all, these components are ‘up and running’ and
according to the fact that the new enhanced algorithm is based on the battery
level of each sensor, we need to find out a way to calculate the residual
energy in a certain node. Unfortunately, there is no direct way to get that
value when using Cooja. Instead, Contiki OS has a built-in function called
Energest. Using this function, you can measure the power consumption for
different modules by having the time the components have been turned on.
Components are CPU; CPU in active mode, LPM; CPU in idle/low power mode, RX;
Radio in receiving mode and finally TX; Radio in transmitting mode.
Substituting the time each component has been turned on in Joule’s law (see
Equ. 1,2,3 and 4) will yield the energy consumed by that component. Summation
of components energy consumption will result in the total power consumption by
a certain node. Finally, if we substitute the total power consumption of a
certain node in Equ. 5 5, we will have the Battery Level at a certain point
in time 5.
TPC: Total Power Consumption,
evaluated by summation of equations (1-4)
FullBattery: 7000 mj
I_x: Current value in x
module from the data sheet.
V_x: Voltage value for module
x from the datasheet
RTIMER_SECOND: Number of
Ticks Per Second in Contiki
Table 1 shows the
simulator environment variables (same values as in 5)
To evaluate the new algorithm fairly, we need to compare it to the
Standard algorithm and to the traditional Dynamic one as well. After doing many
experiments that discovers many aspects such as a different number of nodes,
different RX ratios and different periods of simulation time, some interesting
results have been discovered. In general, the new algorithm has extended the network
lifetime by 10% over the traditional dynamic approach 5 and 35% over the
Fig. 4 shows the
battery level over the lifetime of the three approaches (Standard, Dynamic and
enhanced). Obviously, according to the lifetime, Enhanced dynamic approach
outperforms the other two approaches for all battery levels.
Moreover at 5%, and
when the battery is nearly dead, the Enhanced approach has made it 10% more
life than the traditional Dynamic one.
4. Battery Level over the time for Standard, Dynamic and Enhanced
Taking another measurement into consideration, I have tried
a different number of nodes to evaluate how network density would affect the
new algorithm. Fig. 5 shows that the new Enhanced dynamic algorithm has given a
better life for a various number of sending nodes. For example, when trying 70
nodes, the new technique has given almost 100 min more lifetime over the
Standard approach and 30 mins over the traditional Dynamic technique.
Fig. 5. Lifetime for various
number of nodes
The last Measurement I took into consideration is trying a different
receiving ratio (RX), which is a random variable that allows packet receiving
with random errors 15. I have run the simulation om different RX ratios (75%,
50%, 25% and 0%), and as Fig.6 shows again the excellence of the enhanced
approach over the previous approaches.
Fig. 6. Network lifetime over Different RX ratios
II. CONCLUSION AND FUTURE WORK
In this project, I proposed an enhanced dynamic algorithm that extended
a previous effort of 5, I have increased the update interval of each battery
level as mentioned before to reduce the overall number of sent messages that
have been costing more energy, this applies to less-sensitive application that
requires a very frequent update messages to guarantee the refreshment of their
However, this new algorithm has proven an extended network lifetime by
10% over the Enhanced dynamic one.
On Future, I plan to test this algorithm with a denser network to
verify the maximum improvement this technique can provide.
I plan to study as well, this new technique in a larger area than (200
x 200) to know the impact of the sensor field space.
Somayya Madakam, R. Ramaswamy and Siddharth Tripathi
“Internet of Things (IoT): A Literatur Review”.
2 K.Matthias, Martin Lanter, and Zach Shelby.
“Californium: Scalable cloud services for the internet of things with
coap.” Internet of Things (IoT), 2014 International Conference on the.
Meirong “Distributed resource directory architecture in Machine-to-Machine
communications.” WiMob. 2013.
Pötsch, Thomas, et al. “Performance evaluation of CoAP using RPL and LPL
in TinyOS.” 2012 5th International Conference on New Technologies,
Mobility and Security (NTMS). IEEE, 2012.
Muneer Bani Yasin, Qusai Abuein, Ahmad Bani Amer, and Mamoun Qasem. “An
Energy-efficient Technique for Constrained Application Protocol of Internet of
K. Matthias, Simon Duquennoy, and Adam Dunkels. “A low-power CoAP for
Contiki.” 2011 IEEE Eighth International Conference on Mobile Ad-Hoc and
Sensor Systems. IEEE, 2011.
C. Walter, Kris Steenhaut, and Niccolò De Caro. “Integrating wireless
sensor networks with the web.” Extending the Internet to Low power and
Lossy Networks (IP+ SN 2011) (2011).
8 Shahid Raza,
Shafagh, and Kasun HewageLithe:
Lightweight Secure CoAP for the Internet of Things