0% found this document useful (0 votes)
13 views58 pages

Iot Reference PPT Unit 2

Uploaded by

Harsha Mannem
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)
13 views58 pages

Iot Reference PPT Unit 2

Uploaded by

Harsha Mannem
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
You are on page 1/ 58

Internet of Things (IoT)

• IoT system applications


• IoT system architectures

References: Wolf Text: Chapter 8


ARM SoC/IoT Presentations

https://pixabay.com/en/network-iot-internet-of-things-782707/
ARM: Making Things Smart, Connected and Interactive

26 Billion
installed units
by 2020*

Device Categories *Gartner


Internet of Things (IoT)
Safer/Smarter Automotive
What is it?
Smart Appliances Fitness / Healthcare
• “The Internet of Things (IoT) is
the interconnection of uniquely
identifiable embedded computing
devices within the existing
Smart
Portable and
Wearable
Internet infrastructure.”
Farming Electronics wikipedia.org

Resource
• Buzzword, trend, convenient
Smart
Management categorisation, industrial and
Lighting
consumer

Industrial Internet Smart Home


Machine to Machine
Internet of Things (IoT)
Safer/Smarter Automotive

Why Now?
Smart Appliances Fitness / Healthcare • Embedded chips are
becoming:
• Cheaper (<50c)
Portable and
Smart
Farming
Wearable • Smaller (<1mm2)
Electronics
• Lower power (µW)
• Commoditised HW and SW
Resource
Smart
Lighting
Management • Communication is growing
faster (broadband)
• New socio-economic demands
Industrial Internet Smart Home (globalisation, competition, mobility)
Machine to Machine
Internet of Things (IoT)
Safer/Smarter Automotive
Socio-Economic Benefits
• Automation (higher productivity)
• Smart monitoring, control and
Smart Appliances Fitness / Healthcare
maintenance (higher efficiency, lower
cost, higher quality, better
optimisation/outcomes)

Smart
Portable and
Wearable
• Better safety (early warning)
Farming Electronics • Higher responsiveness (dynamic
response to varying demands)
• Huge and varied applications in
Smart
Resource
Management industry, agriculture, health,
Lighting
transport, infrastructure, smart
living, consumer etc.
Industrial Internet Smart Home
Machine to Machine
IoT system applications
• Soft real-time networked
embedded system.
• Input devices: tags, sensors, etc.
• Output devices: motor controllers,
displays, etc.
• Examples:
• Computer-readable identification
code for objects.
• Appliances controlled by cell phone
interface. https://www.quora.com/How-is-IOT-useful-in-manufacturing
• Sensor network with analytics.

Computers as Components 4e © 2016 Marilyn Wolf


Devices
• People: • Objects:
• Interior: temperature sensor, etc.
• Implanted devices in the body.
• Exterior: RFID, etc.
• Wearable devices on the body.
• Environmental: camera, motion
• Environmental devices outside the
sensor, etc.
body.

https://www.meddeviceonline.com/doc/how-revolutionizing- https://communicationandmediastudies.wordpress.com/2012/10/24/
healthcare-0001 the-internet-of-things/
Computers as Components 4e © 2016 Marilyn Wolf
Connecting the Physical and Digital Worlds

Sensing and Controlling Wireless Network Cloud


• Integrated sensors, memory • High throughput networks • High performance efficient servers
and processing • High capacity storage
• Low power wireless
• Low power systems • Software as a service
networks
• Little Data • Big Data

Things (“Edge” Devices)


IoT system architectures
edge device hub UI
• Edge: I/O devices.
status request
• Cloud: centralized processing.
• Smart appliance = connected
status
appliance + network + UI.

command

Computers as Components 4e © 2016 Marilyn Wolf


IoT system architectures, cont’d.
• Monitoring system = sensors + network + database + dashboard.
edge device hub database data analysis dashboard

sample

update

alert
Computers as Components 4e © 2016 Marilyn Wolf
IoT system architectures, etc.
• Control system = sensors + database + controller + actuator.

edge sensor hub database controller edge actuator

sample

command

Computers as Components 4e © 2016 Marilyn Wolf


Things: Basic Building Functional Blocks

M
Sense Compute Control Store Communicate
Unlock a greater potential with custom SoCs

From PCB to custom SoC Increase margins by reducing


 Cost
 Complexity
 Size

Enhance designs with greater


 Efficiency
 Reliability
 Differentiation
 IP protection
Cortex-M: Scalable, compatible and trusted
Cortex-M7
Maximum High
performance, performance
control and
DSP

Cortex-M3 Cortex-M4 Cortex-M33


