You are on page 1of 16

11/12/19

The Internet of Things:


Architecture and Applications
(ELEC423)

Dr Valerio Selis

V.Selis@liverpool.ac.uk

Outline

• M2M in the IoT:


• IoT applications
• Wireless technologies for IoT and M2M
• Long Range (LoRa) communication
• ETSI regulations in Europe
• Long Range Wide Area Network (LoRaWAN)
• LoRaWAN data transmissions

M2M in the IoT


M2M solution (1) – Things in the same network
Cloud
M2M Network The
domain M2M app
Internet
Ethernet

MQTT broker
Mosquitto
M2M Device Wi-Fi
and Gateway
domain
Local
Network

MQTT publisher MQTT subscriber


Paho-MQTT Paho-MQTT

Wi-Fi Wi-Fi
Sensor (DHT11) Actuator (LED)

1
11/12/19

M2M in the IoT


M2M solution (2) – Things in different networks
MQTT broker
M2M Network The
domain Mosquitto
Internet
Ethernet

Gateway Gateway

M2M Device
Local Local
and Gateway
Network Network
domain

MQTT publisher MQTT subscriber


Paho-MQTT Paho-MQTT

Wi-Fi Wi-Fi
Sensor (DHT11) Actuator (LED)

M2M in the IoT


IoT applications

Applications are the main point of creating and


applying the Internet of Things
Many areas:
• Outdoor and environment monitoring
• Buildings and energy
• Safety and security
• Industrial and infrastructure
• Urban areas
• Person health
An application addresses a specific aspect of
the larger problems.

M2M in the IoT


IoT applications
Can we use M2M solutions based on Wi-Fi for
every IoT application?

https://iot-analytics.com/product/list-of-1600-enterprise-iot-projects-2018/

2
11/12/19

M2M in the IoT


IoT applications – Wireless technologies for IoT

Owner Open – IEEE 802.11 Proprietary PHY – Semtech


Standard ah bg n ac ad LoRaWAN – LoRa Alliance
Frequency
0.86 2.4 5 60 0.868 EU
(GHz)
Max range
1000 140 250 300 10 2500 urban 15000 rural
(m)
Max data
8.67 54 600 1000 7000 0.0003 – 0.055
rate (Mbps)
Security Yes Yes
Power
Low Medium to high Low
consumption
Max devices 8191 250 Uplink 1M, Downlink 100k

* No products available on the market supporting this standard yet!

M2M in the IoT


IoT applications – Power consumption/Bandwidth vs Range
Power Consumption/
Bandwidth

Range

M2M in the IoT


IoT applications – Trade-off

Well established standard Proprietary PHY layer from


from the IEEE Semtech with open MAC
Pros: layer from LoRa alliance
• Mobile machines Pros:
• In-building applications • Long distance
• Medium/short distance communications
• High data rate • Very low power
Cons: consumption and long
• Medium to high power battery life
consumption and low • Positioning
battery life Cons:
• Long distance not • Very low data rate
supported yet • Proprietary PHY

3
11/12/19

M2M in the IoT


Semtech Corporation – LoRa
LoRa (Long Range) is a proprietary physical layer
protocol for long distance communications:
• Supported by Semtech Corporation
• Based on a Spread Spectrum Technology
• Derived from chirp spread spectrum (CSS)
modulation
𝑓high

𝑓center

𝑓low

Up-chirp Down-chirp

www.semtech.com

10

M2M in the IoT


Semtech Corporation – LoRa
• Defined by three parameters:
• Spreading factor (𝑆𝐹): number of bits per symbol
• Ranges from 7 to 12
• A symbol has 2%& values (chips),
e.g. 𝑆𝐹 = 7 (7 bits symbol) ⟹ 2%& = 2𝟕= 128 chips

𝑓high
𝑓center
𝑓low

128 chips

revspace.nl/DecodingLora

11

M2M in the IoT


Semtech Corporation – LoRa
• Defined by three parameters:
• Spreading factor (𝑆𝐹): number of bits per symbol
• Bandwidth (𝐵𝑊): difference between the maximum
and the minimum frequency in Hz
𝑓high
+ K⁄G BW
𝑓center BW
− K⁄G BW
𝑓low

