Design and Implementation
Design and Implementation
School of Science
Computer Science and Engineering
Title: The design and implementation of a smart-parking system for Helsinki Area
Abstract:
The strain on the parking infrastructure for the general public has significantly grown as a result of the
ever rising number of vehicles geared by the rapid population growth in urban areas. Consequently,
finding a vacant parking space has become quite a challenging task, especially at peak hours. Drivers
have to cycle back and forth a number of times before they finally find where to park. This leads to
increased fuel consumption, air pollution, increased likelihood of causing accidents, to mention but a few.
Paying for the parking is not straight forward either, as the ticket machines, on top of being located at a
distance, in many times, they have several payment methods drivers must prepare for. A system therefore,
that would allow drivers to check for the vacant parking places before driving to a busy city, takes care of
the parking fee for exact time they have used, manages electronic parking permit, is right direction
towards to toppling these difficulties.
The main objective of this project was to design and implement a system that would provide parking
occupancy estimation, parking fee payment method, parking permit management and parking analytics for
the city authorities. The project had three phases. The first and the second phases used qualitative
approaches to validate our hypotheses about parking shortcoming in Helsinki area and recruitment of
participants to the pilot of the project, respectively. The third phase involved the design, implementation
and installation of the system. The other objective was to study the challenges a smart parking system
would face at different stages of its life cycle.
The objectives of the project were achieved and the assumption about the challenges associated with
parking in a busy city were validated. A smart parking system will allow drivers to check for available
parking spaces beforehand, they are able to pay for the parking fee, they can get electronic parking
permits, and the city authority can get parking analytics for the city planning.
Keywords: Smart parking system, LoRa, LoRaWAN, Internet of Things, IoT, Reverse SSH tunneling,
Machine learning
2
Acknowledgements
On this project I worked as both systems and electronics engineer. Under the systems engineer
role, I worked on the design of the Smart Parking System architecture together with the CIO
(Krister Holmstrom). With the Electronic Engineer hood on, I was responsible for all the hardware
used on the project, right from schematic design up to soldering the components to the printed
circuit board, testing and installation. Other duties included brain storming on technology
selection and algorithms, site surveys, and system installation and maintenance.
The interview part of this work was done with help of my colleague Aftab Ansari during the course
Methods for Software Engineering and Business Research P. The objective of the course was to
introduce us to research methods, approaches and processes in software engineering and business
both in academy and industry. The course also provided us with practice on formulating research
questions and planning empirical studies for our master's theses.
I would like to thank my supervisor professor Kary Främling for his guidance and advise on many
issues including the technical correctness of this thesis. I wish also to take this opportunity to thank
my colleagues at Witrafi Oy without whose support and hard work, the project would not have
been completed. First I thank my instructor Sampsa Siitonen, for allowing me to write my thesis
on their project, and my instructors for guiding me whenever I went wrong. Secondly, i wish to
thank the following teams for their great work towards this project: The backend team Krister
Holmstrom and Nelson Makubuya; the frontend team - Doan Minh Hieu; Industrial design team
Thomas Wahl; Data analysis/machine learning team-Momir Beljic; Management team - Sampsa
Siitonen and the embedded software team Jonathan Malangoni and Toni Piira. Thank you guys, I
learned a lot from you and please continue that good spirit.
Lastly, I wish to thank my family especially Rosette and my son Ethan for enduring my absence
during the project and thesis writing time. And the family members and friends, forgive me for not
returning your calls, I was packed up but now I am free again.
3
Try Not to Become a Man of Success, But
Albert Einstein
4
Table of Contents
Abstract: ...................................................................................................................................................... 2
Acknowledgements ..................................................................................................................................... 3
1. INTRODUCTION............................................................................................................................... 7
1.1 Objectives of the project ................................................................................................................... 7
1.2 Research questions ............................................................................................................................ 7
1.2.1 What are the challenges associated with parking in Helsinki Area? ..................................................... 8
1.2.2 What are the advantages of smart Parking in Helsinki Area? ..............................................................8
1.2.3 What are the challenges a Smart Parking system for Helsinki Area would face? ...............................8
1.3 The different roles I played during the project .............................................................................. 8
1.4 The Use Case diagram for the Smart Parking System ................................................................ 11
1.5 Structure of the thesis ..................................................................................................................... 12
2. Background ....................................................................................................................................... 13
2.1 IoT Architectures ............................................................................................................................ 13
2.1.1 Architectural Model of IoT Public Sensing ...........................................................................................14
2.1.2 IoT Architecture Proposal for Disabled People..................................................................................... 14
2.1.3 An IoT Gateway Centric Architecture ................................................................................................... 15
2.1.4 Long Range Wide Area Network (LoRaWAN) Architecture ..............................................................17
2.2 IoT standards that would support Smart Parking....................................................................... 18
2.2.1 The Open Data Format Standard ...........................................................................................................18
2.2.2 Message Queuing Telemetry Transport (MQTT) for Sensor Networks (MQTT-SN) .......................19
2.2.3 The Constrained Application Protocol (CoAP) ..................................................................................... 21
2.2.4 The LoRaWAN protocol .........................................................................................................................21
2.3 Wireless Technologies and remote connection ............................................................................. 24
2.3.1 Active RFID based positioning ...............................................................................................................24
2.3.2 Long Range IoT Communication Systems in Unlicensed bands .......................................................... 25
2.3.3 Reverse SSH Tunneling based remote control ...................................................................................... 26
2.4 Web technologies and Frameworks............................................................................................... 28
2.4.1 Restful Application interface ..................................................................................................................28
2.4.2 HTML 5 and CSS3 ................................................................................................................................... 29
2.4.3 Spring Framework ................................................................................................................................... 29
2.4.4 Django .......................................................................................................................................................31
2.5 Machine Learning ........................................................................................................................... 32
3.0 METHODS .......................................................................................................................................... 33
3.1 Qualitative approach ...................................................................................................................... 33
5
3.1.1 Interviews ................................................................................................................................................. 33
3.1.2 Survey .......................................................................................................................................................36
3.2 Embedded Networking ................................................................................................................... 37
3.2.1 The Smart Parking System Architecture ............................................................................................... 37
4.0 Implementation ................................................................................................................................... 39
4.1 WinNode Design and Implementation ......................................................................................................39
4.1.1 The first working Version of WinNode .................................................................................................. 40
4.1.2 The WinNode Assembly and Enclosure .................................................................................................41
4.1.3 Voltage Stabilizer for WinNode ..............................................................................................................42
4.1.4 The WinNode Embedded software ......................................................................................................... 43
4.1.5 Enhancing the positioning capability of the WinNode ..........................................................................44
4.1.6 More WinNode Power saving using accelerometer ...............................................................................45
4.2 WinSpot (Gateway) Design and Implementation ..................................................................................... 45
4.3 System components inter-communication .................................................................................... 47
4.3.1 WinNode-to-WinSpot communication ................................................................................................... 47
4.3.2 WinSpot to server communication .........................................................................................................47
4.3.3 Server-to- WinNode communication ......................................................................................................48
4.4 WinSpot Installation and Deployment ......................................................................................................48
4.5 Backend Implementations .............................................................................................................. 49
4.5.1 Using Django for a proof of concept ....................................................................................................... 50
4.5.2 WinNode Position Estimation Methods .................................................................................................50
4.6 Smart Parking System area coverage test .................................................................................... 51
5.0 Results .................................................................................................................................................. 53
5.1 Results from the interviews ............................................................................................................ 53
5.2 Results from the Survey ................................................................................................................. 54
5.3 Smart Parking System area coverage and performance ............................................................. 54
5.4 Parking facility Occupancy Prediction ......................................................................................... 55
6.0 Discussion and Conclusion ................................................................................................................. 57
References .................................................................................................................................................. 60
6
1. INTRODUCTION
Due to the increasing number of vehicles caused by rapid population growth in urban areas, the demand on
parking infrastructure for the general public has increased significantly (Polycarpou et al., 2013). As
Polycarpou et al. (2013) further points out, finding a free parking space in urban cities especially during
peak hours is more or less impossible, in many cases.
Looking for a vacant parking lot in a busy city like Helsinki, at a peak hour is a nightmare to drivers. They
have to drive around looking for a free parking spot, something that is believed to increase traffic congestion
(Chinrungrueng et al., 2007; Srikanth et al., 2009; Geng et al., 2012). The cycling around not only frustrates
drivers but also increases the average consumption of gas and hence the air pollution (Chinrungrueng et al.,
2007) oking for a free
spot in a busy city, the likelihood of causing an accident is higher. Another challenge is associated with
paying for the parking, most of the time, the machines from which to get the payment ticket are located
some distance from the car. The ticket machines too, present some complications since they are not the
same; some machines take only coins, or coins plus credit/debit cards or only credit/debit cards. The
situation looks like drivers have to prepare for the possibility of any of the above type of ticket machines.
Smart parking is a vehicle parking system that aid drivers to identify empty parking lots (Pcmag, 2014).
The smart parking system also includes the means of calculating and paying for the time spent in the parking
lot. The idea behind such arrangement is that, the system allocates a parking space and automates the
payment for the parked time (Revathi et al. 2009). In addition to establishing the location of vacant parking
space and payment for the parking, the system could also include the management of parking permits.
Currently, the parking permits are hard copies and digitizing them would be a value addition and a further
utilization of the system.
This work aims to study how challenging it is to find parking space in Helsinki area in comparison to what
research works have pointed out for other urban cities. This research investigates whether there is need for
smart parking systems in Helsinki area basing on driver's point of view. A smart parking system would be
designed, implemented and deployed at Katajanokka Helsinki, with the aim of identifying some of the
challenges a smart parking system would face. The challenges to learn includes design, implementation,
deployment and operations challenges.
The main objective of this paper is to highlight the steps and decisions that were taken during the
conception, design and implementation of a smart parking system, concentrating mainly on the architecture
and the hardware required. The technologies and standards that were relevant towards the completion of
the project are briefly introduced.
1.2 Research questions
The objectives of the project were compressed into three research questions. The idea was, if these
questions are answered, then the objectives of the project would be achieved.
7
1.2.1 What are the challenges associated with parking in Helsinki Area?
To answer this question, related work in this area will be evaluated to know and study some of the known
challenges. In addition, interviews will be conducted with the target group relevant to this work to capture
existing challenges for the Helsinki area.
1.2.3 What are the challenges a Smart Parking system for Helsinki Area would face?
To answer this question, a prototype will be designed, implemented and deployed, and along the way, the
challenges and benefits of a smart parking system will be documented and analyzed.
A three-month pilot was allowed to test the system, to verify its feasibility and also gain more insights on
what benefits such a system would bring to its users.
From the given requirements, I started by identifying some of the problems that the system was likely to
solve, but I was not sure whether I was not creating just problems of my own. To get a clear picture of what
challenges drivers in Helsinki area face, I decided to conduct interviews during a class project for the course,
Methods for Software Engineering and Business Research P, that in so doing would help me validate my
hypotheses. I chose to adopt the name Smart Parking System for the name of the system and the class
project title was, Usefulness of Smart Parking System in Helsinki Area. I worked with my colleague Aftab
Ansari during the class project when conducting interviews and analysis of data. We collected a great deal
of useful information and the hypotheses were validated.
Equipped with this information, it was time to get to the design table and start planning how to proceed.The
first step was to identify the key components the system should be comprised of. To learn the parking
behaviors of drivers in the city resonated with the idea of tracking the cars. The needed system was a system
that could monitor how and where cars are parked. There I knew an active RFID tag could get that task
sorted out. My instructors had some ideas on the technology to use. They had tried out some positioning
technologies that operated in 2.4 GHZ band and used angle of arrival to estimate the position, but the results
were not satisfying. That helped me as I was discouraged from driving down that lane. At least they knew
one upcoming wireless technology, which they mentioned to me that I should put on my table as one of the
8
candidates to choose from. The technology was LoRa, the technology I had never heard of, but here it was
for me to learn and figure out if it was a fit for our application.
Having worked with indoor positioning systems using active RFID tags and with some knowledge on
, with a star
topology. What was needed was the means to collect th
send that to the server where it is analyzed together with data from other sources. At this stage I knew what
to do but how to do it, in a very limited time was out of my reach. I came to know that GPS technology was
black listed when I proposed it as one of the options, so it was off my menu. I was also persuaded to believe
that time-of-
knowledge and experience on that to give an affirmative answer, so I started researching for me to be able
to validate or invalidate that claim. An obvious choice was to use received signal strength indicator (RSSI)
to estimate position of a transmitter, I had used it before and I knew its limitations.
I bought a number of different development boards for prototyping, but the timing requirement for using
TOF to estimate position was less unlikely to be achieved within our budget and time brackets. My
instructor brought in different consultants to assist on the system implementation. But I disagreed with these
consultants, most of the time, as it looked like they were pulling me, mostly, towards their comfort zones
which in many times looked unsuitable for our application. The confidence I had was knowing what to do,
but my challenge was about how do it in reasonable time, this lead to me rejecting the consultant and
advised to hire interns instead
hired as employe
embedded software for the RFID tag. At this point I decided that we concentrate on LoRa technology as it
was promising long range communication even in built up areas.
The sourcing problem then struck. Where to get the LoRa tags was not obvious and those from Semitech
the LoRa chip maker, were quite expensive. Other tags that were available then, were preprogramed and
osting more because they had sensors on board,
but I needed no sensors and I never wanted to pay for what I would not use. The next option was to buy a
LoRa radio module to build my own tag with a microcontroller of my preference. The first LoRa radio
modules I bought for prototyping, even though they were expensive, but again the vendor never put
available the data sheets, unless if I used their development boards and ecosystem. They had encoded and
hidden the module pins to make them difficult to reverse engineer, time was not my ally to try that.
During my search I came across a company in German that sold LoRa modules relatively cheaper. These
modules though pre-programmed, it was possible to reprogram them and good documentation was available
teaching how to go about all that we wanted. But again the module had only the radio and MCU, and
nothing else. Therefore, there was a need for an adapter board to host the module and other components
including a button, LEDs, antenna, and power supply, or to buy it from the vendor. The adaptor board from
the vendor was a bit expensive for our budget and
those designed in-house.
With tags looking like they had been taken care of, it was time to look for the gateway. There was not so
many vendors in gateway business, something that made the gateways not only expensive but also scarce.
9
Many of the available gateways then, had either WiFi or Ethernet for the IP network interface. I wanted a
gateway with 3G interface. I had tested GSM/GPRS modules but I was not impressed with their
performance. Another limitation was that many of the LoRa gateways were none re-programmable, they
that I had to use
their cloud service if I was to use their gateways. Some of the gateways that were open, were quite
expensive to fit well into our budget. So I decided to assemble my own gateway. To assemble a gateway, I
needed a LoRa concentrator, a raspberry pi, a 3G dongle, and there was my relatively cheap gateway. The
concentrators were later put available by the German company at a reasonable price.
There were two tasks on the table to execute; the embedded software development for the gateway and the
assembly of the gateway, and the making of the LoRa tags. The making of the LoRa tags required some
knowledge in radio electronics, power electronics and printed circuit board design. So, I needed someone
to take care of the hardware and i handle the embedded software development for the gateway. What turned
out was a failure to find a hardware person but instead I spotted a person for embedded software
development. I decided to recruit him and myself took head-on the task of developing the hardware for the
project.
After the first version of the LoRa tags were out, it became apparent that the tags would need enclosures
and it was time to get started designing them. This task required an industrial designer with some experience
in this area. I made calls to a number of them in my contacts and fortunately one of them accepted to take
up the challenge, and so I recruited him. At this stage all looked progressing on well under the tight schedule
we had.
At first I thought I would build a backend where the contents of the gateways could be off-loaded. The
plan was to use Django (python) to build a server with APIs to be used by the other company server to fetch
the tags data for processing and analysis. I actually quickly built a test server to visualize how the gateway
CIO, we realized that building another server would be a duplication of work. So we agreed that he should
provide endpoints from the server he had developed, to handle the traffic from the gateways. Under this
arrangement, the backend development was transferred to his command. But still I participated in
formulating some logics and development of some algorithms that were used in the backend. When it came
to employing machine learning algorithms to estimate the location of the LoRa tags based on RSSI, I was
available to give the domain knowledge needed for the data scientist to perform his tasks effectively.
On top of the above mentioned roles, I was also out in the field surveying the area to figure out the system
requirements and locations fit for the installation of the system. I was also I key resource during the
installation of the system itself.
10
1.4 The Use Case diagram for the Smart Parking System
The smart parking system to be developed has four actors whose needs the system must satisfy. The primary
actors of the system include car drivers, system administrators, parking enforcement officers, and the city
planning authority. Figure 1 shows the use case diagram of the system highlighting the actors and their
actions.
Figure 1: The use case diagram for the smart parking system
The secondary actors include the payment processing system and the parking permit issuing system. The
Driver has to Register
to the created account. The Payment Processor the external system is used to process the payment. The
driver checks for available empty parking spaces in the part of the city before driving there. The check
free(empty) parking space depends on the Occupancy Prediction engine which includes the execution of
11
Car positioning algorithms. When a driver finds a parking space, the driver wants to Pay parking fee
which action requires the system to Check Credit balance to cover the parking fee due. The driver
furthermore wants to Get Electronic parking permit, this action invokes the Permit Issuer an external
system that manages the issuance of parking permit.
The Admin, just like the driver, both have to Login/Logout and the system must verify that they are who
they claim to be using User Authentication engine. The system admin also wants to Manage User
Accounts in case of a problem or during routine maintenance of the system. The Enforcement officer
wants to Get Info about parked Cars which tells if a car has a parking permit or if it has the parking event
running at the end of which the parking fee would be paid. The City Authority want to Get Parking
Analytics to predict the parking behaviors of the drivers in the city to aid their city planning. This action
involving the Pattern recognition engine that looks for patterns and correlations between different data set
of parking events and occupancy.
12
CHAPTER 2
2. Background
The problems this project is addressing needs an aggregation of data and information from different sources,
but these sources must be connected to the internet to make that data accessible. The sharing and utilization
of data between interconnected data sources, through the internet, shares similar characteristics to the
concept known as The Internet of Things (IoT). This chapter presents some contributions towards the IoT,
with anticipations that inspirations towards this project could be gained from what is already done for IoT.
Some of the IoT architectures, standards, radio technologies and web technologies that are considered
relevant to the execution of this project are briefly introduced.
The Internet of Things is a paradigm referring to the interconnection of physical objects (Things), people,
virtual data and environment that allows them to interact at will (Framling et al., 2014; Al-Fagih et al.,
2013). The physical objects are equipped with hardware and software that permits them to collect and
exchange data and/or execute control commands to drive actuators.
The architecture of an IoT system has to take into consideration the diverse and distinct technologies
spanning from computing (e.g. cloud computing), communication (e.g. 3 or 4G) to semantics (e.g. data
mining) (Vasco et al, 2014). The IoT architecture of an IoT system is also influenced by the requirements
of a given application/project and its location in the IoT domain (Krco et al., 2014). A good number of
project-based IoT architectures such as IoT-A, SENSEI and SPITFIRE, were developed to address specific
requirements of those projects (Krco et al., 2014). The difference of the focus to which an IoT system could
be designed has led to the development of several different IoT architectures with different components and
protocols.
Among the challenges faced by these IoT architectures is the difference in the terminology, and limited
interoperability between systems (Krco et al., 2014). The IoT community agrees, according to a survey
(Krco et al., 2014), that a common IoT reference model would be useful if the lack of interoperability is to
be addressed. A good number of projects have been carried out including those supported by European
Union, with the aim of harmonizing the IoT architectures and hence, systems. Global initiatives such as
oneM2M were created to see to it that a common platform has been specified and a reference model
developed.
13
derived (Krco et al., 2014). With the same technical base, architects of IoT systems would use similar
terminologies and best practices that would simplify their efforts towards optimizing the interoperability of
their systems.
A good number of IoT architectures have been proposed and the proposed architectures seem to fall under
the M2M top-level architecture, defined by the ETSI mentioned in previous paragraph. Some of the
proposed architectures are briefly explained in sections: - 2.1.1 (Architectural Model of IoT Public
Sensing), 2.1.2 (IoT Architecture Proposal for Disabled People), and 2.1.3 (An IoT Gateway Centric
Architecture). The Long Range Wide Area Network in section 2.1.4 combines three-in-on; the architecture,
the standard and the protocol.
Figure 2: Architectural model of IoT public sensing (Reprint from (Al-Fagih et al., 2013)
Data is collected from sensor networks together with that freely shared by mobile devices users. Publically
available data such as data from environmental monitoring stations, public transport schedules and alike,
from databases is also collected. The deliverable is a set of services derived from combining different
available data to achieve an improved residential experience and quality of living in smart cities.
The IoT Architecture for disabled people was proposed by Vasco et al. (2014) targeting to address the needs
of people with disabilities, the needs that available architectures never considered. The architecture is made
14
up of four layers; the Device, Network, Service and Application layer. Figure 3 illustrates the proposed
architecture and the corresponding mapping to the TCP/IP stack.
Figure 3: IoT Architecture for People with Disabilities (Vasco et al., 2014)
It is proposed that the Device layer would collect data/event from the physical world and then pass it to the
network such as WiMax or 3GPP. The Device layer maps to the Physical and Data link layers of the TCP/IP
stack. The Network layer handles the end-to-end communication, addressing, and routing of messages to
specified destinations. It maps to Transport and Network layers of the TCP/IP stack. The service layer is
introduced to, literary, hide the vertical silos caused by the heterogeneous nature of IoT environments from
the application layer and hence, facilitating high application level interoperability between IoT systems.
Application layer is the interface between the users and the system, it provides the user interface. (Vasco et
al., 2014)
The Device layer is made up of two components; sensing devices and wireless sensor networks. The sensing
device includes the detecting and sensing (perception) technologies such as sensors, cameras, e.t.c, that
captures the state of the environment. The wireless sensor networks are self-organized wireless sensor
networks that collects the physical status of the environment. An IoT gateway can only link devices that
are not IPv6 compliant to the core network. The IoT technologies from which the device layer could benefit
includes the identification technology, the sensor technology and the assistive devices. (Vasco et al., 2014)
15
Figure 4: An IoT Gateway Centric Architecture (Datta et al., 2014)
The wireless gateway is mad up two interfaces; the north and south interface. The north interface handles
the communication between the mobile clients as well as the discovery phase of M2M devices and
endpoints. Whereas the interconnection with and the management of the M2M devices is left to the south
interface. The M2M Devices and Endpoints layer is responsible for collecting physical quantities such as
temperature and pressure from the environment, aided by appropriate sensor endpoint. The smart M2M
devices have the capability, resources and support for the Sensor Markup Language (SenML) to encode the
measurements into the JSON format, pass the data directly to the South interface of the wireless gateway.
But for the non-smart devices, they have to go through the MODBUS or the M2M sensor gateway which
creates the desired SenML compliant metadata and encodes it to a format acceptable to the wireless
gateway.
The mobile clients the architecture assumed, included smartphones and tablets running Android and iOS.
These clients are running Connect and Control Things (CCT) application whose role is to receive the
measurements from sensors and can control actuators via a cloud service such as Google App Engine
(GAE).
Other layered IoT architectures listed by (Vasco et al, 2014) that has not been covered here, are given by
their layers:
16
2.1.4 Long Range Wide Area Network (LoRaWAN) Architecture
LoRaWAN is a low power wireless networking architecture and protocol developed for low-cost secure
two-way communication in IoT. The LoRa network, which is LoRaWAN due its ability to provide wide
area network, is made up of four main components: Endpoints, LoRa gateway, NetServer and Remote
computer (Ian Poole ,2014; Vangelista et al., 2015). The LoRaWAN architecture is commonly deployed in
a star-of-stars topology with the gateway interconnecting the endpoints and network server (LoRa Alliance,
2016). Figure 5 shows the illustration of the interconnection of components in a LoRa network.
Endpoints (End-devices): These are components of the LoRa network that are responsible for collecting
data or execution of control commands, usually from remote locations.
LoRa gateway: The gateway links the LoRa network end-devices to the backhaul system. The link between
the gateway and the NetServer can be through Ethernet, cellular or any other telecommunications link wired
or wireless that supports standard Internet Protocol (IP) connections. (Centenaro et al., 2015; Ian Poole
,2014)
NetServer: The Network Server handles the cores of the network. It is possible in some cases for the end-
device to be in range to more than one gateway, in which case the Netserver has the task of filtering out
duplicates and outlying packets (Ian Poole ,2014; Centenaro et al., 2015). It also schedules
acknowledgements on top of adapting data rates (Ian Poole ,2014). The NetSever plays a key role in cases
when the network is public or shared by different integrators. It must receive and differentiate packets from
Remote computer/Application Server: The remote computer represents different systems in a shared
LoRa network. It is responsible for controlling the actions of the end-devices or for the collection of data
from them (Ian Poole ,2014).
17
2.2 IoT standards that would support Smart Parking
The need for a standard is no question any more if the interoperability of IoT systems is to be achieved.
The question is whether a single standard can cover the enormous number of technologies required to get
IoT work, covering Layers including Application, Network/Transport and Physical/Link layer. In the
following sections, a few of the standards covering one or more layers are briefly presented.
The publication of available data using O-DF can be achieved using already familiar Uniform Resource
Locator (URL) addresses. The same structure of O-DF supports for exchanging data between system. O-
DF makes it possible for information systems to manage IoT-related data due to its generalized data
representation standard. The O-DF uses object identifier to make it possible to trace data related to a
particular IoT item from different information systems. An Object identifier is one of the most important
data structure in all general IoT standards, as it might be the only way to make the identification of parties
requesting for data, context of request, and the visibility and access to data could be dependent on the
same.
The specification of O-DF is done using XML Schema. The O-DF is comparable to object-oriented
programing in relation to the style used to create information structures. An O-DF structure is a hierarchy
with an Objects element as its top element, as illustrated in figure 6. There is no limit on the number of
Object sub-elements to make up an Objects element.
The InfoItem are sub-elements for the properties of the Object sub-elements, but properties also include
Object sub-elements and the Object tree can be up of any number of levels. The O-DF content describing
18
(JMS) e.t.c as both request and responses. For more details on O-DF you may refer to (Open Group,
2014).
Source (Open Group, 2014)
2.2.2 Message Queuing Telemetry Transport (MQTT) for Sensor Networks (MQTT-SN)
The Message Queuing Telemetry Transport (MQTT) is lightweight publish/subscribe messaging protocol,
originally developed by IBM but now it is open standard (Lee et al, 2013; Stanford-Clark & Truong, 2013).
Its development was intended for application suffering from unreliable networks, low bandwidth and high-
latency (Lee et al, 2013; Hunkeler et al, 2008), yet a data-centric communication is needed to be supported.
The publish/subscribe messaging system is one of the data-centric communication examples in which the
information sent to the recipients is based on the content and interest instead of the network address
(Hunkeler et al., 2008, Stanford-Clark & Truong, 2013).
The MQTT protocol fails for applications with resource constrained devices very simple devices with
limited storage, low cost, and low computation capabilities (Stanford-Clark & Truong, 2013), as the support
for TCP/IP networking is farfetched and complicated. This lead to the development of the MQTT-SN a
publish/subscribe protocol for wireless sensor networks that is optimized for low-cost, battery operated
devices with limited resources (Stanford-Clark & Truong, 2013). The independence of MQTT-SN from
the underlying network services permits usage of any 2-way communication between nodes and gateway
to be used (Stanford-Clark & Truong, 2013).
The gateways can be classified into two categories; a transparent gateway or an aggregating gateway. This
categorization is based on the nature of the connection between the client and the server. With the
transparent gateway, there is an exclusive end-to-end connection between each client and a server that is
maintained all the time and an almost transparent messages are exchanged between the two. The advantage
with this set up is that, all the functions and features from the MQTT server are visible to the client. The
drawback however, is on the fact that some servers might not support unlimited number of concurrent
connection. The other option is the aggregating gateway in which not all clients connected to the gateway
are connected through to the MQTT server, but only a few are selected by the aggregating gateway.
The architectural set up of the MQTT-SN protocol is mainly composed of three components; the MQTT-
SN client, gateway and the forwarder. Figure 7 shows the MQTT-SN architecture and the interconnection
of the components. Since the MQTT-SN clients have no TCP/IP stack, they connect to the MQTT-SN
server through the MQTT-SN gateway using the MQTT-SN protocol. There are two possible configuration
of the gateway; it is either an integral part of the server or a stand-alone gateway. In the latter case, the role
of the gateway is to translate between MQTT-SN and MQTT protocols. Since MQTT is used between the
gateway and the server yet the client and gateway uses MQTT-SN protocol to intercommunicate, translation
is necessary.
19
Figure 7: MQTT-SN Architecture (source: Stanford-Clark & Truong, 2013)
The forwarder is another channel through which a client can interact with the server, the forwarder simply
encloses the packets from the client into the MQTT frame details and transparently forwards it to the server.
The reverse happens for communications from the MQTT server to the MQTT-SN clients. (Stanford-Clark
& Truong, 2013)
The packet format of the MQTT-SN protocol is shown in Figure 8. The packet is made up of two parts,
the Message header and the Message variable part. The Message header defines the packet length and the
message type. The Message variable part may contain one or more parts depending on the type of the
message.
Figure 8: MQTT-SN General Message Format (source: Stanford-Clark & Truong, 2013)
To minimize the packet length, the message type is coded into a one-byte code instead of a whole string.
Examples of message types include 0x00 for ADVERTISE, 0x04 for CONNECT, 0x12 for SUBSCRIBE
and so on. (Stanford-Clark & Truong, 2013)
20
2.2.3 The Constrained Application Protocol (CoAP)
The Constrained Application Protocol (CoAP) is a specially designed web transfer protocol for nodes and
networks with limited capabilities (Shelby et al., 2014; Bormann et al., 2012; Villaverde et al., 2012). The
constrained nodes might be as simple as an 8-bit microcontroller based system with limited amount of RAM
and ROM. The networks usually have high packet error rates and low throughput such as IPv6 over Low-
Power Wireless Personal Area Networks (6LoWPANs) (Shelby, et al., 2014). The CoAP was born from
the efforts of the Constrained RESTful Environments (CoRE) working group and it was standardized in the
IETF as RFC 7252 (Shelby, et al., 2014).
The CoAP follows a client/server model in which the client sends a request and the server responds. One
of the interesting part of the CoAP clients is that they are able to switch between roles. CoAP can be looked
at as an optimized HTTP that offers part of REST methods to constrained M2M/IoT applications. Therefore,
the HTTP verbs; GET, PUT, POST and DELETE are supported and devices can use them to request data
from the server. CoAP brings on table a couple of good features to the M2M/IoT community including but
not limited to built-in discovery, multicast support, and asynchronous message exchange. (Shelby, et al.,
2014)
The built-in discovery feature permits clients to learn of the resources located on servers. The subnetwork
devices benefit from the same feature as they are able to discover themselves. There is also a possibility to
post fully described resources to Resource Directory (RD) entities from where others can know who hosts
what resources. The multicast support allows group communication, in which many similar devices are
queried simultaneously. (Villaverde et al., 2012)
Since CoAP runs on top of UDP to carry out message exchange between endpoints, it uses four message
types to achieve reliable communication and imitate the likes of TCP. These message types are;
Confirmable, Non Confirmable, Acknowledgement and Reset. The Confirmable message type stresses to
the recipient that an acknowledgement of message receipt is required. The sender repeats sending the same
message with the same message ID until an acknowledgement is received from the receiver or a Reset
Message to indicate the inability to process the message. The Non Confirmable message is used in situations
where a reliable communication is not critical and acknowledgement is unnecessary. (Shelby, et al., 2014;
Villaverde et al., 2012)
The adaptation of CoAP has reached a stage that some implementations are already available:
21
Figure 9: The LoRa network components and links
The end-devices can be implemented in three classes that are intended to support the different
requirements for given applications. There are classes A, B and C (Ian Poole ,2014). All these classes
support bi-directional communication between the end-devices and the gateways, but the implementation
is not the same. In class A for instance, there are two listening/receiving instances after every
transmission, and the scheduling of which is entirely up to the end-
Vangelista et al., 2015; Vangelista et al., 2015; LoRa Alliance, 2016). The second listening window is
scheduled on a different sub-band which must have been agreed upon with the NetServer (Vangelista et
al., 2015). This class provides power saving options for devices that must contact the server to receive
something. This means that the only way the server can contact the end-device is after the end-device has
contacted it.
For Class B end-devices, on top of all the mandatory features offered by class A, they add on the ability to
schedule extra receive windows. The scheduling of receive windows by an endpoint creates a need to
synchronize the device clock with that of the server, and this is achieved by gateway sending sync
beacons (Ian Poole ,2014; Vangelista et al., 2015). Under this arrangement, the server can know when it
can contact the end-device instead of waiting for the device to contact the server, through the gateway.
The gateway is transparent to the end-device, that is, it has no knowledge of the contents of the packet, it
simply adds extra information about the communication channel such as radio signal strength
indicator(RSSI) (Centenaro et al., 2015; Ian Poole ,2014). A gateway built with a concentrator supports
parallel processing of up to 9 LoRa channels and channels are differentiate using a sub-band and
spreading factor (Centenaro et al., 2015).
22
The Class C end-devices stay in receive model except at the times when they are transmitting something.
This class is suitable for devices where big volumes of data have to be received but less is needed to be
transmitted. (Ian Poole ,2014; Vangelista et al., 2015)
Network security: Network security being an important aspect of any network, LoRa networks
A Unique
Network key (EUI64) was introduced for network level security. On the application level, a Unique
Application key (EUI64) handles the end-to-end security on this layer (Ian Poole ,2014). The Device
specific key (EUI128) is for protecting the devices such that, if one device is attacked, it is only that
device that is compromised and none else in the network. The network uses the AES CCM (128-bit) for
encryption and authentication. (LoRa Alliance, 2016)
The security of the LoRa network is derived from the already proven working secure protocols such as
the IEEE 802.15.4 MAC. For instance, the authentication process of the LoRa network MAC layer was
replicated from the IEEE 802.15.4 standard using the 4-octet MIC (Message Integrity Code) (Vangelista
et al., 2015), there was no need to re-invent the wheel. Figure 10 show the architecture of the LoRa
protocol. The three evident parts translating to the LoRa architecture are the Sensor the end-device, the
gateway and the network server. The gateway in this case is shown to be a packet forwarder and its
functionality resembles the one mentioned in section 2.2.2.
Figure 10: LoRaWAN protocol architecture (Reprint from: LoRa Alliance, 2016)
The physical layer linking the end-device(sensor) to the Gateway can be either through LoRa modulation
scheme or the Frequency Shift Keying (FSK), the LoRa gateway supports both. The IP based connection
between the gateway and the network server can be anything from a WiFi, Ethernet to 3G.
Message Formats
The LoRaWAN specification defines two message formats, one for the uplink communication and the
other for downlink communication. The uplink messages are sent from the end-device to the gateway and
23
then to the network server. The LoRa physical packet structure consists of a Preamble, LoRa physical
header(PHDR), a header CRC (PHDR_CRC), the payload (PHYPayload) and CRC (LoRaWAN
Specification 1R0).
-------------------------------------------------------------------------
| Preamble | PHDR | PHDR_CRC | PHYPayload | CRC |
--------------------------------------------------------------------------
The downlink messages for the downlink communication are received by the end-devices from the
gateway, which passes them over to devices on the behalf of the network server. The downlink physical
packet structure is made up of a Preamble, LoRa physical header(PHDR), a header CRC (PHDR_CRC),
and a payload (PHYPayload) (LoRaWAN Specification 1R0).
-----------------------------------------------------------------
| Preamble | PHDR | PHDR_CRC | PHYPayload |
-----------------------------------------------------------------
Both the downlink and uplink messages use the radio packet explicit mode which includes the LoRa
physical header and a header CRC (LoRaWAN Specification 1R0).
The Global Positioning System (GPS) is the de facto standard for outdoor positioning, but it suffers some
limitations in areas with tall buildings and inside buildings or in places where signal penetration is poor
(Wang et al., 2009; Zhang et al., 2011). Furthermore, GPS systems have higher energy requirements that
simple sensor nodes might not afford to satisfy, as it could limit their battery life considerably. Using active
RFID for positioning in places where GPS in impractical to use could bridge the gap, but a combination of
the two technologies would give a complete solution for indoor and outdoor positioning. When active RFID
is used for indoor positioning, signal strength could be used to give about 5 meters of precision (Tesoriero
24
et al., 2008). The location of an item could be obtained by using RFID either as a mobile tag or as a mobile
reader (Tesoriero et al., 2008).
Mobile tag is when an RFID tag is attached to the item whose position is to be determined and RFID readers
are usually stationary, whereas the reverse is true for a mobile reader. A mobile reader was used by (Zhang
et al., 2011) to implement an Active RFID Positioning (ARP) scheme where RFID tags were deployed
along each lane of the road to position cars installed with RFID readers. It is possible to use signal strength
indication (RSSI) from active RFID tags to estimate the location of the tag. Some of the approaches to do
the positioning includes; signal strength to range conversion and location fingerprinting based on RSSI, and
Cell-based Positioning (Fu and Retscher, 2009). For the first approach, logarithmic and a simple
polynomial model (or trilateration) is use to convert the signal strength to distance. In the fingerprinting
approach, there is a training phase where RSSI is measured at known location of interest and stored in a
database and later used with current measurements to estimate the current location. (Fu and Retscher, 2009)
The Cell-
the highest RSSI value. It is also known as the Cell of Origin (CoO) (Fu and Retscher, 2009). This approach
works in situations where just the knowledge of which cell an item is located is sufficient and accuracy is
not very important. In some situations, stating some thresholds outside of which the measurements are
rejected is necessary. This is useful if there are some prohibited areas whose location is not needed. The
volatility of the RSSI values can lead to misestimating of the location since RSSI values can change, due
to slight changes to the environment such as when big vehicles passes by. In this case, machine learning
algorithms could be employed to design an adaptive system to changes in the environment. The cell is
identified by the stationary RFID component; it can be a tag or a reader.
SIGFOX
SIGFOX technology is the oldest among these three technologies and the first to be suggested for IoT
systems (Centenaro et al., 2015; Vangelista et al., 2015)). It was founded as early as 2009. Some of what is
known about SIGFOX is that it uses Ultra Narrow Band (UNB) wireless modulation on the physical layer
but most of technical details are closed from public. SIGFOX as a company, has positioned itself as a
network operator (Centenaro el at., 2015) for IoT services and it has already SIGFOX network coverage in
countries including UK, France and Spain (Vangelista et al., 2015). The technology supports bidirectional
communication between the end device and the aggregator. The range that SIGFOX technology covers is
between 30-50 km in less congested areas and 3-10 km in built up areas (Centenaro el at., 2015; Vangelista
et al., 2015).
25
Ingenu
Ingenu is another upcoming long range communication technology on the block, available for IoT solutions
and M2M communication. It was developed by On-Ramp Wireless based in San Diego (USA). The physical
layer is based on the proprietary Random Phase Multiple Access (RPMA) technology and the technology
can be deployed on other networks. The robust design of the technology on the physical layer allows the
use of the 2.4 GHz band to operate over long range wireless links. (Centenaro et al., 2015; Vangelista et
al., 2015)
LoRa
LoRa is a modulation scheme or a physical layer designed and patented by the Semetch Corporation - an
analog and mixed-signal IC maker. It is derived from Chirp Spread Spectrum (CSS) with some phase tuning
on symbol properties of the preamble to achieve better timing and frequency synchronization, which in turn
allows a stable local clock on the LoRa tag without strict requirements on quality of components used.
(Centenaro et al., 2015; Vangelista et al., 2015). In other words, data is encoded from the extent of frequency
changes over time (Ian Poole ,2014). Ian Poole (2014), describes LoRa as a spread spectrum modulation
technique that utilizes wideband linear frequency modulated pulses.
The technology achieves noise and interference reduction at the receiver by use of a spreading technique
that sees the symbols encoded into a longer sequence of bits. The flexibility of the spreading code lengths
allows for tradeoffs between coverage range, or link robustness, or energy demand against performance
resulting from variable date rates. (Centenaro et al., 2015)
LoRa takes advantage of the unlicensed frequency bands that are usable all over the world, these includes
868 MHz for Europe, 915 MHz for North America and 433 MHz band for Asia. The choice of lower
frequencies is to enable longer range and resistance to interference. It is worth mentioning that LoRa is not
frequency specific, it can be used on many other frequencies with no serious changes. (Ian Poole ,2014) In
fact, Semtech is already developing a chip that will use LoRa in 2.4 GHZ frequency band.
The LoRa employs an adaptive link in which different bandwidths are selected depending on the data rate
and the link conditions. The available bandwidths include: 7.8 kHz; 10.4 kHz; 15.6 kHz; 20.8 kHz; 31.2
kHz; 41.7 kHz; 62.5 kHz; 125 kHz; 250 kHz; 500 kHz. It turns out that the choice of the data rate and the
condition of the link plus some other factors also affects the power level adjustments. The power level
adjustments are done in such way that fast communication is supported and battery life maximized without
affecting network capacity. The choice of the data rate is a compromise between range and message time-
on-air. (Ian Poole ,2014)
26
The port-forwarding functionality of the SSH protocol support both local, dynamic and remote
forwarding that allows it to redirect TCP/IP session over encrypted tunnels (Egners et al., 2012;). With
the local port forwarding, all the traffic directed to local port is redirected to a server and a port through
an SSH tunnel to a third node (Egners et al., 2012). The reverse of the local port-forwarding is the reverse
SSH tunneling (Egners et al., 2012). In this case, the SSH client reverses the direction of traffic flow of
the port on the SSH server where by packets from the third node to the port on the SSH server are
redirected to a port to the SSH client.
Some other technologies that could be used to build a secure communication channel includes the Virtual
Private Network(VPN) and the Secure Socket Layer (SSL) or Transport Layer Security(TLS) (Atighetchi
et al., 2013) - the latest version of SSL. Unlike the SSH protocol that requires mainly only updating the
, the VPN may require special privileges for the operating
system and utilizing it within a user application may not be possible still (Plesowicz & Laszczyk, 2013).
The usage of SSL protocol may require a redesign if not a recompilation of all the applications (Plesowicz
& Laszczyk, 2013) and also requires certificate which can self-made or obtained from the certificate
authority.
The idea of reverse SSH tunneling has found use in different applications that requires remote access to
clients behind a fire wall. For instance, Le Blond et al. (2012) and Holt (2014) used reverse SSH tunneling
to establish a remote connection between a ZigBee Access Point and a remote collector server for a smart
metering system. The beauty of using the SSH protocol is that, it uses public-key cryptography in which a
key-pair is used to authenticate clients to server, where by a server can verify that a client is who it claims
to be.
Based on Powers (2014), the following explains how a Reverse SSH Tunneling could be configured:
With a known IP address of a server, a remote device could be configured to open a socket to this server
and instructing the server to forward all packets directed to this specified port to the remote device.
For example, (Powers, 2014) assuming that the remote device and the server are running some Linux
version of OS, a command:
ssh -N -R 2121:localhost:22 serverUserName@ServerIP,
instructs the server to open port 2121. Where; serverUserName is the user name of the device user to the
server, ServerIP is the IP of the server, the N-Tag rules out the interactive shell when a connection is
established and R is reverse connection. Now to connect to the remote device, a command like this:
sh -l DeviceUser -p 2121 localhost
27
would do the trick, but it would require a script that would keep this connection up by reconnecting when
it goes down. Powers (2014) further explains how to configure autossh utility to create a secure and
persistent reverse SSH tunnel to the remote device.
The client applications can interact with the remote system using standard commands such as the GET,
PUT, POST, and DELETE from HTTP protocol (Stirbu, 2010; Herrero et al.,2015; Kim et al.,2016). The
REST approach offers a number of important benefits for system scalability, it facilitates the visibility of
the connotations of requests at the HTTP protocol layer. This makes a system easier to scale, optimize, and
strengthen through the use of HTTP level appliances providing security, caching, and proxy capabilities.
Furthermore, the absence of endpoints but the just a set of resource URIs and standard operations (Alarcon
and Wilde, 2010) makes RESTful services easy to integrate as it requires just a handful of prerequisites to
get a system up and running. It is platform and programming language independent (Jeliazkova and
Jeliazkov, 2011), any language that s
easily utilize the REST APIs. (Wilke et al.,2015)
Despite the fact that most of the RESTful services use HTTP protocol, the REST setup itself is protocol
independent, for that reason, REST systems that do not depend on HTTP protocol could be built (Jeliazkova
and Jeliazkov, 2011). The REST APIs usage is simple, it just requires sending standard messages to the
remote system indicating the URI of the requested resource, the method, the payload of the message and
metadata (Alarcon and Wilde, 2010). For the RESTful services that use HTTP protocol, the system design
involves identifying the domain object, linking the object to system resources and specifying the identifiers
(URI designs) and operations (HTTP methods) on every resource (Jeliazkova and Jeliazkov, 2011).
However, the downside of the REST procedure is the one-way interaction initiation, that is, the
28
communication follows the request-response pattern, where only the client can start the conversation
(Stirbu, 2010).
Many of the features that developer imported from additional add-ons or plug-ins are available natively to
the HTML5, features such as parallel processing, data storage and real-time communication (RTC)
(Nurminen et al., 2013). The HTML5 and its RTC have been used in an experiment where Nurminen et al.
(2013) proved the feasibility of a peer-to-peer video streaming between browsers with no need for external
plug-ins. The support for client-server interacting application implementations is possible with HTML5,
something that was a nightmare with other HTML versions (Park et al., 2014).
Among the most useful features availed by the HTML5 includes the WebSocket, which permits the
exchange of date in real time using an always-on TCP connection. The mechanism is that the WebSocket
protocol uses HTTP to establish a connection but the rest of the communication is handled by the
WebSocket reader protocol. The benefits of this WebSocket is a smaller feature header which in turn
reduces the communication overhead. (Park et al., 2014) The presence of CSS3 empowers the developers
with the ability to develop User interfaces natively in the browser (Anthes, 2012) using HTML5. The
support for the responsive web design means that developers can use HTML5 and CSS3 to produce
et al.,
2015). LaGrone (2013) teaches how to develop responsive websites that meets current mobile internet
devices. He demonstrates how intuitive UI could be implemented using HTML5, CSS3 and JQuery.
Some of the features that Spring framework offers includes Dependency Injection (DI), Aspect-Oriented
Programming (AOP) including Spring's declarative transaction management, Spring model-view-controller
(MVC) web application and RESTful web service framework, Foundational support for Java Database
Connectivity (JDBC) for interacting with relational databases, Java Persistence API (JPA) an Object-
29
relational mapping (ORM) layer on top of databases, Java Messaging Service (JMS)- for queue/messaging,
to mention but a few (The Spring Team, 2016; Soni, 2015). Figure 11 shows the components that permits
the Spring framework to put available a range of services for developers to utilize. The components are
grouped into seven categories, Core Container, Data Access/Integration, Web, AOP (Aspect Oriented
Programming), Instrumentation, Messaging, and Test just as shown in Figure 11.
Figure 11: Spring Framework Architecture. [Reprint from (The Spring Team, 2016)]
Core Container
This category hosts modules that provide the essential parts of the framework including the IoC and
Dependency Injection features. The support for integrating common third-party libraries into a Spring
application context for caching, mailing, scheduling and template engines is made possible by this part of
Spring framework.
Data Access/Integration
This is responsible for handling the common challenges developers face while working with databases in
applications.
Web
This bring all the support needed to build robust and easy to maintain web application in a simplified
manner. The web provides the MVC framework which provides model-view-controller architecture and
ready components that can be used and loosely coupled web applications. The web-socket module for the
WebSockect-based two-way communication between client and server in web applications also belongs to
this category. The MVC provides a clean separation between binding request parameter, business objects
and controller logic.
30
The MVC works in such a way that the HTTP request from the client in received by the core controller
(DispatcherServlet) which looks up for the HandleMapping based on the URL to dispatch the request to the
appropriate Controller. The Controller calls the necessary business logic to process the request, and the
view name and ModelAndView object are returned to DispatcherServlet at the end of the process, and
eventually by ViewResolver. The returned ModelAndView is rendered to the corresponding view. (Zhang
et al., 2013)
Aspects
This module is responsible for the integration with AspectJ which is another AOP framework.
Instrumentation
This module avails the class instrumentation support and class loader implementation that is useful to some
application servers.
Test
The Unit and integration testing of the Spring components using Junit or TestNG are made possible by the
Test module. The module also gives the developer the ability to test the code in isolation using the mock
objects (Soni, 2015).
2.4.4 Django
Django is a free and open source full-stack framework with features covering all needed modules to develop
a fully functional web application. It makes the building of the web applications easier and faster with fewer
code (Taneja & Gupta, 2014), where by, in a matter of hours a developer can progress from concept to web
perfectionists with
14; Plekhanova, 2009). Django is based on Python, one of the most popular
web programming languages and one of the well documented, from which also Django derives its strength
s.org showcases
websites powered by Django and, at the time of writing, there was 5080 websites listed.
With its inbuilt server, web applications can be developed and tested at just a click of a button. Some of the
features that Django offers includes templates, support for rational database model, comprehensive security
and many more (Taneja & Gupta, 2014). The Databases supported include MySQL, SQLite, Oracle and
PostgreSQL (Taneja & Gupta, 2014). Django offers tight security and helps developers circumvent many
known security mistakes, such as SQL injection, cross-site scripting, cross-site request forgery and
clickjacking (Django, 2016). Some of the security projections are achieved by its support for the
management of user accounts and passwords through its user authentication system.
The possible reason for Django to be labeled as the web framework work for perfectionists with deadlines
is probably due to the fact that Django does most of the heavy lifting, handling most of the common web
31
development tasks including user authentication, content administration, site maps, RSS feeds, just to
mention (Django, 2016). With all the heavy lifting done, the developer is left to focus on writing the
application with no need for reinventing the wheel.
The Django framework uses the Model-Template-View(MTV), a variation of the MVC pattern. The
Model works just like in the typical MVC. The Template produces the final HTML presented to the user
by combining the HTML elements and data. The View gets the user inputs (HTTP request), they access
the necessary models, and if needed some logic added, and then pass the data to the template. The
template is rendered and returned to the user.
derives the mapping from only the inputs given. (Alpaydin, 2014)
The problems to solve usually falls into two categories; one whose output(s) is discrete, called a
classification problem or the one whose output is continuous, called a regression problem. A Classifier
solves classification problems and the regressor handles regression problems. Clustering is an example of
unsupervised learning that allows machines to learn from given data and then group together instances of
data that look similar (Alpaydin, 2014).
32
CHAPTER 3
3.0 METHODS
The execution of the project had three phases, the first phase dealt with the validation of the hypotheses
derived from the problems conceived. The second phase was recruiting the participants to the pilot and the
third phase was the implementation and installation of the system. The second and third phase were
executed in parallel since the two required different resources and were independent. A qualitative research
approach was used for the first two phases of the project.
Qualitative approach is suitable for studying and understanding complex phenomenon by analyzing data
gathered via interviews, surveys, and among other approaches. Studying complex phenomenon also
requires the researcher to collect data from real world environments and situations (Seaman C., 1999).
Saldana (2011) defines qualitative research as a broad term that encompasses a collection of approaches
and methodologies including interviews, surveys, ground theory, and etcetera. Yet Strauss and Corbin,
cal procedures or other
3.1.1 Interviews
The interviews were conducted to find answers to the first two research questions. The first question seeks
to know the challenges associated with parking in Helsinki Area, while the second question aims to assert
that really a smart Parking in Helsinki Area will offer some advantages to drivers.
The recruitment of participant was based on the characteristic of the target group. Invitations were sent
asking them to take part and interviews were scheduled based on their responses. Skype and phone
interviews were used with those whose schedule changed abruptly. There were two face-to-face, one Skype
and three phone interviews. The backgrounds of the participants are shown in the Table 1.
33
Table 1: Details of the participants
Interviewee Details
Data was collected by conducting structured interviews. The target groups for this research work were
people travelling by car in Helsinki area. That included native people and tourists. For studying challenges
y car to Helsinki
area were interviewed.
Two types of Interviews were used; the face-to-face and phone interviews. The face-to-face interview set-
up was as shown in figure 12. A similar arrangement was used for a skype video calling interview. The
34
setup for the phone interview was in such a way that the phone was in front but equal distance from each
host.
Audio Recorder
Interviewer
Interviewee
Notes taker
All the interviews were conducted in a pair, where one person was interviewing while the other took notes,
as illustrated in figure 12. An audio recorder was used too, to capture all the discussions during the
interviewing process. At the end of each interview, the interviewer and the one taking notes discussed the
event to interpret the collected data. This was done when they were still fresh and documented their
conclusions.
The stratified sample that was used as the target group was divided into subgroups. The reason for this was
to have the participants cover the different characteristics of the target group as widely as possible. Out of
the total six interviewees, two of them were female and four were males. Three interviewees were aged
between 18- to 29 and three were 30-45 years of age. Furthermore, three of the interviewees were new and
inexperienced drivers whereas the other three were experienced drivers.
35
3.1.1.3 Data Analysis
To ensure the quality of the analysis, immediately after each interview, the handwritten interview notes
were transferred to a word file. The recorded audio file was replayed to ensure that the documentation was
accurate and was not influenced by the researcher. The raw data such as interview notes and audio files
were kept in one folder in google drive so that both the researchers can refer to it when needed. To answer
were extracted from interview notes and categorized under three main categories of problem area:
1) Finding parking space,
2) Paying parking fees, and
3) Costing of parking time.
fees was chosen to be a category for research question one because several interviewees mentioned they
had problems in paying parking fees.
Helsinki Area were extracted from the interview notes and categorized under three main categories:
1) Time Saving,
2) Convenience in finding a parking space and paying the parking fees, and
3) Favorable costing of the parking time.
3.1.2 Survey
The recruitme
project team in conjunction with Witrafi management team, using a survey. The survey was sent to all
persons who reside or work at the Katajonokka Island. The maximum number of entrants desired were
300 people. The selection of the successful candidates depended on their response in the survey. For
instance, to qualify;
a respondent should own a car
should have a Helsinki city issued parking permit that permit parking to Katajonokka
no other family member should have qualified already
The distribution of the survey was done by uploading a link of the survey to the Helsinki city website and
through news letters sent by Witrafi management team to all its stakeholders. More announcements about
the survey were published in Helsinki Sanomat newspaper. When the survey was closed, respondents
were contacted by emails to give them the verdict towards their participation to the pilot and availing to
them information on how to proceed.
The pilot was estimated to last for three months and all the successful participants would be exempted from
parking charges for the whole pilot period. They would receive a WinNode - an active RFID tag, to be left
on the dashboard when cars are parked. It was also believed that some people would participate in the
survey and later in the pilot because they wish to see parking getting better in the city.
36
3.2 Embedded Networking
The main reason behind Embedded Networking is to facilitate embedded device get connection to the
internet and exchange data on a network (such as LAN or WAN) with a specific or standard protocols such
as Ethernet or Internet. A concept cyber-physical system is used to describe a system that combines physical
systems together with computing and communication core (Lee et al., 2015; Rajkuma et al., 2010).
The Smart Parking system has two main parts; the back-end and front-end. The back-end in this context
refers to the part of the system that stores, processes data and provide information to users and decision
makers. It consists of the presentation layer (the front end) and the data access layer (the backend) - when
looked at from software engineering viewpoint. Similarly, the front-end refers to the hardware users interact
with and that hardware that collects data and passes it to the data access layer. The front-end consists of
two parts; the active RFID tag and the gateway. The active RFID tag was named WinNode and the gateway
is the WinSpot.
front-end had the following constraints that I (the system engineer) had to
respect:
i. Interoperability with other IoT systems
ii. WinNode should be as cheap as it is practically possible
iii. WinNode should be a Low power node with battery lasting for at least 2 years
The LoRa technology and LoRaWAN was chosen as it looks to be with the highest momentum in the area
of IoT application. Furthermore, software and hardware supporting the technology are readily available.
The LoRaWAN stack is free of charge and getting it requires no registration, no strings attached whatsoever.
from some of the already known
architectures such as LoRaWAN and IoT Gateway Centric Architecture.
37
Figure 13: The Smart Parking System Architecture
Unlike the LoRaWAN that includes a network server for routing packets to respective destination networks
in case different users are being served by the same LoRa network, with the Smart Parking System, packets
are routed by the gateway to the backend. The device layer supports LoRa based nodes that are able to
interact with the server through the LoRa gateway using LoRa network. The device data could be from
sensor node, item identification node, Car nodes (WinNode) or any other node based on LoRa MAC.
The gateway has two interfaces, the LoRa interface that communicates with the LoRa nodes and the IP
network interface that interacts with the server. The IP network interface was implemented with 3G
network. More on gateway is elaborated in section 4.2.3. A simplistic procedure description of how the
Smart Parking System Architecture works, follows:
1. Data from the Car node is transmitted through the LoRa network to the Gateway
2. The Gateway adds on top of the packet the Gateway layer information, pack in supported format
and add IP network information before passing it over to the server
3. The back-end parses that received packet using Spring functions for REST API parsing
4. After parsing the data, it is processed and the final logic might require data to be collected from the
database after which the result is passed to users and/or stored in the database
5. A payment highway API is used to support payment functions of the Smart Parking System
38
CHAPTER 4
4.0 Implementation
This phase started with the design of the subsystems using block diagrams. The system block diagrams
were presented to a second person with sufficient knowledge for both the system as whole and electronics
in general. The aim was to get a second opinion, but ended up igniting some discussions which led to the
discovery of some flaws in the system at this such an early stage. After a few revisions, we both agreed to
move to the following stage of drawing the schematics. The seeking of a second opinion for the schematic
files was also done and indeed some errors were discovered and corrected. The third stage was the PCB
layout design, which is converting the schematic drawings to component footprints on which electronics
components are mounted/installed.
The PCB layouts were also reviewed by a second person before sending them for manufacturing. To start
with, 10 pieces of PCBs were ordered, assembled and tested to verify the working of a subsystem. During
testing some errors were found and corrected. After three iterations, a working system was ready to be
tested. Along the way the enclosures designs were also being iterated as the form factor is affected by the
shape of the PCB and vice-vasa.
One of the roles I performed during the implementation of the smart parking system was to provide the
hardware needed to build a platform on which the parking services would be delivered. There were two
components I had to build; the WinSpot (LoRa gateway) and the WinNodes (LoRa Active RFID TAG).
The following sections explains how the WinNode and WinSpot building was approached.
The communication between the MCU and the radio core happens via an SPI interface. The radio core
interrupts are communicated to the MCU using the digital input/output pins (DIO). The MCU is the brain
power of the node; it makes most of the decisions and interpretation and execution of the commands
received from the gateway. The radio core provides an interface between the node and the rest of the LoRa
network the local network. The WinNode required LED light indicators and a push button for control.
39
4.1.1 The first working Version of WinNode
To lower to cost of the WinNode, more research and development on components was done and some
options were chosen over others to achieve an optimum solution. The first decision was to use a printed
circuit board (PCB) antenna for the LoRa system instead of other alternatives such as chip antenna, patch
or helical antenna, etc. With a PCB antenna, once designed its costs are covered by the cost of the PCB
manufacturing. A LoRa module was chosen for purposes of speeding up the development as it would take
more time for board design iterations to have the WinNode conform to regulatory requirements. The module
also removes the expert radio frequency(RF) knowledge required for RF designs.
The LoRa module hosts both the microcontroller and the radio chip with all the needed matching circuits.
The design and implementation of the WinNode went through a number of iterations until a working version
was realized. Figure 15 shows one of the working version of the WinNode. It uses a PCB antenna but also
a provision for an external antenna was included using an SMA (SubMiniature version A) connector
footprint. The LEDs (LED1 and LED2) and a button provide the user interface to the node user.
In comparison to figure 14 and figure 15, the LoRa module combines both the MCU and RF transceiver
into one unit the module. The module is soldered to an adapter board to allow the inclusion of other
components including a button, LEDs, power supply and an antenna.
The Green(LED1) and Red (LED2) LEDs are used to signal to the user the status changes as communicated
from the data access layer via the gateway. The user communicates to system using the button and web
interface. The SWD (Serial Wire Debug) interface is used for reprogramming the MCU and the UART
40
(universal asynchronous receiver/transmitter) was intended for logging some events at runtime for purposes
of debugging the WinNode embedded software. The WinNode was designed to use 2xAA batteries in series
providing a 3.0 Volts power supply. To protect the system from the dangers of reverse polarity, a MOSFET
(metal oxide semiconductor field-effect transistor) was installed in series with the battery negative (B-)
terminal. The MOSFET was chosen because I would cause lower voltage drop than if a diode was used.
The next step is to have the PCB assembled in to a housing.
To increase the visibility of the indictor LED lights, lens pipes were added on to the enclosure. The usage
and placement of the WinNode should be that it is turned on by placing the button, and then have it placed
on the dashboard with the front plate facing the car windscreen. The reason behind having the WinNode
(parking enforcement officers) to
see the identity(ID) of the tag the Node ID.
registration number at the backend(server) and with it, wardens are able to tell which car has paid the
ration number could be used too though.
41
making up the enclosure were designed in such a way that they could be manufactured by one mould that
opens in one direction no sliding. Furthermore, the parts themselves were designed in a manner that they
would require no tool to assemble the assembly functionality was embedded into the parts. This in turn
reduced on the cost of WinNode production due to reduced cost of assembly.
The time for testing had arrived. This version was tested by loading it to maximum power the node could
consumer while recording the time it is active. A LoRa nodes consumes most while in transmitting mode,
it takes up to 125mA, so by programing it to send a continuous wave with all other peripheral on, it was
off voltage. To test this, a linear DC power supply with voltmeter and ammeter was used. A WinNode was
powered to 3.3V from the power supply and then the voltage lowered until the stopped working. At that
point the voltage reading from the voltmeter was the low voltage cut off voltage.
The cut off voltage was 1.8V but the WinNode stopped working properly when the power supply voltage
went below 2.0V. It was clear that this limitation required a stabilizer to maintain a constant voltage despite
the fluctuations in the input voltage.
A 3.3V DC-DC converter shown in figure 17 was used to stabilize the output voltage of the system to 3.3
Volts, for the ran
maintaining the system voltage stable at 3.3V and the node can live for a longer time before the need to
replace the batteries.
The same test for the lower cut off voltage as described in section 4.1.2, was performed and this time the
cut off voltage had gone down as low as 0.8 Volts. This was good news as it meant that, almost all the
battery charge would be drained during the operation of the WinNode in the field.
42
Figure 17: WinNode Board components final version.
The WinNodes were configured to use an adaptive data rate scheme (ADRS). Under this scheme, nodes
automatically determine their connection status and adjust their data rates (DR) accordingly. The details of
the data rates the WinNodes uses to switch between as defined by the scheme are as shown in table 2. The
43
node starts with the highest data rate DR5 and lower the data rate towards DR0 when it does not receive
a response for its transmission.
The WinNode software was developed in such way that it is possible to do some configuration updates
remotely. The means by which a WinNode remote access in accomplished is explained in coming sections.
Some of the functionalities such as ping frequency and LED behaviors of a WinNode can be altered using
commands through a given downstream port. The WinNode is programmed with a unique identifier and it
advertises it at a programmable time interval when it is first switched on. When the car is parked, the green
LEDs of the WinNode blink very slowly. The reason for slow blinking is to conserve battery life. If the car
is detected by the backend to be located in a wrong parking lot, the backend sends a warning packet through
the gateway to the WinNode.
When a warning packet is received, the red LED of the WinNode blinks very slowly. The button of the
WinNode can be configured to have several functions such as turning ON/OFF of the WinNode, initiating
a parking event, opening of a barrier or a garage door, approval of payment for the parking, to mention but
a few. The results from position estimation as explained in section 4.5.2 - WinNode Position Estimation
Methods, indicated that there was room for some improvements. The next section explains how these
improvements were approached.
The added GPS module is shown in figure 17. The PCB antenna is designed for a fixed size of the board
and hence limiting the flexibility to just expand the board size to accommodate more components when
needed. To meet the limitation of the space, a small GPS module with on board antenna was used. Of course
when a GPS in added, the energy demands of the system increases. However, if the GPS could acquire a
fix fast enough, it could be switched off to save the energy. To achieve that, some Client Generated
Extended Ephemeris (CGEE) files - calculated on the device and are required to be stored locally for the
GPS receiver to use in estimating its position on Earth. The Server Generated Extended Ephemeris (SGEE)
files were not used since the WinNode does not have internet connection for the files to be downloaded and
stored.
44
The flash memory shown in figure 17 is used for storing those Ephemeris files. The challenge then, was
how to integrate a 1.8V GPS module and flash to a 3.3V node. The solution to that was the 1.8V low-
dropout (LDO) regulator and a voltage shifter shown in figure 17. The 1.8V LDO regulator takes in 3.3V
system voltage and output 1.8 Volts for the flash and GPS module. To facilitate the intercommunication
between 3.3V LoRa module and a 1.8V GPS module, a voltage shifter was used. Its operation is in such a
way that one side is configured to 3.3V and the other to 1.8V. Communications from one side is converted
to the voltage levels of the other side and vice versa.
The next task was to find ways that could be used to reduce on the energy demands of the WinNode to have
the life span of the battery extended.
The accelerometer has an interrupt output pin that wakes up the main MCU, which is normally in very low
power mode together with other components. The accelerometer could be configured to interrupt the MCU
when the motion stops. When the MCU wakes up due to the accelerometer interruption, it turns on the
GPS to the transmission,
the MCU turns off all the peripherals and goes back to sleep and waits for another interrupt.
45
Figure 18: WinSpot block diagram for Raspberry Pi Version
The 3G modem is a USB dongle that provides networking capabilities to the LoRa network implementing
the backhaul IP stack shown in figure 10 in section 2.2.4. The Raspberry Pi runs a Linux distribution on
which the gateway functionality was implemented using the open source LoRa gateway code base and
libraries located at (https://github.com/Lora-net). The concentrator unit is based on Semtech SX1301 multi-
channel modem and SX1257/SX1255 RF transceivers. The interaction between the central processing unit
and the concentrator is through the SPI interface. WinSpot acts as gateway towards the IP-world.
To achieve easier interconnection between the WinSpot components, a raspberry Pi 2 connector, shown in
figure 19, was designed. To be able to monitor the temperature of the gateway unit, a temperature sensor
was added to the Pi connector board. The Inter-Integrated Circuit (I2C) interface facilitates the
intercommunication between the Pi and the temperature sensor. The purpose of monitoring the temperature
was to learn how the temperature fluctuations would affect the functioning of the gateway, especially during
cold times like in winter seasons. The results of the temperature measurements were to help decide the
necessity of installation inside the gateway enclosure a heater for winter and cooler for hot summer.
The hardware watchdog is responsible for resetting the system in case of a total system crash or when it
hangs in some software subroutine loop. The external hardware watchdog used has watchdog service time
from 1ms to 3 minutes that are configurable by hardware. The three minutes service time was chosen. The
main system has to service the watchdog by toggling an input/output pin before the set reset time elapses.
The Pi connector header has other interfaces made accessible that makes attaching other subsystems
smooth.
46
Figure 19: Raspberry Pi 2 connector
The interfaces include Serial Peripheral Interface (SPI), and Universal Asynchronous Receiver/Transmitter
(UART). An expansion header for another radio module was also added whose use is still an ongoing
research on how to use more than one LoRa transmitter on a single gateway.
When the WinNode sends a packet to the WinSpot, it goes to sleep mode and wakes up later, after a
programmed waiting time, to listen and receive a packets. If no packet is received, it retries 3 times and if
nothing is received it sleeps and retry after typically either 15 minutes or two minutes.
47
Nonetheless, some pings to the backend are required to keep in touch just in case the backend has some
queries to the WinNode.
The WinSpot is registered as a user to the database, this way it is easy to create and manage profiles. The
authentication and authorization of the WinSpot is based on the fact that it is a user. When the WinSpot
sends packets to the database, the backend first authenticates it before registering any transaction to the
database. Therefore, for that matter, the WinSpot packet must always contain an authentication/session
token depending on scheme chosen by the systems administrator. The public private key pair scheme is
also used for authentication.
When the WinSpot receives a warning packet response from the server, the target WinNode ID is extracted
and via unicast, the specified WinNode is contacted. The WinSpot waits until the WinNode contacts it
through the regular pings to forwards the packet from the backend.
48
Figure 20: WinSpots Installation points at Katajonokka
The beacons/Geofence were installed at the boundary of the area of interest to be able to know when a car
leaves or enters the region. This was based on the fact that it is possible for a WinNode across the other
side of the area of interest to have the same or even higher RSSI than the one inside the area. The beacons
would be transmitting packets at a very low power, limiting their coverage within about ten to fifteen
meters. The green spots shown in figure 20 are the ticket machine locations. Their location gives an idea
where the parking slots are positioned. The distance between the closest parking spots from the two areas
is about fifty (50) meters and by limiting the beacon coverage to at most fifteen (15) meters, cars from the
other side should not pick up beacon transitions.
The WinSpots were installed on poles, about three and half meters tall. The poles were fastened to the ticket
machine and the power for the WinSpots was tapped from socket provisions located in the ticket machines.
At the end of each installation, the WinSpot was turned on and tested to make sure that it connects to the
backend.
49
4.5.1 Using Django for a proof of concept
The main objective of the proof of concept was to test how the intercommunication between the gateway
and the server could be accomplished. A database was designed and implemented in a python based
framework Django. The design of the database shown in figure 21 was based on the idea that the position
of a car could be determined by the location of the CarTag (WinNode) using trilateration. Under this
approach, a WinNode should be read by at least three AccessPoints (WinSpots) for the location of the node
to be estimated.
The database has five tables with the Package table linking all the other tables. The AccessPoint table stores
the Access point unique Id, its user name and locations as latitude and longitude. The CarTag table stores
the unique id of the tag, the user name and the password hash. The CarTagRawData table stores all the raw
ation which includes time of flight, distance and the package Id. The last
table, the TagGeolocation table keeps the coordinates for the location of the tag and the time stamp at which
the location was determined. The pilot version has some modification from this, as RSSI values and GPS
coordinates were used.
50
recording the RSSI values at those points. This task was designed in such a way that a known WinNode
was used, when the button was pressed, a packet was sent to the backend which recorded the WinNode ID,
Time stamp and RSSI value. At the same time, the person carrying out the task recorded the location and
the time of button press. From the results, the lowest RSSI value was used as the cut off value for that cell.
This means that when a WinNode pings to the backend, it would only be placed to a particular cell if its
RSSI value passes the cut of limit of that cell.
The first method suffers some drawbacks, especially when the environmental conditions changed the
threshold RSSI values could not be changed. The second method applied machine learning algorithms to
achieve an adaptive system that can respond to changes in the environment. The Radial Basis Function
Network (RBFN) in particular, was used for its ability to carry out classification by measuring the
homogeneity between the data. The algorithm takes as inputs the WinNode RSSI values to perform
clustering and returns weights assigned to different WinSpots. The weights tell how likely the WinNode
belonging to the cell represented by the WinSpot ID. The WinNode is placed to the cell with the highest
weight. Figure 22 shows the improvements a machine learning algorithms introduces.
Figure 22: Cell prediction using machine learning [Source: Witrafi Oy]
In figure 22 (a), there are three cells to which a node is predicted to belong, with each color representing a
cell in a given gateway resides. Figure 22 (b) shows the result of the clustering algorithm with distinct
boundaries. After clustering it is clear that the node belongs to cell coded with blue color code.
The second approach used for estimating the position of the WinNode was the use of GPS coordinates.
When a car is parked, the GSP coordinated are read from the GPS module and together with the node ID
they are transmitted to the gateway. The gateway reads the RSSI value and add it the packet together with
its ID. At the backend, the WinNode positon is estimated from the GPS coordinates. But in case the
WinNode is located in a place where the GPS coordinates cannot be reliably obtained, the RSSI values are
used to estimate its location.
The test setup to have the coverage test made was designed in such a way that when a button on the
WinNode is pressed, it sends a packet request for a response, the WinSpot in range responds. And when
the WinNode receives the response packet, it blinks the green LED. The test was carried out by having a
WinNode in a car and driving around the pilot area. One person was driving the car around parking places
considered obstructed while the other pressing the WinNode button and recording the coverage on the map.
During the button pressing, the WinNode was placed on the dashboard to mimic the operating position of
the node. After covering all the planed points from the pilot area, the testing also continued out of the pilot
area just see how far the coverage could go.
52
CHAPTER 5
5.0 Results
This section presents the research and measurement results for the different phases of the project. The
interviews produced results answering research questions 1 and 2. The survey presents the outcome of the
recruitment process for the participants to the project pilot. Some measurement results aimed at checking
the performance of the chosen technology, such as coverage is also presented.
All interviewees pointed out that, finding free parking space in Helsinki area is real challenge. Four
Paying parking fees - Inconvenient payment - Not convenient because you do not have
method coins always
Costing of parking time - Expensive - Feels like cheating because most of the
time you pay more than you use
- Minimum charging is too much
53
The data collected from the interview suggested that a smart parking system could solve most of the
problems associated with parking. After explaining the concept of smart parking, all the participants were
like, when will the system hit the shelves? A belief that the smart parking system would reduce, if it does
not totally eliminate, the back and forth driving looking for the free slot and hence saving time and fuel,
was evident from a
need for having coins. It was vivid, from the interview that smart parking system could solve the existing
problems and that there is a sheer need of such system. However, cost of using smart parking system will
how much it costs. If it costs way more than manually trying to find a free parking space, I would not
Table 3 highlights some of the key advantages of smart parking system pointed out by interviewees.
Convenience in finding a parking space and paying the - It would be very handy
parking fees - Sounds very convenient
-
expire
- No need of having coins
Favorable costing of the parking time - Can pay only for time you park
-
As can be seen from the comments in Table 3, participants believe that smart parking system can solve
the key problems they are facing today. Apart from these comments, participants showed their excitement
and willingness to use the system if such system would be made available.
The results from the coverage tests were good, the whole pilot area was well covered. Despite the heavy
concentration of concrete building in the pilot area, LoRa technology performed quite good considering
54
the height at which the gateways were installed. Figure 23 show the coverage area map tested during the
pilot.
The furthest point that was measured was about two (2) kilometers away from the pilot area, near the Bar
Bakkari. We believe that if the elevation at which the WinSpots where installed was much higher, the
coverage to other areas would have been even better.
55
Figure 24: Parking Occupancy prediction for a day at Katajonokka
The 100% occupancy was modeled to be the total number of participants who received the parking nodes
WinNodes. The algorithm uses the history parking data to learn the parking behaviors of these drivers to
be able to predict the parking situation for a future date. Since Katajonokka is at the same time a residential
area, the occupancy is seen dropping starting at 06:00 when residents start leaving to work, but start building
back at 15:00 as they return from work.
56
CHAPTER 6
The research questions were answered and a smart parking system was designed, implemented and
deployed at Katajanokka.
Several challenges associated with parking in Helsinki area were highlighted by participants of the
interview. All the participants believed that the smart parking system could solve their city parking
difficulties. However, the cost of using a smart parking system also appeared to be a deciding factor to
whether or not use the system. One of the participant stressed that the decision of whether or not to use the
smart parking system depends of the cost.
The preliminary research through interviews identified three main problem areas associated with parking
in Helsinki area:
1) Finding parking space,
2) Paying parking fees, and
3) Costing of parking time.
Smart parking being a good solution, there was willingness already among the people interviewed to use
such system in Helsinki area. However, cost of using smart parking system should be kept moderate and
comparable to the existing solutions.
A smart parking system was built based on LoRa technology one of the long range communication
technologies developed to support the IoT systems. Some protocols developed to support IoT are locked
where by the only way to use them one has to deal their vendors. An example of such locked technologies
include SIGFOX, one is not able to build a private network based on SIGFOX like it is possible with LoRa.
The absence of central IoT standards is hindering the efforts to build IoT systems that can interoperate.
Some good application level standards such as Open Data Format standard, and MQTT-SN already exist,
the adaptation of a single one of them by the IoT community has not happened yet. What is being seen
happening is the creation of ecosystems such as LoRa Alliance, Intel IoT solution Alliance, and many others
but many of which are based on a given platform they are promoting. These ecosystems are closing out
other players and hence creating a barrier towards the interoperability of IoT system.
It is quite unlikely that one is able to build a single IoT system that would meet all the requirements, but
instead, a system of systems could be the most appropriate way to go for a cost effective solution. Many
57
IoT systems have mixed requirements to fulfil which require a combination of different technologies. For
instance, the requirement for low power consumption and long range that must connect to the internet.
2. Implementation challenges
a. There is a limitation on using the industrial, scientific and medical (ISM) radio band, it
poses a restriction on the quantity of data to be shared between the Node and the gateway
due shorter time on air imposed. The transmissions cannot happen at any time, the duty
cycle must be respected and hence limiting the real time communication capabilities.
b. The implementation of the system requires knowledge from a number of fields such as
radio electronics and systems, power electronics, embedded systems, web technology and
databases, to mention a few.
c. Reducing the Cost of system: it takes enormous amount of time to look for the best deal
from components vendors. For a small company with low volumes, the components cost
is usually high, mainly due to lack of volume bargain.
3. Deployment/Installation challenges
a. The need for a raised point from the ground, possibly on top of buildings, to mount the
gateway as higher heights improves communication range and reduces the number of
4. Operations challenges
a. People fear to be tracked yet they love to be served
b. Visibility of the WinNode under heavy snow fall
c. Charging of the WinNode to full charge when less time is spent in that car battery life
under quick charging is threatened
d. The accurate prediction of parking occupancy in the Helsinki area would require that all
drivers have a WinNode, at least the majority of them.
58
Automatic determination/reading of WinNode ID/Car registration number in situations when it is
not visible. In heavy snow fall of winter, reading registration numbers and node IDs could be
improved if done automatically. So more research on ways to have such a feature added is
needed.
Charging of the WinNode to full charge when less time is spent in that car battery life under
quick charging. As more features are added, more energy is needed and using non-rechargeable
batteries might not might not be feasible as the size of the node would grow bigger to be able to
store enough energy for longer node life. A good option could be to use reachable but with a
charger that supports quick charge as les time is spent in the car might not be enough to load
A
to the barrier and the barrier detects the node and opens the barrier, he/she simply parks the car
and drives a way at the end payments taken care of automatically.
The use of the button to switch the modes of the WinNode from, for instance, a parking permit to
the parking disk when in places where no payment is required. The node could have a display
and a timer to show the time at which the car was parked.
Cellular based Nodes that talks directly to the backend could eliminate the use of gateways and
the challenges associated with their installation. More research on node-to-server architecture is
needed especially in the area of power consumption reduction.
59
References
1. Ahmad, N.A.N. and Zamri, S.A.S., 2014, September. The cross platform application development adapted
Spring framework to support front-end tendering services. In Computer, Communications, and Control
Technology (I4CT), 2014 International Conference on (pp. 58-62). IEEE.
2. Alarcon, R. and Wilde, E., 2010, April. Linking data from restful services. In Third Workshop on Linked
Data on the Web, Raleigh, North Carolina (April 2010).
3. Al-Fagih, A.E., Al-Turjman, F.M., Alsalih, W.M. and Hassanein, H.S., 2013. A priced public sensing
framework for heterogeneous IoT architectures. Emerging Topics in Computing, IEEE Transactions on, 1(1),
pp.133-147.
4. Alpaydin, E., 2014. Introduction to machine learning. MIT press.
5. Anthes, G., 2012. HTML5 leads a web revolution. Communications of the ACM, 55(7), pp.16-17.
6. Armando, A., Carbone, R., Chekole, E.G. and Ranise, S., 2014, June. Attribute based access control for APIs
in spring security. In Proceedings of the 19th ACM symposium on Access control models and technologies
(pp. 85-88). ACM.
7. Atighetchi, M., Soule, N., Pal, P., Loyall, J., Sinclair, A. and Grant, R., 2013, October. Safe configuration of
TLS connections. In Communications and Network Security (CNS), 2013 IEEE Conference on (pp. 415-
422). IEEE.
8. Bormann, C., Castellani, A.P. and Shelby, Z., 2012. Coap: An application protocol for billions of tiny internet
nodes. IEEE Internet Computing, 16(2), p.62.
9. Centenaro, M., Vangelista, L., Zanella, A. and Zorzi, M., 2015. Long-Range Communications in Unlicensed
Bands: The Rising Stars in the IoT and Smart City Scenarios. arXiv preprint arXiv:1510.00620.
10. Chinrungrueng, J., Sunantachaikul, U. and Triamlumlerd, S., 2007, January. Smart parking: An application
of optical wireless sensor network. In Applications and the Internet Workshops, 2007. SAINT Workshops
2007. International Symposium on (pp. 66-66). IEEE.
11. Datta, S.K., Bonnet, C. and Nikaein, N., 2014, March. An IoT gateway centric architecture to provide novel
M2M services. In Internet of Things (WF-IoT), 2014 IEEE World Forum on (pp. 514-519). IEEE.
12. DiCicco Bloom, B. and Crabtree, B.F., 2006. The qualitative research interview. Medical education, 40(4),
pp.314-321.
13. Django, 2016. Django overview. Django Software Foundation. Accessed 2 April 2016. Available at:
https://www.djangoproject.com/start/overview/
14. Egners, A., Gatzen, D., Panchenko, A. and Meyer, U., 2012, March. Introducing SOR: SSH-based onion
routing. In Advanced Information Networking and Applications Workshops (WAINA), 2012 26th
International Conference on (pp. 280-286). IEEE.
15. Framling, K., Kubler, S. and Buda, A., 2014. Universal messaging standards for the IoT from a lifecycle
management perspective. Internet of Things Journal, IEEE, 1(4), pp.319-327.
16. Fu, Q. and Retscher, G., 2009. Active RFID trilateration and location fingerprinting based on RSSI for
pedestrian navigation. Journal of Navigation, 62(02), pp.323-340.
17.
Procedia-Social and Behavioral Sciences, 54, pp.1278-1287.
18. Govindan, K. and Azad, A.P., 2015, January. End-to-end service assurance in IoT MQTT-SN. In Consumer
Communications and Networking Conference (CCNC), 2015 12th Annual IEEE (pp. 290-296). IEEE.
19. Gubbi, J., Buyya, R., Marusic, S. and Palaniswami, M., 2013. Internet of Things (IoT): A vision, architectural
elements, and future directions. Future Generation Computer Systems, 29(7), pp.1645-1660.
20. Gupta, V., Goldman, R. and Udupi, P., 2011, June. A network architecture for the web of things. In
Proceedings of the Second International Workshop on Web of Things (p. 3). ACM.
60
21. Herrero, J.L., Lozano, J. and Santos, J.P., 2015. A REstfull Approach for Classifying Pollutants in Water
Using Neural Networks. In New Contributions in Information Systems and Technologies (pp. 371-380).
Springer International Publishing.
22. Holt, G.K, Sep 16, 2014. Get Smart: SSH reverse tunnels for some access to smart meters. researchgate.net.
23. Hunkeler, U., Truong, H.L. and Stanford-Clark, A., 2008, January. MQTT-S A publish/subscribe protocol
for Wireless Sensor Networks. In Communication systems software and middleware and workshops, 2008.
comsware 2008. 3rd international conference on (pp. 791-798). IEEE.
24. Ian Poole, 2014. LoRa Physical Layer & RF Interface. Radio-Electronics.com. Accessed 10 March 2016.
Available:http://www.radio-electronics.com/info/wireless/lora/rf-interface-physical-layer.php
25. Jeliazkova, N. and Jeliazkov, V., 2011. AMBIT RESTful web services: an implementation of the OpenTox
application programming interface. J. Cheminformatics, 3, p.18.
26. Kim, K.J., Kim, C.G., Whangbo, T.K. and Yoon, K., 2016. A continuous playing scheme on RESTful web
service. Cluster Computing, pp.1-9.
27. King, N. and Horrocks, C., 2010. Interviews in qualitative research. Sage.
28. Krco, S., Pokric, B. and Carrez, F., 2014, March. Designing IoT architecture (s): A European perspective. In
Internet of Things (WF-IoT), 2014 IEEE World Forum on (pp. 79-84). IEEE.
29. Ksairi, N., Tomasin, S. and Debbah, M., 2015. A Multi-Service Oriented Multiple-Access Scheme For Next-
Generation Mobile Networks. arXiv preprint arXiv:1512.00213.
30. LaGrone, B., 2013. HTML5 and CSS3 Responsive Web Design Cookbook. Packt Publishing Ltd.
31. Le Blond, S.P., Holt, A. and White, P., 2012, October. 3eHouses: A smart metering pilot in UK living labs.
In Innovative Smart Grid Technologies (ISGT Europe), 2012 3rd IEEE PES International Conference and
Exhibition on (pp. 1-6). IEEE.
32. Lee, E.A. and Seshia, S.A., 2015. Introduction to embedded systems: A cyber-physical systems approach.
Lee & Seshia.
33. Lee, S., Kim, H., Hong, D.K. and Ju, H., 2013, January. Correlation analysis of MQTT loss and delay
according to QoS level. In Information Networking (ICOIN), 2013 International Conference on (pp. 714-
717). IEEE.
34. Lomotey, R.K. and Deters, R., 2013, March. Reliable Consumption of Web Services in a Mobile-Cloud
Ecosystem Using REST. In Service Oriented System Engineering (SOSE), 2013 IEEE 7th International
Symposium on (pp. 13-24). IEEE.
35. LoRa Alliance, 2016. LoRa Alliance Wide Area Networks for IoT, LoRa Allinace [Online]. Available:
https://www.lora-alliance.org/ [Accessed: 10 March 2016].
36. LoRaWAN Specification v1.0, LoRa Alliance, Inc. 2400 Camino Ramon, Suite 375 San Ramon, CA 94583,
2015. Available: https://www.lora-alliance.org/portals/0/specs/LoRaWAN%20Specification%201R0.pdf
37. Merriam, S.B. and Tisdell, E.J., 2015. Qualitative research: A guide to design and implementation. John
Wiley & Sons.
38. Munsi, N., Sehrawat, N. and Jain, M., 2014. Integration of Struts, Spring and Hibernate for an E-Commerce
System.
39.
streaming with HTML5 and WebRTC. In Computer Communications Workshops (INFOCOM WKSHPS),
2013 IEEE Conference on (pp. 63-64). IEEE.
40. Park, J.T., Hwang, H.S., Yun, J.S. and Moon, I.Y., 2014. Study of HTML5 WebSocket for a Multimedia
Communication. development, 9(7).
41. Pautasso, C., Zimmermann, O. and Leymann, F., 2008, April. Restful web services vs. big'web services:
making the right architectural decision. In Proceedings of the 17th international conference on World Wide
Web (pp. 805-814). ACM.
42. Pcmag, 2014. Smart-parking [online]. [ Accessed: 10 March 2016] Available at:
http://www.pcmag.com/encyclopedia/term/65086/smart-parking
61
43. Pimentel, J.R., 2014, May. An effective and easy to use IoT architecture. In 2014 10th IEEE Workshop on
Factory Communication Systems (WFCS 2014).
44. Plekhanova, J., 2009. Evaluating web development frameworks: Django, Ruby on Rails and CakePHP.
Institute for Business and Information Technology.
45. Plesowicz, P. and Laszczyk, P., 2013, August. Evaluation of secure signal transmission in automatic control
using SSH tunneling. In Methods and Models in Automation and Robotics (MMAR), 2013 18th International
Conference on (pp. 672-677). IEEE.
46. Polycarpou, E., Lambrinos, L. and Protopapadakis, E., 2013, June. Smart parking solutions for urban areas.
In World of Wireless, Mobile and Multimedia Networks (WoWMoM), 2013 IEEE 14th International
Symposium and Workshops on a (pp. 1-6). IEEE.
47. Powers, S., 2014. The open-source classroom: this is why we can't have nice things: SSH. Linux Journal,
2014(246), p.7.
48. Rajkumar, R.R., Lee, I., Sha, L. and Stankovic, J., 2010, June. Cyber-physical systems: the next computing
revolution. In Proceedings of the 47th Design Automation Conference (pp. 731-736). ACM.
49. Retscher, G. and Fu, Q., 2008. Active RFID trilateration for indoor positioning. Coordinates, 4(5), pp.10-15.
Available at: http://mycoordinates.org/active-rfid-trilateration-for-indoor-positioning/all/1/
50. Revathi, G., Dhulipala, V. and Sarma, R., 2012, February. Smart parking systems and sensors: A survey. In
2012 International Conference on Computing, Communication and Applications (ICCCA) (pp. 1-5).
51. Riliskis, L., Hong, J. and Levis, P., 2015, November. Ravel: Programming iot applications as distributed
models, views, and controllers. In Proceedings of the 2015 International Workshop on Internet of Things
towards Applications (pp. 1-6). ACM.
52. Rodriguez, A., 2008. Restful web services: The basics. IBM developerWorks.
53. Saldana, J., 2011. Fundamentals of qualitative research. Oxford university press.
54. Seaman, C.B., 1999. Qualitative methods in empirical studies of software engineering. Software Engineering,
IEEE Transactions on, 25(4), pp.557-572.
55. Shelby, Z., Hartke, K. and Bormann, C., 2014. The constrained application protocol (CoAP).
56. Soni, R.K., 2015. Learning Spring Application Development. Packt Publishing Ltd.
57. Srikanth, S.V., Pramod, P.J., Dileep, K.P., Tapas, S., Patil, M.U. and Sarat, C.B.N., 2009, May. Design and
implementation of a prototype Smart PARKing (SPARK) system using wireless sensor networks. In
Advanced Information Networking and Applications Workshops, 2009. WAINA'09. International
Conference on (pp. 401-406). IEEE.
58. Stanford-Clark, A.S. and Truong, H.L., 2013. MQTT for sensor networks (MQTT-S) protocol specification.
International Business Machines Corporation version, 1.2.
59. Stirbu, V., 2010, April. A restful architecture for adaptive and multi-device application sharing. In
Proceedings of the First International Workshop on RESTful Design (pp. 62-65). ACM.
60. Strauss, A. and Corbin, J., 1990. Basics of qualitative research (Vol. 15). Newbury Park, CA: Sage.
61. Taneja, S. and Gupta, P.R., 2014. Python as a Tool for Web Server Application Development.
62. Tesoriero, R., Gallud, J., Lozano, M. and Penichet, V., 2008. Using active and passive RFID technology to
support indoor location-aware systems. Consumer Electronics, IEEE Transactions on, 54(2), pp.578-583.
63. The OpenGroup, 2014. Open Data Format Standard(O-DF), Available at:
https://www2.opengroup.org/ogsys/catalog/C14B
64. The Spring Team, 2016. Spring Framework. Pivotal Software, Inc. Accessed 28 March 2016. Available at:
https://projects.spring.io/spring-framework/#quick-start
65. Vangelista, L., Zanella, A. and Zorzi, M., 2015. Long-
In Future Access Enablers for Ubiquitous and Intelligent Infrastructures (pp. 51-58). Springer International
Publishing.
66. Vasco Lopes, N., Pinto, F., Furtado, P. and Silva, J., 2014, October. IoT architecture proposal for disabled
people. In Wireless and Mobile Computing, Networking and Communications (WiMob), 2014 IEEE 10th
International Conference on (pp. 152-158). IEEE.
62
67. Villaverde, B.C., Pesch, D., De Paz Alberola, R., Fedor, S. and Boubekeur, M., 2012, July. Constrained
application protocol for low power embedded networks: A survey. In Innovative Mobile and Internet Services
in Ubiquitous Computing (IMIS), 2012 Sixth International Conference on (pp. 702-707). IEEE.
68. Wang, C.S., Huang, C.H., Chen, Y.S. and Zheng, L.J., 2009, December. An implementation of positioning
system in indoor environment based on active RFID. In Pervasive Computing (JCPC), 2009 Joint
Conferences on (pp. 71-76). IEEE.
69. Weinstein, R., 2005. RFID: a technical overview and its application to the enterprise. IT professional, 7(3),
pp.27-33.
70. Wilke, A., Bischof, J., Harrison, T., Brettin, T., D'Souza, M., Gerlach, W., Matthews, H., Paczian, T.,
Wilkening, J., Glass, E.M. and Desai, N., 2015. A RESTful API for accessing microbial community data for
MG-RAST. PLoS Comput Biol, 11(1), p. e1004008.
71. Yeh, M.C., Yang, H.I. and Mei, H., 2015, March. A HTML5-Based Innovative Sleep Prescription Service.
In Mobile Cloud Computing, Services, and Engineering (MobileCloud), 2015 3rd IEEE International
Conference on (pp. 221-222). IEEE.
72. Ylonen, T. and Lonvick, C., 2006. The secure shell (SSH) protocol architecture.
73. Yun, M. and Yuxin, B., 2010, June. Research on the architecture and key technology of Internet of Things
(IoT) applied on smart grid. In Advances in Energy Engineering (ICAEE), 2010 International Conference on
(pp. 69-72). IEEE.
74. Zhang, D., Wei, Z. and Yang, Y., 2013, October. Research on Lightweight MVC Framework Based on Spring
MVC and Mybatis. In Computational Intelligence and Design (ISCID), 2013 Sixth International Symposium
on (Vol. 1, pp. 350-353). IEEE.
75. Zhang, E., Jiang, W., Kuang, Y. and Umer, M.A., 2011, October. Active RFID positioning of vehicles in
road traffic. In Communications and Information Technologies (ISCIT), 2011 11th International Symposium
on (pp. 222-227). IEEE.
63