Flexibility, Performance
Mainstream
Performance control and efficiency
control and
efficiency DSP with
DSP
TrustZone

Cortex-M0 Cortex-M0+ Cortex-M23


TrustZone in Lowest
Lowest cost, Highest energy power & area
smallest area,
low power efficiency lowest power

ARMv7-M
ARMv8-M
ARMv6-M
ARM Cortex-M0 DesignStart Processor
• Subset of the full ARM Cortex-M0
• Low gate count, 32-bit processor, 3-stage pipeline
• Implements ARMv6-M architecture
• Can achieve around 0.9 DIPS/MHz
• Provided as synthesizable Verilog model
• CPU contained in top-level macro-cell “CORTEXM0DS” (instantiated in the
SoC system model) and submodule “cortexm0ds_logic” (pre-configured,
obfuscated)
• Top-level macro-cell implements memory and system bus interface
compatible with AMBA 3 AHB-Lite specification, including interrupt and
event inputs, 3 status outputs, and an event output.
• DesignStart Kit includes:
• Simulation testbench, a set of AHB-Lite peripherals, example SoC systems
IoT Demo Architecture
The “THING”
Sense/Compute/Control/Store/Communicate
The “NETWORK” The “CLOUD”
Sensor:
Accelerometer Low-power Server
Bluetooth
Cortex-M0 Radio
Sensor: Software,
SoC
Ambient Light Bluetooth Storage

User Interface
Display received
data in a PC
• Periodically sense, encrypt, send ambient light Labview window.
and acceleration data to “The Cloud”.
• Based on ARM SoC LiB and Cortex-M0 CPU.
• Platform: FPGA board
(Digilent Nexys4 DDR, Numato Labs Mimas V2)
IoT SoC Application
• Periodically capture sensor data
• Read ambient light sensor data
• Read X-axis/Y-axis/Z-axis acceleration data
• Sample at 1Hz frequency (timer interrupt-driven)
• Encrypt sensor data
• Tiny Encryption Algorithm (TEA)
• Encrypt before sending (for debug - decrypt back to original data if Switch 1 on)
• Transmit data via Bluetooth to server
• Simulated wireless network and “Cloud” server
• For debug (Switch 0 on) transmit via hard-wired USB to server
• Display sensor data in server terminal window
IoT Demo Sensors & Communication
• ADXL362 3-axis Accelerometer
• 12-bit X/Y/Z axis values + 12-bit temperature
• On Nexys4 DDR board
• SPI interface
• PmodALS Ambient Light Sensor
• Vishay Semiconductor TEMT6000X01 ambient light sensor
• Texas Instruments ADC081S021 analog to digital converter
• SPI interface
• PmodBT2 Bluetooth Interface
• Roving Networks RN-42 Bluetooth (2.1, 2.0, 1.2, 1.0)
• UART interface
IoT SoC Hardware
• ARM Cortex-M0 “Design Start” CPU
• Program and data in distributed/block RAM in FPGA
• Peripherals: basic I/O, timer, UART, SPI (all except SPI in the SoC LiB)
• Sensors accessed via SPI
• Wireless and wired communication via UARTs
• CPU and peripherals interconnected via AHB-Lite bus

System on Chip
ARM Cortex-M0
Processor
ARM AMBA 3 AHB-Lite System Bus
Control signals
32-bit Address bus
32-bit Data bus

Program
SPI Timer UART GPIO 7-segment
Memory SPI UART
Peripheral Peripheral Peripheral Peripheral Peripheral
(On-Chip) Peripherals Peripherals

PmodBT2
PmodALS ADXL362 UART to USB LEDs 7-Segment
Bluetooth
Light Sensor Accelerometer Converter Switches Display
Radio
Things: The Security Challenge
Flexible embedded device security

• Security important as more embedded devices become connected

• Even the smallest of devices need to


• Safely store and process secrets Non-trusted
• Have secure communications (i.e., encryption)
• Offer trust in the integrity of the device and its software
• Be able to isolate trusted resources from non-trusted
Trusted
• Reduce attack surface of key components

… without compromising on latency, determinism or footprint.


ARM TrustZone Technology
Bringing ARM security extensions to the embedded world

• Optional security extension for the ARMv8-M architecture


• Security architecture for deeply embedded processors
• Enables containerisation of software
• Simplifies security assessment of embedded devices.

• Conceptually similar and compatible with existing TrustZone technology


• New architecture tailored for embedded devices
 Preserves low interrupt latencies of Cortex-M
 Provides high performance cross-domain calling.
