0 ratings0% found this document useful (0 votes) 58 views11 pagesEs-Iot Unit 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
CHAPTER
Embedded IoT Platform
Design Methodology
Purpose and requirement specification, Process specification, Domain model specification, information
model specification, Service specifications, loT level specification, Functional view specification,
Operational view specification, Device and component integration, Application development.
24 Introduction
— In Chapter 1, we have studied six IoT system levels.
Every IoT level starting from oT level 1 to [oT level 6
consist of different components and deployment
configurations.
— For different application different levels are suitable.
— Different components like ToT devices, network
resources, application server, database server, web
services, analytics components requires interaction
between them in IoT system.
— So designing loT system is challenging task. Because
of various choices available for each component it is
very difficult for designers to evaluate among available
alternative.
= So lof system designers consider specific product or
service and design system with respect to that product,
or service.
Disadvantage of above technique is it may lead to
vendor lock-in which may be satisfactory to vendor but
totally unacceptable to the customer.
- Another disadvantage is adding new feature or
replacing certain service or product choice for
‘component is very complex and sometime may require
re-design of IoT system.
= Inthis unit, we will learn generic design methodology.
= Thatis this design methodology will be independent of
specific service or product.
— This methodology is also independent of programming
language.
Advantages of using such methodology
Design, testing and maintenance time is reduced.
~ Provide better interoperability.
~ Complexity is reduced,
2.2 loT Design Methodology
‘Q. Which are various steps in loT design methodology ?
Fig. 22.1: oT system Design Methodology
Various steps involved in IoT system design
methodology are shown in Fig. 2.2.1. To explain every step
in fo system methodology we will consider example of
smart [oT based home automation system.
Scanned with CamScannerSs
Syllabus Topic : Purpose and Requirement
= Specification
2.21 Purpose and Requirement
Specification
Q. Explain purpose and requirement specification in loT
‘design methodology with example,
Q. Consider any IoT based application and write purpose
8nd requirement.
— This is the first step in design methodology where we
define the purpose and requirements of the system.
Requirements include various requirements like data
collection requirements, system management
requirements, data analysis requirements, data privacy
requirement, security requirements, user interface
requirements.
— Considering the example of home automation system,
purpose and requirement specification can be described
as follows
> Purpose
Home automation system which will allow controlling
‘f lights in a home with the help of web application.
© Behaviour
‘Our system should have auto mode as well as manual
‘mode. In auto mode, system should be capable of measuring
the light level in the room and if light level is low (or very
ow) then it should switch on the light. In manual mode,
system should provide choice of manually operating (on/off)
the light.
‘= System Management Requirement
JT system for home automation system should have
‘capability of local analysis of data.
¥
(SPPU-Sem 6-Comp) 2-2 Embedded loT Platform Design Methodoion,
the second step in IoT design methodoiog,
where we define process specifications. Process mode
specification for home automation system is shown jg
Fig. 2.22. In Fig. 2.2.2, we can see two modes oy
system auto mode and manual mode. If mode is aut,
mode, the system Keeps track of light level. System
changes state of light to on if light level is low (or very
low). © seep
Omen
Fig 2.2.2 : Home automation IoT system process specification
— System changes light state to off if light level is high
(if there is no need of light).
= If mode is manual mode then system checks light level
in the room set by the user. If light state is on (i.e. user
set light state on) then system changes light state to
“on”. If light state is off (i.e. user set light state off
then system changes light state to “off”,
———
Syllabus Topic : Domain Model Specification
———_———————— eee
2.2.3 Domain Model Specification
Q. Write domain mode! specification for smart home
‘automation system.
§
[
~ This is the third step in IoT system desis ~
methodology. In this step domain model is defined.
Scanned with CamScannerSPF FRFES KE
oft Be
11s
3 |
BE emesis ‘and JoT (SPPU -Sem 6 -
~The domain model consists of description about main
concepts, entities and objects in the domain of system
‘which is being designed.
Domain model also defines various attributes of objects
‘and. relationships between those objects. Abstract
representation of main concepts, entities and objects is
provided by domain model. This abstract representation
isindependent of technology and platform to be used.
— With the help of domain model system designer can
‘easily understand the [oT domain for the system which
he wants to design.
— Fig. 223 shows domain model for our example of
hhome automation system. Main concepts, entities and
‘objects in the domain model consist of physical entity,
virtual entity devices, resources and services.
as
= Discrete and identifiable entities like room, light, an
appliances are physical entities in the physical
‘environment.
= Using sensors or by performing actuation on physical
‘entities, IOT system gives information about various
physical entities.
= In our example of home automation system two
physical entities can be considered. First entity can be
room of which light level is monitored and second
entity can be light appliance which is to be controlled
(on or off).
= Representation of physical entities in digital word is
called as virtual entity, There is a virtual entity for
every physical entity.
As there are two physical entities in our example of
‘home automation system there will be two virtual
‘entities one for room and other for light appliance.
© Device
Physical entities and virtual entities interact with each
other through some medium which is provided by
devices. Devices can be deployed near physical entities
or attached to physical entities.
~ Devices collects information about physical entities for
‘example information can be collected using various
sensors. Using actuators devices can perform actuation
‘on physical entities. Devices can also used to identify
physical entities using tags.
~ In home automation system devices is minicomputer
‘with light sensor and relay switch (actuator).
) 23
Embedded oT Platform Design
Resources are nothing but software components
Resources can be “on-device” resources or network-
resources.
“On - device Resources”: They are hosted on device
On-device resources consist of software components
that give information on physical entities to which they
are attached. They also enable actuation on physical
entities.
“Network Resources”: Network resources consist of
software components that are available in network for
example database.
In our example of home automation system operating
system which runs on single board minicomputer is an
“on-device” resource.
= Service
Interface to interact with physical entity is provided by
services. Resources hosted on a device or network
resource are accessed by services in order to obtain
information about physical entity and perform actuation
on physical entities,
‘Now consider our example of home automation system.
‘There are three services which are as follows :
(1) Service to set mode (auto or manual)
(2) Service to set light state (on or off)
or to find out current light state.
) Controller service.
Controller service runs as native service on device.
In auto mode controller service checks the light level
‘and switches the light ‘on’ or ‘off according to light
level. Also updates status in database.
In manual mode current light state is retrieved by
controller service from database based on the retrieved
‘current state if switches the light “on” or “off”
“Syllabus Topic : Information Model Specification
2.24
Information Model Specification
= This is the fourth step in the IoT system design mode!
where we define information model. Structure of all
information like attributes of virtual Entities, relations,
‘tc, is described in information model.
It doesn’t explain details about how information is
stored or represented.
— In order to define the information model, we have to
first list the virtual entities. After that by describing
their attributes and relations information mode! adds
‘more details to the virtual entity
Scanned with CamScanner- 3
embedded 10T Platform Design, Meg,
& Embedded Systems and ioT SPU - Sem 6 COMB) ES
In our example of home automation system there
are two virtual entities. One is virtual entity for
light appliance which has attribute light sate
Another virtual entity is room which has attribute
light level. Information model is shown in
Fig. 224,
—+ oe way Aasociten
—*Aaarepaton
formation model of JOT based Dome aitomaton yay
i
2.2.5 Service Specifications
Scanned with CamScannerET emvosies
and IoT (SPPU - Sem 6 - Comp.
Embedded loT Platform Design Methodology
‘This is fifth step in design methodology where we
define a service specification that is describing various
services in IOT system.
Service specification includes defining various services
in the system, their service types, service inputs and
‘outputs, service endpoints, schedules of services,
service preconditions and service effects.
For our example of home automation system we have
made process specification and designed information
model. Fig. 2.2.5 shows derivation of services from
[Process specification and information model.
Steps of deriving of services from specification and
information model are as follows :
‘© Identify states and attributes.
(© Define a service for each state and attribute.
© That services can find out current values of state
‘or attribute or can change that values.
In our example of home automation mode service can
retrieve current mode or can change mode from auto to
‘manual or vice versa.
In the same way state service can sets the light
appliances to on or off or can retrieve its current state.
Controller service can monitors the light level and can
switch light on or off. Service can also update status to
database.
If mode is manual mode then controller service can
retrieve current state from database and then can switch
the light on or off.
Fig. 2.2.8 : Controller service specification
— Fig. 2.2.6 shows specifications of mode service.
Fig. 2.2.7 shows specifications of state service and
Fig. 2.2.8 shows the specifications of controller service.
‘Some of the important details about mode service are:
= Itis a RESTful web service.
= Service can set mode to auto or manual using PUT
request.
— Service can retrieve current mode using GET request.
— Mode is updated to the database or can be retrieved
from database by using mode service.
Some of the important details about state service are:
= Itis also RESTful web service.
= Service can set state of light to on or off using PUT
request.
= Service can retrieve current state using GET request.
= State is updated to the status database or can be
retrieved from status database,
Details about controller service are as follows:
~ Runs as a native service on the device.
= If mode is auto mode then this service checks the light
level.
According to light level service switches the light on or
ff and updates the status in the status database.
— If mode is manual mode then this service retrieves
Current state that is on or off from status database and
Switches the light appliance on or off.
Syllabus Topic : loT Level Specification
2.2.6 _loT Level Specification
~ We have studied IoT deployment levels in unit ~ 1
Scanned with CamScannerToT deployment levels are
@ ToT level - 1. Gi) ToT level -2.
Gi) ToT level -3. (iv) ToT level -4.
(vi) IoT level -6.
() ToT levels,
~ In our example of home automation system we have
used [oT level - 1.
JoT level ~ 1 based system has a single node or loT
device that performs sensing, actuation, data storage,
Performs data analysis and hosts the application.
As shown in Fig. 2.2.9 a single node is responsible for
sensing, storage and data analysis.
Cloud
Fig. 2.2.9 : Deployment design of home automation system
IoT level ~ 1 based solution are used for low-cost low-
complexity solutions in which data involved is less and data
analysis and computational complexity is low.
= In our example of home automation system home
appliances(lights) are controlled remoiely via
application.
— A relay is connected in a system with single node ToT.
device and lights and/or other home appliances.
— Status information of each connected home appliance
is maintained via device monitoring in a local
database.
= _ REST service is used to access and update the status of
lights and appliances by changing the values in local
database.
‘The controller service continuously monitors the
database and keeps track of the appliances and triggers
the relay switches.
- The which is deployed locally provides a
GUI using which lights and other home appliances can
be handled by the user.
AS i 25 ‘control the home appliances,
ee 7.29 shows deployment desig
automation system.
rl View Spec,
Functional Peciticatiy
‘Syllabus Topic:
227 Functional View Specification
]Eipian funcional view specication stop in (oT dea)
‘diagram mapping of deployment leg
Eee eporis extortion aysion. "*
| 2, write note on functional 9rOUPS. Pow
‘This is the seventh step in IoT design me
methodology where we define functional view
Functions of IoT system are grouped into var
Functional Groups (FG). We define these functions . ~
oT system in functional view specification.
Every FG that is functional group provides differs
functionalities which are used for interacting wy
instances of concepts which are defined in Doma:
model or FG provides information related to they ;
concepts.
= Functional Groups (FG) consists of :
1. Device functional groups 4
2. Communication functional groups 7
3. Services functional groups
Z Management functional groups
6.
Security functional groups
% ToT system is handled by thes
Sommunication protocols, frOups consist of variow
~ These Protocols enable
Sonsidered as backbone cp nor Connectivity and can
Web aot system. Communica“
Socket are used by services 3
system followin
Scanned with CamScanner.
Embedded ‘and IoT (SPPU - Sem6-Comp.)_2
Link layer protocol : (802.11)
Network layer protocol : Pv4 / IPv6
‘Transport layer protocol ; TCP
Application layer protocol : HTTP
= Communication API's are REST based in home
automation system.
© Service Functional Group
This functional group consists of following services
= Device monitoring services
= Device control services
= Device discovery services
= Data publishing services
= _Inour example of home automation system.
‘There are two REST services.
Mode service and state service and one native service
that is controller service.
© Management Functional Group
Functionalities which are required to configure and
‘manage the IoT system are provided by management
functional groups.
‘© Security Functional Group
JoT system also requires security mechanisms security
‘mechanisms like authentication, authorization and data
security are provided by security functional group.
Embedded loT Platform Design Methodology
‘© Application Functional Group
This functional group consists of applications that
provide an interface to the users for controlling and
monitoring of various aspects of IoT system. These
applications allow users to view processed data as well as
system status.
= Mapping of deployment level to functional
groups
For Smart home IoT system mapping of deployment
level to functional groups is shown in Fig. 2.2.10.
= Devices which include sensors, actuators and
communication devices are mapped to Device FG and
device management (Management FG).
= Resources maps to Communication FG and Device FG.
= Controller Service maps to native Service that is to
Services FG.
= Database maps to database management and database
security that means database maps to Management FG
‘and Security FG.
— REST web service maps to services FG.
— Application maps to web app, application server,
database server that is to Application FG.
~ Application also maps to application management and
application security that means it maps to Management
FG and Security FG.
Scanned with CamScannerThis is the eighth steps in JoT desi
in IoT design methodology
here we define operational view specifications. Options
operations which are related to IoT system deployment
are defined in this step. ae
These options are as follows:
= Device options
— Storage options
~ Application hosting option
= Service hosting option
Mapping of functional groups to operational view for
JoT based home automation system is shown in Fig. 2.2.11.
embedded 1oT Pater
pis
= Communication Al Ais
‘Communication API ike RES
‘Communication Protocols
jon protocols sre
— Link layer protocol = wee mae
“Transport layer protocol= TCP
‘Applicaton layer protocol HTTP
®& Services
Services include mode
controller service.
© Mode Service
It is RESTful web service which is hosted on a device.
Service can be implemented using Django-REST
framework.
> State Service
It is RESTful web service which is hosted on a device.
‘Service can be implanted using Django-REST framework.
® Controller Service
ice, state service and
Controller service is run as native service and it is
hosted on device. This service can be implementing in
python.
= Application
Application details can be as follows
~ Web application will be Django Web Application
~ Application server can be Django App Server
— Database server can be MySql.
© Security
z view for | Authentication and authorizati .
Fig. 22.11 : Mapping functional groups to operational authorization mechani
TOT based home automation system applied to web App and databases —"
onal view specifications of home automation | |” yy)
system are as follows: x3
- ation management can be done wit
@ Devices Djan, with the help of
"G0 App Management.
Devices consists of — Database management with
Computing devices like raspberry Pi ceased the help of Mysql DB
sistor
Light dependent res! ~ Device management with
the
Relay switch device management help of Raspberry Pi
Scanned with CamScannerEmbedded Systems and IoT (SPU - Sem 6 - Comp.)
“Ha
Embedded oT Platform Design.
‘Syllabus Topic : Device and Component
oP ptegration
2.2.9 Device and Component integration
@. Describe device and component integration for loT
{Q, Explain in short devices and components which can
‘based home automation system,
‘be used in loT based home automation system.
This
ninth step in IoT design methodology where we
ccan integrate devices and components. Schematic diagram
of home automation system is shown in Fig. 2.2.12.
‘Broadboard for connection
Fig. 22.12 : Home automation system with sensors and
actuator integrated
= Devices and components
Devices and components which are used in our
‘example are
Raspberry P,
LDR sensor.
Relay switch actuator.
Raspberry Pi
— The Raspberry Pi is a series of powerful, small
single-board computers. The Raspberry Pi is
developed by Raspberry Pi Foundation in the
United Kingdom,
— Various versions of Raspberry Pi have been out
Aill date. All versions consist of & Broadcom
system on a chip (SoC) with an integrated ARM
compatible CPU and on-chip graphics processing
unit (GPU).
Processor speed of device ranges from 700 MHz
{0 1.2 GHz and memory range from 256 MB to 1
GBRAM.
= To store the operating system and program
memory Secure Digital (SD) cards are used
Raspbian OS which is a Debian-based Linux
operating system is recommended OS by
Raspberry Pi Foundation. Some other third party
‘operating systems like RISC OS Pi.Diet Pi, Kali
Linux can also be run on Raspberry Pi.
— Fig. 2.2.13 shows Raspberry pi 3 model B.
teen Tie He
gaye
Fig. 22.13 : Raspberry pi3 model B
LDR sensor
= LDR that is Light Dependent Resistor is a
‘component which has variable resistance.
~ Resistance changes depending on intensity of light
falling upon it. This property makes LDR useful in
various light sensing circuits
— LDR sensor converts light energy into electrical
signal output.
~ LDR sensors generates output signal which
‘measures intensity of light.
In our example of smart home LDR sensors are
‘used to measure intensity of light in a room.
Relay switch Actuator
= An actuator is the device which carries out the
‘mechanical movements required for any physical
process.
~The most basic control of any device is ability to
turn it on or off, Best way to do it is by using
switches.
~ Relays are nothing but switches which can be
tumed on or off by application of a low voltage
across the relay terminals,
~ They are commonly found in automatic control
applications as they can control equipment directly
‘through electric signals and does not require
physical operation.
~ In our example of Smart home we are relay switch
‘o tum light appliance on or off.
Scanned with CamScannertot
embedded
1 Specificatio
[FF exivedded sytem ind IoT (SPPU - Sem Top ‘Domain Mode! Spec .
See = syllabus epectcation for smart hom
Syllabus Topic : Application Development
—_—_—eSaa=——r
2.2.10 Application Development
Q. Explain application development step in loT design
methodology for smart home automation system.
— This is the last step in IoT design methodology. In this
step we develop the IoT application. Fig. 2.2.14 shows
‘web application screenshot for home automation
system.
‘Welcome to Smart Home
Mote ED
Ugh Sate ED
Fig. 22.14; Screenshot of home - automation application
— Application thas functionality to control the mode as
well as light appliance.
= In auto mode based on light condition in room system
will control light appliance (switch on or switch off).
~ Light intensity is measured by LDR sensors which we
have used. If light intensity is low (below specified
limit) light appliance will tum on.
If light intensity is high (more than specified limit)
light appliance will tum off,
— If mode selected is manual then user can manually tum
light appliance on or off.
As the device is connected to the internet, application
‘can remotely control the home appliances.
2.3 Exam Pack (Review Questions)
@. Which are various steps in loT design methodology ?
piatform Design Methodology
Wite som ‘section 2.2:3)
Oana yn Son
oOo O peler 22.3)
ran ee vitual entity in domain. mod
~ (Peter section 22:3)
ea Hr govie Resources” and Netwoy
Pesources” (Refer sation 2.2.5)
tabus Topic : Information Model
“apr Specification
vn information made application for smart hore
fe a ae (Refer section 2.2.4)
apaniomation rode speciation for ToT based
a
e284
pplication. (Refer section 2.24)
Syllabus Topie : Service Specifications
eiication step in IoT system design
oe Refer section 2.2.5)
Deserve various services in loT system.
(Reter section 22.5)
Write service specification for smart home automation
system. (Reler section 225)
Wite note on :
() Mode service
(0) State service
(il) Controier service (Refer section 2.2.5)
Syllabus Topic : loT Level Specification
Sate diferent loT deployment levels. Explain loT love
semaine grat home auioaion sen
(Refer section 2.2) = Syllabus Topic : Functional View Specification
© Syllabus Topic : Purpose and Requirement Explain functional view specification step in loT design
@. Explain pupose and requirement specication in let | g, fee?
‘design methodology with example. diagram mappir
(Refer section 22.1) tonal up fot home saan a
Consider any loT based application and write purpose |g, (ler Seaton 2.2.7)
‘and requirement. (Refer section 2.2 1) ‘rg nel on funciona group,
@ Syllabus Topic : Process Specification - ‘section 2.2.7)
Syllabus Topic :
Q. Explain process model specication for home opie :
E af Rerstonal View Speciation
(Rete secon 222) desig meted, *Pefeaton stop trom oT
@. Consider any loT based application and write process % (Roter section 22
‘model specification for same application. Eola operational view
(Reter section 222) home automation syetan’ “Petiication for loT based
(Refer section 22)
Scanned with CamScanner[BF embecied Systems and loT (SPPU -Sem 6 - Comp) 2-11
‘© Syllabus Topic : Device and Component
Integration
@. Describe device and component integration for loT
‘based home automation system,
(Refer section 2.2.9)
©. Explain in short devices and components which can be
‘sed in loT based home automation system.
(Refer section 2.2.9)
re
Embedded IoT Platform Design Methodology
Q. Write note on :
(Raspberry Pi
(LDR sensors
(i). Actuator
(Reter section 22.9)
‘= Syllabus Topic : Application Development
Q. Explain application development step in loT design
‘methodology for smart home automation system.
(Refer section 2.2.10)
goog
Scanned with CamScanner