5. zigbee technologyarusu/abdrt/lecture/abdrt lecture zigbee-e… · 5.1 introduction zigbee is a...
TRANSCRIPT
5. ZigBee Technology
Access and Broadcasting Digital Radio Techniques 1
Prof.dr.ing. Ion Marghescu
2019
Contents
1. Introduction
2. ZigBee Standard
2.1. History of ZigBee
2.2 ZigBee Applications:
3. . ZigBee Protocol
3.1 ZigBee Networking Topologies
3.2 ZigBee wireless networking protocol Layers
3.2.1 PHY Layer
3.2.2 MAC Layer
3.2.3 The NWK Layer
3.2.4 The Application Layer
3.2.5 ZigBee Protocol Packets Structure
3.2.6 Security
3.3 Operating Frequencies and Data Rates
3.6 ZigBee vs LORAWAN
2 Access and Broadcasting Digital Radio Techniques 2019
5.1 Introduction
ZigBee is a low-cost, low-power, wireless mesh
networking standard.
Low cost allows the technology to be widely deployed
in wireless control and monitoring applications.
Low power-usage allows longer life with smaller
batteries.
The mesh networking provides high reliability and
more extensive range.
“ZigBee” originated with reference to the behavior of
honey bees after their return to the bee hive.
3 Access and Broadcasting Digital Radio Techniques 2019
ZigBee standard was developed by ZigBee Alliance,
formed in 2002.
Has hundreds of member companies, from the semi-
conductor industry and software developers to original
equipment manufacturers and installers. ZigBee has adopted the standard IEEE 802.15.4 for:
- physical (PHY)
- Medium Access Control (MAC).
4 Access and Broadcasting Digital Radio Techniques 2019
The data link layer has two sublayers: logical link
control (LLC) and media access control (MAC).
5 Access and Broadcasting Digital Radio Techniques 2019
This standard defines a set of communication
protocols for low data rate, short range, wireless
networking.
Can operate in 868MHz, 915MHz and 2.4GHz
frequency bands.
In many ZigBee applications, the total time the
wireless device is engaged in any type of activity is
very short.
Targeted mainly for battery power applications
where low data rate, low cost and long battery life
are main requirements.
The device spends most of its time in power saving
mode, also known as sleep mode.
6 Access and Broadcasting Digital Radio Techniques 2019
As a result, ZigBee enabled devices are capable of
being operational for several years before their
batteries needs to be replaced.
This technology reduced the implementation cost by
simplifying the communication protocols and
reducing the data rate.
Initially ZigBee technology was developed for a
wireless personal area networks (PAN), aimed at
control and military applications with low data rate
and low power consumption.
5.2 ZigBee Standard
• Consists in the specifications designed for wireless
networked sensors and controllers.
• The physical (PHY) and medium access control
(MAC) layers are standardized by the IEEE 802.15
wireless personal area network (WPAN) working group
(IEEE 802.15.4).
• The higher layers are specified by the ZigBee
Alliance.
• Is designed for providing wireless networking
capability for battery-powered, low-cost, low capability
sensor and controller nodes, typically powered only by
an eight-bit microcontroller.
7 Access and Broadcasting Digital Radio Techniques 2019
• Is designed for many low-data rate and low power
consumption applications, such as:
home monitoring and automation,
environmental monitoring,
industry controls,
emerging low-rate wireless sensor applications.
8 Access and Broadcasting Digital Radio Techniques 2019
5.2.1 History of ZigBee
• Networks similar to ZigBee were conceived around
1998, when many engineers saw the need for self-
organizing ad-hoc digital radio networks need that.
•Such networks can not be efficiently realized by using
either Wi-Fi or Bluetooth.
•The IEEE 802.15.4-2003 standard was established in
May 2003.
• The ZigBee specifications were ratified on December
2004.
• The ZigBee Alliance announced public availability of
Specification 1.0 on 13 June 2005 (ZigBee 2004
Specification). 9 Access and Broadcasting Digital Radio Techniques 2019
•This was superseded by the publication of IEEE
802.15.4-2006.
• The ZigBee Alliance announces the completion of
an enhanced version of the ZigBee Standard in
September 2006: ZigBee 2006 Specification.
• During the last quarter of 2007, ZigBee PRO, the
enhanced ZigBee specification was finalized.
10 Access and Broadcasting Digital Radio Techniques 2019
5.2.2 ZigBee Applications •Biotelemetry applications
Rather than the traditional wired monitoring equipment,
the biotelemetry techniques allow electrical isolation from
data processing devices and power lines.
In-home patient monitoring: patient’s vital body
parameters, for example blood pressure and heart rate can
be measured by wearable devices.
The patient wears a ZigBee device that interfaces with a
sensor that gathers health related information periodically.
Then the data is wirelessly transmitted to a local server,
such as a personal computer inside the patient’s home,
where initial analysis is performed.
The vital information is sent to the patients nurse or
physician via the internet for further analysis.
11 Access and Broadcasting Digital Radio Techniques 2019
•Monitoring the structural health of large scale building
and structures
Several ZigBee enabled wireless sensors like
accelerometers can be installed in a building.
All these sensors can form a single wireless network to
gather the information that will be used to evaluate the
building structural health and detects the signs of possible
damage.
After an earthquake, for example, a building requires a
careful testing before it reopens to the public.
The data gathered by the sensors could help further and
reduce the cost of inspection.
12 Access and Broadcasting Digital Radio Techniques 2019
•Home automation
Some of the possible ZigBee applications in a typical
residential building are:
light control systems,
security systems,
meter reading systems,
irrigation systems,
multi zone Heating,
Ventilation, and
Air Conditioning
(HVAC) systems
13 Access and Broadcasting Digital Radio Techniques 2019
ZigBee Applications - Smart Home
5.2.3 ZigBee Protocol
5. 3.1 ZigBee Networking Topologies
• The network formation is managed by the ZigBee networking layer.
• The network must be in one of two networking topologies specified in
IEEE 802.15.4:
star
peer-to-peer
• The Zig Bee devices can be of two types:
FFD – Full-Function Device
RFD – Reduced- Function Device.
• In the frame of a network device can be used as:
End Device
Router
Coordinator. 14 Access and Broadcasting Digital Radio Techniques 2019
15 Access and Broadcasting Digital Radio Techniques 2019
• Star topology
Every device in the network can communicate
only with the PAN coordinator.
A FFD, programmed to be a PAN coordinator,
is activated and starts establishing its network.
The first thing this PAN coordinator does is
selecting a unique PAN identifier that is not used
by any other network deployed is in the region
around the device in which its radio can
successfully communicate with other radios.
16 Access and Broadcasting Digital Radio Techniques 2019
• Peer-to-peer topology
Each device can communicate directly with any other
device if the devices are placed close enough to establish
a successful communication link
Any FFD can play the role of the PAN coordinator.
All the devices that participate in relaying the messages
are FFDs because RFDs are not capable of such action.
A RFD can be part of the network and communicate
only with one particular device (a coordinator or a router)
in the network.
17 Access and Broadcasting Digital Radio Techniques 2019
• A peer-to-peer network can take different shapes by defining
restrictions on the devices that can communicate with each other.
If there is no restriction, the peer-to-peer network is known as a
mesh topology.
• Another form of peer-to-peer network that ZigBee supports is
the tree topology (below).
A ZigBee coordinator (PAN coordinator) establishes the
initial network.
ZigBee routers form the branches and relay the messages.
ZigBee end devices act as leaves of the tree and do not
participate in message routing.
18 Access and Broadcasting Digital Radio Techniques 2019
• An important conclusion: any IEEE 802.15.4 network, regardless of its
topology, is always created by a PAN coordinator.
• The PAN coordinator controls the network and performs the following
minimum duties:
Allocate a unique address (16-bit or 64-bit) to each device in the
network;
Initiate, terminate, and route the messages throughout the
network;
Select a unique PAN identifier for the network; the PAN
identifier allows the devices within a network to use the 16-bit
short-addressing method and still be able to communicate with
other devices across independent networks.
• There is only one PAN coordinator in the entire network.
• A PAN coordinator may need to have long active periods; therefore, it
is usually connected to a main supply rather than a battery.
• All other devices are normally battery powered.
• The smallest possible network includes two devices:
a PAN coordinator and
a device.
5.3.2 ZigBee wireless networking protocol layers
19 Access and Broadcasting Digital Radio Techniques 2019
•ZigBee protocol layers are based on the Open System
Interconnect (OSI) basic reference model.
•As shown below, the bottom two networking layers are
defined by IEEE 802.15.4 standard.
• IEEE 802.15.4 defines the specifications for PHY
and MAC layers of wireless networking, but it does
not specify any requirements for higher networking
layers.
• The ZigBee standard, issued by ZigBee Alliance,
defines the networking, applications and security
layers of the protocol.
• It adopts IEEE 802.15.4 PHY and MAC layers as
a part of the ZigBee networking protocol.
• Therefore, ZigBee-compliant devices conform to
IEEE 802.15.4 as well.
20 Access and Broadcasting Digital Radio Techniques 2019
5.3.2.1 PHY Layer
• In ZigBee wireless networking protocol , the lowest layer is the
Physical layer, or PHY.
• This layer is the closest layer to hardware and directly controls
and communicates with the radio transceiver.
• The PHY layer is responsible for modulation and demodulation
process and for activating the radio that transmits or receives
packets.
• The PHY also selects the channel frequency and makes sure the
channel is not currently used by any other devices.
• The standard defines channels having a frequency spacing
depending on the modulation technique and the frequency band.
• In 915 MHz band 10 radio channels (1-10) with 2 MHz
frequency spacing are defined.
•In 2.4 GHz band, 16 radio channels (11-26) with 5 MHz
frequency spacing are defined. 21
Access and Broadcasting Digital Radio Techniques 2019 21
Access and Broadcasting Digital Radio Techniques 22
• The difference in frequency spacing, and in the occupied bandwidth,
can be explained by the different data rates and in the modulation
techniques used :
40 kbps in 915 MHz band
250 kbps in 2.4 GHz.
• A block diagram of the data signal processing realized at the
transmitter in 915 MHz is given in figure below.
Every bit is represented by a 15 chips symbol (the spreading factor of
15).
The spread signal will be a binary chips stream with 600 kilochips per
second.
This spread signal is used as input of a BPSK modulator.
Before using the signal to modulate the RF carrier it is shaped by
means of a raised cosine filter.
2019
Data Stream
40 kbps BPF raised
cosine
Modulated RF signal
Spreading
BPSK Modulator Differential
Encoder
A block diagram for the modulation process in 915 MHz frequency band
Access and Broadcasting Digital Radio Techniques 23
• In case of the RF channels defined in 2.4 GHz the modulation process
can be described by the block diagram given below.
The data stream is converted to a 16 level baseband signal by splitting
every octet in two nibbles of 4 bits each.
Every nibble will be associated with a one of 16 symbols (0 to 15).
The rate of these symbols is 62,5 ksym/sec.
Then, on the basis of a table, every symbol is associated with a 32
chips block (a spreading operation with a spreading factor of 32).
The chip rate of the binary spread signal is 2000 kchips/sec.
The spread signal is applied as input of an OQPSK modulator
resulting a 1000 ksymbol/sec modulated signal.
Before using the signal to modulate the RF carrier it is shaped by
means of a half sine wave filter.
2019
Data Stream
250 kbps
BPF half sine wave
Modulated RF signal
Spreading
OQPSK Modulator
Bits to 16 level chips
A block diagram for the modulation process in 2.4 GHz frequency band
5.3.2.2 MAC Layer
• The Medium Access Control layer provides the interface between the
PHY layer and the NWK layer.
• It is responsible for generating beacons and synchronizing the devices
to the beacons (in a beacon-enabled network).
• It provides association and disassociation services.
• MAC layer transfers data to and from the Physical layer.
• The data is organized in packets named MPDU– MAC Protocol Data
Unit
• The IEEE 802.15.4 defines four MAC frame structures:
Beacon frame, used by a coordinator to transmit beacons.
Data frame, used to transmit data .
Acknowledge frame, used to acknowledge the successful
reception of a frame.
MAC command frame, used to transmit the MAC commands.
24 Access and Broadcasting Digital Radio Techniques
2019
5.3.2.3 NWK Layer
• The NWK layer interfaces between the MAC and the APL and is
responsible for managing the network formation and routing.
• Routing is the process of selecting the path through which the message
will be relayed to its destination device.
• The ZigBee coordinator and the routers are responsible for discovering
and maintaining the routes in the network.
• A ZigBee end device cannot perform route discovery.
• The ZigBee coordinator or a router will perform route discovery on
behalf of the end device.
• The NWK layer of a ZigBee coordinator is responsible for establishing
a new network and selecting the network topology (tree, star, or mesh).
• The ZigBee coordinator also assigns the NWK addresses to the devices
in its network.
25 Access and Broadcasting Digital Radio Techniques
2019
5.3.2.4 Application Layer
• The application (APL) layer is the highest protocol layer in the
ZigBee wireless network and hosts the application objects.
• Manufacturers develop the application objects to customize a
device for various applications.
• Application objects control and manage the protocol layers in a
ZigBee device.
• There can be up to 240 application objects in a single device.
• The ZigBee standard offers the option to use application profiles in
developing an application.
• An application profile is a set of agreements on application-specific
message formats and processing actions.
• The use of an application profile allows further interoperability
between the products developed by different vendors for a specific
application.
• If two vendors use the same application profile to develop their
products, the product from one vendor will be able to interact with
products manufactured by the other vendor as though both were
manufactured by the same vendor. 26 Access and Broadcasting Digital Radio Techniques
2019
5.3.2.5 ZigBee Protocol Packets Structure
• Data and commands are communicated between various devices in the
form of packets (frames).
•The general structure of the protocol packets is shown in the next Figure.
• The PHY frame described in the next two figures consists of three
components:
the Synchronization Header (SHR),
the PHY Header (PHR),
the PHY payload.
27 Access and Broadcasting Digital Radio Techniques
2019
•The SHR enables the receiver to synchronize and lock into the bit stream.
• The synchronization is based on the preamble which consists of 32 zeros.
• After the preamble comes the SFD which separates the preamble form the
rest of data and has a fix format: 11100101.
• The PHR contains a Frame Length field which specifies the total number
of octets included in PHY payload field which is variable in lengths.
• The PHY payload is designated as PSDU (PHY Service Data Unit),
includes the frame provided by MAC layer
28 Access and Broadcasting Digital Radio Techniques
2019
SHR - Synchronization Header PHR - Physical Layer Frame
Header
PHY Payload
Preamble
SFD - Start of
Frame
Delimiter
Frame
Lengths 7
bits
Reserved
1 bit
PSDU
4 Bytes 1 Byte 1 Byte Variable
number of
bytes
29 Access and Broadcasting Digital Radio Techniques
2019
•The MAC frame, which is transmitted to other devices as a PHY payload, has also
three sections:
MAC Header (MHR), contains information such as addressing and security.
The MAC payload has a variable length size (including zero length) and
contains commands or data.
MAC Payload
MAC footer (MFR) contains a 16-bit Frame Check Sequence (FCS) for data
verification.
• The NWK frame has two parts:
NWK Header (NHR), has network-level addressing and control
information.
NWK Payload is provided by the APS sublayer in the APS sublayer frame.
• The APS frame includes four fields:
APS Header (AHR) has application-layer control and addressing
information.
Auxiliary Header, contains the mechanism used to add security to the frame
and the security keys shared among the corresponding devices.
APS payload contains data or commands.
Message Integrity Code (MIC) ) is a security feature in the APS frame that
is used to detect any unauthorized change in the content of the message.
30
5. 3.2.6 Security • In a wireless network, the transmitted messages can be received by any nearby
device, including an intruder.
• There are two main security concerns in a wireless network:
Data confidentiality. The intruder device can gain sensitive information by
simply listening to the transmitted messages.
Encrypting the messages before transmission will solve the
confidentiality problem.
An encryption algorithm modifies a message using a string of bits
known as the security key, and only the intended recipient will be able to
recover the original message.
The IEEE 802.15.4 standard supports the use of Advanced Encryption
Standard (AES) to encrypt their outgoing messages.
Data Integrity. The intruder device may modify and resend one of the
previous messages even if the messages are encrypted.
Including a message integrity code (MIC) with each outgoing frame
will allow the recipient to know whether the message has been changed
in transit.
This process is known as data authentication.
30 Access and Broadcasting Digital Radio Techniques 2019
31
5. 3.3 Operating Frequencies and Data Rates There are three frequency bands used for IEEE 802.15.4 :
• 868 – 868.6 MHz (868 MHz band) used in Europe for a number of applications,
including short range wireless networking.
• 902 – 928 MHz (915 MHz band) used mainly in North America.
2400 – 2483.5 MHz (2.4 GHz band) used worldwide, part of ISM (Industrial,
Scientific and Medical) frequency bands.
• IEEE 802.15.4 requires that the two bands are bundled together as the 868/915 MHz
frequency bands of operations.
31 Access and Broadcasting Digital Radio Techniques 2019
Frequency
(MHz)
NO of
Channels
Modulation Chip
Rate
(kchip/s)
Bit
Rate
(kb/s)
Symbol
Rate
(ksymbol/s)
Spreading
Method
868-868.9 1 BPSK 300 20 20 Binary DSSS
902-928 10 BPSK 600 40 40 Binary DSSS
2400-2483.5 16 OQPSK 2000 250 62.5 16-array
Orthogonal
32
5. 6 LORAWAN vs. ZigBee
32 Access and Broadcasting Digital Radio Techniques 2019
Specifications LoRa Zigbee
Frequency Bands
863 to 870 MHz,
902 to 928 MHz,
779 to 787 MHz
868 MHz,
915 MHz,
2450 MHz
Coverage distance
2-5 Km (urban areas),
15 Km (suburban areas) 10 to 100 meters
Power
consumption lower compare to zigbee low
Modulation
technique
LoRa modulation (CSS
modulation), FSK or GFSK
BPSK, OQPSK modulation. Also uses DSSS
technique to convert bits to chips.
Data rate
0.3 to 22 Kbps (LoRa modulation)
and
100 Kbps (using GFSK)
20 kbps (868 MHz band ) , 40Kbps (915 MHz
band ) ,
250 kbps (2450 MHz band)
33
5. 6 LORAWAN vs. ZigBee
33 Access and Broadcasting Digital Radio Techniques 2019
Architecture
Consists of LoRa Gateway, servers
and end devices.
Consists of coordinator, routers and end devices.
34
5. 6 LORAWAN vs. ZigBee
34 Access and Broadcasting Digital Radio Techniques 2019
Frame Structure
LORAWAN
ZigBee
35
5. 6 LORAWAN vs. ZigBee
35 Access and Broadcasting Digital Radio Techniques 2019
Protocol stack
LORAWAN
ZigBee
36
5. 6 LORAWAN vs. ZigBee
36 Access and Broadcasting Digital Radio Techniques 2019
LORAWAN ZigBee
Physical Layer Uses modulation scheme as mentioned
above and incorporates error correction
capabilities, It adds preamble for
synchronization purpose, It uses PHY
header CRC as well as entire frame CRC.
There are two physical layers viz. 868/915
Mhz (uses BPSK, raised cosine pulse
shaping) , and 2450 MHz (uses OQPSK,
half sine wave pulse shaping )
Applications used as Wide Area Network used as LR-WPAN i.e. low rate wireless
personal area network
Advantages, disadvantages https://www.rfwireless-
world.com/Terminology/Advantages-and-
Disadvantages-of-Lora-or-
LoRaWAN.html
https://www.rfwireless-
world.com/Terminology/Advantages-and-
Disadvantages-of-zigbee.html
Standard/Alliance IEEE 802.15.4g, LoRa Alliance IEEE 802.15.4 (defines PHY and MAC),
Zigbee Alliance (defines network,
security and application layers)