IoT - Unit1 - Notes (KNH Sir)
IoT - Unit1 - Notes (KNH Sir)
IoT architecture
Our approach to IoT architecture is reflected in the IoT architecture diagram which shows the building blocks
of an IoT system and how they are connected to collect, store and process data.
Things. A “thing” is an object equipped with sensors that gather data which will be transferred over a network
and actuators that allow things to act (for example, to switch on or off the light, to open or close a door, to
increase or decrease engine rotation speed and more). This concept includes fridges, street lamps, buildings,
vehicles, production machinery, rehabilitation equipment and everything else imaginable. Sensors are not in
all cases physically attached to the things: sensors may need to monitor, for example, what happens in the
closest environment to a thing.
Gateways. Data goes from things to the cloud and vice versa through the gateways. A gateway provides
connectivity between things and the cloud part of the IoT solution, enables data preprocessing and filtering
before moving it to the cloud (to reduce the volume of data for detailed processing and storing) and transmits
control commands going from the cloud to things. Things then execute commands using their actuators.
Cloud gateway facilitates data compression and secure data transmission between field gateways and cloud
IoT servers. It also ensures compatibility with various protocols and communicates with field gateways using
different protocols depending on what protocol is supported by gateways.
Streaming data processor ensures effective transition of input data to a data lake and control applications.
No data can be occasionally lost or corrupted.
Data lake. A data lake is used for storing the data generated by connected devices in its natural format. Big
data comes in "batches" or in “streams”. When the data is needed for meaningful insights it’s extracted from
a data lake and loaded to a big data warehouse.
Big data warehouse. Filtered and pre-processed data needed for meaningful insights is extracted from a data
lake to a big data warehouse. A big data warehouse contains only cleaned, structured and matched data
(compared to a data lake which contains all sorts of data generated by sensors). Also, data warehouse stores
context information about things and sensors (for example, where sensors are installed) and the commands
control applications send to things.
Data analytics. Data analysts can use data from the big data warehouse to find trends and gain actionable
insights. When analysed (and in many cases – visualized in schemes, diagrams, infographics) big data show,
for example, the performance of devices, help identify inefficiencies and work out the ways to improve an IoT
system (make it more reliable, more customer-oriented). Also, the correlations and patterns found manually
can further contribute to creating algorithms for control applications.
Machine learning and the models ML generates. With machine learning, there is an opportunity to create
more precise and more efficient models for control applications. Models are regularly updated (for example,
once in a week or once in a month) based on the historical data accumulated in a big data warehouse. When
the applicability and efficiency of new models are tested and approved by data analysts, new models are used
by control applications.
Control applications send automatic commands and alerts to actuators, for example:
• Windows of a smart home can receive an automatic command to open or close depending on the
forecasts taken from the weather service.
• When sensors show that the soil is dry, watering systems get an automatic command to water plants.
• Sensors help monitor the state of industrial equipment, and in case of a pre-failure situation, an IoT
system generates and sends automatic notifications to field engineers.
The commands sent by control apps to actuators can be also additionally stored in a big data warehouse. This
may help investigate problematic cases (for example, a control app sends commands, but they are not
performed by actuators – then connectivity, gateways and actuators need to be checked). On the other side,
storing commands from control apps may contribute to security, as an IoT system can identify that some
commands are too strange or come in too big amounts which may evidence security breaches (as well as other
problems which need investigation and corrective measures).
Control applications can be either rule-based or machine-learning based. In the first case, control apps work
according to the rules stated by specialists. In the second case, control apps are using models which are
regularly updated (once in a week, once in a month depending on the specifics of an IoT system) with the
historical data stored in a big data warehouse.
Although control apps ensure better automation of an IoT system, there should be always an option for users
to influence the behavior of such applications (for example, in cases of emergency or when it turns out that an
IoT system is badly tuned to perform certain actions).
User applications are a software component of an IoT system which enables the connection of users to an
IoT system and gives the options to monitor and control their smart things (while they are connected to a
network of similar things, for example, homes or cars and controlled by a central system). With a mobile or
web app, users can monitor the state of their things, send commands to control applications, set the options of
automatic behaviour (automatic notifications and actions when certain data comes from sensors).
Device management
To ensure sufficient functioning of IoT devices, it’s far not enough to install them and let things go their way.
There are some procedures required to manage the performance of connected devices (facilitate the interaction
between devices, ensure secure data transmission and more):
• Device identification to establish the identity of the device to be sure that it’s a genuine device with
trusted software transmitting reliable data.
• Configuration and control to tune devices according to the purposes of an IoT system. Some
parameters need to be written once a device is installed (for example, unique device ID). Other settings
might need updates (for example, the time between sending messages with data).
• Monitoring and diagnostics to ensure smooth and secure performance of every device in a network
and reduce the risk of breakdowns.
• Software updates and maintenance to add functionality, fix bugs, address security vulnerabilities.
User management
Alongside with device management, it’s important to provide control over the users having access to an IoT
system.
User management involves identifying users, their roles, access levels and ownership in a system. It includes
such options as adding and removing users, managing user settings, controlling access of various users to
certain information, as well as the permission to perform certain operations within a system, controlling and
recording user activities and more.
Security monitoring
Security is one of the top concerns in the internet of things. Connected things produce huge volumes of data,
which need to be securely transmitted and protected from cyber-criminals. Another side is that the things
connected to the Internet can be entry points for villains. What is more, cyber-criminals can get the access to
the “brain” of the whole IoT system and take control of it.
To prevent such problems, it makes sense to log and analyse the commands sent by control applications to
things, monitor the actions of users and store all these data in the cloud. With such an approach, it’s possible
to address security breaches at the earliest stages and take measures to reduce their influence on an IoT system
(for example, block certain commands coming from control applications).
Also, it’s possible to identify the patterns of suspicious behaviour, store these samples and compare them with
the logs generated by an IoT systems to prevent potential penetrations and minimize their impact on an IoT
system.
View Model
A view model can be described in several different views to capture specific properties that are of relevance
to model, and the views chosen in are:
Functional view (Logical view): Description of what the system does, and its main functions.
Deployment view (Physical view): Description of the main real world components of the system such as
devices, network routers, servers, etc.
Process view (Behavioral view): deals with the dynamic aspects of the system, explains the
system processes and how they communicate, and focuses on the run time behavior of the system.
Implementation view (Development view): Used to capture the architectural decisions made for
the implementation.
Scenarios (use case diagram): in which your system or application interacts with people, organizations, or
external systems.
Comparing these different approaches, a common feature is the focus on a horizontal system approach.
Clear separation of the underlying communication networks and related technologies from capabilities that
enable services.
Clear desire to define uniform interfaces towards the devices that provide sensing and actuation, including
abstraction of services the devices provide.
The overall design objective of IoT architecture shall be to target a horizontal system of real-world services
that are open, service-oriented, secure, and offer trust.
1. Design for reuse of deployed IoT resources across application domains.
2. Design for a set of support services that provide open service-oriented capabilities and can be used for
application development and execution.
3. Design for different abstraction levels that hide underlying complexities and heterogeneities.
4. Design for sensing and actors taking on different roles of providing and using services across different
business domains and value chains.
5. Design for ensuring trust, security, and privacy.
6. Design for scalability, performance, and effectiveness.
7. Design for evolvability, heterogeneity, and simplicity of integration.
8. Design for simplicity of management.
9. Design for different service delivery models.
10. Design for lifecycle support. The lifecycle phases are: planning, development, deployment, and
execution. Management aspects include deployment efficiency, design time tools, and run-time
management.
From these design principles, and taking into consideration detailed use cases and target applications, it is
possible to identify requirements that form the basis for a more detailed architecture design.
Different sets of requirements have been identified in the already-referenced work.
Devices in IoT
• A device is a hardware unit that can sense aspects of it’s environment and/or actuate, i.e. perform tasks
in its environment. A device can be characterized as having several properties, including:
Microcontroller: 8-, 16-, or 32-bit working memory and storage.
• Power Source: Fixed, battery, energy harvesting, or hybrid.
• Sensors and Actuators: Onboard sensors and actuators, or circuitry that allows them to be connected,
sampled, conditioned, and controlled.
• Communication: Cellular, wireless, or wired for LAN and WAN communication.
• Operating System (OS): Main-loop, event-based, real-time, or full featured OS.
• Applications: Simple sensor sampling or more advanced applications.
• User Interface: Display, buttons, or other functions for user interaction.
• Device Management (DM): Provisioning, firmware, bootstrapping, and monitoring.
• Execution Environment (EE): Application lifecycle management and Application Programming
Interface (API).
Device types
Grouping of devices into two categories:
Basic Devices: Devices that only provide the basic services of sensor readings and/or actuation tasks, and in
some cases limited support for user interaction. LAN communication is supported via wired or wireless
technology, thus a gateway is needed to provide the WAN connection.
Advanced Devices: In this case the devices also host the application logic and a WAN connection. They may
also feature device management and an execution environment for hosting multiple applications. Gateway
devices are most likely to fall into this category.
Deployment scenarios for devices
Deployment can differ for basic and advanced deployment scenarios. Example deployment scenarios for basic
devices include:
Home Alarms: Such devices typically include motion detectors, magnetic sensors, and smoke detectors. A
central unit takes care of the application logic that calls security and sounds an alarm if a sensor is activated
when the alarm is armed. The central unit also handles the WAN connection towards the alarm central. These
systems are currently often based on proprietary radio protocols.
Smart Meters: The meters are installed in the households and measure consumption of, for example,
electricity and gas. A concentrator gateway collects data from the meters, performs aggregation, and
periodically transmits the aggregated data to an application server over a cellular connection. By using a
capillary network technology
Building Automation Systems (BASs): Devices include thermostats, fans, motion detectors, and boilers,
which are controlled by local facilities, but can also be remotely operated. Standalone Smart Thermostats uses
Wi-Fi to communicate with web services.
Examples for advanced devices include:
Onboard units in cars that perform remote monitoring and configuration over a cellular connection.
Robots and autonomous vehicles such as unmanned aerial vehicles that can work both autonomously or by
remote control using a cellular connection.
Video cameras for remote monitoring over 3G and LTE.
Oil well monitoring and collection of data points from remote devices.
Connected printers that can be upgraded and serviced remotely.
Advanced Devices
• A powerful CPU or microcontroller with enough memory and storage to host advanced applications.
• Video or other high bandwidth functions.
• The consolidation of software and interfaces.
• Battery-powered devices with ultra-low power cellular connections.
• Devices that harvest energy from their environment.
• Smart bandwidth management and protocol switching.
• Microcontrollers with multicore processors.
• Novel software architectures for better handling of concurrency.
Gateways
A gateway is a network node that forms a passage between two networks operating with different transmission
protocols and serves as a translator between different protocols, e.g. between IEEE 802.15.4 or IEEE 802.11,
to Ethernet or cellular.
Different types of gateways, which can work on different levels in the protocol layers. Most often a gateway
refers to a device that performs translation of the physical and link layer, but application layer gateways
(ALGs) are also common. The latter is preferably avoided because it adds complexity and is a common source
of error in deployments.
ALGs include the ZigBee Gateway Device, which translates from ZigBee to SOAP and IP, or gateways that
translate from Constrained Application Protocol (CoAP) to HyperText Transfer Protocol/Representational
State Transfer (HTTP/REST).
LAN technologies, such as 802.11 and Z-Wave, the gateway is used for inclusion and exclusion of devices.
Typically works by activating the gateway into inclusion or exclusion mode and by pressing a button on the
device to be added or removed from the network.
Data management
Typical functions for data management include performing sensor readings and caching this data, as well as
filtering, concentrating, and aggregating the data before transmitting it to back-end servers.
Local applications: Examples of local applications that can be hosted on a gateway include closed loops, home
alarm logic, and ventilation control, or the data management function.
The benefit of hosting this logic on the gateway instead of in the network is to avoid downtime in case of
WAN connection failure, minimize usage of costly cellular data, and reduce latency.
Device management
Device management (DM) is an essential part of the IoT and provides efficient means to perform many of the
management tasks for devices:
Provisioning: Initialization (or activation) of devices in regards to configuration and features to be enabled.
Device Configuration: Management of device settings and parameters.
Software Upgrades: Installation of firmware, system software, and applications on the device.
Fault Management: Enables error reporting and access to device status.
Advanced devices
Features that can characterize an advanced device are the following:
• A powerful CPU or microcontroller with enough memory and storage to host advanced applications,
such as a printer offering functions for copying, faxing, printing, and remote management.
• A more advanced user interface with, for example, display and advanced user input in the form of a
keypad or touch screen.
• Video or other high bandwidth functions.
The barrier for new developers will further be reduced thanks to the consolidation of software and interfaces,
e.g. it will be possible to interact with a device using simple HTTP/REST and to easily install a Java
application on a device, resulting in an increased number of developers.
Advanced devices
Developments in hardware and network technologies, entirely new device classes and features are expected,
such as: Battery-powered devices with ultra-low power cellular connections.
• Devices that harvest energy from their environment.
• Smart bandwidth management and protocol switching, i.e. using adaptive RF mechanisms to swap
between, for example, Bluetooth LE and IEEE 802.15.4.
• Multi-radio/multi-rate to switch between bands or bit rates (slower bit rate implies better sensitivity at
longer range).
• Microcontrollers with multicore processors.
• Novel software architectures for better handling of concurrency.
The possibility to automate the design of integrated circuits based on business-level logic and use case.
All these improvements that the IoT brings will remove the final barriers that have been holding back the
market for M2M.
Gateway provides bridge between different communication technologies which means we can say that a
Gateway acts as a medium to open up connection between cloud and controller (sensors / devices) in IoT.
Gateways establish device to device or device to cloud communication. A gateway can be a typical hardware
device or software program.
Enables a connection between sensor network and Internet along with enabling IoT communication, it also
performs many other tasks like, performs protocol translation, aggregating all data, local processing and
filtering of data before sending it to cloud, locally storing data and autonomously controlling devices based
on some inputted data, providing additional device security.
Internet of Things (IoT) Gateways
As IoT devices work with low power consumption (Battery power) in other words they are energy constrained
so if they will directly communicate to cloud/internet, it won’t be effective in terms of power.
So they communicate with Gateway first using short range wireless transmission modes/network like ZigBee,
Bluetooth, etc as they consume less power or they can also be connected using long range like Cellular and
Wi-Fi etc.
Internet of Things (IoT) Gateways
Gateway links them to Internet/ cloud by converting data into a standard protocol like MQTT. using ethernet,
Wi-Fi/cellular or satellite connection. And in mostly Gateway is Mains powered unlike sensor nodes which
are battery powered. In practice there are multiple Gateway devices.
Smartphone can also work as a basic IoT gateway when we use multiple radio technologies like WiFi,
Bluetooth, Cellular network of smart phone to work on any IoT project in sending and receiving data at that
time this also acts as a basic IoT Gateway.
Key functionalities of IoT Gateway
• Establishing communication bridge
• Provides additional security.
• Performs data aggregation.
• Pre-processing and filtering of data.
• Provides local storage as a cache/ buffer.
• Data computing at edge level.
• Ability to manage entire device.
• Device diagnostics.
• Adding more functional capability.
• Verifying protocols.
Working of IoT Gateway
• Receives data from sensor network.
• Performs Preprocessing, filtering and cleaning on unfiltered data.
• Transports into standard protocols for communication.
• Sends data to cloud.
IoT Gateways are key element of IoT infrastructure as Gateways establish connection for communication and
also performs other task as described above. So IoT Gateway is one of most essential thing when we start
think about an IoT ecosystem.
The art and science of IoT gateway architecture
Device layer - IoT gateway hardware comprises a microprocessor or controller depending on processing
speed and memory required, a connectivity module (cellular, Wi-Fi, Bluetooth, etc.), IoT sensors, and
circuitry.
Operating system – The OS is software that runs gateway hardware and other programs on the
device. Choice of an OS such as Java, Linux, RTOS, etc., depends on the gateway's application.
Hardware abstraction – The abstraction layer allows the software to be developed and controlled
independently of the hardware. This adds flexibility and agility to application design and makes software
updates and evolution easier.
Sensor and actuator drivers – This layer serves as the interface between the device and sensors and modules.
Specific stacks are integrated depending on what the application demands.
Device management and configuration – IoT gateways need to keep track of all the connected devices and
sensors it communicates with. This layer tracks and manages the configurations, settings, and properties of
sensors and connected devices within its ecosystem.
Security – Security is a key consideration in gateway architecture. This layer ensures that gateways have
trusted identities, strong encryption, and crypto authentication schemes. It provides a secure boot to protect
devices from intrusion and ensure data integrity and confidentiality.
Firmware Over the Air Updates – Keeping device firmware updated and enabling security patches and fixes
to defend against ever-evolving threats is paramount to maintaining device integrity. This layer ensures that
Firmware Over The Air (FOTA) updates are managed securely and efficiently to preserve device memory,
power, and network bandwidth.
Communication protocols – IoT gateway protocols are selected according to the amount and frequency of
data communicated to the cloud. Gateways need to connect via a cellular module (5G/4G/3G), Ethernet, and/or
Wi-Fi, but the underlying communication protocol layer is typically TCP IP protocol.
Data management – IoT gateways manage data from sensors and connected devices and data coming from
the cloud. The data management layer controls streaming, filtering, and data storage, and it provides data
traffic control to minimize delays and ensure device fidelity.
Cloud connectivity manager - This layer is responsible for seamless, secure connectivity with cloud platforms
and device and cloud authentication.
Custom software applications - IoT gateways integrate custom software to manage specific application
needs. This layer interacts with all other layers to efficiently, securely, and efficiently manage data needs
specific to the IoT application.
Gateway data transfer – This layer controls the gateway’s connection to the Internet using either a
5G/4G/3G/GPRS modem or IoT module, ethernet, or Wi-Fi. It also analyses and determines which data needs
to be communicated to the cloud and which data should be cached for processing offline to save processing
power and data plan fees.
----***----***----***----