• The 𝐵𝑊 = 125 kHz or 𝐵𝑊 = 250 kHz


• The symbol rate (𝑅: ) can be calculated as the 𝐵𝑊
over the number of chips:
𝑩𝑾
• E.g.: 𝑆𝐹 = 7 ⟹ 𝑅: = =
𝒄𝒉𝒊𝒑𝒔

= 𝟏𝟐𝟓𝟎𝟎𝟎BG𝟕 = 977 symbols/s

12

4
11/12/19

M2M in the IoT


Semtech Corporation – LoRa
• Defined by three parameters:
• Spreading factor (𝑆𝐹): number of bits per symbol
• Bandwidth (𝐵𝑊): difference between the maximum
and the minimum frequency in Hz
• Coding rate (𝐶𝑅): amount of forward error correction
(𝐹𝐸𝐶) bits
• Given by 𝐶𝑅 = 4⁄(𝐶𝑅 + 4), where 𝐶𝑅 = 1 … 4
• Proportion of transmitted bits that carry information:
• Allowed coding rates: 4/5, 4/6, 4/7, and 4/8
info = 𝑆𝐹 × 𝐶𝑅 ⟹ 𝐹𝐸𝐶WXY: = 𝑆𝐹 − info
• E.g. 𝑆𝐹 = 7 and 𝐶𝑅 = 4⁄5
info = 7 × 4⁄5 = 5.6 bits ⟹ 𝐹𝐸𝐶WXY: = 7 − 5.6 = 1.4 bits

13

M2M in the IoT


Semtech Corporation – LoRa

• The bit rate (R b) can be calculated as:


