Kam 2016

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

2017 International Conference on Signals and Systems (ICSigSys)

Throughput Evaluation of Raspberry Pi Devices on


Multihop and Multiflow Wireless Sensor Network
Scenarios

Mike Cristian B. Gragasin, Miguel Paulo A. Talplacido, Nemesio A. Macabale Jr.


Information Systems Institute, Central Luzon State University
Science City of Muñoz, Philippines
mike.gragasin,paulo.talplacido,namacabale{@clsu.edu.ph}

Abstract—The Raspberry Pi has become one of the most media access control layer is 102 octets, which may further
popular devices used in the internet of things studies because of its decrease based on the link layer security algorithm. Such sizes
flexibility and affordability for prototyping purposes. It has found are too small when compared to typical IP packet sizes. (2)
its niche in wireless sensor networks as it can function both as sensor nodes spend most of their time in sleep mode to preserve
sensor node and router node just by adding wireless adapter. energy which hinders them from communicating (3) scalability
Studies have employed the Raspberry Pi as WSN mesh node and problems due to the need to use router nodes to connect sensor
sensor node. These studies looked on the performance of these nodes to the base station.
devices on single flow of data and/or on limited number of hops.
Indirectly, they say these devices performs poorly on multihop and To address the issues above studies[7] have used the
multi-flow experimental scenarios. Our experiments show that for Raspberry Pi [6] acting as a sensor node and mesh node in a
multi-hop and multi-flow of scenarios, the raspberry pi nodes WSN. Eric Erfanian showed an easy to follow way to set up[19]
actually have enough resource and capacity to maintain good the raspberry pi as a wireless network using three nodes and a
performance. Data flows simply share these resources amongst gate way. These studies[8][9][10][11] focused on range,
themselves that results to smaller throughput per flow. We show throughput, the ability to self-heal and multihop, throughput
the appropriateness of Raspberry Pi not only as a sensor node but degradation, and even power consumption. Studies on the
at the same time act as a mesh node for wireless sensor network Raspberry Pi[7] as a mesh node focused only on one(1) flow of
studies in different scenarios. To the best of our knowledge, this
data which is not the case in WSN scenarios[15]. Previous
has not been reported in the literature which should be helpful to
studies used the raspberry pi in experimental scenario that uses
other researchers.
multiple flow of data in two-hop set up and gets extremely low
Keywords—raspberry pi 3; olsrd; mesh; wireless sensor throughput. They attributed this to the raspberry pi’s resource
network; IOT limitations. Indirectly, they looked at this device as not suitable
for wide/full scale multihop wireless sensor network
experiments and deployment.
I. INTRODUCTION
In this study, we show that the Raspberry Pi devices have
The Internet of Things(IOT) is a novel technological enough resource to handle the above mentioned situations. We
advancement that is gaining ground in the world today. The further show the appropriateness the use of Raspberry Pi in
general idea of the technology is the presence of “things” like Wireless Sensor networks with multi hop, multi flow
mobile devices, sensors or other objects interacting with each applications. The rest of the paper is organized as follows.
other for a particular goal [1]. Even the US National Intelligence Section II discusses other studies conducted on the feasibility of
Council recognizes it in the list of six ‘‘Disruptive Civil using the Raspberry Pi as MANET mesh node. Section III
Technologies” with potential impacts on US national power[2]. contains the testing design. Section IV shows the
NIC foresees that ‘‘by 2025 Internet nodes may reside in implementation and results of the testing. Finally Section V
everyday things – food packages, furniture, paper documents, presents the conclusion.
and more”. Future demand will promote wide spread
deployment of IOT devices in different key sectors, e.g.
II. RELATED WORK
environment, industry, health, and military.[2][3]
An enabling technology for IOT is the wireless sensor
network(WSN) [1]. Wireless sensor networks applications Most studies[9][10] involving IOT are mostly done through
include military operations, indoor and outdoor environmental simulation software like Network Simulator 2 and Network
monitoring, logistic support for business, health, and even Simulator 3 (NS2 & NS3) [13][14]. However it is difficult to
robotics [3]. Commercial and customized wireless sensor capture the complexity of wireless communications in real
networks [4] use the IEEE 802.15.4 (WPAN) [5], however, this environment in simulations[16]. Some studies[11][12] use
poses problems as (1) The largest physical layer packet in IEEE consumer off the shelf(COTS) devices that partner laptops with
802.15.4 has 127 bytes; the resulting maximum frame size at the wireless adapters which is too expensive in terms of cost, and

978-1-5090-6748-0/17/$31.00 ©2017 IEEE 256


2017 International Conference on Signals and Systems (ICSigSys)

power for a sensor node. Others use IEEE802.15.4 devices like


