0% found this document useful (0 votes)
9 views116 pages

Session 7 Network Topology: Ramesh Loganathan Sunil Jardosh

The document outlines the architecture and network topology of IoT solutions, detailing various layers including application, event processing, and information transmission. It discusses different network topologies such as bus, ring, mesh, star, tree, and hybrid, along with case studies on building monitoring and networking requirements. Additionally, it covers standards and protocols relevant to IoT communications, particularly focusing on Bluetooth technology and its low energy variant.

Uploaded by

jofihi6998
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views116 pages

Session 7 Network Topology: Ramesh Loganathan Sunil Jardosh

The document outlines the architecture and network topology of IoT solutions, detailing various layers including application, event processing, and information transmission. It discusses different network topologies such as bus, ring, mesh, star, tree, and hybrid, along with case studies on building monitoring and networking requirements. Additionally, it covers standards and protocols relevant to IoT communications, particularly focusing on Bluetooth technology and its low energy variant.

Uploaded by

jofihi6998
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Sensor Network

(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

Left to right: Arduino Uno, BeagleBone, Communication


Raspberry Pi
Network Topology
• What is network topology?
• Graph representation
– Nodes
– Edges
• Network Topologies (Connected Devices)
– Bus Topology
– Ring Topology
– Mesh Topology Predictive Energy Saving
Improe


Smart Grid

Star Topology
Maintenance Productivity

– Tree Topology Improve Food H2O

Connected
Intelligent
Buildings


World

Hybrid Topology Enhanced Safety & Security Smart Home

High-Confidence Enable New Healthcare


Transport and Knowledge
Asset Tracking
Network Topology : Bus Topology
Network Topology : Ring Topology
Network Topology : Mesh Topology
Network Topology : Star Topology
Network Topology : Tree Topology
Network Topology : Hybrid Topology
Layered Architect
Case Study: Building monitoring
application
• Monitor, analyze, and optimize energy usage
throughout the user’s properties
• Monitoring and control points need to be
deployed throughout each building
• Occupancy and temperature sensors
• Performance and building utilization patterns
• Comparison of energy utilization throughout
the portfolio of properties allows lower
performing buildings to be flagged
Case Study: Networking requirements
• Range, Hops
– Up to 1,000 feet, sensor to gateway. Network
coverage of up to 200,000 square feet.
• Power consumption, Hops
– Sensor nodes run off battery power for a minimum of
one year.
• Scalability
– Up to hundreds of nodes.
• Bandwidth/data rate, Throughput, Latency
– Up to 20 Kbps.
Case Study: Networking requirements
• Reliability, Latency
– Very high, mission-critical reliability and network uptime.
• Interoperability
– Based on an open standard allowing interoperability with
third-party devices.
• Availability
– Proven technology, established installed base, and multiple
sourcing options.
• Cost
– Reasonably low cost, relative to other networking options.
Case Study: Network Topology
• Bus Topology
• Ring Topology
• Mesh Topology
• Star Topology
• Tree Topology
• Hybrid Topology
• Point-to-Point Topology
Standards
• Ensure that hardware and software produced by
different vendors can work together.
• Makes it much easier to develop software and hardware
that link different networks because software and
hardware can be developed one layer at a time.
• Normally, the standards used in data communication are
called protocols.
• Formal standards are developed by an official industry or
government body.
• Defacto standards emerge in the marketplace and
supported by several vendors, but have no official
standing.
Standards
• Email related standards
– IMAP, POP, X.400, SMTP, CMC, MIME, binhex, uuencode
• Web related standards
– http, CGI, html/xml/vrml/sgml
• Internet directory standards
– X.500, LDAP
• Application standards
– http, FTP, telnet, gopher, wais
• Videoconferencing standards
– H.320, H.323, Mpeg-1, Mpeg-2
Standard: Organizations
– American National Standards Institute (ANSI)
– Institute of Electrical and Electronics Engineers (IEEE)
– Internet Engineering Task Force (IETF)
– Electronic Industries Association (EIA)
– National Institute of Standards and Technology (NIST)
– National Exchange Carriers Association (NECA)
– Corporation for Open Systems (COS)
– Electronic Data Interchange -(EDI) of Electronic Data
Interchange for Administration Commerce and Transport
(EDIFACT).
Standards
• 802.1 This work defines an overall picture of LANs and connectivity.
• 802.1B This set of standards specifically addressed network management.
• 802.1D Standards for bridges used to connect various types of LANs
together were set up with 802.1D.
• 802.2 Called the Logical Link Control (LLC) standards, this specification
governs the communication of packets of information from one device to
another on a network. Specifically it deals with communication, not access
to the network itself.
• 802.3 Defines the way data has access to a network for multiple topology
systems using Carrier Sense Multiple Access/ Collision Detection
(CSMA/CD). A prime example is Ethernet and StarLAN systems. These LAN
types operate at 10 Mb/sec.
• 802.4 Standards developed for a token-passing scheme on a bus topology.
The primary utilizer of this specification was the Manufacturing
Automation Protocol LANs developed by General Motors. Operates at 10
Mb/sec.
Standards
• 802.5 This standard defines token ring systems. It involves the token-
passing concept on a ring topology with twisted pair cabling. IBM's token
ring system uses this specification. The speed is either 4 Mb/sec or 16
Mb/sec.
• 802.6 Metropolitan Area Networks are defined by this group. MANs are
networks that are larger than LANs typically falling within 50 kilometers.
They operate at speeds ranging from 1 Mb/sec up to about 200 Mb/sec.
• 802.7 These are standards concerning broadband LANs.
• 802.8 This group sets up standards for LANs using fiber optic cabling and
access methods.
• 802.9 This specification covers voice and digital data integration.
• 802.10 These members set standards for interoperable security.
• 802.11 Wireless LANs are the subject of this particular subcommittee's
works. Both infrared and radio LANs are covered.
Standards

A protocol proposed by a vendor

IETF working group study the proposal

IETF issues a request for comment (RFC)

IETF reviews the comments

IETF proposes an improved RFC

The RFC becomes a proposed standard


The proposed standard becomes a draft
standard if two or more vendors adopt it
Case Study: Network Topology
• Bus Topology
• Ring Topology
• Mesh Topology
– Zigbee
• Star Topology
– WiFi
• Tree Topology
• Hybrid Topology
• Point-to-Point Topology
– Bluetooth
Point-to-point
Attribute Star (Wi-Fi) Mesh (Zigbee)
(Bluetooth)
32m (120 feet)
10 meters (about 30 Well over 300 meters
Range indoors, 95m (300
feet) (1,000 feet)
feet) outdoors
High. Line power Very low. Battery life
2.5 mW. Battery life
Power Consumption required for access over two years for
measured in days
point. sensor nodes.
Scalability and Two nodes, limited 10-15 devices per 100s of nodes per
flexibility flexibility access point network
Bandwidth 1-3 Mbps >100 Mbps 250Kbits/sec
Reliability High High High
High, requiring the
same ZigBee app’n
High (with other profile. Medium in
Interoperability High
Bluetooth devices) general (due
to multiple app’n
profiles).
Component
Widely available Widely available Widely available
Availability
Complete SoC w/
Bluetooth
Protocol Architecture: Bluetooth
• BT Radio (2.4 GHZ Freq. Band):
Application
• Modulation: Gaussian Frequency Shift Keying
• Baseband: FH-SS (79 carriers), CDMA (hopping sequence from
TCP/UDP

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

inquiry page connecting

transmit connected active

BT device addressing: PARK HOLD SNIFF


• BD_ADDR (48 bits) low power
• AM_ADDR ( 3bits): ACTIVE, HOLD, or SNIFF
• PM_ADDR (8 bits): PARK Mode address (exchanged with the AM_ADDR when entering PARK mode)
• AR_ADDR (8 bits): not unique used to come back from PARK to ACTIVE state
Bluetooth Audio
• Voice encoding schemes:
– Pulse code modulation (PCM)
– Continuously variable slope delta (CVSD)
modulation
• Choice of scheme made by link manager
– Negotiates most appropriate scheme for
application
Bluetooth Link Security
• Elements:
– Authentication – verify claimed identity
– Encryption – privacy
– Key management and usage
• Security algorithm parameters:
– Unit address
– Secret authentication key (128 bits key)
– Secret privacy key (4-128 bits secret key)
– Random number
Link Management
• Manages master-slave radio link
• Security Service: authentication, encryption,
and key distribution
• Clock synchronization
• Exchange station capability information
• Mode management:
– switch master/slave role
– change hold, sniff, park modes
– QoS
L2CAP
• Provides a link-layer protocol between entities with a number
of services
• Relies on lower layer for flow and error control
• Makes use of ACL links, does not support SCO links
• Provides two alternative services to upper-layer protocols
– Connectionless service
– Connection-oriented service: A QoS flow specification is assigned in
each direction
• Exchange of signaling messages to establish and configure
connection parameters
Flow Specification Parameters
• Service type
• Token rate (bytes/second)
• Token bucket size (bytes)
• Peak bandwidth (bytes/second)
• Latency (microseconds)
• Delay variation (microseconds)
Bluetooth 4.0: Low Energy

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

Bluetooth low energy x x x x Y

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

State = low bandwidth, low latency data

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.

• Sniff modes allow devices to sleep, reducing power


consumption to give months of battery life

• Peak transmit current is typically around 25mA

• Even though it has been independently shown to be lower


power than other radio standards, it is still not low enough
power for coin cells and energy harvesting applications

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

23.2˚C 60.5 km/h 12:23 pm

Gate 10
3.2 kWh
BOARDING
PLAY >> Network
Available

• It’s good at small, discrete data transfers.


• Data can triggered by local events.
• Data can be read at any time by a client.
• Interface model is very simple (GATT)
46
Bluetooth Low Energy Architecture

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

• Devices can advertise for a variety of reasons:


– To broadcast promiscuously
– To transmit signed data to a previously bonded device
– To advertise their presence to a device wanting to connect
– To reconnect asynchronously due to a local event

54
Data transactions

• Once a connection is made:


– Master informs slave of hopping sequence and when to wake
– All subsequent transactions are performed in the 37 data
channels
– Transactions can be encrypted
– Both devices can go into deep sleep between transactions
55
Link Layer Connection
• Very low latency connection

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

Network & Security ZigBee


Specification
Application
MAC Layer
802.15.4 ZigBee stack
PHY Layer
Hardware

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

• Reduced function device (RFD)


– Limited to star topology
– Cannot become a network coordinator
– Talks only to a network coordinator
– Very simple implementation

74
Star topology

Network
coordinator

Master/slave

Full Function Device (FFD)


Reduced Function Device (RFD)
Communications Flow

75
Peer to peer topology

Point to point Tree

Full Function Device (FFD)


Communications Flow

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

868MHz/ Channel 0 Channels 1-10


2 MHz
915MHz
PHY
868.3 MHz 902 MHz 928 MHz

2.4 GHz
PHY Channels 11-26 5 MHz

2.4 GHz 2.4835 GHz

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

SD = aBaseSuperframeDuration*2SO symbols (Active)

BI = aBaseSuperframeDuration*2BO symbols

• A superframe is divided into two parts


– Inactive: all station sleep
– Active:
• Active period will be divided into 16 slots
• 16 slots can further divided into two parts
» Contention access period
» Contention free period

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

• For a beacon-enabled network, the setting of BO and


SO should satisfy the relationship 0≦SO≦BO≦14

• For channels 11 to 26, the length of a superframe can


range from 15.36 msec to 215.7 sec (= 3.5 min).
86
Superframe
• Each device will be active for 2-(BO-SO) portion
of the time, and sleep for 1-2-(BO-SO) portion of
the time
• 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

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 CCA CCA


transmitter
Backoff Detect an
end here ACK

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

Make Beacon Wait for


decision (pending address) response

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

• After associating to a coordinator, a device will be


assigned a 16-bit short address.
104
ZigBee Network Layer Protocols

105
ZigBee Network Layer Overview
• Three kinds of networks are supported: star,
tree, and mesh networks

(a) (b) (c)

ZigBee coordinator ZigBee router ZigBee end device

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

• In a tree network, the coordinator and routers can


announce beacons.
• In a mesh network, there is no regular beacon.
– Devices in a mesh network can only communicate with
each other in a peer-to-peer manner

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 Lmd 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

assigned to address Addr = 63,

Aparent+(n-1)×Cskip(d)+1 Addr = 30
Cskip = 7

Addr = 0,
– nth child end device is C Cskip = 31

assigned to address Addr = 1,


Addr = 126
Cskip = 7
Aparent+Rm×Cskip(d)+n A
Addr = 40,
Addr = 32,
Addr = 31 Cskip = 1
Cskip = 7
B
Addr = 33,
Cskip = 1
Addr = 45
C
Addr = 38
Addr = 39

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

• Route discovery procedure


– The source broadcasts a route request packet
– Intermediate nodes will rebroadcast route request if
• They have routing discovery table capacities
• The cost is lower
– Otherwise, nodes will relay the request along the tree
– The destination will choose the routing path with the lowest cost and then send a
route reply

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

You might also like