Lec 4
Lec 4
Dr.Ravikiran Y
Assistant Professor
EEE Department
BITS Pilani Hyderabad Campus
Outline
2
Introduction to Design of IOT
● Physical Design :
● Logical Design :
Abstract representation of entities and processes
without going into low-level specifics
3
Background on Communication Models
• Request-Response:
• Client sends requests to server and the server responds.
• Server decides how to respond.
• Stateless (no record, each request is independent) communication
models.
• Each response-request pair is independent of other.
4
• Publish-Subscribe:
• Involves publishers, brokers and consumers.
• Publishers send data to the topics which are managed by the brokers.
• Publishers are not aware of the consumers.
• Consumers subscribe to the topics managed by the broker.
• Brokers receives data for a topic from the publisher and sends the data to
the subscribed consumers.
5
• Push-Pull:
• The data producers push the data to the queue and the consumers pull
the data from the queue.
• Producers do not need to be aware of the consumers.
• Queues help in decoupling the messaging between the producers and the
consumers.
• Queues also act as a buffer which helps in situations when there is a
mismatch in rate.
6
• Exclusive Pair:
• Bi-directional full duplex communication method.
• Uses persistent connection between server and a client.
• Once the connection is setup, it remains open unit the client sends a
request to close the connection.
• Stateful communication.
7
PHYSICAL DESIGN
Communication Design :IoT Protocols
11
• Transport Layer
• Provides end-to-end message transfer capability independent of the
underlying network.
• The message transfer capability can be set up on connections, either
using handshakes (TCP) or without handshakes (UDP)
• Error control, segmentation, flow control and congestion control.
• Protocols
• TCP
• UDP
12
TCP - Transmission Control Protocol < from wikipedia>
Widely used - browsers/ SMTP/FTP
TCP is connection-oriented, meaning that sender and receiver firstly need
to establish a connection based on agreed parameters; they do this
through three-way handshake procedure.
16
RESTful webservice
2.Uniform interface:
Method of communication client-server must be uniform.
“Resource” and a “Representations of Resource (URI)”.
When a client holds a URI it has all information to update/delete provided it has
required permissions.
3.Code on demand(optional):
Servers can provide executable code or scripts for clients to execute in their context18
REST - 6 guidelines
4.Cacheability:
Data within a response can be labelled as:
> cacheable : can reduce interactions, as client can store data
>non-cacheable
5.Client-server architecture:
Separation of concerns
Client should not be concerned with storage of data ( concern of server)
Server should not be concerned with UI
6. Layered system:
Each component cannot see beyond the immediate layer
E.g client cannot tell if it is connected to the end server or inter-mediary node
19
20
IoT APIs - WebSocket
Reduce network traffic & latency as there are no overheads for connection setup &
termination requests for each message
21
Logical Design of IoT
Abstract representation of entities and processes without going into low-level specifics 22
IoT Levels and Deployment Templates
23
IoT Levels and Deployment Templates
24
IoT Levels and Deployment Templates
25
IoT Levels and Deployment Templates
E.g Smart Irrigation system - 1 single node monitors soil moisture and controls
irrigation
Cloud based app helps in visualization of moisture levels over a period of time. 26
IoT Levels and Deployment Templates
E.g Ride service - Ola & Uber, The phone on the driver’s side will keep sending
location of driver to its cloud. The customer can see the live location of the
driver
27
IoT Levels and Deployment Templates
E.g. Noise monitoring system in a specified area. Multiple nodes (with sound
sensors) are placed in different locations within the area.
-If a user (observer node) wants to know about noise levels in his area, he can
subscribe to this service 28
IoT Levels and Deployment Templates
E.g. Forest fire detection - multiple nodes - measure temperature, humidity, CO2 levels in a
forest. -Coordinator node collects data from end nodes & has internet connectivity (acts as a
gateway). 29
-In the cloud - storage & analysis is done.
IoT Levels and Deployment Templates
E.g. Advanced farm monitoring/control - multiple nodes - measure temperature, humidity, images in its vicinity (
each one is connected to cloud).
-In the cloud - storage & analysis is done.
-The centralised controller generates commands to individual nodes - to control water irrigation, pesticide system.
-Farmer can subscribe and get overall status
30
Design Methodology
IoT Design Methodology
• IoT designers often tend to design the system keeping specific products in
mind. But updating the system might get complicated
33
IoT Design Methodology
34
IoT Design Methodology
A home automation system that allows controlling the lights remotely using a web
Purpose
application
Home automation system should support two modes: auto and manual
Auto: System measures the light level in the room and switches on the light when it is
Behavior
dark
Manual: Allows remotely switching lights on and off
System
System should provide remote monitoring and control functions
Management
Data Analysis System should perform local analysis of the data and determine if it is too dim
Application
Application should be deployed locally, but should be accessible remotely
Deployment
35
IoT Design Methodology -
2. Process Specification
39
IoT Design Methodology -
41
IoT Design Methodology -
42
IoT Design Methodology -
5. Service Specifications
• The service specification defines the following:
• Services in the system
• Service types
• Service inputs/output
• Service endpoints
• Service schedules
• Service preconditions
• Service effects
• For each state and attribute in the process specification and information
model, we define a service. Services either change the state of
attributes or retrieve their current values.
43
IoT Design Methodology -
48
IoT Design Methodology -
49
IoT Design Methodology -
Mapping deployment level to functional groups for home automation IoT System
50
IoT Design Methodology -
• In this step the devices like sensors, computing devices and other
components are integrated together.
51
IoT Design Methodology -
Schematic diagram for the home automation IoT System showing the device,
sensor and actuator integrated 52
IoT Design Methodology -
• Using all the information from previous steps, the application (code) for
the IoT system is developed
53