the Zigbee[17] which are low cost but have low data packet
sizes, low processing power and requires low level
programming expertise. Raspberry Pi is an appropriate choice as
sensor node because of its high performance, good memory,
affordable cost, and operating system that allows programming
in high level languages [13].
Raspberry Pi devices are among the most suited as wireless
mesh node, capable of multi hop, self-healing, and a
communication range of around 170 m[14]. Previous studies [8]
showed that although the Raspberry Pi 3 can hold a high enough
throughput for single hop [8], it performs poorly for multi hop
and multi flow scenarios. These results discourages the use of
raspberry pi for multihop multiflow wireless sensor network
experiments. On the other hand, we show that the raspberry pi
nodes actually have enough resource and capacity to maintain Figure 1. Device Raspberry Pi 3
good performance. Data flows simply share these resources
amongst themselves that results to smaller throughput per flow.
We show the appropriateness of Raspberry Pi for Wireless
Sensor Network studies in different scenarios.

III. EXPERIMENTAL SET UP


This section contains two sub sections. The first sub section
describes the set up and configuration of the Raspberry Pi mesh
nodes used. The second one describes the experimental
scenarios used to demonstrate the appropriateness of the
Raspberry Pi as a wireless sensor/mesh node. Although we show
their appropriateness as wireless sensor nodes our tests tackle its
capabilities as a relay node in wireless sensor networks.

A. Raspberry Pi Configuration Figure 2. Device Raspberry Pi 3 with TP LINK TL-WN722N


Three pieces of Raspberry Pi hardware with same For design and implementation of the sensor network
specifications were used for the mesh nodes. The Raspberry Pi devices, the following software were installed in the Raspberry
3 a 700MHz clock speed single board computer was chosen Pi3. The operating system used was Raspbian based on the
since it has the appropriate tools to function both as a mesh node Debian Linux Distro to easily install other packages on the
and a possible sensor node because of its general purpose input- Raspberry Pi 3. OLSRD for ad-hoc network implementation and
output (gpio) pins which enables other modules such as sensors Iperf for network testing.
(soil, temperature, light, etc..) to be added to it. A Wireless
Here is an ad hoc device set up:
Adapter TP Link WN722n was used as its wireless interface this
was chosen as it has been well documented as wireless adapter 1. Device Assembly
for the Raspberry Pi.
This phase is done by setting up the Raspberr Pi boards and
other supporting devices such as wireless adapter, and Noobs
TABLE I. LISF OF HARDWARE FOR ONE NODE SD Card with pre-installed Raspbian,
Device Description 2. OLSR package installation
A board that manages the entire
Raspberry Pi 3 (1.2GHz 64-bit In this phase package olsrd was installed using the command
activity; acts as a mesh node and
quad-core ARMv8 CPU, 1GB
sensor node substitute.
RAM, 4 USB ports, 40 GPIO pins) Sudo apt-get install olsrd
Acts as a signal transmitter
Wireless adapter (TP and receiver so one node
3. Iperf package installation
Link WN722N) can interact with another In this package iperf was installed using the command
node.
Noobs SD card (4 GB) As a storage for software Sudo apt-get install iperf
4. Configuration
Figure 1 the internal board of the Raspberry Pi3, and Figure 2
shows the Raspberry Pi 3 assembled with the wireless adapter In this step the Raspberry Pi devices were configured
attachment as used in [9]. The adapter was added for longer for mesh networking by editing the /etc/network/interfaces
reach and more stable connection. file to set the wireless adapter to be on the same network,
ssid, and channel, and to be in adhoc mode [9]. For the

978-1-5090-6748-0/17/$31.00 ©2017 IEEE 257


2017 International Conference on Signals and Systems (ICSigSys)

experiment the network address was set to 192.168.10.0, the R2 and R1’s throughput using the command “iperf -c
network ssid was set “meshkit”, and the channel was set to 192.168.10.1xx -t 10”. This was replicated for 20 times.
channel 6 so that all mesh nodes will lie on the same network
and be able to communicate with each other. 2. two-hop, two-flow scenario
Lastly to run olsrd in the device the command: sudo olsrd - The topology used for measuring the throughput of a two
I wlan1 -d 2 was used. hop, two flow scenario can be seen in Figure 5 below. It shows
the floor plan of the building and placement of the mesh nodes
in the two-hop, two-flow network scenario.

Figure 3. OLSRD debug level 2 running on Raspberry Pi 3

