Professional Documents
Culture Documents
Zee Big
Zee Big
Zee Big
4 MAC
and PHY
Specifications for LRWPANs
Tel: (03) 211-8800 Ext: 5990
Email: jhchen@mail.cgu.edu.tw
URL: http://www.csie.cgu.edu.tw/~jhchen
All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise,
without prior written permission of Professor Jenhui Chen (E-mail: jhchen@mail.cgu.edu.tw).
CGU NDSL LR-WPAN - 1
Outline
1. IEEE 802.15.4 Architecture and Overview
2. IEEE 802.15.4 PHY
3. IEEE 802.15.4 MAC
1. 802.15.4 Architecture
and Overview
WPAN
WLAN
WMAN
LR-WPAN
Applications
Industrial
Agricultural
Vehicular
Residential
Medical
Wireless Markets
HI-FI
AUDIO
STREAMING
VIDEO
>
LONG
MULTI-CHANNEL
VIDEO
LAN
RANGE
802.11b
802.11a/HL2 & 802.11g
Bluetooth 2
<
SHORT
DIGITAL
VIDEO
ZigBee
PAN
Bluetooth1
LOW
<
DATA RATE
>
HIGH
Wireless Technologies
Range
Meters
GSM
GPRS
EDGE
3G
2000
2003-4
10,000
2005
1,000
802.11b
ZigBee
100
Bluetooth 2.0
Bluetooth
10
100
1,000
Hiper
LAN/2
WiMedia
Bluetooth 1.5
10
802.11a/g
10,000
Bandwidth
kbps
100,000
WLAN vs WPAN
Wireless Applications
monitors
sensors
automation
control
monitors
diagnostics
sensors
INDUSTRIAL &
COMMERCIAL
CONSUMER
ELECTRONICS
TV
VCR
DVD/CD
remote
ZigBee
PERSONAL
HEALTH CARE
consoles
portables
educational
LOW DATA-RATE
RADIO DEVICES
TOYS &
GAMES
HOME
AUTOMATION
PC &
PERIPHERALS
mouse
keyboard
joystick
security
HVAC
lighting
closures
Architecture
APPLICATION
ZIGBEE STACK
SILICON
ZigBee Alliance
45+ companies: semiconductor
mfrs, IP providers, OEMs, etc.
Customer
Defining upper layers of protocol
stack: from network to
application, including application
ZigBee
profiles
Alliance
First profiles published mid 2003
IEEE
802.15.4
IEEE 802.15.4 Working Group
Defining lower layers of protocol
stack: MAC and PHY
draft D18 (will be finalized 2003)
WPAN Features
Media access is contention based.
Using carrier sense multiple access with collision
avoidance (CSMA/CA) MAC protocol
Similar to IEEE 802.11 CSMA/CA protocol, but not the same
FFD vs RFD
Full function device (FFD)
Any topology
Network coordinator capable
Talks to any other device
Network Topologies
Star and Peer2Peer Topologies
Network Topologies
Star network formation:
formation
An FFD may establish its own network and become the PAN
coordinator.
All star networks operate independently.
Choosing a PAN identifier, which is not currently used by any
other network within the radio sphere of influence.
Both FFDs and RFDs may join the network.
Star Topology
Home Application
FFD
RFD
FFD
PAN coordinator
RFD
RFD
FFD
RFD
MAC/PHY Functions
Functions in PHY sublayer
beacon management
channel access (slotted or unslotted CSMA/CA)
guarantee time slot management (QoS)
frame validation
acknowledged frame delivery
association
disassociation
security mechanisms (AES)
PHY Specifications
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
PHY Specification
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
PHY Specification
2.4 GHz
ISM
868 MHz
915 MHz
ISM
COVERAGE
DATA RATE
CHANNEL(S)
Worldwide
250 kbps
16
Europe
20 kbps
Americas
40 kbps
10
PHY Parameters
Transmit Power
Capable of at least 1 mW
Power reduction capability required if > 16 dBm
(reduce to < 4 dBm in single step)
Receiver Sensitivity
-85dBm (2450 MHz)
-92dBm (868/915 MHz)
1% Packet Error Rate in PSDU = 20 Bytes)
RSSI Measurements
A PHY header
PHY Header (8 bits) 7-bit frame length (0-127) and 1-bit reserved
A payload
PSDU (0 to 127 bytes) Data field
4 Bytes
1 Byte
1 Byte
Preamble
Start of
Packet
Delimiter
PHY
Header
6 Bytes
PHY Service
Data Unit (PSDU)
0-127 Bytes
CGU NDSL LR-WPAN - 31
(b3b2b1b0)
(b7b6b5b4)
2Mchips/s
250kb/s
b7b6b5b4b3b2b1b0
2Mhz
4:1
1:32
1:1
(1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0)
62.5ksymbols/s
20kb/s
40kb/s
1:1
1:15
20ksymbols/s
40ksymbols/s
1:1
300kchips/s
600kchips/s
300khz
600khz
CGU NDSL LR-WPAN - 36
Pulse shape
raised cosine pulse shape (rolloff factor = 1) used to represent each
baseband chip
Protocol Layer
APPLICATIONS
Customer
APPLICATION INTERFACE
SECURITY
NETWORK LAYER
Star/Cluster/Mesh
915MHz
IEEE
ZigBee
Alliance
802.15.4
868 MHz
Application
ZigBee Stack
Silicon
Network Topologies
Star Topology
Peer-Peer Topology
Star Topology
Network
coordinator
Master/slave
Full Function Device (FFD)
Reduced Function Device (RFD)
Communications Flow
CGU NDSL LR-WPAN - 45
Peer-Peer Topology
Point to point
Tree
Room 1
Room 2
Device Addressing
All devices have IEEE addresses (64-bits)
Short addresses (16-bit) can be allocated
Addressing modes:
Network + device identifier (star)
Source/destination identifier (peer-peer)
Source/destination cluster tree + device identifier
(cluster tree)
Superframe Structure
The LR-WPAN allows the optional use of a superframe
structure.
The format of the superframe is defined by the coordinator.
The superframe is bounded by network beacons, is sent by the
coordinator and is divided into 16 equally sized slots.
The beacon frame is transmitted in the first slot of each
superframe.
If a coordinator does not wish to use a superframe structure it
may turn off the beacon transmissions.
The beacons are used to synchronize the attached devices, to
identify the PAN, and to describe the structure of the
superframes.
Any device wishing to communicate during the contention
access period (CAP) between two beacons shall compete with
other devices using a slotted CSMA-CA mechanism.
All transactions shall be completed by the time of the next
network beacon.
CGU NDSL LR-WPAN - 50
Superframe Structure
The superframe can have an active and an inactive portion. During
the inactive portion the PAN enters a low power mode.
The PAN coordinator may dedicate portions of the active
superframe to some devices/applications. These portions are
called guaranteed time slots (GTSs).
The GTSs comprise the contention free period (CFP).
The PAN coordinator may allocate up to 7 of these GTSs and a
GTS may occupy more than one slot period. (Note:all slots may be
allocated for CFP.)
All contention based transactions shall be complete before the
CFP begins. Also each device transmitting in a GTS shall ensure
that its transaction is complete before the time of the next GTS or
the end of the CFP.
Superframe Structure
The structure of this superframe is described by the
values of macBeaconOrder (BO) and
macSuperframeOrder (SO).
The macBeaconOrder describes the interval at which the
coordinator shall transmit its beacon frames.
The macSuperframeOrder describes the length of the active
portion of the superframe, which includes the beacon frame.
Superframe Structure
The values of BO and the beacon interval (BI)
BI are related as follows:
BI = aBaseSuperframeDuration 2BO symbols, if 0BO14
The values of SO and the superframe duration (SD)
SD are related as follows:
SD = aBaseSuperframeDuration 2SO symbols, if 0SOBO14
Note : If BO = 15, the coordinator will not transmit beacon and the value of
SO shall be ignored. (non beacon-enable network) Moreover,
macRxOnWhenIdle defines whether the receiver is enabled during periods
of transceiver inactivity (default : FALSE)
If SO = 15,
15 the superframe will not be active after the beacon.
PANs that wish to use the superframe structure shall set 0SOBO14.
14
Superframe Structure
The active portion of each superframe shall be
divided into aNumSuperframeSlots equally spaced
slots of duration 2SO *aBaseSlotDuration
aNumSuperframeSlots =16 (Fixed)
aBaseSlotDuration = 2SO 60 symbols (Variable)
aBaseSuperframeDuration = aNumSuperframeSlots
aBaseSlotDuration = 16 2SO 60 symbols (Variable)
MAC Specifications
Superframe Structure
Optional (named as beacon-enable network)
synchronize
identify the PAN
describe the structure of the superframes
MAC Specifications
MAC Specifications
Any device wishing to communicate during the
CAP between two beacons shall compete with
other devices using a slotted CSMA-CA
mechanism.
All transactions shall be completed by the time
of the next network beacon
If the coordinator does not wish to use a
superframe structure, it can turn off the beacon
transmissions
named as non beacon-enable network
Superframe Structure
PHY Layer
MAC
Layer
Payload
Synch. Header
(SHR)
PHY Header
(PHR)
MAC Header
(MHR)
MAC Footer
(MFR)
slotted CSMA/CA:
It is similar to the unslotted CSMA/CA but follows
the backoff slot boundary.The backoff slots are
aligned with the start of the beacon transmission.
Security (1/2)
Security implementation in the MAC sublayer
maintain an access control list (ACL)
use symmetric cryptography to protect transmitted frames.
The higher layers determine when security is to be used at
the MAC sublayer, provide all keying material, Key
management,
management device authentication and freshness protection.
protection
Security modes
Unsecured mode
ACL mode
Secured mode
Data Transmissions
(1) Data transferred from device to coordinator
In a beacon-enable network, device finds the beacon to
synchronize to the superframe structure. Then using
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 beacon-enabled network
Communication to a coordinator
In a non beacon-enabled network
CGU NDSL LR-WPAN - 68
Data Transmissions
(2) Data transferred from coordinator to device
In a beacon-enable network,
network the coordinator indicates in
the beacon that the data is pending.
pending Device periodically
listens to the beacon and transmits a MAC command
request using slotted CSMA/CA if necessary.
In a non beacon-enable network,
network a device transmits a
MAC command request using unslotted CSMA/CA.
CSMA/CA If the
coordinator has its pending data, the coordinator transmits
data frame using unslotted CSMA/CA.
CSMA/CA Otherwise,
coordinator transmits a data frame with zero length
payload.
payload
pending list
Indirect transmissions
Since the standard favors very low cost devices that,
in general, will be battery powered, transactions can
be instigated from the devices themselves rather than
from the coordinator.
either coordinator indicates in its beacon when messages
are pending for devices
or devices polls the coordinator to determine if they have any
messages pending.
Such transfers are called indirect transmissions.
transmissions
Beacon Frame
CGU NDSL LR-WPAN - 72
macAckWaitDuration
macAckWaitDuration
7.
If the coordinator has enough time to determine whether the device has
a frame pending and is still able to send the ACK frame within
macAckWaitDuration symbols,
it sets the actual frame pending subfield of the ACK frame.
Otherwise, the coordinator set the frame pending subfield of the ACK frame
to 1 (i.e., announce first)
If there is no pending data, coordinator will send a data frame containing 0
length payload to device, and without requesting ACK
Drawback : waste devices power
macAckWaitDuration is set as
120 symbols, if 0 channel 10 (868/915MHz)
54 symbols, if 11 channel 26 (2.4GHz)
Data Service
O
rM
igiA
nC
ator
C
h
a
n
n
e
l
access
Datafram
e
Ackn
le
d
ent
(io
frw
eq
ue
sg
tee
d)m
M
CPS-DATA.confirm
Recipient
O
riginator
M
CPS-DATA.request
ReM
ciA
pC
ient
M
CPS-DATA.indication
Frame Types
Inter-frame spacing
The MAC sublayer needs a finite amount of time to
process data received by the PHY layer.
Needs inter-frame spacing (IFS) period.
Inter-frame spacing
CSMA-CA Algorithm
CSMA-CA Algorithm
In slotted CSMA-CA, the backoff period boundaries shall be
aligned with the superframe slot boundaries
the start of the first backoff period of each device is aligned with the
start of the beacon transmission.
CSMA-CA Algorithm
Each device shall maintain three variables for each
transmission attempt:
CSMA-CA Algorithm
macBattLifeExt flag : This indicates whether battery life extension, by
reduction of coordinator receiver operation time during the CAP, is enabled.
(default : FALSE)
macBattLifeExtPeriods : the number of backoff periods during which the receiver
is enabled following a beacon in battery life extension mode. (active shorter and
sleep more)
This value is dependent on the currently selected logical channel
For phyCurrentChannel (0-10), this value is equal to 8.
For phyCurrentChannel (11-26), this value is equal to 6.
macMinBE value : The minimum value of the backoff exponent in the CSMACA algorithm.
If this value is set to 0, collision avoidance is disabled during the first iteration of
the algorithm.
Values :0-3 (default : 3)
aMaxBE value : The maximum value of the backoff exponent in the CSMACA algorithm.
Value = 5 (that is, max 32 backoff slots)
Flow Chart
Channel Scan
Four channel scans
Active scan
Passive scan
Orphan scan
Energy detection scan
Starting a PAN
A PAN is started by
an FFD
after an active channel scan
a suitable PAN identifier is selected
Beacon generation
A device transmits beacon frames only if macShortAddress
0xffff.
The FFD may either begin beacon transmission as the PAN
coordinator of a new PAN or as a device on a previously
established PAN.
The address used in the source address field of the beacon
frame shall contain
aExtendedAddress when macShortAddress = 0xfffe
macShortAddress otherwise.
Device discovery
An FFD may indicate its presence on a PAN to
other devices by transmitting beacon frames.
This allows the other devices to perform device
discovery.
Association
A device first performs active or passive channel scan
Then choose a suitable PAN
Sent an associate request command frame to the PAN
coordinator and waits the returned acknowledgement frame
The ack frame does not mean that the device has associated
The coordinator decides within aResponseWaitTime symbols
phyCurrentChannel
macPANId
macCoordExtendedAddress
or macCoordShortAddress,
associate request command frame
CGU NDSL LR-WPAN - 100
FFD/RFD
Association
If the association is successful, the device shall
store the addresses of the coordinator with which
it has associated.
the short address of the coordinator (contained in the
beacon) is stored in macCoordShortAddress
the extended address of the coordinator (contained in
the MAC header of the association response command
frame) is stored in macCoordExtendedAddress.
Association
The device also stores the assigned short address
into macShortAddress
Three types of macShortAddress
0x0000-0xfffd : for data communications
0xfffe : still uses 64-bit extended address even associated
0xffff : not associated yet
Disassociation
When a coordinator wants one of its associated
devices to leave the PAN, it shall send the
disassociation notification command frame to the
device using indirect transmission.
transmission
disassociation notification command frame
Frame Transmission
If the source address (SA) field is not present, the
originator of the frame shall be assumed to be the PAN
coordinator.
If the destination address (DA) field is not present, the
recipient of the frame shall be assumed to be the PAN
coordinator.
If both SA and DA addresses are present, the MAC shall
compare the destination and source PAN identifiers
If the PAN identifiers are identical, the intra PAN subfield of the
frame control field shall be set to 1 and the source PAN
identifier shall be omitted from the transmitted frame.
Save bandwidth, only carry the destination PAN identifier
If the PAN identifiers are different, the intra PAN subfield of the
frame control field shall be set to 0 and both destination and
source PAN identifier fields shall be included in the
transmitted frame.
CGU NDSL LR-WPAN - 105
Retransmissions
If direct transmission
fails, the device
retransmits the frame
and waiting for the ACK,
up to a maximum of
aMaxFrameRetries
times.
success
starting slot
length (in superframe slots)
direction
associated device address
GTS Allocation
initiated by a device
0: receive
0: GTS allocation
1: transmit
1: GTS deallocation
(devices view)
CGU NDSL LR-WPAN - 112
GTS Deallocation
initiated by a device
initiated by coordinator
GTS reallocation
deallocated
compact
GTS expiration
The PAN coordinator attempts to detect when a
device has stopped using a GTS using the
following rules:
For a transmit GTS (uplink),
(uplink) the PAN coordinator does
not receive data frames from the device at least every
2*n superframes
For receive GTSs (downlink),
(downlink) the PAN coordinator does
not receive ACK frames from the device at least every
2*n superframes
0 macBeaconOrder 8
9 macBeaconOrder 14
CGU NDSL LR-WPAN - 115
Beacon (000)
Data (001)
Acknowledgment (010)
MAC command (011)
Source PAN ID
Appear in the MAC frame only if
source addressing mode = 1
intra PAN subfields = 0
Address fields
Either 16- or 64-bits in length, according to the
value specified in the source/destination
addressing mode subfield of the frame control
field.
CRC-16
Beacon
Data
Acknowledgment
MAC command.
BO
SO
specifies the final
superframe slot in CAP
CGU NDSL LR-WPAN - 124
=0 always appear
>0
the direction of data frame
transmission by the device
GTS descriptor
3-bit
3-bit
variable
(DSN)
1 : allocation
0: deallocation
MAC PIB
Attributes
Energy
detection
scan
Association
message
sequence
chart device
Passive
scan
message
sequence
chart
Data
transmission
message
sequence
chart originator
Data
transmission
message
sequence
chart recipient
More Information
www.IEEE802.org
http://www.ieee802.org/15/pub/TG4.html
Thank You.
Questions ?
CGU NDSL LR-WPAN - 160