Internet of Things Notes Typed1
Internet of Things Notes Typed1
Contents
1 Introduction 3
1.1 What is an IoT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Ubiquitous Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1
12 Data Management 12
12.1 Managing M2M Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2
1 Introduction
1.1 What is an IoT?
• It was previously called Ubiquitous Computing.
• IoT contains things that have unique identities and are connected to the Internet. They use the Internet
to send and receive information.
• An object can receive inputs from the world and transform the inputs into data which is sent onto the
Internet for processing.
3
3.2 Reasons for Using M2M and IoT:
1. An increased need for understanding the physical environment.
2. The improvement of technology.
• M2M Application: It is the realization of a highly specific monitor and control process. It is
integrated into the business process system of the enterprise.
• Metering Applications: Used for remote meter management and data collection for gas, energy,
and water consumption.
• Remote Monitoring: Sensors are attached to assets to track and monitor them in real-time. For
example, we have remote patient monitoring.
• Fleet Management: Track the path through which vehicles go. Used for goods and vehicle position-
ing and security of valuable or hazardous goods.
• Security: Used for home and business security alarms.
• ATM / Point of Sales: These devices are connected to a centralized secure environment.
4
4 Applications of Internet of Things
1. Urban Agriculture: Sensors and actuators can monitor and control the environment around a plant
and modify the conditions in the environment based on the needs of the plant. Monitor weather and
light. Crop monitoring, livestock monitoring, and smart irrigation systems. IoT can also be used to
create automatically-triggered blinds in order to shield the plant from excessive UV.
2. Robots: Remotely monitor and control mine sites. Monitor and control heavy machinery, which
reduces accidents involving humans.
3. Food Safety: Monitor farming conditions, such as usage of pesticides and quality of animal food.
4. Military: Autonomous drones for surveillance. Sensors for night vision and thermal imaging. Tracking
military assets, such as vehicles and weapons. Wearable devices to monitor the soldiers’ vitals.
5. Sports: Wearable devices for measuring heart rate, hydration, and movement patterns. Telemetry in
F1 cars for monitoring fuel levels, tire pressure, and engine performance.
• Social Internet of Things (SIoT): Devices can form social networks with each other to collaborate
and share information. There can be a parental object relationship (devices that belong to the same
owner or administrator, such as all the smart devices in a home) or a co-location object relationship
(devices in the same location, such as the devices in a shared office space).
• Internet of Nano Things (IoNT): Nano-sensors to detect minute quantities of chemicals. Nano-
actuators to deliver drugs to specific cells or trigger chemical reactions. Monitor soil conditions and
crop health.
5
3. M2M is a subset of IoT. IoT is a superset of M2M.
4. In IoT, the data can be shared with other external applications to improve the user experience. On
the other hand, in M2M, the data is only shared with the communicating devices.
5. IoT involves the usage of both hardware and software, whereas M2M is mostly hardware-based.
6. IoT devices have high intelligence and interactivity capabilities, which allow them to process data,
make decisions, and respond to changes in the environment. On the other hand, M2M devices have
limited intelligence; they only focus on exchanging data or commands.
7. IoT devices deal with large volumes of data, which requires sophisticated analysis and processing
capabilities. On the other hand, M2M involves simpler data exchange, which requires less complex
data handling.
8. Some applications of IoT are smart thermostats, security cameras, wearable devices, and remote mon-
itoring systems for healthcare. Some applications of M2M are telemetry services in vehicles, smart
meters for tracking energy consumption, and the technology in smartphones that allows them to send
heartbeat data to your smartphone and receive texts and notifications.
• Both M2M and IoT involve embedded systems with sensors, actuators, and micro-controllers.
• In both M2M and IoT, the devices collect, transmit, and receive data.
• They both support remote control and management.
6
• Climate Change and Environmental Impacts: IoT, along with other technologies, can be used
to reduce the impact of human activity on Earth.
• Safety and Security: Technology can be used to reduce fatalities, improve health, and prevent crime.
• Urbanization: There is an increase in urban population, so there is a higher demand for city infras-
tructures. IoT provides support for decision-makers in cities.
• Material Sciences: It has an impact across a vast range of industries, from pharmaceutical and
cosmetics to electronics. Microelectromechanical systems (MEMS) can be used to create advanced
micro-sized sensors, such as accelerators and gyroscopes. There are a lot of new materials which
provide different methods to manufacture sensors and actuators. So, there is an increase in the range
of applications of sensors.
• Complex and Advanced Machinery: They can be autonomous or semi-autonomous. Robots can
be used in harsh environments, such as deep sea exploration and mining industry. They automate the
tasks that are normally performed by humans.
• Energy Production and Storage: Secure the availability of electricity while reducing the environ-
mental impacts. Smart Grids involve the micro-generation of electricity using affordable photovoltaic
panels. EVs require efficient battery and energy storage technologies. IoT can be used in scenarios
that require a long battery life.
• Big Data: There is an increasing number and size of datasets. With Big Data, we can aggregate the
massive data that is produced by IoT devices and sensors.
7
9 M2M To IoT - An Architectural Outline
• Architecture refers to the conceptual and actual elements, how they relate to each other, and the
principles of design.
• Conceptual Elements: Functions, Piece of Data, or Service.
• Actual Elements: Technology Building Blocks or Protocols.
• Resource Layer: This layer provides the main functional capabilities of sensing, actuation, and
embedded entities. Examples are the sensors and actuators in smartphones and M2M devices like
smart meters.
• Communication Layer: This layer provides connectivity between the resources on one end and the
computing infrastructure that hosts and executes the service support logic and the application logic
on the other end. Can use LAN or WAN.
• Service Support Layer: This layer provides support services that can handle the underlying devices
and network while hiding the complexities of the resource and communication layers. These services are
executed in data centers and server farms. An example is remote device management, which performs
remote software upgrades, remote diagnostics, and remote recovery.
• Data and Information Layer: This layer captures knowledge and provides advanced control logic
support. It focuses on the organization of information.
• Application Layer: This layer provides the specific IoT applications. For example, we have smart
metering in Smart Grid, vehicle tracking, and building automation.
• Business Layer: This is the final level. This layer supports the business or operations of organizations
that are interested in IoT applications. Here, the IoT applications are integrated into the business
processes.
• We also have 3 functional groups across the different layers, which are Security, Management, and IoT
Data and Services.
8
11 Chapter 5: M2M and IoT Technology Fundamentals
11.1 Devices and Gateways
A device has several properties, which are listed below:
• Micro-controllers: An 8-, 16-, or 32-bit working memory and storage.
1. Basic Devices: Devices that provide basic services of sensing and actuation. They may have limited
support for user interaction. LAN communication is provided through wired or wireless technology, so
a gateway is needed to provide the WAN connection.
2. Advanced Devices: Devices that also host the application logic and a WAN connection. They
may also feature device management and execution environments for hosting multiple applications.
Gateways fall in this category.
9
– Home Alarms: Such as motion, magnetic, and smoke detectors. A central unit handles the
application logic that calls security and sounds an alarm if a sensor is activated. The central unit
also handles the WAN connection towards the alarm.
– Smart Meters: Measure the consumption of electricity and gas in households. There is a
concentrator gateway that collects the data, performs aggregation on it, and sends the aggregated
data to a server over a cellular connection.
– Building Automation Systems: Devices such as thermostats, fans, boilers, and motion detec-
tors that are controlled by local facilities.
– Standalone Smart Thermostats: They use Wi-Fi to communicate with web services.
• Example deployment scenarios 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 au-
tonomously or by remote control using a cellular connection.
– Video Cameras: For remote monitoring over a cellular network,
– Oil Well Monitoring and collection of data points from remote devices.
– Connected Printers that can be upgraded and serviced remotely.
• The devices and gateways today use legacy technologies, such as ZigBee. Still, ideally, in the future,
they should all have an IP address and be directly or indirectly connected to the Internet.
• They also focus on enabling battery as a power source, with a lifespan of 1 year and upwards, by using
ultra-low energy microcontrollers.
• The microcontroller has several ports that allow it to be integrated with sensors and actuators.
• Since low-power operation is needed for battery-powered devices, the microcontroller has functions
that allow it to sleep and interrupt in case of events.
11.5 Gateways
• A gateway serves as a translator between different protocols.
• There are many different gateways that can work on different levels of the protocol layers.
• Most often, a gateway refers to a device that performs translation of the physical and link layer, but
application layer gateways are also common.
• An example of an application layer gateway is ZigBee Gateway Device, which translates from ZigBee
to SOAP and IP.
10
• Gateways can also be used for the inclusion and exclusion of devices. First, the gateway is activated
into inclusion or exclusion mode. Then, a button is pressed on a device to be added or removed from
the network.
• An IoT gateway is a centralized hub that connects IoT devices to cloud-based computing and data
processing. They allow the bidirectional flow of data between the cloud and IoT devices.
• Gateways are also used for data management, device management, and local applications.
• In a simple deployment, the devices communicate directly with the Device Management (DM). How-
ever, this is not optimal due to network and protocol constraints. In such cases, gateway functions act
as a mediator between the server and the devices.
• The gateway functions can act in three different ways:
1. If the devices are visible to the DM server, then the gateway simply forwards the messages between
them.
2. If the devices are not visible to the DM server but understand the protocol that is being used,
then the gateway acts as a proxy; that is, it acts as a DM server for the device and as a DM client
for the server.
3. If the devices use a different DM protocol than the server, the gateway translates between the
different protocols.
• An execution environment is also included, which manages the lifecycle of the applications, such as
installation, pausing, stopping, configuration, and uninstallation.
11
11.7 Local and Wide Area Networking
• A network is created when two or more computing devices exchange information with each other.
• The devices are the ”nodes” of the network, and they communicate over ”links”.
• So, node B should be able to communicate with both node A and node C. It should also advertise that
it can act as an intermediary.
• Each node in a network is identified by an IP address, and the links are managed using routing tables.
• A Local Area Network (LAN) covers a small geographical region, such as a commercial building, an
office block, or a home. LANs cover distances of tens to hundreds of meters. The most popular wired
LAN technology is Ethernet. The most popular wireless LAN technology is Wi-Fi.
• A Wide Area Network (WAN) covers longer distances, such as regional areas or metropolitan
locations. WANs cover distances of tens to hundreds of kilometers. The most popular WAN technology
is the cellular network.
12 Data Management
Some of the key characteristics of M2M data include:
• Big Data: Huge amounts of data are generated, capturing the entire processes where the devices are
involved.
• Heterogeneous Data: The M2M data is generated by various different devices and is highly hetero-
geneous.
• Real-World Data: The M2M data relates to real-world processes and is dependent on the environ-
ment they interact with.
• Real-Time Data: The M2M data is generated in real-time.
• Temporal Data: The majority of M2M data is of temporal nature.
• Spatial Data: The assessment of M2M data may vary dynamically based on the location.
• Polymorphic Data: The data used by M2M processes is complex and may have different meanings.
• Proprietary Data: Most M2M data is stored and captured in proprietary formats.
• Security and Privacy Data Aspects: The analysis of M2M data has a risk of leaking private
information.
12
12.1 Managing M2M Data
Dealing with M2M data can be decomposed into several stages, which are described below.
1. Data Generation: This is the first stage. Here, data is generated actively or passively from the
device, system, or as a result of its interactions. Not all the generated data is communicated; in some
cases, the data is assessed and discarded, and the results are communicated.
2. Data Acquisition: This stage deals with collecting the data, either actively or passively, from the
device, system, or as a result of its interactions. The data acquisition systems communicate with the
devices over wired or wireless links to acquire the needed data. The nature of acquisition varies; it can
be continuous monitoring, interval-poll, or event-based. The data acquired can be different from the
data generated since the devices may perform filtering.
3. Data Validation: Here, the acquired data is checked for correctness and meaningfulness. This is
done using rules, semantic annotations, or other logic. If the acquired data does not conform to the
expectations, it means that it was corrupted during transmission or is not related to the current context.
Here, fallback actions can be used, where the data is requested again if the checks fail. It may also try
to repair the data.
4. Data Storage: The data generated by M2M interactions is referred to as Big Data. The machines
generate large amounts of data that need to be captured and stored for further processing. Due to
the large size, only a fraction of the data that is relevant to the current context may be stored. Due
to the large amounts of M2M data, specialized technologies may be used, such as parallel processing
databases, distributed file systems, and cloud computing platforms.
5. Data Processing: Here, the data is operated at a low level and enhanced for future needs. This
includes normalization, filling in missing values, and re-ordering the data. Aggregation may also be
performed on two or more data streams. It also includes transformations, such as converting from
Celsius to Fahrenheit.
6. Data Remanence: When the data is removed, some residues may still be found, which are known as
data remanence. To deal with this, overwriting, degaussing, encryption and physical destruction can
be performed.
7. Data Analysis: The data that is available in the repositories is analyzed to obtain information and
use it in the decision-making processes. Descriptive statistics, exploratory data analysis, confirmatory
data analysis, and data mining can be used.
13
– There are two sensor nodes, the Public Bin Level Monitoring Unit (PBLMU) and the Home Bin
Level Monitoring Unit (HBLMU). They are used for monitoring the trash bins in public places
and residential areas, respectively.
– A LoRaWAN networking architecture is used for deploying the PBLMUs, and Wi-Fi-based com-
munication is used for HBLMUs since these trash bins are associated with homes.
– The data from the PBLMUs are collected by the LoRaWAN gateway and uploaded to the server
for storage and visualization. A Wi-Fi module is integrated in the HBLMUs that allows them to
be connected with the home routers and upload the data to the server.
– The data is published into the server through the MQTT broker, which follows a publish-subscribe
architecture. The PBLMUs and HBLMUs are the publishers, and the server is the subscriber.
– MQTT protocol is attractive because it has low power consumption, rapid data transmission, and
ease of implementation.
– Through the GUI, the personnel can monitor the data.
• Design of the PBLMU:
– It has an ultrasonic sensor and a GPS module. It also has a LoRa module to connect with the
LoRaWAN gateway.
– A power management unit is included to provide a voltage supply to all the components.
– A solar panel is attached for energy harvesting and self-powering.
– Ultrasonic Sensor: Generates high-frequency sound waves and evaluates the received echo.
– GPS Module: This module provides the geolocation coordinates for easy localization by the
garbage trucks. It is in a power-saving mode to minimize the power consumption.
– LoRa Module: Used to send data over long distances using minimal power.
– Host Microcontroller: Controls all the functions of the PBLMU. Uses a RISC-based architec-
ture.
– Power Management Unit: Sensor requires 5 V voltage, and the other components require 3.3
V voltage. This unit includes a solar panel, a battery, and a circuit for energy harvesting and
battery charging.
– LoRaWAN Gateway: Gathers data, wraps it in a JSON format, and transmits it to the
Ethernet controller. The Ethernet controller adds a UDP header to the packets and sends them
to the server.
• Design of the HBLMU:
– Wi-Fi Module: Has an ARM Cortex Microcontroller. Supports DNS, UDP, HTTP, and HTTPS.
– Home Router: Establishes connectivity between the central monitoring station and the sensing
nodes in the HBLMU.
14
• Reinforcement Learning techniques are used, where the RL agent learns the best control policy by
collaborating with the environment.
• The observations at each intersection are distributed to obtain an optimal global schedule for the whole
system.
• Shiraz is one of Iran’s most crowded cities, with 63 junctions. Here, the traffic light systems use a
predefined schedule, which causes increased waiting time, fuel consumption, and pollution.
• An area with 6 intersections and 4 bridges was chosen because it has high traffic congestion.
• Multi-Agent RL (MARL) was used, which overcomes the scalability issues of RL. So more intersections
can be controlled. Distributed MARL was installed in the traffic light system so that an RL agent was
located at each intersection. IoT sensors (surveillance cameras) were used to capture the queue lengths
of the vehicles. The RL agent gathered local traffic data tracked by these cameras and stored it in an
IoT database.
• The RL agents also gathered information from neighbors by exchanging information. Neighbor data
was also kept in the same database.
• Based on the data in the database, the actor-critic algorithm selects the most optimal control action,
and the IoT actuator, such as a traffic light, applies the selected action to the environment.
15