B. Experimental Scenarios
The first scenario consisted of two nodes to show one Figure 5. Topology for two hop, two flow scenario
hop, one flow of data. The second scenario consisted of three For the test TCP was also used like the one hop one flow
nodes to show two hop, two flow of data. The third scenario scenario. The payload was also 28kb for each iteration.
consisted of five nodes to test up to four hops, one flow of
data. For the test R1 was used as the iperf server using command”
iperf -s ”. R2 then sends a stream of packets using the iperf tool
1. one hop, one flow scenario acting as a client for 10 seconds with the command “iperf -c
Figure 4 shows the Raspberry Pi Placement for a one 192.168.10.1xx -t 10” while R3 is also sending indefinitely with
hop, one flow scenario. Raspberry Pi 1 (R1) was placed in the command “iperf -c 192.168.10.1xx -t 10000”. The throughput
a room with walls to shorten the transmission range for the between R2 and R1 is then measured. This was replicated for 20
nodes. times. This is again repeated only R2 is the one sending
indefinitely, R3 is sending for 10 seconds, and the throughput
between R3 and R1 is measured instead. A single flow two hop
scenario was also done with this configuration using R3 as the
client and R1 as the server for reference.
3. UDP and TCP Iperf tests for multiple hops
For this scenario five similarly configured Raspberry Pi’s
were used to test the throughput for each number of hops. The
raspberry pi’s were placed 60 m away from each other with one
raspberry pi acting as a udp server. This test was done in the
Track Oval of the Central Luzon State University. Due to the
lack of outlets the raspberry pi’s were powered using
powerbanks and controlled via ssh by a laptop. Figure 6 shows
the experimental set up.

Figure 4. Raspberry Pi Placement for one hop, one


flow scenario.
For this test R1 was used as the iperf server through the
command “iperf -s”. R2 then sends a stream of packets using
the iperf tool acting as a client for 10 seconds then measuring

978-1-5090-6748-0/17/$31.00 ©2017 IEEE 258


2017 International Conference on Signals and Systems (ICSigSys)

B. Testing of two hop two flow scenarios

For the two hop two flow scenario we obtained an average


throughput of 10.1 Mbps for R2 and an average throughput of .5
Mbps for R3, a big drop from the 5.7 Mbps for a two hop, single
flow scenario for R3. Although the throughput of the two hop
node in the multiflow scenario is lower, the throughput is still
way above the maximum throughput of a WPAN[18].

C. Testing of multihop scenarios

In previous studies [8] the drop in throughput have been


attributed to resource constraints of the Raspberry Pi. The next
section discusses how this is an incomplete explanation of the
phenomenon. A more accurate model for the drop is the
Figure 6. Set up of Multiple Hop Network
throughput degradation that is observed in all mobile ad hoc
Scenario network with multiple hops as is shown in the next scenario.

The steps to measure the throughput for each hop in the


The throughput for each of the number of hops using UDP
set up was similar to that of scenario 1. The raspberry pi’s sent
and TCP were plotted and graphed as shown in Figure 8. The
a payload of 54Mbps over the network with UDP buffer size of
graph shows a similar model as that observed in previous
160kb and sending 1470 byte datagrams for 10 seconds. For the
studies[9][10] showing that throughput degradation is also
TCP test a tcp window size of 43.8 kb was used.
present and behaves similarly in the raspberry pi. Showing that
the drop in throughput is just a characteristic of a Mobile Ad hoc
networks and not a limitation of the Raspberry Pi.
IV. RESULTS AND DISCUSSION
This section describes how the results of the two scenarios
were analyzed and compared.

A. Testing of one hop, one flow scenarios

After testing bandwidth or the throughput of the connection was


obtained. Figure 1 shows a sample Iperf TCP test.

Figure 6. Set up of Multiple Hop Network


Scenario
D. Analysing and Comparing the results from the two
scenarios
The results from the two scenarios were then compared to
find out if the throughput of the whole network was the same
Figure 7. Sample output of Iperf test. for both scenarios. This was done by adding the throughput of
the two raspberry pi’s using the formula
For the one hop, one flow scenario we obtained an average of
11.1 Mbps. Considering the maximum throughput of wireless Throughput R3*2 + Throughput R2 = multi-hop, multi-
networks of 240 kilobits per second [18], this throughput is flow Throughput
more than enough to transfer this kind of data sizes. Another
application could be wireless personal area networks (WPAN) R3’s throughput was multiplied by 2 to account for
[4]. The Raspberry pi is a small device and can be used as a throughput degradation which is present in OLSRD manet
more powerful alternative WPAN device for wireless sensor networks. Multiplier for throughput degradation is computed as
network. 1/N where N= number of hops.

978-1-5090-6748-0/17/$31.00 ©2017 IEEE 259


2017 International Conference on Signals and Systems (ICSigSys)