`a e
• R_ = 𝑆𝐹× ×
bcXd: (fghe)
• For example:
• 𝑆𝐹 = 7
• 𝐵𝑊 = 125 kHz
• 𝐶𝑅 = 1
125000 4
R_ = 7 × × = 5468.75 bps ≈ 5.5 kbps
2i (1 + 4)

14

M2M in the IoT


Semtech Corporation – LoRa

• In the EU the maximum payload size depends upon


the LoRa configuration
Data Rate Configuration Rb (bits/s) Max payload (bytes)
DR0 SF12/125kHz 250 59
DR1 SF11/125kHz 440 59
DR2 SF10/125kHz 980 59
DR3 SF9/125kHz 1 760 123
DR4 SF8/125kHz 3 125 230
DR5 SF7/125kHz 5 470 230
DR6 SF7/250kHz 11 000 230

lora-alliance.org

15

5
11/12/19

M2M in the IoT


ETSI – LoRa frequency
G G1 G3

Uplink

867.1 867.3 867.5 867.7 867.9 868.1 868.3 868.5

Downlink

867.1 867.3 867.5 867.7 867.9 868.1 868.3 868.5 869.525

A device changes channel in a pseudo-randomly for every transmission

125 kHz G and G1 = duty cycle < 1%


250 kHz G3 = duty cycle < 10%
125 kHz www.etsi.org

16

M2M in the IoT


ETSI – LoRa frequency
Frequency restrictions usage:
• The duty cycle (DC) for each of the 8 frequencies in
EU is equal to 1%:
• Allowed uplink Time on Air (ToA) for a day:
24×60×60 × 1% = 86400 × 1% = 864 seconds/day
TInterval ToA TInterval ToA … TInterval ToA

1 2 N
Transmission within a day
• Transmit time interval (Tinterval) = (ToA / DC) – ToA
• The ToA for a transmission can be calculated by
using the tool at https://www.loratools.nl/#/airtime

www.etsi.org

17

M2M in the IoT


LoRa Alliance

The LoRa Alliance:


• Open and non-profit association of worldwide
members
• Support the Long Range Wide Area Network
(LoRaWAN) protocol
• The main objectives are to:
• Standardise Low Power Wide Area Networks
(LPWANs)
• Provide connectivity to billion of IoT devices with
security in mind

lora-alliance.org

18

6
11/12/19

M2M in the IoT


LoRa Alliance – LoRaWAN

LoRaWAN is currently at the 1.0.3 specification:


• Uses an adaptive data rate (ADR) to automatically
manage the SF for each machine:
• Fastest data rate versus range optimisation
• Battery life maximisation
• Achieve the maximum network capacity
• Gateways should constantly receive in three
channels:
• 868.1, 868.3 and 868.5 MHz
• Bit rate between 0.3 and 0.5 kbps

lora-alliance.org

19

M2M in the IoT


LoRa Alliance – LoRaWAN
Application
Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

20

M2M in the IoT


LoRa Alliance – LoRaWAN
Security mechanism in LoRaWAN:
• Advanced Encryption Standard (AES) with 128 bits
key size
• Symmetric key encryption cipher: the same
cryptographic key is used to encrypt and decrypt
• Based on two keys:
• A Network Session Key (NwkSKey): unique key
shared between the device and the network server,
used for control messages (message integrity)
• An Application Session Key (AppSKey): unique key
shared between the device and the application
server, used for data messages (message payload
encryption)

21

7
11/12/19

M2M in the IoT


LoRa Alliance – LoRaWAN

Network Application
Things Gateways Server Servers

IP IP

Packet
NwkSKey
Control
AppSKey
Data

22

M2M in the IoT


LoRa Alliance – LoRaWAN
Three device classes are available in LoRaWAN to
provide flexibility between power consumption and
transmissions:
• Class A: used for battery powered devices
• The device is usually in sleep mode and sends a
message to the server (uplink) at specific interval
windows or when an event occurs
• The server sends a message to the device (downlink)
on pre-established windows after receiving a
message from it
• Bidirectional communications with unicast messages
• Long intervals with small payloads

23

M2M in the IoT


LoRa Alliance – LoRaWAN
Three device classes are available in LoRaWAN to
provide flexibility between power consumption and
transmissions:
• Class B: used for low latency
• The gateway sends periodic beacon for devices to
synchronised their time
• The server can send messages to the device
(downlink) at fixed intervals
• Receive windows are used (ping slots) for waking up
the device
• Bidirectional with scheduled slots with unicast and
multicast messages
• Long intervals with small payloads

24

8
11/12/19

M2M in the IoT


LoRa Alliance – LoRaWAN
Three device classes are available in LoRaWAN to
provide flexibility between power consumption and
transmissions:
• Class C: usually used for main powered devices
with no latency
• The server can send messages to the device
(downlink) at any given time
• The device is constantly listening for new messages
• Bidirectional communications with unicast and
multicast messages
• Small payloads

25

M2M in the IoT


LoRa Alliance – LoRaWAN

Each device on the LoRaWAN network must be


uniquely addressed:
• Unique device address (DevAddr):
• 32 bit identifier
• Unique identifier in the entire network
• Used for any message transmission
• Shared between the device, the network server, and
the application server
• Used with the Network Session and Application
Session keys to exchange messages

26

M2M in the IoT


LoRa Alliance – LoRaWAN
Activation mechanisms in LoRaWAN are used to
exchange information, two available:
• Over-The-Air-Activation (OTAA)
• The device transmits a join request to the application
Over-The-Air handshake

server with:
• Globally unique device identifier (DevEUI)
• Application identifier (AppEUI)
• Authentication with Application key (AppKey)
• The device receives the Join Accept from the
application server and authenticates it
• The device decrypts the Join Accept by using the
AppKey from which it extract and store the DevAddr
• The device derives the NwkSKey and AppSKey keys

27

9
11/12/19

M2M in the IoT


LoRa Alliance – LoRaWAN

• Activation By Personalization (ABP)


• The device is pre-configured with the DevAddr,
NwkSKey and AppSKey keys
• The device can communicate with the network
without any other procedure, no handshake required
• The device is locked to a specific network as the
device is pre-configured
• A mechanism may be required to keep track of frame
counters for messages exchanged between the
device and the server
• By default the server will ignore messages with the
same frame counter

28

M2M in the IoT


LoRa Alliance – LoRaWAN

Activation mechanisms and security:


• Over-The-Air-Activation (OTAA)
• This is based on using the application key to
authenticate the Join Accept message
• Then it derives the NwkSKey and AppSKey keys
• Pros: easy management of huge amount of
devices
• Cons: if the application key is compromised, an
attacker can impersonate any other device in the
network

29

M2M in the IoT


LoRa Alliance – LoRaWAN
Activation mechanisms and security:
• Activation By Personalization (ABP)
• This is based on pre-configured devices with the
DevAddr, NwkSKey and AppSKey keys
• Pros: if a device is compromised and the pre-
configured information is stolen, it is possible to
block it keeping other devices secured
• Cons:
• Difficult management of huge amount of
devices as these must be pre-configured
along with the network
• It is required to keep track of the frame
counter

30

10
11/12/19

M2M in the IoT


LoRaWAN data transmission

Example 1 for class A

Device to Application Server

31

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
D D
and Gateway a a

domain
t
a a
t
10 °C

Things

Temp The device sends data which is


sensor received by all gateways in the area

32

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers

M2M Network
domain
Network
Server
D D
10 °Ca t a a
t
a

Gateways
M2M Device
and Gateway
domain

Things

Temp All gateways receiving the data


sensor forward it to the Network Server

33

11
11/12/19

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers
D
a
M2M Network a
t
10 °C
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Temp The Network Server forwards the


sensor data to the correct Application Server

34

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers
A
C
M2M Network K
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Temp The Application Server sends


sensor an acknowledgment (ACK)

35

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers

M2M Network
domain
Network
Server
A
C
K

Gateways
M2M Device
and Gateway
domain

Things

Temp The Network Server selects the best path


sensor (gateway) to forward the ACK to the device

36

12
11/12/19

M2M in the IoT


LoRaWAN data transmission – Device to Application Server
Temp App Application
Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
A
and Gateway C
domain K

Things

Temp The Gateway transmits


sensor the ACK to the device

37

M2M in the IoT


LoRaWAN data transmission

Example 2 for class A

Application Server to Device

38

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Heater on
Actuator Application
App Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Heater The Application Server would


actuator like to send Data for the Actuator

39

13
11/12/19

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Heater on
Actuator Application
App Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Heater The Application Server has to wait until the


actuator Actuator wakes up and transmits a Data Message

40

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Heater on
Actuator Application
App Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device
D
and Gateway t
a

domain a

Things

Heater The Actuator transmits any


actuator Data Message Upstream

41

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Heater on
Actuator Application
App Server Servers

M2M Network
domain
Network
Server
D
a
t
a

Gateways
M2M Device
and Gateway
domain

Things

Heater The Data Message is forward by


actuator the gateway to the Network Server

42

14
11/12/19

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Heater on
Actuator Application
App Server Servers
D

M2M Network
a
t
a
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Heater The Network Server sends the Data


actuator Message to the Application Server

43

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Actuator Application
App Server Servers
D
a
M2M Network Heater on t
a
domain
Network
Server

Gateways
M2M Device
and Gateway
domain

Things

Heater The Application Server can now send


actuator the Data Message to the Actuator

44

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Actuator Application
App Server Servers

M2M Network
domain
Network
Server
D
a
Heater on t
a

Gateways
M2M Device
and Gateway
domain

Things

Heater The Network Server sends the Data


actuator Message to the appropriate Gateway

45

15
11/12/19

M2M in the IoT


LoRaWAN data transmission – Application Server to Device
Actuator Application
App Server Servers

M2M Network
domain
Network
Server

Gateways
M2M Device D
and Gateway a
Heater on t
domain a

Things

Heater The Gateway forward the


actuator Data Message to the Actuator

46

Summary
IoT Applications

Wireless technologies for M2M and IoT

LoRa and ETSI regulations

LoRaWAN and data transmissions

47

Next class?

Tomorrow at 11 a.m. in the


Mathematical Sciences Building,
Room 106
(MATH-106, Building 206).

48

16

You might also like