Session 7 Network Topology: Ramesh Loganathan Sunil Jardosh
Session 7 Network Topology: Ramesh Loganathan Sunil Jardosh
(IoT)
Solution Architecture
Session 7
IOT Network Topology
Ramesh Loganathan
Sunil Jardosh
Layers of IOT Solution Architecture
Information
Application
Application Layer
Information
Processing
Event Processing Layer
Information
Transmission
Collector & Integrator Layer
Information
Generation Event Producer Layer
Devices
• Arudino Uno
• Rasberry Pi
• BeagleBoard
Sensors/
Memory
Actuator
Power
Controller
Supply
–
Smart Grid
Star Topology
Maintenance Productivity
Connected
Intelligent
Buildings
–
World
Commands
the node MAC address)
OBEX
• Audio: interfaces directly with the baseband. Each voice
AT
PPP
connection is over a 64Kbps SCO link. The voice coding scheme
is the Continuous Variable Slope Delta (CVSD)
• Link Manager Protocol (LMP): link setup and control,
authentication and encryption
RFCOMM TCS SDP
• Host Controller Interface: provides a uniform method of access
to the baseband, control registers, etc through USB, PCI, or
UART L2CAP
• Logical Link Control and Adaptation Layer (L2CAP): higher HCI
protocols multiplexing, packet segmentation/reassembly, QoS
Audio Link Manager (LMP)
• Service Discover Protocol (SDP): protocol of locating services
provided by a Bluetooth device
Baseband
• Telephony Control Specification (TCS): defines the call control
signaling for the establishment of speech and data calls between Bluetooth Radio
Bluetooth devices
• RFCOMM: provides emulation of serial links (RS232). Upto 60
connections
OBEX: OBject EXchange (e.g., vCard)
State Transition Diagram
Inquiry Procedure
• Potential master identifies devices in range that wish to
participate
– Transmits ID packet with inquiry access code (IAC)
– Occurs in Inquiry state
• Device receives inquiry
– Enter Inquiry Response state
– Returns FHS (Frequency Hop Synchrnonization) packet with address
and timing information
– Moves to page scan state
Inquiry Procedure Details
• Goal: aims at discovering other neighboring devices
• Inquiring node:
– Sends an inquiry message (packet with only the access code: General Inquiry Access Code:
GIAC or Dedicated IAC: DIAC). This message is sent over a subset of all possible frequencies.
– The inquiry frequencies are divided into two hopping sets of 16 frequencies each.
– In inquiry state the node will send upto NINQUIRY sequences on one set of 16 frequencies before
switching to the other set of 16 frequencies. Upto 3 switches can be executed. Thus the inquiry
may last upto 10.24 seconds.
• To be discovered node:
– Enters an inquiry_scan mode
– When hearing the inquiry_message (and after a backoff procedure) enter an inquiry_response
mode: send a Frequency Hop Sync (FHS) packet (BD_ADDR, native clock)
• After discovering the neighbors and collecting information on their address and clock,
the inquiring node can start a page routine to setup a piconet
Page Procedure
• Master uses devices address to calculate a
page frequency-hopping sequence
• Master pages with ID packet and device access
code (DAC) of specific slave
• Slave responds with DAC ID packet
• Master responds with its FHS packet
• Slave confirms receipt with DAC ID
• Slaves moves to Connection state
Page Procedure Details
• Goal: e.g., setup a piconet after an inquiry
• Paging node (master):
– Sends a page message (i.e., packet with only Device Access Code of
paged node) over 32 frequency hops (from DAC and split into 2*16
freq.)
– Repeated until a response is received
– When a response is received send a FHS message to allow the paged
node to synchronize
• Paged node (slave):
– Listens on its hopping sequence
– When receiving a page message, send a page_response and wait for
the FHS of the pager
Slave Connection State Modes
• Active – participates in piconet
– Listens, transmits and receives packets
• Sniff – only listens on specified slots
• Hold – does not support ACL packets
– Reduced power status
– May still participate in SCO exchanges
• Park – does not participate on piconet
– Still retained as part of piconet
States of a Bluetooth Device
ACTIVE (connected/transmit): the device is uniquely identified by a 3bits AM_ADDR and
is fully participating
SNIFF state: participates in the piconet only within the SNIFF interval
HOLD state: keeps only the SCO links
PARK state (low-power): releases AM_ADDR but stays synchronized with master
STANDBY unconnected
39
Short range wireless application areas
Voice Data Audio Video State
Bluetooth ACL/HS x Y Y x x
Bluetooth SCO/eSCO Y x x x x
Wi-Fi (VoIP) Y Y Y x
Wi-Fi Direct Y Y Y x x
ZigBee x x x x Y
ANT x x x x Y
Low Power 40
How much energy does traditional Bluetooth
use?
• Traditional Bluetooth is connection oriented. When a device is
connected, a link is maintained, even if there is no data
flowing.
41
What is Bluetooth Low Energy?
• Bluetooth low energy is a NEW, open, short
range radio technology
– Blank sheet of paper design
– Different to Bluetooth classic (BR/EDR)
– Optimized for ultra low power
– Enable coin cell battery use cases
• < 20mA peak current
• < 5 uA average current
42
Basic Concepts of Bluetooth 4.0
• Everything is optimized for lowest power
consumption
– Short packets reduce TX peak current
– Short packets reduce RX time
– Less RF channels to improve discovery and
connection time
– Simple state machine
– Single protocol
– Etc.
43
Bluetooth low energy factsheet
Range: ~ 150 meters open field
Output Power: ~ 10 mW (10dBm)
Max Current: ~ 15 mA
Latency: 3 ms
Topology: Star
Connections: > 2 billion
Modulation: GFSK @ 2.4 GHz
Robustness: Adaptive Frequency Hopping, 24 bit CRC
Security: 128bit AES CCM
Sleep current: ~ 1μA
Modes: Broadcast, Connection, Event Data Models, Reads, Writes
44
Bluetooth low energy factsheet #2
• Data Throughput
– For Bluetooth low energy, data throughput is not a
meaningful parameter. It does not support
streaming.
– It has a data rate of 1Mbps, but is not optimized
for file transfer.
– It is designed for sending small chunks of data
(exposing state)
45
Designed for exposing state
Gate 10
3.2 kWh
BOARDING
PLAY >> Network
Available
47
Device Modes
• Dual Mode
– Bluetooth BR/EDR and LE
– Used anywhere that BR/EDR
is used today
• Single Mode
– Implements only Bluetooth low energy
– Will be used in
new devices / applications
48
Device Modes
• Dual mode + single modes
BR/EDR stack Dual-mode stack Single-mode stack
49
Physical Layer
• 2.4 GHz ISM band
• 1Mbps GFSK
– Larger modulation index than Bluetooth BR (which means better
range)
• 40 Channels on 2 MHz spacing
50
Physical Channels
• Two types of channels
51
Physical Channels
• Advertising channels avoid 802.11
52
Link Layer
• Link Layer state machine
53
Advertising
54
Data transactions
56
Time From Disconnected to Data ~ 3ms
57
How low can the energy get?
• From the previous slide, calculate energy per transaction
– Assume an upper bound of 3ms per minimal transaction
– Estimated TX power is 15mW (mostly TX power amp for 65nm
chips)
– For 1.5v battery, this is 10mA. 0.015W * 0.003 sec = 45 micro
Joule
• How long could a sensor last on a battery?
– An example battery: Lenmar WC357, 1.55v, 180mAh, $2-5
– 180mAh/10mA = 18Hr = 64,800 seconds = 21.6M transactions
– Suppose this sensor sends a report every minute = 1440/day
– For just the BT LE transactions, this is 15,000 days, or > 40 years
– This far exceeds the life of the battery and/or the product
• This means that battery will cost more than the electronics
– This sensor could run on scavenged power, e.g. ambient light
58
What are the USE CASES planned for BT 4.0?
• Proximity • HVAC
• Time • Generic I/O (automation)
• Emergency • Battery status
• Network availability • Heart rate monitor
• Personal User Interface • Physical activity monitor
• Blood glucose monitor
• Simple remote control
• Cycling sensors
• Browse over Bluetooth
• Pulse Oximeter
• Temperature Sensor
• Body thermometer
• Humidity Sensor
59
ZigBee and Bluetooth Low Energy
• Business comparison:
– ZigBee is older. It has gone through some iterations
– ZigBee has market mindshare, but not a lot of shipments yet.
– Market barriers: connectivity – ZigBee is not in PCs or mobile phones
yet.
• Technical comparison:
– Zigbee is low power; Bluetooth LE is even lower. Detailed analysis
depends on specific applications and design detail, no to mention chip
geometry.
– ZigBee stack is light; the Bluetooth LE/GATT stack is even simpler
• Going forward:
– ZigBee has a lead on developing applications and presence
– Bluetooth low energy has improved technology, and a commanding
presence in several existing markets: mobile phones, automobiles,
consumer electronics, PC industry
– Replacing “classic Bluetooth ” with “dual mode” devices will bootstrap
this market quickly
60
Example use: proximity
• It can enable proximity detection
– I’m in the car
– I’m in the office
– I’m in the meeting room
– I’m in the movie theater
• It can enable presence detection
– Turn the lights on when I walk around the house
– Automatically locks the door when I leave home
– Turn the alarm off if I’m already awake
61
New trend of wireless technology
• Most Wireless industry focuses on increasing high
data throughput
• A set of applications require simple wireless
connectivity, relaxed throughput, very low power,
short distance and inexpensive hardware.
– Industrial
– Agricultural
– Vehicular
– Residential
– Medical
62
IEEE 802.15.4 overview
63
IEEE 802.15 working group
64
Comparison between WPAN
65
ZigBee/IEEE 802.15.4 market feature
• Low power consumption
• Low cost
• Low offered message throughput
• Supports large network orders (<= 65k nodes)
• Low to no QoS guarantees
• Flexible protocol design suitable for many
applications
66
ZigBee network applications
monitors TV VCR
sensors DVD/CD
automation INDUSTRIAL & CONSUMER
Remote
control COMMERCIAL ELECTRONICS control
monitors
ZigBee mouse
diagnostics LOW DATA-RATE keyboard
sensors PERSONAL RADIO DEVICES PC &
PERIPHERALS joystick
HEALTH CARE
security
consoles
HVAC
portables TOYS & HOME lighting
educational GAMES AUTOMATION closures
67
Wireless technologies
Range
Meters
GSM GPRS EDGE 3G 2000
10,000
2003-4
2005
1,000
802.11b 802.11a/g
100 ZigBee
Hiper
Bluetooth 2.0 LAN/2
Bluetooth
Bluetooth 1.5 WiMedia Bandwidth
10 kbps
10 100 1,000 10,000 100,000
68
ZigBee/802.15.4 architecture
• ZigBee Alliance
– 45+ companies: semiconductor mfrs, IP providers, OEMs, etc.
– Defining upper layers of protocol stack: from network to application, including
application profiles
– First profiles published mid 2003
• IEEE 802.15.4 Working Group
– Defining lower layers of protocol stack: MAC and PHY
Applications
Application Framework
69
How is ZigBee related to IEEE 802.15.4?
• ZigBee takes full advantage of a powerful
physical radio specified by IEEE 802.15.4
• ZigBee adds logical network, security and
application software
• ZigBee continues to work closely with the IEEE
to ensure an integrated and complete solution
for the market
70
General characteristics
• Data rates of 250 kbps , 20 kbps and 40kpbs.
• Star or Peer-to-Peer operation.
• Support for low latency devices.
• CSMA-CA channel access.
• Dynamic device addressing.
• Fully handshaked protocol for transfer reliability.
• Low power consumption.
• Channels:
– 16 channels in the 2.4GHz ISM band,
– 10 channels in the 915MHz ISM band
– 1 channel in the European 868MHz band.
• Extremely low duty-cycle (<0.1%)
71
IEEE 802.15.4 basics
• 802.15.4 is a simple packet data protocol for
lightweight wireless networks
– Channel Access is via Carrier Sense Multiple Access
with collision avoidance and optional time slotting
– Message acknowledgement
– Optional beacon structure
– Target applications
• Long battery life, selectable latency for controllers, sensors,
remote monitoring and portable electronics
– Configured for maximum battery life, has the potential
to last as long as the shelf life of most batteries
72
IEEE 802.15.4 Device Types
• There are two different device types :
– A full function device (FFD)
– A reduced function device (RFD)
• The FFD can operate in three modes by serving as
– Device
– Coordinator
– PAN coordinator
• The RFD can only serve as:
– Device
73
FFD vs RFD
• Full function device (FFD)
– Any topology
– Network coordinator capable
– Talks to any other device
74
Star topology
Network
coordinator
Master/slave
75
Peer to peer topology
76
Device addressing
• Two or more devices communicating on the same
physical channel constitute a WPAN.
– A WPAN includes at least one FFD (PAN coordinator)
– Each independent PAN will select a unique PAN identifier
• Each device operating on a network has a unique 64-bit
extended address. This address can be used for direct
communication in the PAN
• A device also has a 16-bit short address, which is
allocated by the PAN coordinator when the device
associates with its coordinator.
77
IEEE 802.15.4 physical layer
78
IEEE 802.15.4 PHY overview
• PHY functionalities:
– Activation and deactivation of the radio
transceiver
– Energy detection within the current channel
– Link quality indication for received packets
– Clear channel assessment for CSMA-CA
– Channel frequency selection
– Data transmission and reception
79
IEEE 802.15.4 PHY Overview
• Operating frequency bands
2.4 GHz
PHY Channels 11-26 5 MHz
80
Frequency Bands and Data Rates
• The standard specifies two PHYs :
– 868 MHz/915 MHz direct sequence spread
spectrum (DSSS) PHY (11 channels)
• 1 channel (20Kb/s) in European 868MHz band
• 10 channels (40Kb/s) in 915 (902-928)MHz ISM band
– 2450 MHz direct sequence spread spectrum (DSSS)
PHY (16 channels)
• 16 channels (250Kb/s) in 2.4GHz band
81
PHY Frame Structure
• PHY packet fields
– Preamble (32 bits) – synchronization
– Start of packet delimiter (8 bits) – shall be
formatted as “11100101”
– PHY header (8 bits) –PSDU length
– PSDU (0 to 127 bytes) – data field
Sync Header PHY Header PHY Payload
Start of Frame Reserve PHY Service
Preamble Packet Length (1 bit) Data Unit (PSDU)
Delimiter (7 bit)
4 Octets 1 Octets 1 Octets
0-127 Bytes
82
IEEE 802.15.4 MAC
83
Superframe
Beacon Beacon
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
84
Superframe
• Beacons are used for
– starting superframes
– synchronizing with other devices
– announcing the existence of a PAN
– informing pending data in coordinators
• In a “beacon-enabled” network,
– Devices use the slotted CAMA/CA mechanism to
contend for the usage of channels
– FFDs which require fixed rates of transmissions can
ask for guarantee time slots (GTS) from the
coordinator
85
Superframe
• The structure of superframes is controlled by two
parameters:
– beacon order (BO) : decides the length of a superframe
– superframe order (SO) : decides the length of the active
potion in a superframe
87
Data Transfer Model (I)
• Data transferred from device to coordinator
– In a beacon-enable network, a device finds the beacon to synchronize to
the superframe structure. Then it uses slotted CSMA/CA to transmit its
data.
– In a non-beacon-enable network, device simply transmits its data using
unslotted CSMA/CA
Communication to a coordinator
In a non beacon-enabled network
Communication to a coordinator
In a beacon-enabled network
88
Data Transfer Model (II-1)
• Data transferred from
coordinator to device in a
beacon-enabled network:
– The coordinator indicates in
the beacon that some data is
pending.
– A device periodically listens
to the beacon and transmits
a Data Requst command
using slotted CSMA/CA.
– Then ACK, Data, and ACK
follow … Communication from a coordinator
In a beacon-enabled network
89
Data transfer model (II-2)
• Data transferred from
coordinator to device in a
non-beacon-enable network:
– The device transmits a Data
Request using unslotted
CSMA/CA.
– If the coordinator has its
pending data, an ACK is
replied.
– Then the coordinator Communication from a coordinator
transmits Data using in a non beacon-enabled network
unslotted CSMA/CA.
– If there is no pending data, a
data frame with zero length
payload is transmitted.
90
Channel Access Mechanism
• Two type channel access mechanism:
– beacon-enabled networks slotted CSMA/CA
channel access mechanism
– non-beacon-enabled networks unslotted
CSMA/CA channel access mechanism
91
Slotted CSMA/CA algorithm
• In slotted CSMA/CA
– The backoff period boundaries of every device in
the PAN shall be aligned with the superframe slot
boundaries of the PAN coordinator
• i.e. the start of first backoff period of each device is
aligned with the start of the beacon transmission
– The MAC sublayer shall ensure that the PHY layer
commences all of its transmissions on the
boundary of a backoff period
92
Slotted CSMA/CA algorithm (cont.)
• Each device maintains 3 variables for each transmission
attempt
– NB: number of times that backoff has been taken in this attempt
(if exceeding macMaxCSMABackoff, the attempt fails)
– BE: the backoff exponent which is determined by NB
– CW: contention window length, 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.
• Battery Life Extension:
– designed for very low-power operation, where a node only
contends in the first 6 slots
93
Slotted CSMA/CA (cont.) need 2 CCA to
ensure no
collision
94
Why 2 CCAs to Ensure Collision-Free
• Each CCA occurs at the boundary of a backoff slot
(= 20 symbols), and each CCA time = 8 symbols.
• The standard species 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
– One-time CCA of a transmitter may potentially cause a
collision between a newly-transmitted packet and an
ACK packet.
– (See examples below)
95
Why 2 CCAs (case
Backoff boundary
1)
Existing
session
New CCA
transmitter
Backoff Detect an
end here ACK
New
transmitter CCA CCA
Backoff Detect an
end here ACK
96
Why 2 CCAs (Case
Backoff boundary
2)
Existing
session
New CCA
transmitter
Backoff Detect an
end here ACK
New
transmitter CCA
Backoff Detect an
end here DATA
97
Why 2 CCAs (Case
Backoff boundary
3)
Existing
session
New
transmitter CCA
Backoff Detect a
end here DATA
98
Unslotted
CSMA/CA
only one
CCA
99
GTS Concepts (I)
• A guaranteed time slot (GTS) allows a device to
operate on the channel within a portion of the
superframe
• A GTS shall only be allocated by the PAN
coordinator
• The PAN coordinator can allocated up to 7 GTSs
at the same time
• The PAN coordinator decides whether to allocate
GTS based on:
– Requirements of the GTS request
– The current available capacity in the superframe
100
GTS Concepts (II)
• A GTS can be deallocated
– At any time at the discretion of the PAN
coordinator or
– By the device that originally requested the GTS
• 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
101
GTS Concepts (III)
• Before GTS starts, the GTS direction shall be
specified as either transmit or receive
– Each device may request one transmit GTS and/or
one receive GTS
• 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
• The use of GTSs be an RFD is optional
102
Association Procedures (1/2)
• A device becomes a member of a PAN by
associating with its coordinator
Coordinator Device
• Procedures
Scan
Association req. channel
ACK
Data req.
ACK
Association resp.
ACK
103
Association Procedures (2/2)
• In IEEE 802.15.4, association results are
announced in an indirect fashion.
– A coordinator responds to association requests by
appending devices’ long addresses in beacon frames
• Devices need to send a data request to the
coordinator to acquire the association result
105
ZigBee Network Layer Overview
• Three kinds of networks are supported: star,
tree, and mesh networks
106
ZigBee Network Layer Overview
• Three kinds of devices in the network layer
– ZigBee coordinator: responsible for initializing, maintaining,
and controlling the network
– ZigBee router: form the network backbone
– ZigBee end device: must be connected to
router/coordinator
107
Address Assignment
• In ZigBee, network addresses are assigned to devices by a distributed
address assignment scheme
• ZigBee coordinator determines three network parameters
– the maximum number of children (Cm) of a ZigBee router
– the maximum number of child routers (Rm) of a parent node
– the depth of the network (Lm)
• A parent device utilizes Cm, Rm, and Lm to compute a parameter called Cskip
– which is used to compute the size of its children’s address pools
1 Cm ( Lm d 1), if Rm 1 (a)
Cskip(d ) 1 Cm Rm Cm Rm Lmd 1
, Otherwise (b)
1 Rm
108
Cskip=31 Total:127
For node C 01 32 63 94
125 ,126
node A 32
• If a parent node at depth d Cm=6
Addr = 64,
Cskip = 1
has an address Aparent, Rm=4
Lm=3
Addr = 92
– the nth child router is Addr = 125
Aparent+(n-1)×Cskip(d)+1 Addr = 30
Cskip = 7
Addr = 0,
– nth child end device is C Cskip = 31
109
ZigBee Routing Protocols
• In a tree network
– Utilize the address assignment to obtain the routing
paths
• In a mesh network:
• Routing Capability: ZigBee coordinators and routers are said
to have routing capacity if they have routing table capacities
and route discovery table capacities
• There are 2 options:
– Reactive routing: if having “routing capacity”
– Tree routing: if having no routing capacity
110
ZigBee Tree Routing
• When a device receives a packet, Cm=6
Addr = 64,
Cskip = 1
it first checks if it is the Rm=4
Lm=3
destination or one of its child end Addr = 92
Addr = 125
devices is the destination
– If so, accept the packet or Addr = 63,
Cskip = 7
forward it to a child Addr = 30
Addr = 0,
– Otherwise, relay it along the tree Cskip = 31
Addr = 126
Addr = 1,
• Example: Cskip = 7
A
– 38 45
Addr = 40,
Addr = 32,
Addr = 31 Cskip = 1
Cskip = 7
B
– 38 92 Addr = 33,
Cskip = 1
Addr = 45
C
Addr = 38
Addr = 39
111
ZigBee Mesh Routing
• Route discovery by AODV-like routing protocol
– The cost of a link is defined based on the packet
delivery probability on that link
112
Routing in a Mesh network: Example
Discard route
request
B
req. C
route
a
req.
route route reply T
S
req.
rou
te r route
eq. D
rou
te r
eq.
Unicast
Broadcast
Without routing capacity
113
Summary of ZigBee network layer
Pros Cons
Star 1. Easy to synchronize 1. Small scale
2. Support low power
operation
3. Low latency
Tree 1. Low routing cost 1. Route reconstruction is
2. Can form superframes to costly
support sleep mode 2. Latency may be quite long
3. Allow multihop
communication
Mesh 1. Robust multihop 1. Cannot form superframes
communication (and thus cannot support
2. Network is more flexible sleep mode)
3. Lower latency 2. Route discovery is costly
3. Needs storage for routing
table
114
Competitive perspective
115
Thanks