ACKNOWLEDGMENT
T-Test is then applied to the multi-hop, multi-flow throughput This work has been supported by the Bayanihanets Research
for scenario 2 and single hop, single flow throughput for Program, funded by the Department of Science and
scenario 1 to test for difference. A t-value of 0.32 was obtained Technology(DOST), and Central Luzon State University,
showing that the , multi-flow throughput for scenario 2 and Republic of the Philippines
single hop, single flow throughput is not significantly different.
A more general equation for computing the additive REFERENCES
throughput or describing the scenario is:
[1] L. Atzori, A. Iera, and G. Morabito, “The internet of things: A survey,”
Comput.networks, vol. 54, no. 15, 2010
∑ ℎ ℎ ∗ ℎ =multi-hop, multi- [2] National Intelligence Council, Disruptive Civil Technologies – Six
flow throughput Technologies with Potential Impacts on US Interests Out to 2025 –
Conference Report CR 2008-07, April 2008,
<http://www.dni.gov/nic/NIC_home.html>.
Where n is equal to the number of data flows used, and i is
referring to the dataflow. Adding the throughput for each [3] Th. Arampatzis, J. Lygeros, and S. Manesis, “A Surver of Applications
Wireless Sensors and Wireless Sensor Networks”, Proceedings of ther
dataflow i multiplied by the number of hops traversed by 13th Mediteranean Conference onf Control and Automation, 2005 Sheikh
dataflow i will get you the additive throughput for the scenario. Ferdous, and Xinrong Li, “Wireless Sensor Network System Design using
At least for two hop two data flow scenario this additive Raspberry Pi and Arduino for Environmental Monitoring Applications”,
The 9th International Conference on Future Network and Communications
throughput is the similar or at least not significantly different to (FNC-2014), 2014
the one hop one data flow throughput scenario using the same [4] http://www.ieee802.org/15/pub/TG4.html
set up. [5] Raspberrypi.org
[6] Andreas Tønnesen. “Mobile Ad-Hoc Networks”, retrieved from
www.olsr.org/docs/wos3-olsr.pdf
V. CONCLUSION [7] Contreras, Orangel Jose Azuaje (2015). “Performance Evaluation of an
From the data obtained using throughputs of the first two IEEE 802.11 Mobile Ad-Hoc Network on the Raspberry Pi. Dissertacao
realizada no ambito do Mestrado em Engenharia da Informacao.”
scenarios, and the analysis and comparison of the results from Retrieved from:
the two scenarios, it can be concluded that there is no decrease https://sigarra.up.pt/feup/pt/pub_geral.show_file?pi_gdoc_id=433749
in network performance for the whole network as opposed to [8] Michelangelo Cruz, et. al,”Extending Wireless Sensor Network Lifetimes
what has been reported in the literature [8]. The aggregate Through Channel Load Aware (CLAW) Routing
throughput for the one hop connection is the same regardless of [9] . Nan Liu and Winston K.G. Seah, Performance Evaluation of Routing
one flow or two flow of data. The large drop of throughput in Metrics forCommunity Wireless Mesh Networks.
two flow, two hop is then attributed to the resource constraints [10] Michael Winkler. Cosimo Palazzo. Marco Bartolozzi, TCP Throughput
Measurements and Analysis in Wireless Multi-Hop Networks
and scheduling of the Raspberry Pi 3, R2 the intermediary node
[11] Philipp Hofmann, Chunlei An†, Luis Loyola and Imad Aad, Analysis of
prioritizing one stream to finish over another. Even with this UDP, TCP and Voice Performance in IEEE 802.11b Multihop Networks
constraint however the throughput obtained in the end node is [12] Hardware Comparison Capturing Received SignalStrength Indication
still sufficient for wireless sensor network purposes currently (RSSI) for Wireless SensorsNetwork (WSN)
has a maximum theoretical throughput of 225kbps [13] http://www.isi.edu/nsnam/ns/
(802.15.4)[18] which is still smaller than a four hop throughput [14] https://www.nsnam.org/
of 2000kbps. [15] Internet of Things:Wireless Sensor 2014 retrieved from:
The paper only tested with a stream of data generated using www.iec.ch/whitepaper/pdf/iecWP internetofthings-LR-en.pdf
Iperf network testing tool. Future works should try to test this [16] A. K. Dwivedi and O. P. Vyas, “An Exploratory Study of Experimental
using the Raspberry Pi3 as an actual sensor node and router Tools for Wireless Sensor Networks,” Wireless Sensor Network, vol. 03,
no. 07, p. 215, Jul. 2011.
node in one. Implementing this also in a full mesh network
[17] http://www.zigbee.org/what-is-zigbee/
would show full mesh capabilities of the device in a wireless
[18] Fredrik Österlind and Adam Dunkels. Approaching the maximum
sensor network. Other metrics and routing algorithms as well 802.15.4 multi-hop throughput. In Proceedings of the Fifth ACM
could be explored Workshop on Embedded Networked Sensors (HotEmNets 2008), June
2008.
[19] Erfanian, E. (2012, September 11). Mobile Mesh Networks with the
Raspberry Pi. Retrieved February 14, 2017, from
http://www.ericerfanian.com/mobile-mesh-networks-with-the-raspberry-
pi-part-1/

978-1-5090-6748-0/17/$31.00 ©2017 IEEE 260

You might also like