IoT - Module 3
IoT - Module 3
Module 3
Syllabus
Things in IoT
Sensors
Sensors are fundamental building blocks of IoT networks. They are the foundational elements
in smart objects. “Smart objects are any physical objects that contain embedded technology to
sense and/ or interact with their environment in a meaningful way by being interconnected and
enabling communication among themselves or an external agent”.
Definition: A Sensor measures some physical quantity and converts that measurement
reading into a digital representation which is typically passed to another device for
transformation into useful data that can be consumed by intelligent devices or humans
Nowadays, sensors can measure anything worth measuring. This makes the physical world an
incredibly valuable source of information. Sensors can be readily embedded in any physical
objects that are easily connected to the internet, thus facilitating intelligent decision-making.
Sensor classification/ categories [AICAAHW - AIT, CAA, Home Minister]
1. Active or Passive: Sensors can be categorized based on whether they produce an
energy output and require an external power supply (active) or whether they simply
receive energy and require no external power supply (passive)
2. Invasive or non-invasive: Sensors can be categorized based on whether the sensor is
part of the environment it is measuring or external to it
3. Contact or no contact: Sensors can be categorized based on whether they require
physical contact with what they are measuring or not
4. Absolute or relative: Sensors can be categorized based on whether they measure on an
absolute scale or relative scale
5. Area of application: Sensors can be categorized based on the vertical where they are
being used
6. How sensors measure: Sensors can be categorized based on the physical mechanism
used to measure sensory input (electric, optic, thermoelectric)
7. What sensors measure: Sensors can be categorized based on what physical variables
they measure
8. Sensors can also be classified based on material, cost, design, and other factors
Sensor types (Based on what is being measured) [Fahadh Faasil goes to TCB, looks left and
right, then up, sees POP, and thinks I will first Verify: FAHTCBLRPOPFV]
Velocity and Velocity sensors measure speed of motion, either linear Accelerometer
Acceleration or angular. Acceleration sensors measure changes in
velocity
Actuators
Actuators are natural complements to sensors. Actuators receive some type of control
signal (electrical or digital) that triggers a physical effect, usually some type of motion,
force, and so on. Parallels can be drawn between the working of sensors, actuators, and humans.
The interaction between sensors, actuators, and processors and the similar functionality in
biological systems is the basis for various technical fields. Eg: Sipping very hot coffee
Analogy - Sensors: Human Sensory organs; Microprocessor - Brain; Actuators: Legs and Hands
Actuators can be classified based on: [BPAME: BP for AMD+1 processors]
1. Type of motion: Actuators can be classified based on the type of motion they produce
(linear, rotary, one/two/three-axes)
2. Power: Actuators can be classified based on their power output (high power, low power,
micropower)
3. Binary or continuous: Actuators can be classified based on the number of stable-state
outputs
4. Area of application: Actuators can be classified based on the specific industry or
vertical where they are used
5. Type of energy: Actuators can be classified based on their energy type
a. Mechanical Actuators: Lever, Screw jack
b. Electrical Actuators: Diode, Transistor
c. Electromechanical Actuators: AC Motor, DC Motor, Stepper Motor
d. Electromagnetic Actuators: Electromagnet
e. Hydraulic and Pneumatic Actuators: Pressure control valves
f. Smart material Actuators: Shape memory alloy (SMA)
g. Micro and Nano Actuators: Microvalve
Smart Objects
Smart objects are the building blocks of IoT. The real power of smart objects in IoT comes
from being networked together. This ability to communicate over a network has a
multiplicative effect and allows for very sophisticated correlation and interaction between
disparate smart objects. In precision farming, we can integrate sensors and actuators to make
intelligent decisions. Extending this even further, if a coordinated sensor/actuator set is
intelligently interconnected with other sensor/actuator sets, intelligent automation can be
achieved. Smart objects revolutionize an existing IoT system.
Definition: A smart object is a device that has at a minimum four defining characteristics -
Processing unit, Sensor (s) and/or actuator (s), Communication device, and Power source
1. Processing unit: A smart object has some type of processing unit for acquiring data,
processing and analyzing information received by the sensors, coordinating control
signals to actuators, controlling various aspects of communication and power
systems. The most commonly used processing unit is a Microcontroller because of its
small form factor, flexibility, programming simplicity, low cost, and low power
consumption.
2. Sensor (s) and/or Actuator (s): A smart object is capable of interacting with the
physical world through sensors and actuators. A sensor measures its environment,
whereas an actuator is able to produce some change in the physical world.
3. Communication device: The communication unit is responsible for connecting a smart
object with other smart objects. Communication devices can be wired or wireless,
although wireless is preferred because of the cost and ease of deployment.
4. Power Source: Smart objects have components that need to be powered. The most
significant power consumption comes from the communication unit. Typically, smart
objects are limited in power, are deployed for a very long time, and are not easily
accessible. This makes most smart objects rely on battery power. Some of the crucial
design elements herein are Power efficiency, Judicious power management, sleep modes,
ultra-low power consumption hardware, and so on.
Sensor Networks
[SANET - What?, Example, Why Wireless?, Design Constraints, Data Aggregation]
SANET (Sensor/Actuator network) is a network of sensors that sense and measure their
environment and/or actuators that act on their environment. Effective and well-coordinated
communication and cooperation is a prominent challenge as sensors and actuators in SANETs
are diverse, heterogeneous, and resource-constrained. Eg: Smart Home. Smart homes can
have temperature sensors that are strategically networked with HVAC actuators. When a
sensor detects a specified temperature, this can trigger an actuator to take action and heat or cool
the home as needed.
Advantages of wireless-based solution:
1. Greater deployment flexibility
2. Simpler Scaling to a large number of nodes
3. Lower implementation costs
4. Easier long-term maintenance
5. Effortless introduction of new sensor/ actuator nodes
6. Better equipped to handle topology changes
7. Wireless allows much greater flexibility, is inexpensive, and is reliable which is why
SANETs are the ubiquitous networking technology for IoT
Disadvantages of wireless-based solution
1. Potentially less secure
2. Lower transmission speeds
3. A greater level of impact by environment
Communications Criteria
The criteria used in evaluating wireless access technologies are
Range: Range defines how far the signal will be propagated
1. Short range: Short range supports tens of meters of maximum distance between two
devices. Eg: Serial cable, Bluetooth
2. Medium range: The main category of IoT access technologies; supports a range of tens
to hundreds of meters. Examples of medium-range wireless technologies include IEEE
802.11 and Wi-Fi.
3. Long range: Distances greater than 1 mile between two devices require long-range
technologies. Eg: Cellular (2G, 3G, and 4G) and LPWA (Low power wide area).
LPWA technologies have the ability to communicate over a large area without consuming
much power.
Some of the challenges in selecting a range are environmental factors such as interference and
noise, specific product characteristics such as antenna design and transmit power, potential
landscape and topology changes such as new buildings.
Frequency Bands: ITU and FCC define the regulations and transmission requirements for
various frequency bands. The spectrum for various communications uses is viewed as a critical
resource. The frequency bands are mainly split into licensed and unlicensed bands.
1. Licensed bands: Licensed spectrum is generally applicable to IoT long-range access
technologies. Licensed spectrum requires users to subscribe to services by paying
subscription fees. This adds more complexity when deploying a large number of sensors.
But in exchange for subscription fees, frequency usage is exclusive here, and thus offers
a better guarantee of service. Eg: Cellular, WiMAX.
2. Unlicensed bands: Unlicensed spectrum is mainly defined for ISM (Industrial,
Scientific, Medical) portions of the radio bands. Mainly used for Short range devices.
Since it is unlicensed, no guarantees or protections are offered in the ISM bands for
device communications. An unlicensed band is not unregulated. There are regulations
and compliances on transmit power, duty cycle, and so on. Unlicensed spectrum is
simpler to deploy as it does not require a service provider. However, it can suffer from
interference. The well-known ISM bands are
a. 2.4 GHz - Wi-Fi
b. IEEE 802.15.1 Bluetooth
c. IEEE 802.15.4 WPAN
Some communications within the ISM bands operate in the sub-GHz range. These bands have
better ability than 2.4GHz ISM band to penetrate building infrastructures. The limitation is the
lower rate of data delivery.
Power Consumption
A powered node has a direct connection to a power source, and communications are usually not
limited by power consumption. However, ease of deployment and mobility is limited by the
availability of the power source.
Battery-powered nodes bring flexibility to IoT devices. These nodes are often classified by the
required lifetime of their batteries. Battery-powered nodes are often placed in sleep mode to
preserve battery life. Topology type and the role of nodes in the topology plays a significant role
in the design of battery-powered nodes.
IoT wireless technologies must address the need for low power consumption and connectivity for
battery-powered nodes. This has led to the evolution of a new wireless environment known as
Low-Power Wide-Area [LPWA]
Topology
The three main topology schemes are:
1. Star Topology
a. Star topology is where all sensor nodes communicate to a central hub/access
point (i.e. a gateway)
b. Suitable for long and short range, Eg: Cellular, Bluetooth
c. Adheres to one-hop, point-to-point connection, making it much simpler and
less expensive to implement compared to mesh topology. Network security also
increases, as endpoints operate independently of each other; if a node is attacked,
the rest of the network still remains intact.
d. The primary disadvantage of star topology is that the network footprint is
limited to the maximum transmission range between devices and the gateway.
2. Mesh Topology
a. In mesh networks, a message hops from one device to another in order to
reach its destination (e.g. a gateway). A sensor node serves as both an
endpoint that captures and transmits its own data as well as a repeater that relays
data from other nodes. In a partial mesh network, only selected nodes have the
repeater/relaying function and are connected with more than one other node,
while in a full mesh network, all nodes are homogeneous and fully interconnected
to each other.
b. Mesh networks have a self-healing capability as data can be re-routed using
another path if one repeater node fails, thereby enhancing robustness
c. Mesh networks are complicated to set up, manage and maintain. They are also
expensive and consume high power.
d. Commonly used for medium-range technologies
3. Peer-to-Peer
a. In Peer-to-Peer topology, the devices connect with each other in a workgroup
to share files, and access to internet and printers
b. Each node in the network has the same set of responsibilities and capabilities
c. Each device in the network serves as both a client and server
Constrained devices
Constrained nodes have limited resources that impact their networking feature set and
capabilities. Classes of constrained nodes are as follows:
1. Class 0: Severely constrained nodes with less than 10 KB of memory and less than 100
KB of flash processing and storage capability; battery powered; do not have resources
to implement an IP stack. Eg: Push button
2. Class 1: 10 KB of RAM and approximately 100 KB flash; Optimized stack
implementation is possible such as CoAP. Eg: Environmental sensors
3. Class 2: More than 50 KB of memory and 250 KB of flash; Capable of running full
implementation of an IP stack. Eg: Smart power meter
Constrained-Node Networks
Constrained-node networks are often referred to as low-power and lossy networks (LLNs). Low
power refers to the fact that nodes must cope with the requirements of power-constrained
nodes while lossy networks indicate network performance subjected to interference and
variability due to harsh radio environments. Some of the characteristics used in evaluating
Constrained-node networks in relation to IoT applications are
1. Data rate and throughput: The data rate is the theoretical value that a system can
achieve, considering no losses or interference. However, in the real world, there will be
interference and losses which will result in a lower bit rate. The throughput can be seen
as a practical value that the wireless link can achieve. IoT access technologies developed
for constrained nodes are optimized for low power consumption and are limited in terms
of data rate.
2. Latency and determinism: Latency expectations of IoT applications should be known
when selecting an access technology. On constrained networks, latency may range from a
few milliseconds to seconds. The delay between when an instruction is received and
when it executes is known as latency. Determinism is knowing exactly when an
instruction will execute. Eg: If your system is providing information to a pilot who needs
to make decisions in only tens of milliseconds, you certainly want to reduce any delays in
the information chain. However, in instances where users don’t need to make real-time
decisions, then some latency may not be an issue.
3. Overhead and payload: A packet generally consists of a header and then the
payload. “Payload” refers to the data itself being transferred. The "header" contains
various things depending on the protocol being used, for example, UDP contains just
simple things in the header like Destination and Source IP/PORT, whereas TCP on the
other end contains more things like the sequence number of the packet to ensure
ordered delivery, a lot of flags to ensure the packet is actually received in the destination
and checksum of the data to make sure it didn't get corrupted and is received correctly in
its destination. The "overhead" part is actually the additional data that you need in
order to send your payload. It is the header part, as it is added to every payload. TCP
has a bigger overhead than UDP because it needs to add more data to the payload, but
there is a guarantee that data will be received in the destination in the order it was sent
without getting corrupted. UDP does not have this feature.
Protocol Description
6LoWPAN IPv6 adaptation layer promoted by IETF 6LoWPAN working group that
describes how to transport IPv6 packets over IEEE
ZigBee IP Adopts 6LoWPAN adaptation layer, IPv6 network layer, and RPL routing
protocol
Thread Thread is a protocol stack for a secure and reliable mesh network to
connect and control products in the home
ZigBee
ZigBee has wide industry support with ZigBee alliance group certifying interoperability
between vendors. ZigBee solutions are aimed at smart objects and sensors that have low
bandwidth and low power needs. The ZigBee specification has undergone several revisions.
The sets of commands and message types supported in ZigBee are called clusters. Clusters from
different functional domains form the building blocks of ZigBee application profiles. The main
areas where ZigBee is the most well-known include automation for commercial, retail, and
home applications, and smart energy.
The traditional ZigBee stack is shown below:
ZigBee utilizes the IEEE 802.15.4 standard at the lower PHY and MAC layers. ZigBee
specifies the network and security layer and application support layer that sits on top of the lower
layers. The ZigBee network and security layer provide mechanisms for network startup,
configuration routing, and secure communications. This includes calculating routing paths
in what is often a changing topology, discovering neighbors, and managing the routing tables
as devices join for the first time. The network layer is also responsible for forming the
appropriate topology. ZigBee utilizes 802.15.4 for security using AES with a 128-bit key. The
application support layer interfaces the lower portion of the stack with higher-layer
applications.
This structure has provided a fair degree of interoperability for vendors with membership in the
ZigBee alliance, but not with other IoT solutions. ZigBee IP looks to address this issue.
ZigBee IP
Herein, the support of IEEE 802.5.4 continues, but the IP and TCP/UDP protocols are now
supported at the network and transport layers. ZigBee-specific layers are now found only at the
top of the protocol stack for the applications. ZigBee IP was created to embrace open
standards and is suitable for low bandwidth, low power, and cost-effective communications
when connecting smart objects. ZigBee Ip was designed specifically for SE (Smart Energy)
2.0.
MAC Layer
The IEEE 802.15.4 MAC layer manages access to the PHY channel by defining how devices
in the same area will share the frequencies allocated. At this layer, the scheduling and routing
of data frames are also coordinated. The 802.15.4 MAC layer performs the following tasks:
1. Network beaconing for devices acting as coordinators
2. PAN association and disassociation by a device
3. Device Security
4. Reliable link communications between 2 peer MAC entities
The MAC layer achieves these tasks by using various predefined frame types
1. Data frame: Handles all transfers of data
2. Beacon frame: Used in the transmission of beacons from a PAN coordinator
3. Acknowledgment frame: confirms the successful reception of a frame
4. MAC command frame: Responsible for control communication between devices
802.15.4 MAC Frame
The 802.15.4 MAC frame can be broken down into the following fields
1. MAC Header
a. Frame control: Defines frame attributes such as frame type
b. Sequence number: Indicates the sequence identifier for the frame
c. Addressing fields
i. Destination and Source PAN identifier
ii. Destination and Source address
2. MAC Payload: Varies based on individual frame type
3. MAC Footer: Facilitates Frame check sequence (FCS); FCS is a calculation based on
the data in the frame that is used by the receiving side to confirm the integrity of the
data in the frame
Topology
IEEE 802.15.4 based networks can be built as a star, peer-to-peer, or mesh topologies. Every
802.15.4 PAN should be set up with a unique ID. All the nodes in the same 802.15.4 network
should use the same PAN ID.
A minimum of one FFD acting as a PAN coordinator is required to deliver services that allow
other devices to associate and form a cell or PAN. FFD devices can communicate with any other
devices, whereas RFD devices can communicate only with FFD devices.
The IEEE 802.15.4 does not define a path selection within the MAC layer. This can be done
using mesh-under or mesh-over.
Security
The IEEE 802.15.4 uses AES with a 128-bit key length as the base encryption algorithm. AES
is a block cipher, meaning it operates on fixed-size blocks of data. A symmetric key means
the same key is used for both encryption and decryption. AES also validates the data that is
sent by employing a message integrity code (MIC).
Enabling security features for 802.15.4 changes the frame format slightly and consumes
some of the payloads as shown in the below figure.
Using the security-enabled field in the frame control portion of the 802.15.4 header is the first
step to enabling AES encryption. This field is a single bit that is set to 1 for security. Once this
is set, the Auxiliary security header field is created after the source address field by stealing
some bytes from the payload field.
Competitive technologies
A competitive radio technology that is different in its PHY and MAC layers is DASH7. DASH7
was originally positioned for industrial applications and is commonly employed in RFID
implementations. The current DASH7 technology offers low power consumption, a compact
protocol stack, a range of up to 1 mile, and AES encryption. DASH7 is promoted by the DASH7
alliance.