MOD1_PART2.pptx
MOD1_PART2.pptx
Components in IoT
► Sensors and actuators
► Device -(thing + sensors)
► Gateway(Device + External gateway(+Internet)
► Protocols
► Cloud
Sensor
► Sensors are devices that detect the feature quantity of a measurement object and
convert this quantity(physical) into a readable signal(electrical).
• Temperature Sensors.
• Humidity Sensors.
• Pressure Sensors.
• Proximity Sensors.
• Level Sensors.
• Accelerometers.
• Gyroscope.
• Gas Sensors.
Actuators
► An actuator is a machine component or system that moves or controls the
mechanism or the system. It takes an electrical input and turns it into physical action.
• Hydraulic Actuators.
• Pneumatic Actuators. .
• Electrical Actuators.
• Thermal Actuators.
• Magnetic Actuators.
• Relay Actuators.
IoT Device
► An IoT device is made up of a Physical object (“thing”) + Controller (“brain”) +
Sensors + Actuators + Networks (Internet)
► IoT devices are pieces of hardware, such as sensors, actuators, gadgets,
appliances, or machines, that are programmed for certain applications and
can transmit data over the internet or other networks. Examples
► Arduino with Arduino Ethernet connection
► Raspberry Pi connected via Ethernet or Wi-Fi
► Intel Galileo connected via Ethernet or Wi-Fi Examples of indirectly
connected device include
Gateway
► An IoT gateway is a physical device or virtual platform that connects sensors, IoT
modules, and smart devices to the cloud. Gateways serve as a wireless access
portal to give IoT devices access to the Internet.
Types of communication in IoT
► Device to device
D2 D2 BLE, Z-wave, Zigbee
► Device to cloud
D1 cloud WiFi , Ethernet
► Device to gateway
BLE D1
Z-wave WiiFi
D2 gate cloud
way
Zigbee D3
cloud
Communication protocols
Link layer protocols
► Link layer : protocols determine how the data is physically sent over the
networks physical medium
802.3 – Ethernet: Medium can be coaxial cable,twisted pair or optical
fiber. Data rates can be 10 Mb/s to 40 Gb/s
802.11- Wi Fi: Collection of wireless local area network protocols. Data
rates can be 1 Mb/s to 6.75 Gb/s.
802.16 – Wi Max : Collection of wireless broadband standards. Data
rate 1.5 Mb/s to 1G/s
802.15.4 – LR –WPAN: collection of standards for low rate wireless
personal area networks. Data rates 40 kb/s to 250 kb/s.Used for low cost
,low speed communication for power constrained devices.
2G/ 3G/ 4G/5G –Mobile communication: Communicates over cellular
networks. Data rates 9.6kb/s to 100Mb/s
Network/Internet Layer
► The network layer is responsible for sending IP datagrams from the
source network to the destination network. It performs the host
addressing and packet routing. Host addressing is done using the
following IP addressing scheme.
► IPv4: 32bit addressing scheme
► IPv6: 128 bit addressing scheme
► 6LoWPAN: IPv6 over Low-Power Wireless Personal Area Networks, brings IP
protocol to the low power devices which have limited processing
capability.
Transport layer
► The transport layer protocols provide end to end message transfer and
functions such as error control segmentation, flow control and
congestion control.
► TCP : Transmission Control Protocol connection oriented and stateful
protocols. Ensures reliable transmission of packets in order. Used by
web browsers, email programs and file transfer. Light weight
implementation of TCP is used in IoT.
► UDP: User datagram protocol Connectionless protocol. Transaction
oriented and stateless protocol. Used for time sensitive applications.
Application layer
► Application layer protocols define how the applications interface with the
lower layer protocols to send the data over the network. Port numbers are used
for application addressing.
► HTTP: foundation of WWW. The protocol follows a request-response model
where a client(browser or application) sends a request to server using HTTP
commands. It is a stateless protocol. Protocol uses URL to identify resources.
Runs over TCP.
► CoAP: Constrained application protocol: Used for machine to machine
applications, meant for constrained environments with constrained devices
and constrained networks. It uses a client server architecture, request-response
model where clients communicate with servers using connectionless
datagrams. It runs over UDP.
► WebSocket: allows full duplex communication over a single socket connection
for sending messages between client and server while keeping the TCP
connection open.
► MQTT: Message Queue Telemetry Transport is a light weight messaging
protocol based on publish subscribe model. Uses a client server
architecture where the client connects to the server and publishes
messages to topics on the server. Well suited for constrained environments
where the devices have limited processing and memory resources and the
bandwidth is low.
► XMPP: Extensible Messaging and Presence Protocol is used for real time
communication. It is a decentralized protocol and supports both client
-server and server –server architecture. It has wide range of applications
including messaging, gaming, multi-party chat and voice/video calls.
► DDS: Data Distribution Services is a data-centric middleware standard for
device - device or machine-machine communication. It uses
publish-subscribe model. DDS provides real time, scalable, dependable
high performance, inter-operable data communication between publisher
and subscriber.
► AMQP: Advanced Message Queuing Protocol is an open application
protocol for business messaging. It supports both point-to-point and
publisher/subscriber models.
IoT architecture
Resource Service
Identifi- repository and
management
cation discovery Security
Enterprise shared bus and message and
Autho-ri
broker privacy
zation Device
manag enforce
Communication layer er ment
Access
control
Devices ,sensors, human operators
Device layer
► The bottom layer of the architecture is the device layer. Devices can be of various
types, but in order to be considered as IoT devices, they must have some
communications that either indirectly or directly attaches to the Internet. Examples
► ZigBee devices connected via a ZigBee gateway
► Bluetooth or Bluetooth Low Energy devices connecting via a mobile phone
► Each device typically needs an identity. The identity may be one of the following:
• A unique identifier (UUID) burnt into the device (typically part of the System-on-Chip, or
provided by a secondary chip)
• A UUID provided by the radio subsystem (e.g. Bluetooth identifier, Wi-Fi MAC address)
• An OAuth2 Refresh/Bearer Token (this may be in addition to one of the above)
• An identifier stored in nonvolatile memory such as EEPROM
Communication layer
► The communication layer supports the connectivity of the devices. There are multiple
potential protocols for communication between the devices and the cloud. The most well
known three potential protocols are
• HTTP/HTTPS (and RESTful approaches on those)
• MQTT 3.1/3.1.1
• Constrained application protocol (CoAP)
Aggregation/bus layer
► An important layer of the architecture is the layer that aggregates and brokers
communications. This is an important layer for three reasons:
1. The ability to support an HTTP server and/or an MQTT broker to talk to the
devices;
2. The ability to aggregate and combine communications from different devices
and to route communications to a specific device (possibly via a gateway)
3. The ability to bridge and transform between different protocols, e.g. to offer
HTTP based APIs that are mediated into an MQTT message going to the
device.
Event processing and analytics
► This layer takes the events from the bus and provides the ability to process
and act upon these events. A core capability here is the requirement to
store the data into a database. This layer is used for
• Highly scalable, column-based data storage for storing events
• Map-reduce for long-running batch-oriented processing of data
• Complex event processing for fast in-memory processing and near
real-time reaction and autonomic actions based on the data and activity of
devices and other systems
• In addition, this layer may support traditional application processing
platforms.
Client/external communication layer
Resource
request(REST/ Response(JSON
SOAP) /SOAP-XML)
Presentation layer
Security
module
Business logic layer
Database
► Architecture is structured into a secure API, a backbone, and separate device networks with
standard interface to the backbone.
► In conventional method, SOAP(Simple Object Access Protocol) or RMI(remote procedure
invocation) are used to describe, discover and call services. They have huge overhead and
complexity.
► Web API and REST are the alternative solutions.
► They use light weight data exchange formats like JSON which replace XML files to describe
services. They have less overhead and uses the communication channel and processing ability of
the devices efficiently.
► The API decouples innovation of services and service logic from protocols and network
elements. It also enables service portability between systems, i.e. a service may be allocated to
end-systems or servers, with possible relocation and replication throughout its lifecycle.
► Building APIs for IoT applications helps the service provider to focus on functionality, efficient
service monitoring and pricing tools.
Functional Blocks of IoT
Application
Services
Management Security
Communication
Device
IoT communication models
► Request-Response
► Publish-Subscribe
► Push-Pull
► Exclusive Pair
Request-Response model
CLIENT SERVER
❖ Receives
Request request
Sends ❖ Process
request to ❖ Looks/fetch
server es resources RESOURCES
Response ❖ Prepare
response
❖ Send
response
Publish-Subscribe Communication model
PUBLISHER BROKER
CONSUMER-1
Message TOPIC-1
published Subscribers:
to Topic-1 Consumer-1
Sends message Consumer-2
to Topics CONSUMER-2
Message TOPIC-2
published Subscribers:
to Topic-2 Consumer-3
CONSUMER-3
Push-Pull Communication model
QUEUES
PUBLISHER
CONSUMER-1
Sends
messages to Messages
queues Message pulled
pushed to from
queues queues
CONSUMER-2
Exclusive pair communication model
CLIENT SERVER
Request (GET,PUT,UPDATE,DELETE)with
payload(JSON,XML)
Response(JSON,XML)
Request (GET,PUT,UPDATE,DELETE)with
payload(JSON,XML)
Response(JSON,XML)
Web socket based communication APIs