Академический Документы
Профессиональный Документы
Культура Документы
Chapter 4: IoT
2
Introduction
4
Definition of WLAN
A WLAN allows users to move around the coverage area, often a home
or small office, while maintaining a network connection.
5
Characteristics of WLANs
Advantages
Flexible deployment, Mobility, Robustness, Cost, ...
Disadvantages
Qos, Proprietary Solutions, Frequency Restrictions, Safety And
Security
6
WLAN Architecture Components
• Station (STA):
− Any device that contains an 802.11
conformant MAC and PHY interface to
the wireless medium ESS
AP
• Independent BSS (IBSS) as an Ad Hoc DS
Network:
− A set of STAs which are directly
connected
• Access Point (AP):
− An AP is a STA which provides access
to the DS by providing DS services in
addition to Station Services.
7
WLAN Architecture Components
• Extended Service Set (ESS):
– A set of interconnected BSSs
– Stations within an ESS can
communicate and mobile stations may
move from one BSS to another (within ESS
the same ESS)
• Distribution System (DS): STA 1 BSS 2
– A system used to interconnect a set of BSS 1 STA 2 STA4
STA 3
BSSs to create an ESS. It is used in AP
AP
Infrastructure Network
DS
• Basic Service Area (BSA):
– The area within which members of a
BSS can communicate
Portal
• The portal must also consider the
dynamic membership of BSSs and the
mapping of address and location
IEEE 802.X
required by mobility
9
Logical Services
• 802.11 specifies two categories of services are defined: Station Service
(SS) and Distribution System Service (DSS)
• Station Services (SS):
– The set of services that support transport of MSDUs (MAC Service Data
Units) between Stations within a BSS
– Present in every 802.11 station, including APs
– Are specified for use by MAC layer entities
– The SS subset is:
» Authentication
» De-authentication
» Privacy
» MSDU delivery
• Distribution System Services (DSS):
– The set of services provided by the DS which enable the MAC to transport
MSDUs between BSSs within an ESS
– The DSS subset is:
» Association and disassociation
» Distribution and integration
» Re-association
10
Authentication and De-authentication
• An open system example:
(a) Assertion: I'm station 1
(b) Challenge: Null
(c) Response: Null
(d) Result: Station becomes Authenticated
12
Association and Disassociation
Association:
• The service which establishes an initial Association between a station
and an access point
• Before a STA is allowed to send via an AP, it must first become
associated with the AP
• At any given time, a mobile STA may be associated with no more than
one AP. This ensures that the DS can determine which AP is serving a
specified STA
• Association is always initiated by the mobile STA
Reassociation:
• The service which enables an established Association (of a STA) to be
transferred from one AP to another AP (within an ESS)
• Reassociation is always initiated by the mobile STA
Disassociation:
• The service which deletes an existing Association
• The Disassociation can be invoked by either party to an Association
(mobile STA or AP)
13
Distribution and Integration Services
Distribution:
The service which (by using Association
information) delivers MSDUs within the
DS distribution
Consider a data message being sent
from STA1 to STA4 via STA2 (Input AP) STA 1
DS
Integration:
The service which enables delivery of
Portal
MSDUs between the DS and an existing
integration
network
IEEE 802.X
If the Distribution Service determines that
the intended recipient of a message is a
member of an integrated LAN, the
"output" point would be a Portal instead
of an AP
14
802.11 Layers
The 802.11 standards cover definitions for both MAC (Medium
Access Control) and Physical Layer
The standard currently defines a single MAC which interacts
with four PHYs
15
Physical Layer Architecture
The architecture of the Physical layer comprises of the two sub
layers for each station
16
Physical Layer Architecture
Sender Receiver
PHY
PLCP PLCP
MPDU MPDU
header header
Physical Media
PMD layer
Dependent (PMD) layer
17
2.4 GHz 5 GHz
DSSS PMD Sublayer
-1
+1
+1 -1 +1 +1 -1 +1 +1 +1 -1 -1 -1
Signal (Bits)
DQPSK
Encoder X Modulator
Power
Density
Transmitter
Code Power Density
generater after spreading
Receiver
Code
generater
19
FHSS PMD Sublayer
Each available frequency band is divided into sub-frequencies.
Signals rapidly change hop by shifting carriers across numerous
channels with pseudorandom sequence which is already
known to the sender and receiver
802.11 Frequency Hopping PHY uses 79 hopping channels
(2.402-2.480GHz) with 1 MHz channel spacing
Every frequency is GFSK modulated with channel width of 1MHz
and rates defined as 1 Mbps and 2 Mbps respectively
20
FHSS Transmitter/Receiver
Transmitter
Receiver
21
OFDM PMD Sublayer
22
OFDM Transmitter/Receiver
Mapping Transmitter
Mapping
IFFT
S/P
Guard RF
Interval Modulator
Mapping
Decision
Decision
FFT
P/S
RF
S/P
GI
Demodulator
Receiver Decision
23
Channelization
• 8 independent channels in 5.15GHz-5.35GHz
• 4 independent channels in 5.725-5.825GHz
24
Infrared Transmission
Diffused infrared physical PMD translates the binary signal of
the frame into light pulses that are used for transmission
1 and 2 Mbps transmission with 6-PPM and 4-PPM
(PPM:Pulse Position Modulation)
PHY operates only in indoor environments
25
PLCP Frame Formats (IEEE 802.11b)
Two different preamble and header formats
26
Long PLCP Frame Format
1Mbps DBPSK
1Mbps DBPSK
PPDU 2Mbps DQPSK
5.5, 11Mbps DQPSK
96us
2Mbps DQBSK
PPDU 5.5/11Mbps CCK
29
MAC Architecture
All implementations must support DCF, but PCF is optional
Distributed Coordination Function (DCF)
– The fundamental access method for the 802.11 MAC is Carrier Sense
Multiple Access with Collision Avoidance CSMA/CA
Point Coordination Function (PCF)
– Shall be implemented on top of the DCF
– A point coordinator : is used to determine which station currently has
the right to transmit
– Shall be built up from the DCF through the use of an access priority
mechanism
Point
Coordination Required for Contention
Function Free Services
(PCF)
MAC
extension Distributed Used for Contention
Coordination Function Services and basis for PCF
(DCF)
30
PHY
Distributed Coordination Function
32
Distributed Coordination Function -
Inter-Frame Space (IFS)
33
CSMA/CA
Free access when medium
is free longer than DIFS DIFS
Contention Window
PIFS
DIFS
SIFS
Busy Medium Backoff Next Frame
Slot time
Defer Access Select Slot and Decrement Backoff as long as medium is idle.
34
Physical Channel Sensing in CSMA/CA
DIFS
Source Data
SIFS
Destination Ack
DIFS Contention Window
36
Point Coordination Function
37
Fragmentation in IEEE 802.11
38
MAC Frame Types
39
MAC Frame Formats
Each frame should consist of three basic components:
– A MAC Header, which includes control information, addressing,
sequencing fragmentation identification, duration and QoS
information
– A variable length Frame Body, which contains information
specify to the frame type
– A frame check sequence (FCS), which contains an IEEE 32-
bit cyclic redundancy code (CRC)
Octets: 2 2 6 6 6 2 6 0-2312 4
Frame Duration
Addr 1 Addr 2 Addr 3 Sequence Addr 4 Frame
CRC
Control ID Control Body
802.11 MAC Header
Bits: 2 2 4 1 1 1 1 1 1 1 1
42
Frame Fields
43
Format of Individual Frame Types
Control Frames
– Immediately previous frame, the reception of which
concluded within the prior SIFS interval.
RTS Frame Format
– In an infrastructure LAN, the DA shall be the address of the AP with which
the station is associated. In an ad hoc LAN, the DA shall be the destination
of the subsequent data or management frame.
CTS Frame Format
– The DA shall be taken from the source address field of the RTS frame to
which the CTS is a response.
ACK Frame Format
– The DA shall be the address contained in the Address 2 field of the
immediately previous Data or Management frame.
PS-Poll Frame Format
– The BSS ID shall be the address of the AP. The AID shall be the value
assigned by the AP in the Association Response frame. The AID value
always has its two significant bits set to 1.
44
Format of Individual Frame Types : control
frames
MAC Header
Bit : 7654
Frame
Subtype: 1011 Control
Duration RA TA FCS
RTS Frame
MAC Header
MAC Header
Frame
Subtype: 1101 Control
Duration RA FCS
ACK Frame
MAC Header
Frame
Subtype: 1010 Control
AID BSS ID TA FCS PS-Poll Frame
45
Format of Individual Frame Types :
Management frames
– The BSSID : The AP address, if the station is an AP or associated with
an AP or The BSSID of the ad hoc LAN, if the station is a member of
an ad hoc LAN
– The Frame body shall be the information elements :
MAC Header
Frame Sequence
Duration DA SA BSSID Frame Body CRC
Control Control
46
Privacy and Access Control
47
Privacy and Access Control
48
Privacy Mechanism
WEP encipherment WEP decipherment
Secret
Key seed
Initialization WEP Key Sequence
seed Key IV IV
Vector (IV) PRNG
WEP Sequence
PRNG
TX + Plaintext
Secret Key Ciphertext
Ciphertext
Plaintext Integrity Alg ICV'
ICV'=ICV?
Integrity Alg ICV ICV ICV
Encrypted
Shared key requires the STA and the AP to have the same WEP
key
An AP using Shared Key Authentication sends a challenge text
packet to the station
If the STA has the wrong key or no key, it will fail this portion of the
authentication process : The STA will not be allowed to associate to
the AP
WEP is an encryption algorithm, not a method of authentication 50
Authentication Process : Frame Format
• The STA:
– Sets the Authentication Algorithm Number to 1 (shared-key)
– Set Authentication Transaction Sequence Number to 1
• The AP:
– Sets the Authentication Algorithm Number to 1 (shared-key)
– Set Authentication Transaction Sequence Number to 2
– Status Code set to 0 (Successful)
– Challenge Text (later)
• The STA :
– Sets the Authentication Algorithm Number to 1 (shared-key)
– Set Authentication Transaction Sequence Number to 3
– Challenge Text (later)
• The AP:
– Sets the Authentication Algorithm Number to 1 (shared-key)
– Set Authentication Transaction Sequence Number to 4
– Status Code set to 0 (Successful) 51
Channel Scanning
Scanning required for many functions
– finding and joining a network
– finding a new AP while roaming
– initializing an Independent BSS (ad hoc) network
A STA shall operate in either a Passive Scanning mode or an
Active Scanning mode
For Passive scanning, the STA shall scan for Beacon frames
containing the desired SSID (or broadcast SSID)
For Active scanning, the STA shall transmit Probe request
containing the desired SSID (also can use broadcast SSID): On
each channel Send a Probe, Wait for a Probe Response
Beacon or Probe Response contains information necessary to join
new network
If a STA’s scanning does not result in finding a BSS with the
desired SSID, or does not result in finding any BSS, the STA may
start an IBSS
52
Active Scanning Example
Steps to Association:
Station sends Probe
Access Point A Access Point C
APs send Probe Response
Station selects best AP
Station sends Association
Request to selected AP
AP sends Association
Response.
Min_Probe_Response_Time Max_Probe_Response_Time
P RESPONSE
Responder
1
DIFS
Responder P RESPONSE
2
DIFS SIFS SIFS
54
Roaming Approach
Access Point B
Station 4
Station 7
Station 3
Access Point B
Station 2 Station 6
Station 5
Reassocication
Station 4
Station 3
Station 7
Station 1
57
802.11 Wireless LAN Characteristics
58
Chapter 2
WPAN : Bluetooth, ZigBee
Architectural Overview of Bluetooth
Introduction To ZigBee
59
Architectural Overview of
Bluetooth
Bluetooth Characteristics and Specifications
Protocol Stack
Network Topology
Functional Overview
60
Applications
61
Bluetooth Characteristics
Background
1997 - Designed by Ericsson
1998 - Established the Special Interest Group (SIG)
Ericsson, Nokia, IBM, Toshiba, Intel
2002 - IEEE 802.15 WPAN
IEEE 802.15.1 Wireless Personal Area Networks (Bluetooth)
Bluetooth Characteristics
Low cost Market consideration
Low power consumption
Unlicensed Used ISM band used
Mixed voice and data
Sized 0.5 square inches
62
Bluetooth Specifications
2.4 GHz ISM Unlicensed band
FHSS : Frequency Hopping Spread Spectrum
– Avoid interference
– 23/79 channels
– 1 MHz per channel
– 1 Mbps link rate (GFSK modulation frequency deviation Between
140kHz and 175kHz)
– Fast frequency hopping and short data packets avoids
interference
» Nominally hops at 1600 times a second (vs. 2.5 hops/sec in
IEEE 802.11)
» 625us per hop (366us for data only)
» 3200 times a second during inquiry and paging modes
Transmit power and range
- Power 1mW (class 3, 3% power of cellular phone)
• 10 m of transmission distance
- Power 100 mW (class 1)
• 100 m of transmission distance
63
Bluetooth Protocol stack
64
Bluetooth network topology
Radio designation
– Connected radios can be master or
slave S M
Scatternet S
65
Functional Overview
h
tac
radios to connect to Ttypical=2s
De
Connecting Inquiry Page
States
Page : Connect to a
specific radio Ttypical=0.6s
Transmit
Active Connected
data
AMA
Connected : Actively States AMA
on a piconet (master or
Ttypical=2 ms Ttypical=2 ms
slave)
Releases
Park/Hold : Low Power Low Power AMA
PARK
PMA
HOLD
AMA
States Address
connected states
66
Page and Inquire Scans
Inquiry scan :
– 32 channels (of 79 channels) are assigned for inquiry
procedure
– 32 channels are divided as 2 trains (Trains A and B), each
one contains 16 channels.
Page scan :
– 32 channels (of 79 channels) are assigned for page
procedure
– 32 channels are divided as 2 trains (Trains A and B), each
one contains 16 adjacent channels.
– Train A : f(k-8), f(k-7), … f(k), f(k+1), … , f(k+7)
– Train B : f(k-16), f(k-15), … f(k-9), f(k+8), … , f(k+15)
3200 hop/sec
Broadcast ID packet
67
Page and Inquire Scans
Inquiring radio Issues inquiry packet with Inquire ID (dedicated
or general access code GIAC or DIAC)
Any radio doing an Inquire scan will respond with an FHS packet
– FHS packet gives Inquiring radio information to page
» Device ID IDa
» Clock
– If there is a collision then radios wait a random number of
slots before responding to the page inquire
After process is done, Inquiring radio has Device IDs and Clocks
of all radios in range
Slave listens one of 16 channels for sufficient time (18 slots =
11.25 ms)
68
The Piconet
IDa
IDd IDd
IDa D IDa P
A M
IDe
IDe
sb
E
IDa
IDb B IDb S IDa
IDc C IDc S
Access Point
master
slave
LAN master/slave
Mobile Phone
Headset
Printer
Mouse
Laptop Laptop
70
Device Addressing
fk fk+1 fk fk+1
Master
One
Slot
Master Three Slot Packet
Packet
One
One Slave Slot
Slave Slot
Packet
Packet
625 us
625 us
One Slot
One Slot
asymmetric bandwidth
73
Time Division Duplex (TDD)
Master
+/-10 s 220 s
Slave
guard Packet
time
time
even (625s) odd (625s) even slot
74
Multi-slot Packets
76
Bluetooth Frame Fields
Access code : Timing synchronization, offset compensation, paging,
and inquiry
– Preamble
0101 if LSB of sync word is 0
1010 if LSB of synch word is 1
– Sync word 64 bits
– Trailer
0101 if MSB of sync word is 1
1010 if MSB of sync word is 0
Header : used to identify frame type and carry protocol control
information
− AM_ADDR : contains “active mode” address of one of the slaves
− Type : identifies type of frame
− Flow : 1-bit flow control
− ARQN : 1-bit acknowledgment
− SEQN : 1-bit sequential numbering schemes
− Header error control (HEC) : 8-bit error detection code
Payload : contains user voice or data
77
Overview to Zigbee
ZigBee Characteristics
Protocol Stack
Network Topology
Functional Overview
78
ZigBee Characteristics
79
Applications
Monitors TV VCR
Sensors DVD/CD
Automation Remote control
control
Consoles
Portables TOYS & HOME Security
GAMES AUTOMATION Lighting
educational
Closures
80
ZigBee Protocol Stack
81
Network Topologies
Cluster Tree
– Advantage
» Low routing cost PAN coordinator
» Multihop communication Full Function Device
– Disadvantage
Reduced Function Device
» Route reconstruction is
costly
» Latency may be quite
Cluster Tree long
82
Network Topologies
Device Classes
Full function device (FFD)
− Can function in any topology
− Capable of being Network coordinator
− Can talk to any other device (FFD/RFD)
Reduced function device (RFD)
− Limited to star topology
− Cannot become network coordinator
MAC functionalities
− beacon management channel access (slotted or unslotted
CSMA/CA)
− guarantee time slot management (QoS)
− frame validation acknowledged
− frame delivery association disassociation
− security mechanisms (AES)
84
Operating frequency bands
The standard specifies two PHYs :
– 868 MHz/915 MHz direct sequence spread spectrum (DSSS) PHY (11
channels)
» 1 channel (20Kb/s) in 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
Frame Types
– Data Frame : used for all transfers of data
– Beacon Frame : used by a coordinator to transmit beacons
– Acknowledgment Frame : used for confirming successful frame
reception
– MAC Command Frame : used for handling all MAC peer entity
control transfers
Operating Mode
– Slotted (Beacon enable mode ) : Periodic data and Repetitive
low latency data using
– Un-slotted (Non-Beacon enable mode) : Intermittent data using
87
Operating Modes
Non-Beacon Mode
ZigBee devices are continuously active
Requires a more robust power supply
A simple, traditional multiple access system
Beacon Mode
ZigBee Routers transmit periodic beacons to confirm their
presence to other network nodes
Controlling power consumption and extending battery life
Allows all devices in the network the ability to know when to
communicate with each other
Beacon intervals depend on data rate
15.36 ms to 251.68 s at 250 kbit/s
24 ms to 393.21 s at 40 kbit/s
48 ms to 786.43 s at 20 kbit/s
88
MAC Frames
Bytes 2 1 0-20 variable 2
90
Introduction
Two types of radio communication
− High-range networks: a few hundred meters to several tens
of kilometers: traditional cellular networks: GSM, GPRS, LTE,
etc
High cost
High power consumption
High throughput
Large infrastructure : Oversized for IoT applications
− Short-range networks: from a few centimeters to a few
hundred meters maximum: Bluetooth, RFID, NFC, ZigBee,
WiFi, etc
Low cost
Low power comsumption
Low throughput
Short transmission range
92
LoRa Specifications
93
LoRaWAN Network Architecture
Long Range Star Topology: Preserving battery lifetime when
long-range connectivity is achieved
Data transmitted by End-Device (ED) is received by multiple
gateways
Each gateway (BS) forward the received packet to the cloud-
based network server via some links (Cellular, Ethernet, Wi-Fi,…)
94
Devices classes
Bi-directional EDs (Class A)
− Each ED’s uplink transmission is followed by two short downlink windows
− The transmission slot scheduled by the ED is based on ALOHA-type
protocol
Bi-directional EDs with scheduled receive slots (Class B)
− ED opens extra receive windows at scheduled times that’s why it receives
a time-synchronized beacon from the gateway
Bi-directional EDs with maximal receive slots (Class C)
− EDs have almost continuously open receive windows
95
LoRa Modulation
LoRa is a spread spectrum modulation scheme that uses
wideband linear frequency modulated pulses whose frequency
increases or decreases over a certain amount of time to encode
information
The main advantages of this approach are twofold:
A substantial increase in receiver sensitivity due to the
processing gain of the spread spectrum technique
A high tolerance to frequency misalignment between receiver and
transmitter
96
LoRaWAN Protocol Stack
LoRa physical layer enables the long-range communication link
The protocol and network architecture have the most influence in
determining
- the battery lifetime of a node,
- the network capacity
- the quality of service
- the security
97
LoRa Frame Format
Frame Format
98
LoRaWAN Security
LoRaWAN utilizes two layers of security: one for the network and
one for the application
99
Chapter 4
IoT
IoT Applications and technologies
IoT Architecture
IoT Platform
IoT Security and Privacy
100
What is the “Internet of Things”?
101
Internet of Things Hierarchy
102
IoT Application Segments
103
IoT Technologies
104
IoT Architecture
Integrated
Application Smart Grid Green Building Smart Transport Env. Monitor
Information
Processing
Big Data Search Engine IA Security Data Mining
Network and
WWAN
Communications WMAN
Internet
WPAN and LPWAN WLAN
Sensing
105
GPS Smart Device RFID Sensor Camera
IoT Platform
IEEE 802.15.4
2.4GHz RF
User/Environment sensors System
Sensors and
Actuators XM1000
Device
level “Thing”
Communications
Network
Network Gateway
level
The The
Internet Internet
Servers
106
Sensors and Actuators
Sensors: Input components That sense and collect surrounding
information
Basically three types:
Passive, omnidirectional (e.g. mic)
Passive, narrow-beam sensor (e.g. PIR)
Active sensors (e.g. sonar, radar, etc.)
We can turn almost every object into a “thing”. A thing still looks
much like an embedded system currently
109
Networks
The Roles of Networks
– Managing nodes (discovery, join, leave, etc)
– Relaying data packets from the source to the destination node in the
network
The Internet uses TCP/IP : this implies that things must also
support TCP/IP
111
Protocol Stack
Thing Thing
Application Application
TCP/UDP TCP/UDP
Server
Application
Gateway
TCP/UDP
Solutions?
113