Professional Documents
Culture Documents
IoT TillMidsem 1
IoT TillMidsem 1
IoT TillMidsem 1
Introduction to IoT
Definitions, Characteristics, Applications
• Alternate Definition:
“The Internet of Things (IoT) is the network of physical objects that contain embedded
technology to communicate and sense or interact with their internal states or the external
environment.” – Gartner Research*
* https://www.gartner.com/en/information-technology/glossary/internet-of-things
Early 1980s at the Carnegie Melon University, a group of students created a way to get
their campus Coca-Cola vending machine to report on its contents through a network in
order to save them the trek if the machine was out of Coke.
In 1990, John Romkey, developer of the first TCP/IP stack for IBM PC in 1983,
connected a toaster to the internet for the first time.
In 1991, a group of students at the University of Cambridge used a web camera to report
on coffee available in their computer labs coffee pot.
At the beginning of the 21st Century, LG Electronics introduced the world’s first
refrigerator connected to the internet
Cost
Predictive
Automation Process / Reduction Improved/
Maintenance Adaptability
Efficiency New Insights
•Machines can •Continuous Improvement •When an
assemble parts with monitoring of organization can
more precision and systems and improve system •the ability to adapt
•process
speed, resulting in processes to identify uptime, automate •IoT systems often to new business
improvement affects
fewer errors during key indicators of processes, reduce act as the eyes and requirements,
every aspect of an
assembly problems before the risk of failure ears on remote, customer needs,
operation’s bottom
•Robots can very they result in and gain insights hard-to-reach, or and changing
line
rapidly detect faults downtime or system that support better widely distributed conditions, or scale
that may not be failure decision making, equipment and the deployment in
detected by the and reduce resource processes. response to business
human eye usage, the result is growth or customer
efficiency and cost requirements
savings
– WSN is primarily used for monitoring and recording the physical environment
conditions like temperature, sound, pollution levels, humidity, wind, and so on.
– In a WSN, there is no direct connection to the internet. Instead, the various sensors
connect to some kind of router or central node.
Smart Appliances
It’s everywhere!
Industry Automation
and Monitoring
Healthcare
02-08-2022 Dr. Manas Khatua 10
Global IoT Market Share
14% Smart Homes Retail < 2%
3%
Wearables Smart Utilities
& Energy
4%
7%
Industrial IoT
Connected Cars
24%
Source: https://iot-analytics.com/iot-market-size/
Source: https://depositphotos.com/126025652/stock-illustration-smart-city-concept-and-internet.html
Source: https://medium.com/@globalindnews/north-america-accounted-for-major-share-in-the-global-smart-home-healthcare-market-in-2015-cc9cc1974ac5
Source: http://iot.fit-foxconn.com/
Source: https://www.winmate.com/Solutions/Solutions_IoT.asp
Source: https://www.google.com/
Source: https://in.pinterest.com/pin/515380751093603767/?lp=true
Source: https://data-flair.training/blogs/iot-applications-in-agriculture/
Interoperability
• various protocol, various architecture
• unavailability of standardized platform
• different technology leads to interoperability issue
• Recent IoT standards are minimizing this problem
• Community components:
IoT Frameworks
• Tools needed to design and implement IoT-based solutions and products
IoT Architectures
• Graphical structure of the designed IoT-based solutions and products
IoT Core
• Sensors & Actuators, microcontrollers, internet connectivity, service platform including security
IoT Gateway
• It carries the responsibility to ensure bidirectional communication between IoT protocols and other networks
Cloud
• Accepts, accumulates, maintains, stores, and process data in real time
Analytics
• It indulges in conversion and analysis of data which results in recommendations and future decision making
– sensors, sensor systems, gateways, mobile app, embedded controller, data management
platform, analytical platform, and so on.
– support interoperability among all devices, provides secure connectivity, reliability in data
transfer, interface to 3rd party application to built on it, and so on.
Architecture is how you design (i.e. graphical structure) your application or solution.
• The practice of building single-purpose and “vertical” domain applications leads to isolated silos.
• Using the smart building use case, a security application can detect when nobody is in the building.
• It could then trigger lights to be switched off and for the air conditioning system to operate on a reduced setting.
Source: https://onem2m.org/using-onem2m/developers/basics
MQ135 - Air Quality Sound Detection DHT11 - Temperature PIR Motion Detector
Gas Sensor Sensor and Humidity Sensor Sensor
LED LCD
Linear Actuators
Source: Nick Lethaby “Wireless Connectivity for the IoT: one size does not fit all”, Texas Instruments, 2017
IEEE 802.15.4e -
2011 Amendment
Source: B. Kang, D. Kim, H. Choo, “Internet of Everything: A Large-Scale Autonomic IoT Gateway”,
IEEE Transactions on Multi-scale Computing Systems, vol. 3, no. 3, 2017, pp. 206-214.
Use of AI in IoT:
• Smart Home
– Automated HVAC control
• Industrial IoT
– Predictive maintenance
– Optimized supply chain
• Farming
– Smart farming
– Interruption warning
• Self-driving Car
– Mimic human driving on road
• Health
– Auto-diagnosing any disease
– Assistive healthcare
The business value of IoT is not just in the ability to connect devices, but it
comes from understanding the data these devices create.
Challenges:
Huge Volume
Real-time data flow
Variety of data types
e.g. XML, video, SMS
Unstructured data
Variable data model and
meaning / value
IoT analytics is the application of data analysis tools and procedures to realize
value from the huge volumes of data generated by connected IoT devices
Source:https://www.theguardian.com/technology/2016/oct/26/ddos-
attack-dyn-mirai-botnet Source:http://metropolitan.fi/entry/ddos-attack-halts-heating-in-
finland-amidst-winter
• Users can actively check and act in for their IOT system
Important
Characteristics:
Sleek design
Visually appealing
Interactive UI
Ease-of-use
Handy
Source: https://www.daikin.com/about/design/2017/05/entry-15
Source: https://www.youtube.com/watch?v=7E1WsdODxu0
Source: https://www.youtube.com/watch?v=4oONdV5RYp8
“The soil of India is my highest heaven, the good of India is my good.” – Swami Vivekananda
What is Arduino?
• Arduino is an open-source electronics platform
– based on easy-to-use hardware and software.
• It was born at the Interaction Design Institute Ivrea, Italy, as an easy tool for fast
prototyping
– aimed at students without any background in electronics and programming.
• It has the capability to act as an interface for electrical and electronic systems
Digital Input/output pin Digital Pins 2 - 13 Can be used as input or output pins.
Serial 0(Rx),1(Tx) Used to receive and transmit TTL serial data.
TWI: Two Wire Interface A4 (SDA: Serial Data), Used for TWI / I2C communication.
/ I2C: Inter-IC A5 (SCL: Serial Clock)
AREF AREF : Analog Reference To provide reference voltage for input voltage.
Voltage
• The Arduino Software (IDE) allows you to write programs and upload them to your board.
• When the Arduino IDE first opens, this is what you should see:
• Compilation
successful
message in
bottom left
corner.
Serial Monitor
output
• Output:
In-built LED will glow
continuously
• Output:
In-built LED will glow
continuously
• Output:
In-built LED will glow
periodically
OUTPUT:
LED connected with digital pin 9 will blink periodically.
Arduino in IoT
Arduino IDE
“If you want peace of mind, do not find fault with others. Rather learn to see your own faults.” – Ma Sarada Devi
Introduction
• The Arduino Software (IDE) allows you to write programs (i.e. sketches)
and upload them to your board.
• digitalWrite(pin, value)
– Used for output by using the LOW/HIGH logic level (i.e. 0V / 5V) digitalWrite(10,HIGH);
– value: LOW / HIGH
• analogRead(pin)
– Access and gets value from a particular Analog pin having 10-bit resolution (i.e. 10- val = analogRead(A3);
bit ADC)
– Returns: 0-1023 (integer)
– Arduino UNO yields a resolution between readings of: 5 volts / 1024 units. It will
map input voltages between 0 and the operating voltage(5V or 3.3V) into integer
values between 0 and 1023.
– The input range can be changed using analogReference()
• analogWrite(pin, value)
– Write the analog value (PWM wave) to a pin analogWrite(9, val / 4);
– value: it is the duty cycle value between 0 and 255 (as 6 pins).
– Note: analogRead values go from 0 to 1023, analogWrite values from 0 to 255
• Serial.begin( speed )
– It sets the speed in bps (baud rate) for serial data transmission Serial.begin(9600);
from computer to Arduino board
• Serial.available ()
– Returns: the number of bytes (characters) available to read
if (Serial.available() > 0) { }
• Serial.print( value )
– Print data to the serial port as human-readable ASCII text
Serial.print("I received: ");
– Numbers are printed using ASCII character for each digit
– Floats are printed as ASCII digits (upto 2 decimal places)
– Bytes are send as a single character
– Characters and Strings are sent as is.
• Trigonometry:
– cos()
– sin()
– tan()
• Math:
– abs()
– max()
– min()
– pow()
– sq()
– sqrt()
– random()
– randomSeed()
• Connection:
– Place the LED and resistor on breadboard
– Connect the digital out pin with Anode, and
ground with Cathode of the LED
– Connect the bradboard power with Arduino
– Connect the Arduino board with PC/Laptop
• Arduino Programming
– Install IDE in PC/Laptop
– Run the IDE
– Select the Arduino board in IDE
– Select the connected COM port
– Start writing new sketch
• OUTPUT:
LED connected with digital
pin 9 will periodically blink.
• Connection:
– Place the LED and resistor on breadboard
– Connect the bradboard power with Arduino
– Connect the LED with Arduino
– Connect the Arduino board with PC/Laptop
• Arduino Programming
– Install IDE in PC/Laptop
– Run the IDE
– Select the Arduino board in IDE
– Select the connected COM port
– Start writing new sketch
“We suffer as a result of our own actions; it is unfair to blame anybody for it.” – Ma Sarada Devi
UART
UART stands for Universal Asynchronous Receiver Transmitter
• one of the earliest modes of communication applied to computers
• its origin goes back at least as far as the 1960s
• called ‘universal’ because its parameters — speed, data size and so on — are not fixed
and can be configured, however, both side should agree
Baud rate is a measure of the speed of data transfer, expressed as symbol / sec.
Also represented by bit per second (bps).
Bit Rate = Baud rate x the number of bit per baud
Common baud rates: 9600, 4800, 19200, 38400, etc.
Both of these problems are solved in UART by using start and stop bits.
15-08-2022 Dr. Manas Khatua 5
UART Communication
UART Communication
• Communication may be simplex, full duplex, or half duplex
• Full Duplex: Devices can send and receive at the same time
• TX (transmission)
• RX (reception).
Start Bit:
• The UART transmission line is normally held at a high voltage level when it’s not transmitting data
i.e. idle
• It start bit is set to logic low as it is used to signal the receiver that a new framing is coming.
Data Frame:
• If one parity bit is used, then next 5-8 bits carry the “data bits” (information).
• Otherwise, data bits can be 5-9 bits
• Certainly, the standard data size is 8-bit byte, but other sizes have their uses.
• A 7-bit data chunk can be more efficient than 8, especially if you're just transferring 7-bit ASCII
characters.
15-08-2022 Dr. Manas Khatua 7
Cont…
Parity:
• It is an optional bit.
• It is used to detect the wrong data packets, i.e. error during transmission
• Two type of parity bit used: even parity, odd parity.
• Even parity:
• If the count of bits with value 1 is odd, the parity bit value is set to 1, making the total
count of occurrences of 1s in the whole set (including the parity bit) an even number.
• If the count of 1s in a given set of bits is already even, the parity bit's value is 0.
• Odd parity:
• the coding is reverse of even parity.
Stop Bits:
• To signal the end of the data packet, the sending UART drives the data transmission line from a low
voltage to a high voltage.
2. The transmitting UART adds the start bit, (even) parity bit, and stop bit(s) to the data frame:
Cont…
3. The entire packet is sent serially from the transmitting UART to the receiving UART. In most
cases, the data is sent with the least significant bit first.
The receiving UART samples the data line at the pre-configured baud rate:
4. The receiving UART discards the start bit, parity bit, and stop bit from the data frame:
Cont…
5. The receiving UART converts the serial data back into parallel and transfers it to the data bus
on the receiving end:
Note:
• For communication between the devices, both of them have to have same baud rate
• The baud rate between the transmitting and receiving UARTs can only differ by max 10%.
Use of Start bit
As time matters with asynchronous signals,
it is needed to send a "LISTEN UP" signal.
Source: https://electronics.stackexchange.com/questions/335695/why-the-start-bit-and-the-stop-bits-are-necessary
Source: https://electronics.stackexchange.com/questions/335695/why-the-start-bit-and-the-stop-bits-are-necessary
• A device transmitting the ASCII characters 'O' and 'K' would have to create two packets
of data.
• The ASCII value of O (that's uppercase) is 79, which breaks down into an 8-bit binary
value of 01001111, while K's binary value is 01001011
• Since we're transferring at 9600 bps, the time spent holding each of those bits high or
low is 1/(9600 bps) or 104 µs per bit.
• For every byte of data transmitted, there are actually 10 bits being sent: a start bit, 8
data bits, and a stop bit.
• So, at 9600 bps, we're actually sending 9600 bits per second or 960 (9600/10) bytes per
second.
15-08-2022 Dr. Manas Khatua 14
Advantages and Disadvantages
Advantages:
1) Well documented and widely used method.
5) The structure of the data packet can be changed as long as both sides are set up for it.
Disadvantages:
1) The size of the dataframe is limited to max 9 bits.
3) The baud rate of each UART must be with 10% of each other.
The first of the serial data transmission standards was RS232, or more correctly RS-
232 or COM-port. This was developed in 1962.
There are more recent standards which allow high speed data transmission along
with multiple transmitters and receivers
e.g. USB, DP, HDMI, DDR, Ethernet, PCI Express, SAS/SATA, Thunderbolt, etc.
Lessons Learned
“We must have life-building, man-making, character-making assimilation of ideas.” – Swami Vivekananda
Traditional Data Flow in IoT
Driving forces:
Architecture is how you design (i.e. graphical Scale
structure) your application or solution. Security
Constrained devices
Essence of IoT architecture: Massive data
how the data is Data analysis
transported, Support to legacy
collected, devices
analyzed, and
ultimately acted upon.
Source: https://www.pinterest.com/pin/641129696942354756/
Source: https://onem2m.org/using-onem2m/developers/basics
• Include:
• the physical
network that the
IoT applications
run on. (e.g.
backhaul network)
• the underlying
management
protocols
• the hardware
IoT devices,
communicat
ion network
(802.15.4,
LoRa, WiFi)
• Identify different
technologies at each layer
• primary function is
generating data
Layers Functions
Layer 4: Data Accumulation • Captures data and stores it for applications
• Convert event-based data to query-based processing
Layer 5: Data Abstraction • Reconciles multiple data formats
• Ensures consistent semantics for various data sources
• Confirmation about dataset completeness
Layer 6: Application • Interpret data using software applications
• Applications may monitor, control, and provide report
based on analysing the data
Layer 7: Collaboration and • Consumes and shares the application information
processes • Collaborating and communicating IoT information
21-08-2022 Dr. Manas Khatua 14
Simplified IoT Architecture
• It highlights the fundamental building blocks that are common to most IoT
systems and which is intended to help in designing an IoT network.
The “Things” in IoT
“Arise! Awake! Stop not till the goal is reached.”‐ Swami Vivekananda.
The “Things”
Sensors & Actuators are the fundamental building
blocks of IoT
Sensor senses Sensor
Actuator acts
Smart objects are any physical objects that contain
Actuator
Embedded technology
Sensors and/or actuators
Smart objects are to sense and/or interact with
their environment in a meaningful way
by being interconnected, and
enabling communication among themselves or an
external agent. Smart Object
03‐10‐2020 Dr. Manas Khatua 2
Sensors
• It measures some physical quantity and converts that measurement into analog/digital form
• There are a number of ways to group and cluster sensors into different categories
– Based on external energy requirement
• Active / Passive
– Based on placement location
• Invasive / Non‐invasive
– Based on distance from the sensing object
• Contact / No‐contact
– Based on application industry
• Medical / Manufacturing / Agriculture / etc.
– Based on measuring scale
• Absolute / Relative
– Based on sensing mechanism
• Thermoelectric / Electromechanical / Piezo resistive / Optic / Electric / Fluid mechanics / Photoelastic / etc.
– Based on sensing parameter
• Position / Occupancy / Motion / Velocity / Force / Pressure / Flow / Humidity / Light / Temperature / Acoustic /
Radiation / Chemical / Biosensors / etc.
03‐10‐2020 Dr. Manas Khatua 3
Sensor Types: What it measures
Sensor Type Description Example
Position • Measures the position of an object • Proximity sensor
• Position could be absolute/relative • Potentiometer
• Position sensor could be linear, angular, • Inclinometer
or multi‐axis
Occupancy • Detects the presence of people and • Radar Sensor
animals in a surveillance area
• Generates signal even when a person is
stationary
Motion • Detects the movement of people and • Passive Infrared (PIR)
objects Sensor
03‐10‐2020 Dr. Manas Khatua 6
Cont…
Sensor Type Description Example
Radiation • Detects the radiation in the environment • Neutron detector
• Geiger‐Muller counter
Temperature • Measures the amount of heat or cold • Thermometer
present in the system • Temperature gauge
• Two type: contact / non‐contact • Calorimeter
03‐10‐2020 Dr. Manas Khatua 7
Cont…
Sensor Type Description Example
Acoustic • Measures sound level • Microphone
• Hydrophone
Chemical • Measures the concentration of a • Smoke detector
chemical (e.g. CO2) in a system • Breathalyzer
Biosensor • Detects various biological elements, such • Pulse oximeter
as organisms, tissues, cells, enzymes, • Electrocardiograph (ECG)
antibodies, nucleic acid, etc. • Blood glucose biosensor
03‐10‐2020 Dr. Manas Khatua 9
Sensors in a Smartphone
03‐10‐2020 Dr. Manas Khatua 10
Actuators
• Sensors are designed to sense and measure the surrounding environment
• Actuators receive some type of control signal (commonly an electrical
signal or digital command) that triggers a physical effect, usually some
type of motion, force, and so on.
Source: https://cdn2.hubspot.net/hubfs/1878050/Landingpages/Events/Schwabengipfel/Guido_Schmutz_IoT‐Cloud‐or‐OnPrem.pdf?t=1501051153000
03‐10‐2020 Dr. Manas Khatua 11
Cont…
Source:
https://bridgera.com/iot‐
system‐sensors‐actuators/
Source:
https://www.novatec‐
gmbh.de/blog/sensors‐
and‐actuators‐of‐the‐iot/
03‐10‐2020 Dr. Manas Khatua 12
Actuator Classification
• Common ways to classify actuators:
Type of motion they produce
• e.g. linear, rotary, one/two/three axes
Power output
• e.g. high power, low power, micro power
Binary / Continuous output
• Based on number of stable‐state outputs
Area of application
• Specific industry or vertical where they are used
Type of energy
• e.g. mechanical energy, electrical energy, hydraulic energy, etc.
03‐10‐2020 Dr. Manas Khatua 13
Actuators by Energy Type
Type Examples
Electromagnetic actuators Electromagnet, Linear solenoid
Hydraulic and Pneumatic Hydraulic cylinder, Pneumatic cylinder, Piston,
actuators Pressure control valve, Air motor
03‐10‐2020 Dr. Manas Khatua 14
Smart Objects
• It is the building blocks of IoT
• Smart object has the following five characteristics:
– Sensor(s) and/or Actuator(s)
– Processing unit
• For acquiring sensed data from sensors,
• processing and analysing sensing data,
• coordinating control signals to any actuators, and
• controlling many functions (e.g. communication unit, power unit).
– Memory
• Mostly on‐chip flash memory
• user memory used for storing application related data
• program memory used for programming the device
– Communication unit
• Responsible for connecting a smart object with other smart
objects and the outside world (via the network using
wireless/wired communication)
– Power source
• To powered all components of the smart object
TelosB Mote
03‐10‐2020 Dr. Manas Khatua 15
Cont…
Source: Cisco
03‐10‐2020 Dr. Manas Khatua 16
Present Trends in Smart Objects
• Size is decreasing
• Power consumption is decreasing
• Processing power is increasing
• Communication capabilities are improving
• Communication is being increasingly standardized
03‐10‐2020 Dr. Manas Khatua 17
Lessons Learned
What is “Things” in IoT
Classification method of Sensors
Different Sensors based on Sensing parameter
Classification method of Actuators
Different Actuators based on Energy type
What is “Smart object” in IoT
03‐10‐2020 Dr. Manas Khatua 18
Figures and slide materials are taken from the following Books:
1. David Hanes et al., “IoT Fundamentals: Networking Technologies, Protocols,
and Use Cases for the Internet of Things”, 1st Edition, 2018, Pearson India.
03‐10‐2020 Dr. Manas Khatua 19
CS578: Internet of Things
“All Birds find shelter during a rain. But Eagle avoids rain by flying above the Clouds” – APJ Abdul Kalam
Communications Criteria
• A large number of wired and
wireless access technologies are
available
• Wireless communication is
prevalent for smart object
connectivity
– ease of deployment
– allows smart objects to be mobile
without losing connectivity
• Short range:
– tens of meters of maximum distance between two devices • Long range
– often considered as an alternative to serial cable – greater than 1 mile (1.6 km)
between two devices
– IEEE 802.15.1 Bluetooth, IEEE 802.15.7 Visible Light
Communications (VLC) – Wireless : 2G, 3G, 4G, Outdoor
Wi-Fi (IEEE 802.11ah), Low-
Power Wide-Area (LPWA)
• Medium range communications
– tens to hundreds of meters between two devices – Wired : IEEE 802.3 ethernet
– Wireless : IEEE 802.11 WiFi, IEEE 802.15.4 Low Rate WPAN, over optical fiber, IEEE 1901.2
IEEE 802.15.4g Smart Utility Networks (SUN) Broadband PLC
– Wired : IEEE 802.3 Ethernet, IEEE 1901.2 Narrowband
Power Line Communications (PLC)
• Layer 1 and Layer 2 protocols must be evaluated in using the following characteristics:
– data rate and throughput
– latency and determinism
– overhead and payload.
IEEE 802.15.4 is the IEEE standards for Low Rate Wireless Networks (or Low Rare Wireless
Personal Area Networks). Version 2015 is followed in this portion.
– short distance
communication
– low-powered
communication
• Several network communication stacks leverage this technology for many IoT
use cases in both the consumer and business markets.
• Few applications:
Home and building automation
Automotive networks
Industrial wireless sensor networks
Interactive toys and remote controls
• ZigBee uses AODV routing across a mesh MAC & PHY Layers
network • ZigBee network & security layer provides
mechanisms for network startup,
configuration, routing, and securing
• ZigBee utilizes 128-bit AES encryption for communications.
security at the MAC layer
• ZigBee utilizes the IEEE 802.15.4
• It also provides security at the network and standard at the PHY and MAC layers
application layers.
10-09-2022 Dr. Manas Khatua 17
ZigBee IP
• ZigBee has not provided interoperability
with other IoT solutions or open standards
• Modulation schemes
– OQPSK PHY : Direct sequence spread spectrum (DSSS) PHY employing offset quadrature phase-shift
keying (OQPSK)
– BPSK PHY : DSSS PHY employing binary phase-shift keying (BPSK)
– ASK PHY : parallel sequence spread spectrum (PSSS) PHY employing amplitude shift keying (ASK)
and BPSK
IEEE 802.15.4 PHY Frame Format SFD (1 byte): informs the receiver about the
starting point of frame content
10-09-2022 Dr. Manas Khatua 19
IEEE 802.15.4 MAC layer
• MAC layer manages access to the PHY channel
• defines how devices in the same area will share the frequencies allocated.
• Main tasks:
• Network beaconing for devices acting as coordinators
• PAN association and disassociation by a device
• Reliable link communications between two peer MAC entities
• Device security
16-bit short address
OR
64-bit extended address
Compress
• IEEE 802.15.4 does not define a path selection for a mesh topology
Mesh-under: Path selection can be done at Layer 2
Mesh-over: Path selection can occur at Layer 3 in routing protocol
• IEEE 802.15.4 specification uses Advanced Encryption Standard (AES) with a 128-bit
key length as the base encryption algorithm
• Message integrity code (MIC), which is calculated for the entire frame using the
same AES key, to validate the data that is sent
IEEE 802.15.4g & IEEE 802.15.4e are the PHY and MAC layer amendments of wireless
personal area networks (IEEE 802.15.4) published in 2012.
IEEE 802.15.4 maximum payload size of 127 bytes 2047 bytes for SUN PHY.
– Fragmentation is no longer necessary at Layer 2 for IPv6 packets
Error protection was improved in IEEE 802.15.4g by the CRC from 16 to 32 bits.
SUN PHY supports multiple data rates and more channels in ISM bands
Modulation schemes:
– MR-FSK : Multi-Rate and Multi-Regional Frequency Shift Keying
• good transmit frequency
– MR-OFDM : Multi-Rate and Multi-Regional Orthogonal Frequency Division Multiplexing
• good data rate
– MR-O-QPSK : Multi-Rate and Multi-Regional Offset Quadrature Phase-Shift Keying
• cost effective design
• Enhanced ACK
allow for the integration of a frame counter for the frame being acknowledged
helps to protect against certain attacks
• Message integrity
code (MIC) validates
the data that is sent
Mesh Topology
• Battery-powered nodes
with a long lifecycle
requires
– optimized Layer 2
forwarding or
– optimized Layer 3
routing protocol
• OFDM Modulation
• Null data packet (NDP) support: to cover control and management frames.
– It is only transmitted by a STA; It carry’s no data payload.
• Sectorization: partition the coverage area of a Basic Service Set (BSS) into sectors, each
containing a subset of stations. it uses an antenna array and beam-forming technique.
– reduces contention by restricting which group, in which sector, and at which time window.
– to mitigate the hidden node problem; to eliminate the overlapping BSS problem.
• Target wake time (TWT): allows an AP and STAs to “wake up” at negotiated times
• Star topology
• Semtech LoRa: Layer 1 PHY modulation technology available by multiple chipset vendors
LoRaWAN
Protocol Stack
Class A:
• this is default
implementation
• optimized for battery-
powered nodes
• allows bidirectional
communications
• two receive windows are
available after each
transmission
Class B:
• Class B node should get additional
receive windows compared to Class A Class C:
• gateways must be synchronized • This class is particularly adapted for
through a beaconing process powered nodes
• “ping slots”, can be used by the • enables a node to be continuously
network infrastructure to initiate a listening by keeping its receive window
downlink communication open when not transmitting
Node Addressing:
endpoints are also
known by their 32-bit
end device address
• 7 bit for network
• 25 bit for devices
– Data privacy applied at the end points (end device and application server)
• second layer is an application session key (AppSKey)
• performs encryption & decryption functions between the endpoint and its application
server.
• it computes and checks the application-level MIC
• LoRaWAN service provider does not have access to the application payload if it is
not allowed
• AppKey is then used to derive the session keys: NwkSKey and AppSKey.
• NB-IoT is addressing the LPWA IoT market opportunity using licensed spectrum
– New physical layer signals and channels are designed
“The highest education makes our life in harmony with all existence.” – Rabindranath Tagore
IEEE 802.15.4 LR-WPAN
A low-rate wireless personal area network (LR-WPAN) is a
simple,
low-cost communication network
that allows wireless connectivity in applications
with limited power and
relaxed throughput requirements.
Reference: IEEE Std 802.15.4™‐2020, “IEEE Standard for Low‐Rate Wireless Networks”,
Developed by the LAN/MAN Standards Committee of the IEEE Computer Society, Approved on 6 May 2020.
IEEE 802.15.4 standard PHY provides the PHY data service and
PHY management services:
The PHY data service enables the transmission and reception of
PHY protocol data units (PPDU) across the physical radio channel.
• ZigBee Alliance
45+ companies: Semiconductor mfrs, IP providers, OEMs, etc.
Application Framework
monitors TV VCR
sensors DVD/CD
automation Remote control
control
INDUSTRIAL & CONSUMER
COMMERCIAL ELECTRONICS
monitors mouse
diagnostics ZigBee keyboard
sensors LOW DATA-RATE joystick
PC &
RADIO DEVICES PERIPHERALS
PERSONAL
HEALTH CARE
security
consoles HVAC
portables lighting
educational TOYS & HOME closures
GAMES AUTOMATION
• Applications using ISM band do not require a licence for stations emitting less than 1W.
• Types:
frequency hopping spread spectrum (FHSS)
direct sequence spread spectrum (DSSS)
Channel coding is accomplished by selectively introducing redundant bits into the transmitted information stream.
Modulation is the process by which some characteristic of a carrier wave is varied in accordance with an information/ modulating signal.
– produce sequences of numbers that are not statistically random, but passes reasonable tests of
randomness
– unless you know the algorithm and the seed, it is impractical to predict the sequence
– The signals gains immunity from various kinds of noise and multipath distortion.
– Several users can independently use the same higher bandwidth with very little interference. (e.g. CDMA)
• spreading code spreads the signal across a wider frequency band in direct proportion
to the number of bits used
Spread the
data stream
Transmit the
spread data using
modulation
In-phase
Constellation diagram
quadrature for QPSK
phase
• OQPSK
a variation of QPSK known as
offset QPSK or orthogonal
QPSK
a delay of one bit time is
introduced in the Q stream of
QPSK
Its spectral characteristics and
bit-error performance are the
same as that of QPSK
at any time the phase change
in the combined signal never
exceeds 90° (π/2)
• IEEE 802.15.4 does not prefer to use frequency hopping to minimize energy consumption.
• To minimize interference in 2.4 GHz band, IEEE 802.15.4 prefer channel no. 15, 20, 25, 26
• Transmission power is adjustable from 0.5 mW (min. in 802.1.5.4) to 1 W (max. in ISM band)
• Transmission power 1 mW provides theoretical distances as:
– Outdoor range 300 m.
– Indoor range 100 m.
– Coordinator can make optimal selection of channel based on channels energy level
• 802.15.4 PHY provides link quality information (LQI) to Network and Application layers
– Device
• cannot route messages
• usually receivers are switched off except during transmission
• attached to the network only as leaf nodes
Frame Control
Beacon Beacon
CAP CFP
GTS GTS
Inactive
0 1
Superframe 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Time
SD = aBaseSuperframeDuration*2SO symbols (Active)
SO: superframe order
BO: beacon order BI = aBaseSuperframeDuration*2BO symbols
PAN coordinator decides SO, BO
Octets:2 1 4 to 20 1 variable 2
Data Frame
Frame Address Command
sequence Command payload check
control information type
number sequence
MAC
MAC header MAC payload
footer
ACK Frame
Octets:2 1 2
Data Frame
Frame
sequence check
control
number sequence
MAC
MAC header
footer
• A device also has a 16-bit short address, which is allocated by the PAN coordinator when the device
associates with its coordinator.
– Same short address may be present in to different PAN
• IEEE 802.15.4 devices can be grouped into PAN. These are identified by their 2 Byte PAN identifier
• Three different addressing modes, which sets the address data (none/short/long,
with/without PAN ID)
– Short addressing mode: The address field includes a short address (2B) and a PAN ID (2B) = (total
of 4 bytes).
– Long addressing mode: The address field includes a long address (8B) and a PAN ID (2B) = (total of
10 bytes).
– No addressing mode:
• Both addresses are missing from ACK frames.
• For data and command frames, only one (either source or destination) field can be omitted
– if the source address is omitted, it means the PAN coordinator sent the frame;
– if the destination address is missing, it means it should be received by the PAN coordinator.
CAP CFP
GTS GTS
Inactive
0 1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
BI = aBaseSuperframeDuration*2BO symbols
– Inactive: all station sleep. • beacon order (BO) : decides the length of a
• no communication superframe or beacon transmission period
• nodes can turn their radios off and go into power saving mode
• beacon-enabled network should satisfy
– Active: 0≦SO≦BO≦14
• Active period is divided into 16 slots in general
• PAN coordinator decides SO, BO
• 16 slots are further divided into two parts • Default value: SO=3, BO=5
– Contention access period (CAP)
– Contention free period (CFP) • SD: Superframe Duration
– Beacon only period (BOP) • BI: Beacon Interval
• aNumSuperframeSlots
= The number of slots contained in any superframe
= 16
• aBaseSuperframeDuration
= The number of symbols forming a superframe when the superframe order (SO) is equal to zero
= aBaseSlotDuration × aNumSuperframeSlots
– Devices use the slotted CAMA/CA mechanism to contend for the channels
– FFDs who require fixed rates of transmissions can ask for GTS from the coordinator
• CSMA/CA is not used for Beacon transmission; also not for Data frame transmission during CFP
• Duty Cycle:
BO-SO 0 1 2 3 4 5 6 7 8 9 ≧10
Duty cycle (%) 100 50 25 12 6.25 3.125 1.56 0.78 0.39 0.195 < 0.1
1-persistent
When station found idle channel, it transmits the frame
without any delay.
p-persistent
If the channel found to be idle, it transmits the frame with
probability p
Non-persistent
when the channel is found busy, it will wait for the random
time and again sense for the state of the station whether idle
or busy
Note:
CW in 802.15.4 is
not same with
CW in 802.11
In unslotted CSMA/CA:
The backoff periods of one device are not related in time to the
backoff periods of any other device in the PAN.
– NB (Number of Backoff): number of times that backoff has been taken in this attempt of transmission
• if exceeding macMaxCSMABackoff, the attempt fails
– BE (Backoff Exponent): play the role to decide how many backoff periods a device shall wait before
attempting to assess a channel.
• the number of backoff periods is greater than the remaining number of backoff periods in the CAP
– Otherwise, MAC sublayer shall pause the backoff countdown at the end of the CAP,
and resume it at the start of the CAP in the next superframe
– CW (Contention Window): the number of clear slots that must be seen after each backoff
• always set to 2 and count down to 0 if the channel is sensed to be clear
• The design is for some PHY parameters, which require 2 CCA for efficient channel usage.
Y Perform CCA on
Battery life BE = lesser of
backoff period
extension? (2, macMinBE)
boundary
N
BE = macMinBE Y
Channel idle?
N NB> N
macMaxCSMABackoffs CW = 0?
?
NB (Number of Backoff) Y Y
BE (Backoff Exponent)
CW (Contention Window) Failure Success
Contention in
IEEE 802.11 DCF
Contention in
IEEE 802.15.4
(for slotted CSMA/CA)
• The standard specifies that a transmitter node performs the CCA twice in
order to protect acknowledgment (ACK).
– When an ACK packet is expected, the receiver shall send it after a tACK time on the
backoff boundary
• tACK varies from 12 to 31 symbols
Existing
session for
DATA & ACK
New CCA
transmitter
Backoff Detect
end here an ACK
New
transmitter CCA CCA
Backoff Detect
end here an ACK
10-09-2022 Dr. Manas Khatua 41
Why 2 CCAs (Case 2)
Backoff slot
boundary aTurnaroundTime
Existing
session for
DATA & ACK
New CCA
transmitter
Backoff Detect
end here an ACK
New
transmitter CCA
Backoff Detect
end here an DATA
10-09-2022 Dr. Manas Khatua 42
Why 2 CCAs (Case 3)
Backoff boundary
Existing
session for
DATA & ACK
New
transmitter CCA
Backoff Detect a
end here DATA
10-09-2022 Dr. Manas Khatua 43
Unslotted CSMA/CA
Un-slotted CSMA
NB = 0,
only one
BE = macMinBE
CCA
Delay for
random(2BE - 1) unit
backoff periods
Perform CCA
Y
Channel idle?
NB = NB+1,
BE = min(BE+1, aMaxBE)
N NB>
macMaxCSMABackoffs
?
NB (Number of Backoff) Y
BE (Backoff Exponent)
Failure Success
CW (Contention Window)
CCA (Clear Channel Assessment)
10-09-2022 Dr. Manas Khatua 44
GTS Concepts
• A guaranteed time slot (GTS) allows a device to operate on the channel within a
portion of the superframe
• A device that has been allocated a GTS may also operate in the CAP
• A data frame transmitted in an allocated GTS shall use only short addressing
• A device shall only attempt to allocate and use a GTS if it is currently tracking the
beacon
• If a device loses synchronization with the PAN coordinator, all its GTS allocations
shall be lost
• IEEE 802.15.4 specification uses Advanced Encryption Standard (AES) with a 128-bit
key length as the base encryption algorithm
• Message integrity code (MIC), which is calculated for the entire frame using the
same AES key, to validate the data that is sent
What is ZigBee
“The best among you is the one who doesn’t harm others with his tongue and hands.” – Muhammad
Limitations of 802.15.4 MAC
Unbounded latency No protection against interferences
Both BE and Non-BE mode use /multipath fading
CSMA/CA Due to usage of single channel
No bound on maximum delay to
reach destination
Powered relay nodes in multi-hop
network
Non-reliable communication
Relay nodes keep their radio active always.
Very low delivery ratio due to the
complex synchronization and beacon
inefficiency of CSMA/CA
scheduling in BE mode for multihop
Consume large energy
Reliability
Wire‐like reliability may be required, e.g., 99.9% or better
Scalability
Large network size
Energy Efficiency
Target battery lifetime: 5 years, or more
Device selects best link quality channel as its designated listening channel
Sender node switch to receiver designated listening channel to transmit its data
Beacon or Hello packet is used to advertise node designated listening channel
Channel hopping
Mitigates the effects of interference and multi-
path fading / multipath interference
Improve reliability
• TsTxOffset: Timeslot
Transmission Offset
= TsCCAOffset + TsCCA + TsRxTx
A node can start sending its beacon only after getting a valid EB frame
ASN (absolute slot number) : total # of slots elapsed since the network was deployed
nch : number of physical channels presently available to consider
F is implemented as a look‐up‐table containing the set of available channels
k : count of slotframe cycle since the start of the network
S : slotframe size
t : timeslot in a slotframe
Max. no. of available
channel =16
Each channel is
identified by a
channelOffset
Channel could be
blacklisted because of
low quality
13-09-2022 Dr. Manas Khatua 12
Link and Schedule
Link: Pairwise assignment of a directed communication between devices in a
specific slot, with a given channel offset
(2BE –1)
Generally retransmission
in TSCH is not allowed.
It is handled by link
scheduling
In dedicated link, no
chance of collision.
Timeslot information
describes when to expect a frame transmission and when to send an acknowledgment
Upon receiving an EB
The MAC layer notifies the higher layer
Minimize EB transmissions
Frequent EB transmission consumes more communication resources
Also Increases energy consumption at network and node level
A. Kalita and M. Khatua, "6TiSCH – IPv6 Enabled Open Stack IoT Network Formation: A Review",
ACM Transactions on Internet of Things, 2022.
IEEE 802.15.4e standard does not specify how to derive an appropriate link
schedule
Existing multi-channel scheduling schemes are not suitable for TSCH networks
They do not allow per-packet channel hopping
Not for resource-constrained nodes
They are not efficient in terms of channel utilization
Distributed Scheduling
Link schedule is computed autonomously by each node
Based on local, partial information exchanged with its neighbors
Limited Overhead
Suitable for energy‐constrained nodes
Good choice for dynamic network and large scale network
Security
Selective Jamming (SJ) attacks
Secure Beacons and Different Frequency hopping sequence
Mechanisms to adapt the resources allocated between neighbor nodes to the data
traffic flows
RFC 9030: An Architecture for IPv6 over the Time-Slotted Channel Hopping Mode of IEEE 802.15.4 (6TiSCH)
RFC 9033
RFC 9031
Source: Xavier Vilajosana et al., “IETF 6TiSCH: A Tutorial” IEEE Communications Surveys & Tutorials, 22(1), 2020, pp. 595– 615.
IEEE 802.15.4e
MAC Modes
Functional Enhancements