ARMv8-M Additional States
Existing handler and thread modes mirrored with secure and non-secure states
 Secure and Non-Secure code run on a single CPU
• For efficient embedded implementation. Handler
Mode

 Secure state for trusted code Thread


• New Secure stack pointers for robust operation Mode
• Addition of stack-limit checking.
ARMv7-M
 Dedicated resources for isolation between domains
• Separate memory protection units for Secure and Non-secure Non-secure Secure
• Private SysTick timer for each state. Handler Handler
Mode Mode
Non-secure Secure
 Secure side can configure target domain of Thread Thread
interrupts. Mode Mode
ARMv8-M
ARMv8-M Programmers’ Model Memory Map
Secure state view
ROM tables Non-secure MPU alias  Secure memory view permits
System control Non-secure SCB alias access to Secure Flash, RAM,
Non-secure SysTick alias and peripherals.
Off-chip Device
Debug
Off-chip RAM Security Attribution Unit
Peripherals
Secure MPU  Load/store access to all regions
Secure SCB is possible from Secure state.
Secure Peripherals NVIC
RAM Secure SysTick

Secure RAM
ITM/DWT/FPB  Security of regions can be
configured using the
Flash
Security Attribution Unit (SAU).
Secure Flash Secure vector table
ARMv8-M Interrupt Security
High-performance interrupt handling with register protection
 Subject to priority, Secure can interrupt Non-secure Interrupt
Non-secure and vice versa Running Secure
• Secure can boost priority of own interrupts Code
• Uses current stack pointer to preserve context.
Push All Registers
 Uses ARMv7-M exception stacking
mechanism Pop All Registers Zero All Registers
• Hardware pushes selected registers. Switch to Switch to
Secure Non-secure
 Non-secure interruption of Secure code
• CPU pushes all registers and zeroes them Run Non-Secure
• Removes ability for Non-secure to snoop Handler
Secure register values. Return from Interrupt
Security Defined by Address
All transactions from core and debugger checked Request from CPU
 All addresses are either Secure or Non-secure.
System
Level
Control
 Policing managed by Secure Attribution Unit (SAU) Security
• Internal SAU similar to MPU Attribution
• Supports use of external system-level definition Unit (SAU)
• E.g. based on flash blocks or per peripheral.
Non-Secure Secure
MPU MPU
 Banked MPU configuration
• Independent memory protection per security state.

 Load/stores acquire NS attribute based on address


• Non-secure access attempts to Secure address = memory fault. Request to System
Cross-Domain Function Calls
An assembly code level example
Non-secure memory Secure memory (Non-secure callable)
NonSecureFunc: SecureFunc:
BL SecureFunc Call SG
<Non-secure code> Enter Secure state
<Secure code>
Return to NS BXNS lr

• Guard instruction (SG) polices entry point


• Placed at the start of function callable from non-secure code.
• Non-secure  secure branch faults if SG isn’t at target address
• Can’t branch into the middle of functions
• Can’t call internal functions.
• Code on Non-secure side identical to existing code.
Cortex-M23: Imagine the possibilities

32-bit Small area,


performance low cost
TrustZone Long battery
for ARMv8-M life

27 © ARM 2017
Cortex-M23 enhancements over Cortex-M0+
Cortex-M23
TrustZone
Stack limit checking
Hardware divide
Exclusive memory accesses
Enhanced debug
Cortex-M0+ ETM
NVIC (max 32 IRQs) NVIC (max 240 IRQs)

2.50

0.98
MPU (PMSAv6) MPU (PMSAv8)

2.46

0.95
AHB Lite AHB5
WIC WIC
Fast I/O bus Fast I/O bus
MTB MTB
Serial wire / JTAG Serial wire / JTAG
ARMv6-M ARMv8-M baseline CoreMark®/MHz DMIPS/MHz
New or updated
Addressing diverse embedded and IoT opportunities

Automotive Industrial Smart Agriculture Wearables Smart Home


building Healthcare
lighting automation

Logistics
Retail Environmental

Cortex-M33
32-bit Digital signal
performance TrustZone Configurability, processing
for ARMv8-M extensibility

29 © ARM 2017
Cortex-M33 enhancements over Cortex-M4
Cortex-M33
TrustZone
Stack limit checking
Co-processor interface
Enhanced debug
+13% +20%
Cortex-M4 MTB
ETM ETM
NVIC (max 240 IRQs) NVIC (max 480 IRQs)
MPU (PMSAv7) MPU (PMSAv8)
AHB Lite AHB5

1.50
3.86
3.40

