ECE/BAS Magazine June 2015 - page 22

June 2015
22
I
NTERNET
-O
F
-T
HINGS
– S
YSTEMS
D
ESIGN
Simulating IoT designs: will large-
scale deployment work in practice?
By Jakob Engblom,
Wind River
This article highlights the problem of
developing and testing big IoT appli-
cations, and comes to the result that
simulation is a practical solution.
„n
Developing and testing Internet of ings
applications and systems are big challenges,
simply because the systems are big – they con-
tain a lot of units. It is di cult to get hundreds
of nodes into the so ware development lab
for testing, and it is also di cult to provide
all those nodes with interesting and realistic
inputs. When developing so ware that will
run on hundreds or even thousands of IoT
nodes, just how do you test that so ware in a
practical manner? Simulation is a very good
answer.
e IoT systems that are being built today
o en follow a three-tiered architecture as
shown in gure 1. ere are many small nodes
that connect to each other and to gateways
using wireless mesh networks, and the gate-
ways then connect to a management server or
the cloud. e small nodes can be sensors like
temperature sensors, electricity meters, cam-
eras, light switches, or actuators like thermo-
stats, lights, and door locks. e gateways or
concentrators handle the connection to the
outside world, and ensure security. e back-
end server, which is o en in the Cloud, deals
with the business and control aspects of the
IoT system.
To test this type of system, you want to have
the wireless nodes spread out over a large
area so that not all are in contact with each
other, which requires using entire buildings or
campuses as the lab. Setting up and maintain-
ing such a network is a signi cant amount of
work, with labour costs quickly dwar ng the
cost of the nodes themselves. In a simulator,
as shown in gure 1, setting up a large net-
work is really easy. You just write a program to
virtually deploy and spread out the nodes over
the virtual space you need, and then model
the wireless reachability between the nodes.
Instead of manually handling hundreds of
physical items, you manage a single script
or program. Using a simulation solution like
Wind River Simics to build this simulation,
we simulate the hardware of each node, with
processors, memory, timers, LEDs, wireless
radio, and everything else that is needed. e
simulated nodes run the real operating system
(OS) and target applications, using the same
binaries as would run on the real hardware.
e di erent types of nodes are faithfully sim-
ulated, and run within the same simulation
setup.
Simulating the entire IoT system in this fash-
ion allows you to test all aspects of the so -
ware, including things such as the wireless
communications stack and how it deals with
network problems, the sensing and actuator
code and how it works with the environment,
and the sleep modes and wake-up intervals
on the nodes and how well they conserve
power. Other so ware functions that could
be tested also include the reporting function
from sensors to gateways and on to server, the
middleware that manages network nodes and
updates so ware on the nodes including OTA
updates, along with the security of the gate-
ways and the nodes and the scalability of the
data management system as the number of
nodes goes up.
One particular aspect of an IoT system test
that is a very good t for simulation is testing
system and so ware behaviour as the system
is scaled up. As shown in gure 2, simula-
tion provides the ability to build systems of
any size – from quite small to very large. is
means that the behaviour of the system can be
tested on a whole range of scales, from small
unit tests or subsystem tests, all the way up
to the largest setups imaginable. O en, each
system scale will reveal di erent issues in the
system. It is not just about the very largest set-
ups, but also about making sure things work
e ciently at intermediate system sizes too.
Figure 1 also shows simulation of the envi-
ronment that the IoT system operates in. Each
sensor node will typically interface to a sim-
ulation of the world surrounding it – so that
it has some data to send back to the gateway
and server. An IoT node without a world
around it is not all that useful. System testing
Figure 1. Simulation of
a large network
1...,12,13,14,15,16,17,18,19,20,21 23,24,25,26,27,28,29,30,31,32,...48
Powered by FlippingBook