1.25
FPU FPU
SIMD/ DSP SIMD/ DSP
WIC WIC
Serial wire / JTAG Serial wire / JTAG
ARMv7-M ARMv8-M mainline

New or updated CoreMark®/MHz DMIPS/MHz


IoT systems and networks
• OSI model for networks.
• Internet protocol.
• IoT networking concepts.
• Example networks:
• Classic Bluetooth, Bluetooth Low Energy.
• 802.15.4 and Zigbee.
• Wi-Fi.

Computers as Components 4e © 2016 Marilyn Wolf


Network Abstractions: OSI model
• International Standards
Organization (ISO) application end-use interface
Open Systems presentation data format
Interconnection (OSI)
to describe networks: session application dialog control

• 7-layer model. transport connections

• Standard way to network end-to-end service


classify network reliable data transport
data link
components and
operations. physical mechanical, electrical

Computers as Components 4e © 2016 Marilyn Wolf


OSI layers
• Physical: connectors, bit formats, etc.
• Data link: error detection and control across a single link (single hop).
• Network: end-to-end multi-hop data communication.
• Transport: provides connections; may optimize network resources.
• Session: services for end-user applications: data grouping,
checkpointing, etc.
• Presentation: data formats, transformation services.
• Application: interface between network and end-user programs

Computers as Components 4e © 2016 Marilyn Wolf


PHY and MAC
• PHY = physical layer. • MAC = media access control.
• Circuitry to transmit and receive • Provides link-level services.
bits.

Computers as Components 4e © 2016 Marilyn Wolf


Internet Protocol (IP)
Internet = network of networks: transports data from one network to another.

application application

presentation presentation

session Internet Protocol session

transport transport

network network network

data link data link data link

physical physical physical

Node A Router Node B


Network links
Computers as Components 4e © 2016 Marilyn Wolf
IoT networking concepts
• Edge device may not run IP
protocol.
• IP connection may be provided by message
hub or gateway.
• Non-IP networks are known as edge
networks.
Internet
• Ad hoc network is self-organized--- gateway
not set up by system administrator.
• Ad hoc network services:
• Authentication of eligibility to join
network. device device
• Authorization for access to given
pieces of information on the network.
• Encryption and decryption. device

Computers as Components 4e © 2016 Marilyn Wolf


Network topologies

star tree mesh

Computers as Components 4e © 2016 Marilyn Wolf


Routing
Routing Routing Routing
table table table
• Routing discovery determines
routes between
source/destination pairs.
msg
• Routing is driven by routing
tables at the nodes.
Routing Routing
table table

Routing
table

Computers as Components 4e © 2016 Marilyn Wolf


QoS
• Many networks support synchronous and asynchronous
communication.
• Asynchronous: data records, etc.
• Synchronous: voice, etc.
• Quality-of-service (QoS): bandwidth and periodicity characteristics.
• Admission control ensures that network can handle the QoS demands
of a request.

Computers as Components 4e © 2016 Marilyn Wolf


Synchronization and beacons
• Many network operations require nodes to be synchronized.
• Synchronization can be performed using beacon.
• Beacon transmission marks the beginning of a communications interval.

beacon synchronous asynchronous …

Computers as Components 4e © 2016 Marilyn Wolf


Communcations energy
• Communications energy is a
large part of node energy
consumption. sleep
• Comm energy consumption
depends on many factors and
parameters. idle
• Generally evaluated for a set of
use cases.
• We can use power state machine receive transmit
to model communications
energy cost.

Computers as Components 4e © 2016 Marilyn Wolf


Communications power state machine
example
step state time energy
sleep
1 sleep 1 ms 1 nJ
1 µW
2 idle 10 µs 0.5 nJ
3 receive 50 µs 1.25 nJ
idle 4 transmit 50 µs 1.75 nJ
50 µW
5 receive 50 µs 1.25 nJ
6 transmit 50 µs 1.75 nJ
receive transmit total = 7.5 nJ
25 mW 35 mW

Computers as Components 4e © 2016 Marilyn Wolf


Bluetooth
• Introduced in 1999, originally for telephony applications.
• Classic Bluetooth operates in instrumentation, scientific, and medical
(ISM) band in the 2.4 GHz range.
• Bluetooth networks organized as piconet.
• One master, several slaves.
• Slave can be active or parked.
• A device can be a slave on several networks simultaneously.

Computers as Components 4e © 2016 Marilyn Wolf


Bluetooth stack
• Transport protocol:
• Radio, baseband layer, link manager, logical link control and adaptation
protocol (L2CAP).
• Middleware:
• RFCOMM for serial port, service discovery protocol, Internet Protocol, IrDA,
etc.
• Applications.

Computers as Components 4e © 2016 Marilyn Wolf


Bluetooth protocol
• Every Bluetooth device has a 48-bit Bluetooth Device Address.
• Every device has a Bluetooth clock.
• Transmissions alternate between master and slave directions.
• Two types of packets:
• Synchronous connection-oriented (SCO) packets for QoS-oriented traffic.
• Asynchronous connectionless (ACL) packets for non-QoS traffic.
• SCO traffic has higher priority than ACL packets.

Computers as Components 4e © 2016 Marilyn Wolf


Bluetooth Low Energy
• Designed for very low energy operation such as button-sized battery.
• Goal: minimize radio on-time.
• Part of Bluetooth standard but deviates from Classic Bluetooth in several ways.
• Advertising transmissions can be used to broadcast, discover devices, etc.
• Connections can be established.
• Attribute Protocol Layer allows devices to create application-specific protocols.
• Generic Attribute Profile Layer (GATT) defines basic attributes for all BLUE
devices.
• Pairing devices uses a short-term key to send a long-term key.
• Bonding: storing long-term key in device database.
• Optional data encryption using AES.

Computers as Components 4e © 2016 Marilyn Wolf


scanning
Bluetooth Low Energy (BLE)
active
Link-level state machine
passive

advertising standby initiating

connected

master

slave

Computers as Components 4e © 2016 Marilyn Wolf


802.15.4 and ZigBee
• 802.15.4 defines MAC and PHY layers.
• Supports full-function and reduced-function devices.
• Either star or peer-to-peer topology.
• Communication performed using frames.
• Optional superframe provides a beacon mechanism and QoS.
• ZigBee is a set of application-oriented standards.
• NWK layer provides network services.
• APL layer provides application-level services.
• Supports many different topologies.

Computers as Components 4e © 2016 Marilyn Wolf


Wi-Fi
• Originally designed for portable and mobile applications.
• Has been adapted for lower-energy operation.
• Supports ad hoc networking.
• Network provides a set of services:
• Distribution of messages from one node to another.
• Integration delivers messages from another network.
• Association relates a station to an access point.

Computers as Components 4e © 2016 Marilyn Wolf


IoT Systems Databases
• Database holds data about devices, helps to analyze data.
• Relational database management system:
• Domain1 X domain2 X … -> Range.
• Database organized into records or tuples:
• Attribute: table column.
• Record: table row.
• One column is the primary key---uniquely identifies a record.

Computers as Components 4e © 2016 Marilyn Wolf


Database example devices
name id (primary address type
key)
door 234 10.113 binary
record refrigerator 4326 10.117 signal
table 213 11.039 MV
chair 4325 09.423 binary
faucet 2 11.324 signal

device_data
signature device time value
(primary key)
256423 234 11:23:14 1
252456 4326 11:23:47 40
663443 234 11:27:55 0
Computers as Components 4e © 2016 Marilyn Wolf
IoT Management - Timewheels
• Used to manage timing of events in the system.
• Timewheel is a time-sorted set of events.
• Event placed in proper spot in timewheel queue upon arrival.
• When current time is equal to time of event at head, event is processed.

8:00 AM 7:45 AM 7:30 AM


… lights on
toaster on radio on

head pointer

7:28 AM

Computers as Components 4e © 2016 Marilyn Wolf


Timewheel state diagram

time = current_event.time()
get next event process event

Computers as Components 4e © 2016 Marilyn Wolf


Example: smart home
• Performs a variety of services:
• Remote or automatic operation of lights and appliances.
• Energy and water management.
• Activity monitoring.
• Activity monitoring can help elderly, people with special needs:
• Reports on daily activities.
• Alerts for out-of-the-ordinary activity.
• Recommendations.

Computers as Components 4e © 2016 Marilyn Wolf


Example smart home
camera
• Cameras can identify resident bedroom 1
and their activity.
• Faucet, door sensors can identify dining/living
activity but not who performs room
door sensor
the activity.
camera

faucet faucet sensor


sensor bath
kitchen

Computers as Components 4e © 2016 Marilyn Wolf


Use case: activity monitoring
resident door monitor hall camera bathroom tap TV

Computers as Components 4e © 2016 Marilyn Wolf


Use case: light control
resident console door monitor light

Computers as Components 4e © 2016 Marilyn Wolf


Smart home object diagram
sensor console

hub timewheel database

1
actuator
event queue

1
n

event

Computers as Components 4e © 2016 Marilyn Wolf

You might also like