XEE100 All Slides

Download as pdf or txt
Download as pdf or txt
You are on page 1of 162

IoT Intro

Olav Solgaard

Bio
Olav Solgaard earned his Ph.D. degree from Stanford University in 1992. His doctoral dissertation:
“Integrated Semiconductor Light Modulators for Fiber-optic and Display Applications” was the basis
for the establishment of a Silicon Valley firm Silicon Light Machines (SLM), co-founded by Dr.
Solgaard in 1994. From 1992 to 1995 he carried out research on optical MEMS as a Postdoctoral
Fellow at the University of California, Berkeley, and in 1995, he joined the Electrical Engineering
faculty of the University of California, Davis. His work at UC Davis led to the invention of the multi-
wavelength, fiber-optical switch, which has been developed into commercial products by several
companies. In 1999 he joined Stanford University where he is now a Professor of Electrical
Engineering and the Director of Graduate Studies in the Department of Electrical Engineering.

Professor Solgaard’s research interests include optical MEMS, Photonic Crystals, optical sensors, microendoscopy, atomic force
microscopy, and solar energy conversion. He has authored more than 350 technical publications and holds 70 patents. Professor
Solgaard is a Fellow of the IEEE, the Optical Society of America, the Royal Norwegian Society of Sciences and Letters, and the
Norwegian Academy of Technological Sciences.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT Overview
• What are the disciplines of IoT?
• Cool applications and fantastic opportunities – Ada Poon
• Sensors – Beth Pruitt
• Small, inexpensive and very, very good
• Circuits – Boris Murmann
• This is where it started
• Embedded systems – Phil Levis
• Sensors, circuits and communication links playing together
• Networks – Ayfer Özgür-Aydin
• How does the internet support IoT?
• Big data and machine learning
• Other certificates focus on these aspects of IoT

Ideal IoT
• Ubiquitous
Why is it important?
• Smart
• Fourth industrial • Agile
revolution • On demand
• Blend into background
• IoT will touch everything
• Secure
• Everything will have IoT
• Low maintenance
• Fast
• Upgradable
• Growing
• Adaptable

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT will be the “next big thing”

Tsai, 2014 International Solid-State Circuits Conference (ISSCC), Keynote Talk

What is IoT? Cool


Locomotive for
innovation and
applications
economic growth
Big data
Sensors

Internet
Security
Circuits

Sensors

Sensors

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT Overview
• What will you learn in the short course?
• These are the questions we will help you answer:
• What is your perspective on IoT?
• How does the disciplines of IoT overlap with your expertise and interests?
• Where are the holes in your knowledge that you want to fill?
• What IoT opportunities do you want to pursue?
• And ultimately
• How to get the most out of your IoT certificate

Cool Applications – Professor Ada Poon


• Sustain (Smart cities)
• Move (Self driving cars)
• Heal (Healthcare)
• Feed (Agriculture)
• Make (Manufacturing and packaging)

• The purpose of this section is two fold:


• Get you excited about IoT potential
• And more importantly, have you thinking of better ideas than the ones
already out there

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Waste Management

• Go from collecting 840


containers 4 times a day to
collecting 80 containers a
day.
• Increase waste collection
efficiency by 90%.

Dublin Airport
http://ecubelabs.com/case-studies/dublin-airport/

Smart Street Lights

• Save energy
• Reduce light pollution
• Faster replacement

http://www.tvilight.com/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Street Parking
• Infrared- and magnetic-based vehicle detection
sensor mounted on the road surface
• Zigbee, LoRaWAN wireless connections
• Mesh networks are implemented with
in street lights.
• Apps to direct drivers to
empty spaces
• Dynamic parking pricess

http://www.libelium.com/smart_parking/

Connected Vehicles – Combine private and collective


transportation: The best of both

http://government-2020.dupress.com/trend/connected-vehicles/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Mood Enhancing – Sleep Monitoring

https://www.beddit.com/

Enhance Adherence – Ingestible Sensors

http://www.proteus.com/
http://www.sfchronicle.com/business/article/Did-you-take-your-pill-Ingestible-sensors-can-11206980.php

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Challenges
• A lack of Electronic Health Record (EHR) integration and concerns about data
security may prevent healthcare from fully adopting the IoT technology.
• The need to adopt an integration-first mindset instead of keep building
interesting/fun gadgets. Sometimes, a dumb gadget can be as useful if it could
integrate seamlessly with the EHR.

• False positives
• Doctor’s offices will be filled with perfectly healthy, but anxious patients

Precision Agriculture

https://www.accenture.com/cn-en/insight-accenture-digital-agriculture-solutions

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Food Safety & Storage Efficiency

• Wifi or cellular connectivity


• When a produce recall is
initiated, the juice machine
will check the packs and
prevent the machine from
pressing affected packs.

https://www.juicero.com/

Smart Manufacturing

https://www.slideshare.net/andrejt/ntk-2015-internet-of-things-track-iot-smart-home

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Scaling of sensors
• Many sensors can be modeled as simple
Reference
mechanical harmonic oscillators frame
• The figure shows an accelerometer
• The proof mass (m) is accelerated and displaced k b
• The displacement (Dz) of m is measured
• The acceleration is calculated as a=k·Dz/m (The
spring constant, k, is known) m
• The highest frequency that this accelerometer z

# &
can measure is 𝑓 = Accelerometer modeled as
$% '
mechanical harmonic oscillator

Capacitive measurement of displacement


• Most IoT sensors measure changes in
electrical properties:
• Resistance, capacitance, inductance
• Our accelerometer is completed by I k
capacitive measurement of displacement m
+ +
• Capacitors are great at measuring short Vin g z
V E
distance with very good absolute -
-
accuracy
• Measurements of large displacements are
better done by inductors (magnetic fields)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Block diagram of MEMS accelerometer
Noise and disturbances enter the system both as an equivalent acceleration noise,
and as an equivalent signal noise in the position sensor.

Disturbances
and Noise
+
Proof
mass Position
Acceleration
+

+
Position Noise
Sensor +

MEMS sensors: Small is beautiful


k 1 k
Dz = (2p × f ) × Dz
2
a= f =
m 2p m
• Design objective: Measure the smallest possible a up to a given f
• Looking at the first part of the equation, we might think that we should use a low k and large m
– => low f
– Given a constant f, only the ratio k/m~f2 is important
– A miniaturized accelerometer must have a small proof mass and a weak spring, but it is the
ratio of the two that is important!
– To measure small accelerations up to a given f, we therefore have to measure Dz very
accurately
– For application specific minimum detectable acceleration and bandwidth, there is a
minimum detectable displacement that our position sensor must be able to measure
• Small structures have position sensitivity and can be designed to have any resonance frequency
• => MEMS sensors!

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Electrical components used in miniaturized sensors

Generic block diagram

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

1000 mAh
11.4 µA

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Key: Duty-cycling

§ IoT transceivers are “mostly” off


§ Example: Receive/transmit within 1 ms, then go to sleep for 1 sec

http://www.mouser.com/applications/low-power-ewc-design/

Power/energy cost of wireless transmission


Bluetooth
Nike+ ZigBee WIFI
LE Ant-sized radio
Power
0.147 0.675 35.7 210
(mW)
Bits/sec 960 272 192 40M
Energy/bit
153 2480 186,000 5.25
(nJ)
§ Numbers are a strong function of reach
§ Energy per bit tends to be lower for high-data rate links à Invested power
amortizes better
https://www.digikey.com/en/articles/techzone/2011/aug/comparing-low-power-wireless-technologies

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Key issue for sensors: 1/f noise

offset
+ drift

thermal noise
signal

fcorner log f

§ Analog MOS circuits come with a variety of low frequency artifacts that can
easily ʺswamp outʺ DC or low-frequency signals of interest

What is an embedded system?

“An embedded system is a computerized system that


is purpose-built for its application.”

Elicia White
Making Embedded Systems, O’Reilly

This has deep implications for how they are designed and why.
Typically, want to minimize cost/maximize lifetime for a given expected workload.
Optimized, custom software that uses as few resources as possible.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two basic cost considerations dominate
Energy
§ Embedded systems have an expected workload – want to minimize energy
required to handle the workload (longer battery life, more efficient)
§ More powerful, highly featured MCUs draw more power: can be more power
efficient, but consume more energy for a given workload
Money
§ Many embedded systems markets have tight margins (cars, appliances, etc.)
§ More powerful, highly featured MCUs cost more

Both costs push designs to pick minimal MCU and optimize code for it

IoT: MGC Architecture


eMbedded Gateways Cloud
devices
6lowpan, 3G/4G
ZigBee, Ethernet
ZWave,
Bluetooth, TCP/IP
WiFi,
WirelessHART

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


What is IoT? Cool
Locomotive for
innovation and
applications
economic growth
Big data
Sensors

Internet
Security
Circuits

Sensors

Sensors

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT Overview
• What will you learn in the short course?
• These are the questions we will help you answer:
• What is your perspective on IoT?
• How does the disciplines of IoT overlap with your expertise and interests?
• Where are the holes in your knowledge that you want to fill?
• What IoT opportunities do you want to pursue?
• And ultimately
• How to get the most out of your IoT certificate

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Cool Applications

Professor Ada Poon

Outline
• Smart cities
• Healthcare
• Agriculture
• Manufacturing and logistics

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Source: Verizon. Smart Cities Solutions, 2014

Smart Waste Management

Dublin Airport New York City


http://ecubelabs.com/ http://bigbelly.com/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Waste Management
• Ultrasonic fill-level sensor
• Cellular IoT
• Solar powered
• Predictive pattern recognition

http://ecubelabs.com/integrated-waste-management/

Smart Waste Management

• Go from collecting 840


containers 4 times a day to
collecting 80 containers a
day.
• Increase waste collection
efficiency by 90%.

Dublin Airport
http://ecubelabs.com/case-studies/dublin-airport/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Street Lights

• Save energy
• Reduce light pollution
• Faster replacement

http://www.tvilight.com/

Smart Street Lights


• Light sensor, motion sensor
• Cellular IoT
• Real-time mesh network

https://chess-wise.eu/en/smart-street-lighting/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Street Parking
• In the past year, how many times did you give up when looking for a parking
space in cities? How many times did you argue with someone about a parking
spot? On average, how long did you take to look for a parking spot?
• More than 30% of a city’s traffic is caused by drivers searching for a parking
spot.
• In New York City, 29% of commuters said that they spent 20 minutes on
average looking for a parking spot and 10% spent more than 40 minutes.

http://www.govtech.com/transportation/Smart-Parking-Tech-US-Cities.html

Smart Street Parking


• Infrared- and magnetic-based vehicle detection
sensor mounted on the road surface
• Zigbee, LoRaWAN wireless connections
• Mesh networks are implemented with
in street lights.
• Apps to direct drivers to
empty spaces
• Dynamic parking prices

http://www.libelium.com/smart_parking/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Street Parking in Poland

http://www.worldsensing.com/success-story/gliwice-smart-parking-solution/#

Security without Surveillance

http://www.sensity.com/for-security-1/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Security without Surveillance
• Real-time analytics rather than human-monitored surveillance
• Edge-based analytics rather than cloud-based analytics
• All videos are stored locally.
• This also reduces the requirement on datarate.
• Resultant analytics sent to central cloud database for issuing alerts

Connected Vehicles

http://government-2020.dupress.com/trend/connected-vehicles/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Connected Vehicles – Stages of Safety Innovation
• Passive vehicle safety uses sensors to
take the vehicle’s immediate
surroundings into consideration.
• Recent efforts enable the sharing of
information gathered by the sensors
between vehicles, and between vehicles
and their surroundings to increase safety
further.
• V2X (vehicle-to-X, where X
represents other vehicles,
infrastructure, roads, and so on)
• A step towards autonomous driving
https://dupress.deloitte.com/dup-us-en/deloitte-review/issue-12/the-rise-of-safety-innovations-in-intelligent-mobility.html

Let’s Recap
Sensors
• Ultrasonic fill-level sensor
• Light and motion sensors
• Infrared- and magnetic-based vehicle detection sensor
• Camera

Communication Protocols
• Cellular IoT (LTE Cat-M1 and NB-IOT)
• Zigbee, LoRaWAN
• V2X

Networking Protocols
• Mesh network

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Outline
• Baby monitoring
• Elderly monitoring
• Mood enhancement
• Disease treatment and progression monitoring
• Enhance adherence

Baby Monitoring – Activity Tracking


• Body position
• Breathing
• Oxygen level
• Skin temp
• Wake/sleep pattern
• ECG

Can be integrated with other IoT devices such as thermostat and camera to “close
the loop”. For example, if the baby is too warm, the thermostat will
automatically adjust.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Baby Monitoring – Activity Tracking

http://mimobaby.com/ http://www.owletcare.com/smart-sock-2/

Baby Monitoring – Activity Tracking

1. The turtle sends information about


the baby’s breathing, body position,
sleep activity, and skin temp to the
Lilypad via Bluetooth LE.
2. The Lilypad streams data and live
audio to the cloud via WiFi.
3. Parents receive real-time insight
about their baby on their
smartphone.

http://mimobaby.com/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Baby Monitoring – Urinary Tract Infection Monitoring
• Urinary tract infection (UTI) is
the second most common
infection in the US accounting for
7M hospital visits and 100,000
hospitalization per year.
• It is easy to cure if detected and
treated in early stage.
• Urine culture test is accurate but
time consuming. Dip stick test is
fast but high false alarm rate.

https://sites.google.com/site/jagpurdue/projects/catalyst

Baby Monitoring – Urinary Tract Infection Monitoring

• Urine-activated paper battery (self-powered)


• Paper-based colorimetric nitrite sensor consisting of an LED, a urine-
absorbing strip, a reagent strip, an active photodiode, and a reference
photodiode.
• Sensor signal is converted into a PWM waveform.
• BLE module transmits the PWM signal to the caregiver.
https://sites.google.com/site/jagpurdue/projects/catalyst

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Elderly Monitoring – Incontinence Management

• In most nursing homes, between 40% and


60% of residents suffer from urinary
incontinence.
• Smart diaper allows caregivers to
remotely detect if an incontinence event
has occurred.
• Improved quality and dignity of care by
not having to disturb the elderly.

http://rfmicron.com/health-care/ http://www.medisens.com/news/press-release-1

Elderly Monitoring – Fall Detection


• One-fourth of Americans aged 65+ falls each year.
• Every 11 seconds, an older adult is treated in the emergency room for a fall;
every 19 minutes, an older adult dies from a fall.
• Falls are the leading cause of fatal injury and the most common cause of
nonfatal trauma-related hospital admissions among older adults.
• Falls result in more than 2.8 million injuries treated in emergency departments
annually, including over 800,000 hospitalizations and more than 27,000
deaths.
• In 2013, the total cost of fall injuries was $34 billion.
• The financial toll for older adult falls is expected to increase as the population
ages and may reach $67.7 billion by 2020. (The medicare budget is $584
billion in 2016.)
https://www.ncoa.org/news/resources-for-reporters/get-the-facts/falls-prevention-facts/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Elderly Monitoring – Fall Detection

http://www.semtech.com/wireless-rf/internet-of-things/downloads/Semtech_Health_FallDetection_AppBrief-FINAL.pdf

Mood Enhancement
• Relaxing music could be cued to ease stress.
• Window shades could be programmed to let in the maximum amount of
natural light.
• Use IoT to encourage healthy behaviors.
• Automatically dim the lights in the home at a recommended bedtime.
• Automatically turn off the TV to encourage exercise.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Mood Enhancing – Sleep Monitoring

https://www.beddit.com/

Disease Treatment and Progression Monitoring – Parkinson’s

Patients with Parkinson’s disease must be continually assessed in order to keep


up with their symptoms. This becomes potentially problematic as symptoms
fluctuate on a constant basis, and a monthly check in with their doctor may not be
representative of their experience.
https://www.slideshare.net/rcnossen/healthcare-iot-and-analytics-to-treat-parkinsons

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Disease Treatment and Progression Monitoring – Parkinson’s

Instead of patients actively performing certain tasks, could we monitor disease


progression passively in the background?
http://parkinsonmpower.org/

Disease Treatment and Progression Monitoring – Parkinson’s


• IoT opens up new possibilities for disease treatment through remote
monitoring. Using sensors, mobile devices, and advanced machine learning
capabilities, a patient could keep track of a host of valuable data from mobility
to sleep patterns all in real time. This information will give practitioners a
more complete look into the progression of their patient’s disease states.
• Intel and Michael J. Fox Foundation for Parkinson’s Research, and Pfizer and
IBM are individually collaborating on this idea. The collaboration involves
planned clinical trial.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Enhance Adherence
• 84% of U.S. healthcare spending is on patients with chronic conditions.
• More than 50% of prescribed medications are not taken as directed.
• Reasons why people are not able to take their medication as directed:
• They may forget.
• They may not be convinced of the medication’s effectiveness or be unsure
that it is working.
• They may fear the side effects or have difficulty taking the medication.
• The rising cost of prescription medications is a barrier for many.

Anderson G. Chronic conditions: making the case for ongoing care. Baltimore, MD: Johns Hopkins University, 2010.
Sabate E. Adherence to long-term therapies: evidence for action. World Health Organization, 2003.

Enhance Adherence – Ingestible Sensors

http://www.proteus.com/
http://www.sfchronicle.com/business/article/Did-you-take-your-pill-Ingestible-sensors-can-11206980.php

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Challenges
• A lack of Electronic Health Record (EHR) integration and concerns about data
security may prevent healthcare from fully adopting the IoT technology.
• The need to adopt an integration-first mindset instead of keep building
interesting/fun gadgets. Sometimes, a dump gadget can be as useful if it could
integrate seamlessly with the EHR.

Outline
• Precision agriculture
• Connected livestock
• Food safety

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Precision Agriculture
• A farming management concept based on observing, measuring and
responding to inter and intra-field variability in crops.
• In the past, precision agriculture technology was implemented by big
agribusinesses due to high costs.
• IoT technologies – which include everything from GPS services, sensors, and
big data calculation – have made precision agriculture affordable by many
farmers.
• Farmers don’t have to rely as much on their gut. Instead, they can make
decisions based on detailed information about water, climate changes, soil
quality, the health of their crops and livestock, and the conditions of their
machinery.

https://flex.com/intelligence/iot/old-macdonalds-new-connected-farm

Precision Agriculture

https://www.accenture.com/cn-en/insight-accenture-digital-agriculture-solutions

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Precision Agriculture

Opportunities for
vertical integration

https://www.cbinsights.com/research/agriculture-tech-market-map-company-list/

Connected Livestock
• Around 1.4 billion cattle around the world
• Animals can't tell you when they first get sick. It can be hard for humans to
tell a cow is ill until there are visible signs of sickness.
• IoT sensors cannot diagnose an illness but it will let the farmer know when
something needs attention.

https://www.smaxtec.com/en/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Connected Livestock
• pH measurement
• Early detection of fermentation disorders
• Activity level measurement
• Early, automatic oestrus detection
• Onset illness
• Temperature measurement
• Early detection of onset of diseases such as feverish disorders, metabolic
disorders, post-calving disorders
• Early detection of start of calving

https://www.smaxtec.com/en/

Connected Livestock

http://uk.smaxtec.com/smaxtec-system/

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Food Safety

• Wifi or cellular connectivity


• When a produce recall is
initiated, the juice machine
will check the packs and
prevent the machine from
pressing affected packs.

https://www.juicero.com/

Outline
• Smart manufacturing
• Smart packaging

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Smart Manufacturing
• The use of IoT devices to improve efficiency and productivity of
manufacturing operations. Typically, it involves retrofitting sensors to
existing manufacturing equipment. But new manufacturing equipment often
comes with IoT sensors pre-installed.
• According to IDC data, published early 2017, the manufacturing industry was
good for a total IoT spending of $178 billion in 2016, which is more than
twice as much the second largest vertical market, transportation.
• Manufacturing operations accounts for 57.5% of the total IoT spending on
manufacturing.

http://www.businesswire.com/news/home/20170104005270/en/Internet-Spending-Forecast-Grow-17.9-2016-Led

Smart Packaging
• Packaging systems used with food and pharmaceutical that help extend shelf
life, monitor freshness, display information on quality, improve safety, and
improve convenience.
• Usually involve active functions beyond the inert passive containment, for
example, the ability to sense or measure an attribute of the product, the inner
atmosphere of the package, or the shipping environment. This information can
be communicated to users or can trigger other active packaging functions.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Conclusion

http://www.eetimes.com/author.asp?doc_id=1328602

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Introduction to Sensors
Professor Beth Pruitt
Stanford University

This modules provides an Introduction to Sensors and includes an introduction to


sensors as transducers from physical parameters to signals; a review of sensor
terminology; and discusses sensor selection including how to read a specification
sheet. If you want more detail, check out the course ENGR/ME220 which covers
enough about all kinds of sensors so that you can make good decisions about
recommending, selecting and using sensors in projects, products and research.

Learning Objectives
• Describe and define performance criteria for sensors (e.g., linearity, sensitivity,
resolution, noise)
• Explain the operating mode for some common IoT transducers and sensors
(strain gage, accelerometer, gyros, temperature, pressure sensors…)
• Interpret a specification sheet and extrapolate missing performance data

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


What is a sensor?

input -> Sensor -> output

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Sensation
Imagine Life Without…
Touch
Hearing
Propioception
Vision
Gun Legler

Perception
Force or
of Topography or
Displacement
Stiffness

Rodin’s Cathedral

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


external load

skin mechanics

stress/strain at neuron

neuron mechanics,
channel id & biophysics,
cell physiology

electrochemical response

neural circuit
past/current stimuli

behavioral response

SKIN: your largest and fastest growing organ

Barrier Layer:
• Respiration/perspiration
• Cooling
skin surface
Sensory Function:
• Static Forces
• Dynamic Forces 10’s-100’s µm
• Temperature

100’s-1000’s µm

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Digital Signal Encoding : Amplitude coded by Pulse Density

Adaptation : Pulse density decays over time

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Quantifiying touch sensation
• Dynamic Range – what range of force or deformation can you feel?
• Bandwidth – what frequency or on/off rate can you detect?
• Sensitivity – how strong is the output signal relative to the input? Is it the
relationship linear?
• Resolution – what is the smallest feature or smallest force you can detect?

Sensor Terminology

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Transducer, n. Any device by which variations in one physical quantity (e.g.
pressure, brightness) are quantitatively converted into variations in another (e.g.
voltage, position).
OR…a device for which changes in input quantity A produce corresponding, predictable
changes in output quantity B

For our purposes, Sensors convert physical to electrical signals

Generic Sensing Application

Input
(measurand)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


The Ideal Sensor

Sensor
Output

Measurand

Sensor Specifications

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Sensitivity
Sensor
Output

Measurand

Sensor
Output

Measurand

Non-Linearity

Voltage

Pressure

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Non-Linearity

slope1

slope A

Voltage slope B

Pressure

Hysteresis

Voltage

Pressure

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Repeatability

Voltage

Pressure

Drift

Same pressure, take


measurement for a long time

Voltage

Pressure

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Specifying Non-Linearity

% full
scale
output

Voltage

Pressure

Span / Range
linear saturation

Voltage

Pressure

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Sensor Dynamics

2nd order Mechanical system


• Mass: F=ma b
F(t)
m

• Damper: F=bv k
x(t)

x(0)=0

• Spring: F=kx

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Transfer function & characteristic eqn
d2x dx
f (t) = m 2 + b + kx
dt dt

X(s) 1/m
= G(s) = 2
F(s) s + bms+ k m

X(s) Kω n 2
= G(s) = 2
F(s) s + 2ζω n s + ω n 2

Step Response
Underdamped

Critically damped
Final
value

Voltage
Overdamped

Time

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Sensor stimulus
Dynamics
Ideal

Slight delay

decay

combo

2nd order
system

time

Bandwidth

Δt1
Δt2
delay
decay

time
delay
decay

Bandwidth

1/Δt2 1/Δt1
frequency

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Linearization and Error

All models are wrong, some are useful.


- George Box

Overall Error (Error Band)

Error
Correct Value
Band
at Output

Sensor
Output

Measurand

True Value of
Measurand

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


x
x

Accuracy vs. Precision


x x
x

Imprecise and Inaccurate

• Accurate x xx
x
x
• Average of sampled output is close to
real value (AC errors and noise)
• Precise Precise but Inaccurate
• Sampled output is consistently tightly
grouped with consistent offset from real x

value (DC errors) x


x x

x
Accurate but Imprecise

x x
x
x x

Precise and Accurate

Linearity of a resistive sensor in a half bridge


Vin

linear
R

Vout
Vout
Rsense

Rsense
æ Rsense ö
Vout = Vinç ÷
è Rsense + R ø

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Linearity details
æ Rsense ö
Vout = Vinç ÷ = V (Rs )
è Rsense + R ø
We’re usually interested in the behavior for relatively small changes in Rs.

Rs = Ro + DR

Linearity analysis using a Taylor expansion


æ Rsense ö
Vout = Vinç ÷ = V (Rs )
è Rsense + R ø
We’re usually interested in the behavior for relatively small changes in
Rs so evaluate the linear (sensitivity) and non-linear (error) terms at an
operating point – relative to starting value R0

Rs = Ro + DR
Recall that the Taylor series approximation of f(x) about operating point a is defined as:

offset Linear term Non-linear error terms

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Linearity analysis using Taylor expansion

æ Rsense ö
Vout = Vinç ÷ = V (Rs )
è Rsense + R ø

Rs = Ro + DR

é dV ( Rs ) ù (DR) 2 é d 2V ( Rs ) ù (DR)3 é d 3V ( Rs ) ù
V ( R s ) = V ( Ro ) + DR ê ú + ê 2 ú + ê ú ...
ë dRs û Rs = Ro 2 ë dRs û Rs = Ro 6 ë dRs 3 û Rs = Ro

Ro Ro (DR) 2 Ro (DR)3 Ro
V ( R s ) = Vin + DR - +
R + Ro ( R + Ro ) 2
4 ( R + Ro ) 3
36 ( R + Ro ) 4

offset Linear term Non-linear error terms

“Sensitivity” Decreasing weight with increasing


exponent

Quadratic/linear =

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Why do we care so much about Linearity?

linear

Vout

Rsense

1- (cos2wt) 2

Vibration rectification – offset errors that


add up and don’t average out to zero

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Noise

Electronic Noise Sources


• EMF - capacitive & inductive pickup
• Johnson noise
• All resistors and dissipative systems
• Thermal/Brownian random molecular interactions VJ = 4k B TR
• 1/f noise (shot, flicker, Hooge)
• Semiconductor based electronics, amplifiers, instruments αVR2
• Seminconductor resistors, Hooge noise VH =
Nf
• Drift
• Accumulated offset errors
• Very low frequency fluctuations?

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Other electronic noise
• Shot noise
• Associated with pn junctions Sn ( f ) = 2qe IDC

• Flicker noise (also 1/f)


KIDC
• Associated with trap charge states in diodes and FETs Sn ( f ) = 2qe IDC +
• Amplifier noise f
• Multiple factors, depends on op-amp type, see Senturia
• Example: AD624 instrumentation amplifiers have
• 4nV/rtHz voltage noise at low frequencies
• 200fA/rtHz current noise above 10Hz

Intrinsic thermal noise


mechanical harmonic oscillator

w0 1
x˙˙ + x˙ + w 0 x = [Fsignal (t) + Fnoise (t)]
2
k Q m

[m Hz]
k
m w0 = m 4kB Tk 2
Sn force ( f ) =
ω 0Q

4k B T
Cantilever
t w Sn position ( f ) =
kω 0Q
⎛ ω 2 ⎞2 ω2
[m Hz]
2

⎜1− 2 ⎟ + 2 2
L ⎝ ω0 ⎠ Q ω0

Quality factor, Q =(mk)1/2/b, for a cantilever ~30-50 in air

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Resolution
• Smallest signal the transducer can
resolve or produce for a particular set

Voltage (V)
of operating conditions
• Noise has some frequency distribution Noise
Floor
• Signal to noise ratio (SNR)
• Depends on bandwidth
Time (s)

Noise _ Density
RESOLUTION =
Sensitivity
Integrated _ Voltage _ Noise
MIN =
Sensitivity

Scaling Issues for Force Sensors

• Noise generally does not improve with miniaturization


• Electrical Noise will be about same
• Energy Fluctuations (kBT) will result in larger errors
• Thermomechanical noise scales as 1/√m
• Some 1/f noise becomes more significant
• Increased surface/volume

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Reading a Spec Sheet

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


0.1 mW to 1 mW power – also way too high for a phone

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Basic Description

Key features:
Outputs fused sensor data Quaternion, Euler angles, Rotation vector,
Linear acceleration, Gravity, Heading
3 sensors in one device an advanced triaxial 16bit gyroscope, a versatile,
leading edge triaxial 14bit accelerometer and a
full performance geomagnetic sensor
Data sheet
Small package LGA package 28 pins
Footprint 3.8 x 5.2 mm², height 1.13 mm²
BNO055
Power Management Intelligent Power Management: normal,
low power and suspend mode available

Intelligent 9-axis absolute orientation sensor


Common voltage supplies
Digital interface
VDD voltage range: 2.4V to 3.6V
HID-I2C (Windows 8 compatible), I²C, UART
VDDIO voltage range: 1.7V to 3.6V
Consumer electronics suite MSL1, RoHS compliant, halogen-free
Bosch Sensortec Operating temperature: -40°C ... +85°C

Key features of integrated sensors:


BNO055
Page 13
Accelerometer features Data sheet

Programmable functionality Acceleration ranges ±2g/±4g/±8g/±16g


Low-pass
1.2 Electrical and physical characteristics, measurement filter bandwidths
performance 1kHz - <8Hz
Operation modes:
Table 0-2: Electrical characteristics BNO055 - Normal
- Suspend
OPERATING C ONDITIONS BNO055 - Low power
Parameter Symbol Condition Min Typ- Standby
Max Unit

St art -Up t ime T From Off t o configurat ion mode


Sup 400- Deep suspend ms

POR t ime
On-chipT interrupt controller
From Reset t o Normal mode
POR
Motion-triggered
650
interrupt-signal
ms
generation for
- any-motion (slope) detection
Dat a Rat e DR
- slow or no motion recognition
s. Par. Fusion Out put dat a rat es

Dat a rat e t olerance DR tol ±1- high-g detection


%
9DOF @100Hz out put
dat a rat e
(if int ernal oscillat or is
used)

OPERATING C ONDITIONS ACCELEROMETER


Parameter Symbol Condition Min Typ Max Units

Accelerat ion Range gFS2g Select able ±2 g


via serial digit al int erface
gFS4g ±4 g

gFS8g ±8 g

gFS16g ±16 g

OUTPUT SIGNAL ACCELEROMETER


(ACCELEROMETER ONLY MODE )
BST-BNO055-DS000-12 | Revi si on 1. 2 | November 2014 Bosch Sensortec
Parameter Symbol Condition Min Typ Max Units
© Bosch Sensortec GmbH reserves al l ri ghts even i n the event of i ndustri al property ri ghts. We reserve al l ri ghts of di sposal su ch as copyi ng and Digital from
Sensit
passiivitngyon to thi rd parti S es. BOSCHAllandgFSXgthe
Values, TA=25°C
are regi stered trademarks of1Robert Bosch GmbH, LSB/mg
BNO055: data sheet
SensitNote: Speci fi cati ons wiSthi
ivit y t olerance tol
n thi s document
symbol
are subj
Ta=25°C, ect to change wi thout noti ce.±1
gFS2g ±4
Germany.
%
onboard A/D
Sensit ivit y Temperat ure TCS gFS2g, ±0.03 %/K
Drift Nominal VDD supplies,
Document revision 1.2
Temp operat ing condit ions
Sensit ivit y S VDD gFS2g, TA=25°C, 0.065 0.2 %/V
Document release date
Supply Volt . Drift November 2014
VDD_min ≤  VDD ≤  VDD_max
Zero-g Offset (x,y.z) Offxyz gFS2g, TA=25°C, nominal VDD -150 ±80 + 150 mg Similar offset
Document number BST-BNO055-DS000-12
supplies, over life-t ime
to kionix
Zero-g Offset TCO gFS2g, ±1 + /-3.5 mg/K
Temperat ure Drift Nominal V supplies
Technical reference code(s) 0 273 141 209 DD

Zero-g Offset Supply OffVDD gFS2g, TA=25°C, 1.5 2.5 mg/V


Notes
Volt . Drift
Data in this document are subject to change without notice. Product
VDD_min ≤  VDD ≤  VDD_max

photos and pictures are8 for illustration purposes only and may differ from
nd
Bandwidt h bw8 2 order filt er, bandwidt h Hz
programmable
bw16 the  real  product’s  appearance.
16 Hz
Variable bw 31 31 Hz
Using onboard bw 63 BNO055 63 Hz
Page 14
Filters – choosebw 125 Data sheet 125 Hz

smalles BW bw 250 250 Hz


bw 1,000 Hz
possible for appbwNL
1000
500 500 Hz
Nonlinearit y best fit st raight line, gFS2g 0.5 2 %FS

Out put Noise Densit y nrms gFS2g, TA=25°C 150 190 µg/ Hz
BST-BNO055-DS000-12 | Revi si on 1. 2 | November 2014 Nominal VDD supplies Bosch Sensortec
© Bosch Sensortec GmbH reserves al l ri ghts even i n the event Normal mode
of i ndustri al property ri ghts. We reserve al l ri ghts of di sposal su ch as copyi ng and
passi ng on to thi rd parti es. BOSCH and the symbol are regi stered trademarks of Robert Bosch GmbH, Germany.
Reported as %Full
Note: spec sheets use definitions that give the best numbers!
Note: Speci fi cati ons wi thi n thi s document are subj ect to change wi thout noti ce.
scale output
MECHANICAL C HARACTERISTICS ACCELEROMETER
Parameter Symbol Condition Min Typ Max Units

Cross Axis Sensit ivit y CAS relat ive cont ribut ion bet ween 1 2 %
any t wo of t he t hree axes

Alignment Error EA relat ive t o package out line 0.5 2 °

OPERATING C ONDITIONS GYROSCOPE


Parameter Symbol Condition Min Typ Max Unit

Rat e Range RFS125 Select able 125 °/s


via serial digit al int erface
RFS250 250 °/s

RFS500 500 °/s

RFS1000 1,000 °/s

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


RFS2000 2,000 °/s

OUTPUT SIGNAL GYROSCOPE


(GYRO ONLY MODE )
Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED
Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED
Picking sensors

Automotive Applications:
• What might you want to measure for each?
• What sensors might you use?
• How will you use the data?

1. Seat occupancy
2. Airbag deployment
3. Tire pressure monitoring system
4. Cruise control

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


1. Seat occupancy

2. Airbag deployment

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


3. Tire pressure monitoring system

4. Cruise control

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT Circuits
Boris Murmann
[email protected]

The data-driven world

Kim, 2015 International Solid-State Circuits Conference (ISSCC), Keynote Talk

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Explosion in wireless connectivity

Tsai, 2014 International Solid-State Circuits Conference (ISSCC), Keynote Talk

IoT will be the “next big thing”

Tsai, 2014 International Solid-State Circuits Conference (ISSCC), Keynote Talk

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Today’s hardware: Bluetooth/ZigBee/WIFI/… modules

Under the hood of an IoT chip

A. Klinefelter et al., "A 6.45µW self-powered IoT SoC with integrated energy-harvesting power management and
ULP asymmetric radios," 2015 IEEE International Solid-State Circuits, pp. 384-385, Feb. 2015.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Generic block diagram

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

Batteries

http://www.silabs.com/whitepapers/battery-life-in-connected-wireless-iot-devices

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Batteries improve slowly
§ Semiconductor chip performance tends
to improve rapidly
› See e.g. the blue curve on the left for
microprocessors
› DMIPS = Dhrystone Million
Instructions per Second
§ Battery capacity improves slowly
› About 5-8% per year
› Doubling in ~10 years

§ Key challenge: How to fill this gap via


creative circuit & system design?

Tsai, 2014 International Solid-State Circuits Conference (ISSCC), Keynote Talk

Module outline

§ Battery capacity (exercise)


§ Energy management
§ Wireless link
§ Digital computing
§ Analog-digital interfaces

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Exercise
§ Estimate the average current that be sustained for a battery life of 10 years

Battery 2 x AA CR2032
Capacity 1000 mAh 225 mAh
Average current
? ?
(for 10-year lifetime)

Solution
§ 10 years = 87,600 hours

Battery 2 x AA CR2032
Capacity 1000 mAh 225 mAh
Average current
11.4 µA 2.6 µA
(for 10-year lifetime)

§ Only a very small amount of current available!

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Energy management

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

Typical current consumption across modes

Atmel ATmega2564RFR2 wireless MCU power/sleep mode profiles

§ How to achieve average current consumption of ~10 µA (or less)?

https://www.digikey.com/en/articles/techzone/2016/apr/achieving-wireless-connectivity-for-iot-applications-in-a-power-budget-efficient-way

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Key: Duty-cycling

§ IoT transceivers are “mostly” off


§ Example: Receive/transmit within 1 ms, then go to sleep for 1 sec

http://www.mouser.com/applications/low-power-ewc-design/

Battery lifetime calculation becomes complicated….

http://uk.farnell.com/calculating-battery-life-in-iot-applications

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Extending battery life (or eliminate batteries!) through harvesting

Most
popular

A. Klinefelter et al., "A 6.45µW self-powered IoT SoC with integrated energy-harvesting power management and
ULP asymmetric radios," 2015 IEEE International Solid-State Circuits, pp. 384-385, Feb. 2015.

How much solar power can we pick up?

Laser Light
§ Typically expect 1 µW/mm2 under
Sunny Day
reasonable lighting conditions
Soccer Stadium § A few cm2 of solar cells may help
Overcast Day
extend the lifetime to “infinity”

Corridor Light

Street Light

Candle Light

10-3 10-2 10-1 100 101 102 103 104 Power (μW/mm2)
0
10 -1
10 10 1
10 2
10 3
10 4
10 5
10 6 Illuminance (Lux)

Chart by Nishit Shah, Stanford

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


DC-DC converters for energy harvesting

Storage capacitor

§ Want to cover a variety of harvesting sources à Large input voltage range


§ Want relatively stable output voltage
§ Need efficient management of storage capacitor
M. Saadat and B. Murmann, "A 0.6V - 2.4V Input, Fully Integrated Reconfigurable Switched-Capacitor DC-
DC Converter for Energy Harvesting Sensor Tags," in Proc. IEEE Asian Solid-State Circuits Conf., Nov. 2015.

Series-Parallel Converter VCP Load VOUT


VIN
Current
Sensor
CL
VCP

5 nF RL
§ Example design
VDD Current
Selector Controlled
Oscillator R1
§ Switched-capacitor
series-parallel converter
VDDL-IN

POR

provides 8 gain rations


CL

Φ1 R2
Non-overlapping Clock
Switch Control Multiplexer Φ2
Generator
State § Controller adjusts
Machine
CLK

Gain Reset Caps


frequency for optimum
Controller
efficiency
and
Hold Gain
Rectifier
Q

HOLD

3-Bit
Up/Down
Counter ÷N § Provides step charging of
U

R1
Reference
storage capacitance
RREF

VREF PGOOD
R2 Generator Detection

VFB PGOOD

M. Saadat and B. Murmann, "A 0.6V - 2.4V Input, Fully Integrated Reconfigurable Switched-Capacitor DC-DC
Converter for Energy Harvesting Sensor Tags," in Proc. IEEE Asian Solid-State Circuits Conf., Nov. 2015.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Step charging example
𝐶"#$%& = 100𝑛𝐹
Vout (V)
𝑉-. = 0.8𝑉
𝑉$1# = 1.3𝑉 Time

1
Energy loss without step charging: 𝐸4$"" = 𝐶 𝑉 6 = 192 𝑛𝐽
2 "#$%& $1#
1 6
Energy loss with step charging: 𝐸4$"" = : 𝐶"#$%& 𝑉$1#,< − 𝑉$1#,<>? = 18 𝑛𝐽
2
<

M. Saadat and B. Murmann, "A 0.6V - 2.4V Input, Fully Integrated Reconfigurable Switched-
Capacitor DC-DC Converter for Energy Harvesting Sensor Tags," in Proc. IEEE Asian Solid-
State Circuits Conf., Nov. 2015.

Wireless transceiver

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Power/energy cost of wireless transmission

Bluetooth LE Nike+ ZigBee WIFI


Power (mW) 0.147 0.675 35.7 210
Bits/sec 960 272 192 40M
Energy/bit (nJ) 153 2480 186,000 5.25

§ Numbers are a strong function of reach


§ Energy per bit tends to be lower for high-data rate links à Invested power
amortizes better
https://www.digikey.com/en/articles/techzone/2011/aug/comparing-low-power-wireless-technologies

Pushing the limits


60 GHz pulses

Power
proportional to
data rate

§ A variety of non-standard, short-range radios are being investigated for much


lower energy/bit numbers
§ This open the door for RF powering (no batteries, no solar cells)!
M. Taghivand, K. Aggarwal, Y. Rajavi and A. S. Y. Poon, "An Energy Harvesting 2x60 GHz
Transceiver With Scalable Data Rate of 38–2450 Mb/s for Near-Range Communication," in
IEEE Journal of Solid-State Circuits, vol. 50, no. 8, pp. 1889-1902, Aug. 2015.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


RF harvesting circuit

3 nF, on chip
§ Supplies up to 1 mA at 5-10 cm distance
§ RF power can be supplied by cell phone
M. Taghivand, K. Aggarwal, Y. Rajavi and A. S. Y. Poon, "An Energy Harvesting 2x60 GHz
Transceiver With Scalable Data Rate of 38–2450 Mb/s for Near-Range Communication," in
IEEE Journal of Solid-State Circuits, vol. 50, no. 8, pp. 1889-1902, Aug. 2015.

Comparison of recent works

M. Taghivand, K. Aggarwal, Y. Rajavi and A. S. Y. Poon, "An Energy Harvesting 2x60 GHz
Transceiver With Scalable Data Rate of 38–2450 Mb/s for Near-Range Communication," in
IEEE Journal of Solid-State Circuits, vol. 50, no. 8, pp. 1889-1902, Aug. 2015.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Ant-sized radio

https://web.stanford.edu/~arbabian/Home/IoT_Radio.html

Digital circuits

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


To transmit or not to transmit?

§ Sending bits is expensive


§ How about adding some
signal processing to reduce
number of bits?
§ For example, how about
data compression?

???
Drawing by Peter Kairouz, Stanford

Typical energy of digital operations (45nm CMOS)

V. Sze, Y.-H. Chen, J. Emer, A. Suleiman, Z. Zhang, “Hardware for Machine Learning: Challenges
and Opportunities,” IEEE Custom Integrated Circuits Conference (CICC), Invited Paper, May 2017.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Energy of image processing accelerators

V. Sze, Y.-H. Chen, J. Emer, A. Suleiman, Z. Zhang, “Hardware for Machine Learning: Challenges and
Opportunities,” IEEE Custom Integrated Circuits Conference (CICC), Invited Paper, May 2017.

Research: Always-on object detection

Feature-space transmission

20x less data


A. Omid-Zohoor, C. Young, D. Ta and B. Murmann, "Towards Always-On Mobile Object
Detection: Energy vs. Performance Tradeoffs for Embedded HOG Feature Extraction," to
appear, IEEE Trans. Circuits and Systems for Video Technology.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Microcontroller power modes

Critical for long


battery life

Core Power Consumption of TI CC2650MODA

http://uk.farnell.com/calculating-battery-life-in-iot-applications

Why can’t we reduce leakage current to zero?

§ MOS transistors turn off gradually


§ Current drops exponentially below threshold
voltage (VT)

§ Two options for reducing leakage


› Increase VT à But this reduces on-current
› Increase subthreshold slope à very difficult;
bounded by 60 mV/decade (kT/q)
VGS

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Body biasing in fully depleted silicon-on-insulator (FD-SOI)

FBB = Forward body biasing

RBB = Reverse body biasing

Courtesy Andreia Cathelin, STMicroelectronics

VT changes with body biasing

E. Beigne et al., "Ultra-Wide Voltage Range designs in Fully-Depleted Silicon-On-Insulator FETs," 2013
Design, Automation & Test in Europe Conference & Exhibition (DATE), Grenoble, France, 2013, pp. 613-
618.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Impact on leakage and drive strength (frequency)

Courtesy Philippe Flatresse, STMicroelectronics

Mixed-signal interfaces

Wireless Accelerators &


transceiver Microcontroller
Mixed-signal Sensors
interfaces Actuators
Energy
Memory
Management

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Anatomy of an analog-digital interface

Key issue for sensors: 1/f noise

offset
+ drift

thermal noise
signal

fcorner log f

§ Analog MOS circuits come with a variety of low frequency artifacts that can
easily ʺswamp outʺ DC or low-frequency signals of interest

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Chopper amplification

Analog-to-digital conversion
6
10
Energy per A/D conversion

4
10
P/f s [pJ]

2
10

Flash
Pipeline
0 SAR
10
DS
Other
20 30 40 50 60 70 80 90 100
SNDR [dB] B. Murmann, "ADC Performance Survey 1997-2016," [Online]. Available:
http://web.stanford.edu/~murmann/adcsurvey.html.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


The most efficient architecture for IoT applications: SAR ADC
Successive
Approximation
Register

“Sample and Hold”


or
“Track and Hold”

Maloberti, Understanding Microelectronics: A Top-Down Approach, Wiley, 2011

The most efficient architecture for IoT applications: SAR ADC

Maloberti, Understanding Microelectronics: A Top-Down Approach, Wiley, 2011

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Implementation example

§ Consumes only 1 nW at 1 kS/s!


› Often negligible compared
to RF and digital energy

§ Conversion occurs within 5 µs


of 1 ms period
› Converter is off/idle most of
the time

P. Harpe, et al. "A 3nW signal-acquisition IC integrating an amplifier with 2.1 NEF and a
1.5fJ/conv-step ADC," 2015 IEEE International Solid-State Circuits Conference, Feb. 2015.

Input amplifier
DC servo loop

§ 32 dB gain
§ AC coupled input
§ 370 Hz bandwidth
§ Input noise = 26 µVrms
§ Total current = 1 nA!

P. Harpe, et al. "A 3nW signal-acquisition IC integrating an amplifier with 2.1 NEF and a
1.5fJ/conv-step ADC," 2015 IEEE International Solid-State Circuits Conference, Feb. 2015.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Summary
§ The IoT has become a significant driver for the semiconductor industry
§ The biggest circuit challenges are related to energy supply
› Batteries won’t improve significantly
› We may not want to deal with batteries in billions of sensors!
§ Take-homes on functional blocks
› Energy management requires handcrafting; must often fuse multiple sources
› RF transmission is most power hungry; must be heavily duty cycled
› Large transmit energy warrants efforts toward increased local computing
› Local compute strongly benefits from optimal supply & VT control
› Analog interfaces are non-trivial (1/f noise, etc.), but not a bottleneck
§ Future applications will decide in which direction we will take the next wave of
circuit & system design innovations

Related Stanford coursework on analog circuits

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


The Internet of Things
Embedded Systems

Philip Levis
Associate Professor
Computer Science and Electrical Engineering
Stanford University

Embedded Systems
The "Things" in "Internet of Things"
Computing systems designed for a particular application
smart lightbulb
medical implant
aircraft engine controller/sensor
personal fitness tracker
Cost and energy are paramount and greatly define design

Hardware and software often selected together, driven by application


requirements, and software is often highly customized

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


This module
You'll learn what embedded systems are and how they differ from traditional
computing systems such as servers, phones, and laptops

You'll learn the network and software architectures they typically use and why

You'll learn about the technology drivers behind the recent growth of the IoT

You'll learn about energy budgets and how to design an embedded system

You'll learn about common software techniques and tradeoffs

The Internet of Things

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


What is an embedded system?

“An embedded system is a computerized system that


is purpose-built for its application.”

Elicia White
Making Embedded Systems, O’Reilly

This has deep implications for how they are designed and why.
Typically, want to minimize cost/maximize lifetime for a given expected workload.
Optimized, custom software that uses as few resources as possible.

Internet(s) of Things

Industrial Home Area Personal Area Networked


Automation Networks Networks Devices
Thousands/person Hundreds/person Tens/person Tens/person
Controlled environment Uncontrolled environment Personal environment Uncontrolled environment
High reliability Unlicensed spectrum Unlicensed spectrum Unlicensed spectrum
Control networks Convenience Instrumentation Convenience
Industrial requirements Consumer requirements Fashion vs. function Powered

WirelessHART, 802.15.4 ZigBee, ZWave, Thread Bluetooth/BLE WiFi/802.11


6tsch, RPL 6lowpan, Thread 3G/LTE TCP/IP
IEEE/IIC/IETF IETF/ZigBee/Thread/Private 3GPP/IEEE IEEE/IETF

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT: MGC Architecture
eMbedded Gateways Cloud
devices
6lowpan, 3G/4G
ZigBee, Ethernet
ZWave,
Bluetooth, TCP/IP
WiFi,
WirelessHART

IoT Systems and Applications


Wide range of applications and application requirements
§ Marketing uses the same term (IoT), but very different
Commonly a three-tier architecture: embedded, gateway, and cloud
Each tier has different computing systems
§ Embedded: microcontrollers, custom software, energy
§ Gateway: often ARM, Android, Linux, iOS
§ Cloud: x86_64, virtualized servers (Linux, etc.)
Application is spread across tiers
§ Software at each tier receives, processes, and displays data

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Example Part: nRF51822

Cortex M0+ with integrated 2.4GHz transceiver


§ Supports Bluetooth Low Energy
§ Two models: 32kB/256kB or 16kB/128kB
DigiKey cost for 25,000: $1.99

6lowpan
We can now inexpensively build powerful networked embedded devices
Early networking: proprietary, vertical silos
§ ZigBee defines link up to application layer
§ Zwave, etc.
§ Connect to Internet through application gateway (lock-in)
6lowpan: IETF standard for IPv6 over low-power link layers
§ Just defines IP packet formats/compression (plus UDP)
§ Routing/MAC layer independent
§ Allows interoperability and software flexiblity
§ RFC4944 (basic protocol) and RFC6282 (additional header compression)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Why Today?
Wireless embedded sensors have been in the market for > 15 years
§ Built around 8-bit or 16-bit microcontrollers, proprietary protocols
Two major technological shifts
§ 32-bit CortexM microcontrollers became efficient enough to use
§ Smartphone support for Bluetooth Low Energy allows mobile devices to interact
with ubiquitous ones
Specification of 6lowpan opened low-power wireless devices ("things") up to the
Internet, hence the "Internet of Things"

Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

CortexM microcontrollers

32-bit microcontrollers, use Thumb-1 and Thumb-2 instruction sets


Many types: M0, M0+, M1, M3, M4, M7, M23, M33
§ Optional floating point support: M4F single precision, M7F double precision
Three major subfamilies/architectures
§ ARMv6-M: Cortex-M0, Cortex-M0+, Cortex-M1
§ ARMv7-M: Cortex-M3
§ ARMv7E-M: Cortex-M4, Cortex-M7
§ Upwards compatible
Wikipedia has excellent details on all of the options/features
§ https://en.wikipedia.org/wiki/ARM_Cortex-M

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


CortexM
CortexM defines an instruction set and core processor functionality
Several pieces of optional functionality
§ Memory protection unit: used to protect firmware from applications
§ SysTick: standard timer
§ Bit banding: spread a word across 32 words, so bits can be individually
read/written: useful for GPIO, other single-bit writes
On-chip features/components modeled as memory-mapped peripherals
§ Each peripheral has a block of addresses for its registers

One huge benefit: compiler/tool support


CortexM has excellent open-source compiler support
§ GCC
§ llvm
§ Leverages importance of general ARM architecture
msp430-gcc recently taken in-house my TI (mspgcc)
avr-gcc is incorporated into Atmel studio

One issue: integrated development environments (AVR studio, code composer


studio) tend to minimize activation energy but eventually become restrictive

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


CortexM memory map (ARMv6-M)
0xFFFFFFFF
System
0xE0000000
Device not shared
0xC0000000
Device shared
0xA0000000
RAM write-back
0x80000000
RAM write-through
0x60000000
peripherals
0x40000000
SRAM MCUs focus here
0x20000000
Code
0x00000000

CortexM
On-chip features/components modeled as memory-mapped peripherals
§ Each peripheral has a block of addresses for its registers
Every vendor has completely different peripheral interfaces, different chips by
the same vendor can differ significant too
§ CortexM makes it possible to use the same compiler, boot code, interrupt
handling code
§ Everything else needs to be implemented per-chip
§ Switching from one MCU family to another is a lot of engineering effort
§ E.g., switching from Atmel SAM4L to NXP K66

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

Bluetooth Low Energy


Not backwards compatible with Bluetooth: additional protocol that sits alongside
traditional Bluetooth
§ Uses similar physical layer (modulation, channel hopping, etc.)
§ Allows transcievers to easily support both
Intended for low data-rate, ubiquitous computing applications
§ Much lower energy consumption
§ Much lower throughput

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


BLE basics: link layer
BLE nodes can send advertisements (short broadcast packets) freely
§ iBeacon, other beacon technologies use this
Connections use a star topology: a central node can have multiple peripherals, all connections
are between a central and a peripheral
§ Centrals cannot connect to other centrals, peripherals cannot connect to other peripheral,
peripheral can connect to only one central
§ A single device can be both, or alternate: FitBit -> iPhone -> iPad
Central node sets the communication schedule, issues connection request to peripheral: low
power
central

advertiser
peripherals

BLE basics: application layer


Generic ATTributes (GATT) are how BLE devices exchange data
Attributes have a handle, a type, and data
Attributes are characteristics, services, or profiles
§ Form a data hierarchy for querying/discovery
Many standard characteristics, services, profiles
§ Many devices just invent their own
A GATT server provides data to a GATT client
§ Server/client independent of central/peripheral

server client

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Overview
CortexM microcontrollers have many sub-families
§ Increasingly powerful instruction sets
§ Common memory layout, interrupt handling, etc.
§ Each vendor has its own peripherals as memory-mapped I/O
§ Leads to excellent compiler support
Bluetooth Low Energy is an ultra-low power link layer
§ Advertisements (beacons) for simple data transmission
§ Central node controls the schedule for low power operation
§ Connections can use GATT, a hierarchical data representation for requesting
particular data

Microcontrollers and Systems-on-Chip (SoCs)


Microcontroller executes code, has on-chip peripherals
§ More powerful costs more, higher power
§ Cortex-M0, CortexM4, Cortex-M4F, …
§ On-chip peripherals (SPI, ADC, CAN
System-on-chip (SoC) combines a microcontroller core with more complex
subsystems/peripherals
§ Radios, Digital signal processors (DSPs)
§ Exact line between "microcontroller" and "SoC" is very blurry (don't worry
about it)
This module: learn about an example MCU and SoC

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Atmel SAM4L series: functionality
Cortex M4 core
128-512kB flash (program) memory, 32-64kB RAM
Operates at up to 48MHz at 1.68 to 3.6V
4 USART (UART or SPI) busesm 4 I2C (two-wire) buses
Hardware AES encryption support
USB hardware support
8-bit or 12-bit ADC (3-15 channels depending on form factor)
15 DMA channels for I/O processing offload
1.5-3µA sleep, 1.5µs wakeup, as low as 90µA/MHz active (4.3mA @ 48MHz)

http://www.atmel.com/products/microcontrollers/ARM/SAM4L.aspx

Nordic nRF51 SoC


Cortex-M0 core
Integrated Bluetooth Low Energy transciever
128-256kB flash (program) memory, 16-32kB RAM
Operates at 16MHz at 1.68 to 3.6V
1 UART, 1 SPI, one I2C bus
Hardware AES encryption support (limited)
8-bit, 9-bit, 10-bit ADC
2.6µAsleep, 4.2µs wakeup, 2.4-4.1mA active (RAM vs. flash)
16mA TX (@ +4dBm), 13.4mA RX (but radio is usually off)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Takeaways
Huge variations in what different MCUs/SoCs can do
Orders of magnitude differences in active vs. sleep current
RF is much more expensive than compute

Two basic cost considerations dominate


Energy
§ Embedded systems have an expected workload – want to minimize energy
required to handle the workload (longer battery life, more efficient)
§ More powerful, highly featured MCUs draw more power: can be more power
efficient, but consume more energy for a given workload
Money
§ Many embedded systems markets have tight margins (cars, appliances, etc.)
§ More powerful, highly featured MCUs cost more

Both costs push designs to pick minimal MCU and optimize code for it

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Energy examples
Cortex M4 core
128-512kB flash (program) memory, 32-64kB RAM
Operates at up to 48MHz at 1.68 to 3.6V
4 USART (UART or SPI) busesm 4 I2C (two-wire) buses
Hardware AES encryption support
USB hardware support
8-bit or 12-bit ADC (3-15 channels depending on form factor)
15 DMA channels for I/O processing offload
1.5-3µA sleep, 1.5µs wakeup, as low as 90µA/MHz active (4.3mA @ 48MHz)

http://www.atmel.com/products/microcontrollers/ARM/SAM4L.aspx

Nordic nRF51 SoC


Cortex-M0 core
Integrated Bluetooth Low Energy transciever
128-256kB flash (program) memory, 16-32kB RAM
Operates at 16MHz at 1.68 to 3.6V
1 UART, 1 SPI, one I2C bus
Hardware AES encryption support (limited)
8-bit, 9-bit, 10-bit ADC
2.6µAsleep, 4.2µs wakeup, 2.4-4.1mA active (RAM vs. flash)
16mA TX (@ +4dBm), 13.4mA RX (but radio is usually off)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Cost examples
Part Family Flash RAM Cost Notes
ATSAMD20E15 Cortex-M0+ 16kB 2kB $1.37
A
ATSAMD21E16 Cortex-M0+ 64kB 8kB $1.70 LIN, USB
B
NRF51422 Cortex-M0 256kB 32kB $2.44 BLE
ATSAMD20J18A Cortex-M0+ 256kB 32kB $2.69 20 12-bit ADC
ATSAM4S2BA Cortex-M4 128kB 64kB $2.80 SSC, USB
ATSAMD21G18 Cortex-M0+ 256kB 32kB $3.15 LIN, USB
A Data from DigiKey, July 2017, for ~1,000 units ; at scale costs are much lower
ATSAM4E8EA Cortex-M4 512kB 128kB $7.62 CAN, Ethernet, USB, IrDA

Takeaways
If energy is important, sleep as much as possible and avoid using radio
§ Orders of magnitude differences in active vs. sleep current
§ RF is much more expensive than compute
Choose the smallest MCU you need for the application
§ Huge variations in what different MCUs/SoCs can do
§ Cost increases with features

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Energy is the limiting resource
Many embedded systems are battery-powered
§ Consuming less energy means longer lifetime or fewer recharges
Calculating an energy budget allows you to reason about design tradeoffs

E: energy
E = P s ⋅ ts + P a ⋅ ta P: power
t: time
E = sleep energy + active energy s: sleep
a: active

Example energy budget


nRF51422 that wakes up at 1Hz and transmits a single BLE advertisement

E = P s ⋅ ts + P a ⋅ ta E: energy
P: power
E = sleep power * sleep time + active power * active time t: time
s: sleep
E = 4.8µA * sleep time + 14.6mA * active time
a: active
E = 4.8µA * 999.7ms + 14.6mA * 0.3ms
E = 4.8uAs + 4.38µAs

CR2032 is 225mAh – in theory can last 3 years (in practice much less)

Sleep current assumes all RAM retained; active current assumes 0dB transmit plus CPU at 16MHz
Active time is 37 bytes @ 1Mbps = 300µS

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Alarm bells should be going off
Energy is power * time, not current * time
Often use current when calculating microcontroller power budgets
§ Batteries do not provide constant voltage
§ Don't use voltage regulators because of significant (energy) costs
§ Take advantage of MCU tolerances (e.g. 1.8-3.6V)

Complication
We assumed that system instantaneously transitioned from sleep to wake
§ MCU takes time to wake up
§ Transceiver takes time to power up
Transition times – high power but no work – can be significant
§ Wake up less often, for longer, to amortize over wake period

E = P s ⋅ ts + P a ⋅ ta + P T ⋅ tT
E = sleep energy + active energy + transition energy

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Example
It takes the nRF51422 140µS to transition to TX state, draws 7mA

E = P s ⋅ ts + P a ⋅ ta + P T ⋅ tT
E: energy
P: power
E = 4.8µA * 999.6ms + 14.6mA * 0.3ms + 7.0mA * 0.14ms t: time
s: sleep
E= 4.8uAs + 4.38µAs + 1µAs
a: active
T: transition

Not considering transition times is off by 10%

Takeaways
Energy consumed is the sum of active and sleep energy
For ultra-low power applications, sleep and active energy can be nearly equal
Transition costs can also be significant
Based on energy budget, pick battery with desired capacity

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Minimizing Energy Consumption
To minimize sleep energy, put microcontroller into lowest possible state
§ Microcontrollers have different many low-power states and power-saving
features
§ Complex implications to software

To minimize active energy, minimize time peripherals and MCU are active
§ Perform operations in parallel to minimize active time
§ Cluster/batch operations to minimize transition times
§ Minimize clock rate

Sleep states: SAM4L


Four basic running modes
§ Run – MCU executes instructions, everything can be active
§ Sleep – no instructions, any clocks/peripherals can be active
§ Wait – no instructions, only 32kHz clock active for peripherals
§ Retention – no instructions, only 32kHz clock, no peripherals
Mode Current Wakeup latency
Run (@48MHz) 14.5mA -
Sleep 50µA 0.25µs
Wait 6µA 1.5µs
Retention 3µA 1.5µs

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Sleep state: SAM4L clocks
SAM4L has many different clocks: 32khZ, 1, 4, 8, 12, 80MHz
Higher speeds draw more power: use slowest clock possible (dividers)
But, if a fast enough clock is already on, can subdivide for slower rates

E.g., if need 1MHz and If RCFAST is on, use a clock divider of 12


Clock Speed Current
OSC32K 32kHz 350nA
RCSYS 116kHz 2µA
RC1M 1MHz 35µA
RCFAST 12MHz 180µA

Parallelism
Parallelism allows fixed overheads to amortize over multiple operations

loop {
loop {
sample_sensor();
parallel {
radio_on();
sample_sensor();
send_value();
radio_on();
sleep();
}
}
send_value();
High-cost clocks are on longer, sleep();
in SLEEP (50µA) state longer. }

When could this be more efficient?

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Batching: LTE as an example
LTE Power States

data packet

data packet 100ms 20ms


High Low
Idle On Duty
(RRC_Idle, (Continuous Duty
0.33%) Reception) (Short DRX, (Long DRX,
data packet 5% duty cycle) 2.5% duty cycle)

data packet

11.5s
INdT/Microsoft
Power Management in Mobile Devices (2014) 4 Philip Levis, Stanford University

LTE Batching

Using LTE, compare


§ Sending one small packet every 30s
§ Sending two small packets every 60s

One packet every 30s


§ (0.1s * 100%) + (0.02 * 5%) + (11.5 * 2.5%) + ((30-11.62) * 0.33%)
§ 0.1 + 0.001 + .2875 + .06 = .3576s/30s
§ = 1.2%
Two packets every 60s
§ (0.101s * 100%) + (0.02s * 5%) + (11.5s * 2.5%) + ((60-11.62)s * 0.33%)
§ 0.101 + 0.001 + .2875 + .160 = .4577s/60s
§ = 0.76%

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Minimize clock rate
Most peripherals draw current based on clock rate
§ UART: 8.5µA/MHz
§ SPI: 1.9µA/MHz
Lowering the clock rate reduces power drawn; if a fast enough clock is already
on, can subdivide for slower rates
E.g., if need 1MHz and If RCFAST is on, use
Clock Speed Current
a clock divider of 12
O0SC32K 32kHz 350nA
RCSYS 116kHz 2µA
RC1M 1MHz 35µA
RCFAST 12MHz 180µA

Minimizing Energy Consumption


To minimize sleep energy, put microcontroller into lowest possible state
§ Microcontrollers have different many low-power states and power-saving
features
§ Complex implications to software

To minimize active energy, minimize time peripherals and MCU are active
§ Perform operations in parallel to minimize active time
§ Cluster/batch operations to minimize transition times
§ Minimize clock rate

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


CortexM
CortexM defines an instruction set and core processor functionality
Several pieces of optional functionality
§ Memory protection unit: used to protect firmware from applications
§ SysTick: standard timer
§ Bit banding: spread a word across 32 words, so bits can be individually
read/written: useful for GPIO, other single-bit writes
On-chip features/components modeled as memory-mapped peripherals
§ Each peripheral has a block of addresses for its registers

CortexM memory map (ARMv6-M, ARMv7-M)


0xFFFFFFFF
System
0xE0000000
Device not shared
0xC0000000
Device shared
0xA0000000
RAM write-back
0x80000000
RAM write-through
0x60000000
peripherals
0x40000000
SRAM MCUs focus here
0x20000000
Code
0x00000000

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Core registers r0 return value
r1
r2 function arguments
r3
r4
r5
r6
r7
r8
r9
r10
r11 (fp) frame pointer
r12
r13 (sp) stack pointer
r14 (lr) link register
r15 (pc) program counter

Core registers
Handler Thread
r0 r0 return value
r1 r1
r2 r2 function arguments
r3 r3
r4 r4
r5 r5
r6 r6 Two operating modes:
r7 r7
r8 r8
thread and handler
r9 r9
r10 r10
r11 (fp) r11 (fp) frame pointer
r12 r12
r13 (sp) r13 (sp) stack pointer
r14 (lr) r14 (lr) link register
r15 (pc) r15 (pc) program counter

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Control Registers (M4)
r0 return value
r1
r2 function arguments
r3
r4
r5 APSR N Z C V Q
r6
r7 IPSR 0 or Exception
r8 ICI ICI
r9 EPSR T
/IT /IT
r10
r11 (fp) frame pointer
r12
r13 (sp) stack pointer
r14 (lr) link register
r15 (pc) program counter

Interrupt Vector table (M4)


At address 0x0 (can be relocated with VTOR register)

IRQ1 chip specific/defined


IRQ0 0x0044

SVC
0x002C
reserved
0x001C
usage fault architecture defined
bus fault
mem fault
hard fault
NMI
reset
0x0000

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


CortexM
CortexM defines an instruction set and core processor functionality
Several pieces of optional functionality
§ Memory protection unit: used to protect firmware from applications
§ SysTick: standard timer
§ Bit banding: spread a word across 32 words, so bits can be individually
read/written: useful for GPIO, other single-bit writes
On-chip features/components modeled as memory-mapped peripherals
§ Each peripheral has a block of addresses for its registers

CortexM memory map (ARMv6-M, ARMv7-M)


0xFFFFFFFF
System
0xE0000000
Device not shared
0xC0000000
Device shared
0xA0000000
RAM write-back
0x80000000
RAM write-through
0x60000000
peripherals
0x40000000
SRAM MCUs focus here
0x20000000
Code
0x00000000

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Peripherals
Each peripheral is mapped to a region (0x1000 in size) of memory
Registers laid out in that memory (completely up to chip)
Most associated with an interrupt (NVIC index/IRQ#)

Offset Register Name Access Reset


SAM4L AESA 0x00 Control CTRL RW 0x00000000
0x04 Mode MODE RW 0x000F0000
AES accelerator 0x08 Data buffer pointer DATABUFPTR RW 0x00000000

§ AES-128 0x0C Status SR R 0x00010000


0x10 Interrupt enable IER W 0x00000000
§ ECB
0x14 Interrupt disable IDR W 0x00000000
§ CBC 0x18 Interrupt mask IMR R 0x00000000
§ CF 0x20 Key 0 KEY0 W 0x00000000
§ OF 0x3C Key 7 KEY7 W 0x00000000

§ CTR 0x40 Initialization vector 0 INITVECT0 W 0x00000000


0x4C Initialization vector 3 INITVECT3 W 0x00000000
0x50 Input data IDATA W -
0X60 Output data ODATA R -
0x70 DRNG register DRNGSEED W 0x00000000

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


General operation
Configure peripheral for operation (e.g., AES input data, key)
Set bit in control register to start operation
Return data on completion
§ Spin loop on interrupt mask for very fast operations
§ Handle interrupt for longer operations
§ Read data out of data register (if input)

Buses

SCL
I2C SDATA

UAR RX

T TX

CLK
MOSI
SPI MISO
CSn

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Larger-scale I/O
Some operations transfer a small amount of data
§ Single byte UART write
§ Single ADC sample
Others transfer more data, sometimes very fast
§ Transfer USB data at 8MHz
§ High frequency ADC sampling (100 of kHz)
For larger transfers, per-byte interrupts can be expensive
§ Wakeup, active power cost energy
§ Software may not handle interrupts fast enough

DMA: Direct Memory Access


Set up a series of operations as a direct memory access operation
§ Provide a buffer to read into and/or write from
§ Tell system how many operations
§ Start operation
Receive DMA interrupt when whole series of operations complete
Amortize interrupt cost across many operations
§ Consumes less energy (fewer CPU cycles)
§ Can run faster (not limited by interrupt rate)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Peripherals
On-chip accelerators for common operations
§ Huge variety, depending on application focus on MCU
Interact/use with memory-mapped registers
Larger operations can use DMA to save energy
Fast operations can use DMA to run faster

Handling Interrupts
Handler Thread
r0 r0 return value
r1 r1
r2 r2 function arguments
r3 r3
r4 r4
r5 r5
r6 r6 Two operating modes:
r7 r7
r8 r8
thread and handler
r9 r9
r10 r10
r11 (fp) r11 (fp) frame pointer
r12 r12
r13 (sp) r13 (sp) stack pointer
r14 (lr) r14 (lr) link register
r15 (pc) r15 (pc) program counter

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Execution model

Thread mode executes main loop (application code, etc.)


Handler mode executes interrupts
§ Interrupts can happen at any time
§ Can be disabled, but doing this for a long time is dangerous

interrupts

application application

The danger of interrupts


Thread mode Handler mode
extern int a; extern int a;
void inc() { void dec() {
a = a + 1; a = a - 1;
} }

00008000 <inc>: 0000802c <dec>:


8000: e52db004 push {fp} 802c: e52db004 push {fp}
8004: e28db000 add fp, sp, #0 8030: e28db000 add fp, sp, #0
8008: e59f3018 ldr r3, [pc, #24] 8034: e59f3018 ldr r3, [pc, #24]
800c: e5933000 ldr r3, [r3] 8038: e5933000 ldr r3, [r3]
8010: e2832001 add r2, r3, #1 803c: e2432001 sub r2, r3, #1
8014: e59f300c ldr r3, [pc, #12] 8040: e59f300c ldr r3, [pc, #12]
8018: e5832000 str r2, [r3] 8044: e5832000 str r2, [r3]
801c: e24bd000 sub sp, fp, #0 8048: e24bd000 sub sp, fp, #0
8020: e49db004 pop {fp} 804c: e49db004 pop {fp}
8024: e12fff1e bx lr 8050: e12fff1e bx lr
8028: 00010070 .word 0x00010070 8054: 00010070 .word 0x00010070

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


The danger of interrupts
Thread mode Handler mode
extern int a; extern int a;
void inc() { void dec() {
a = a + 1; a = a - 1;
} }

00008000 <inc>: 0000802c <dec>:


8000: e52db004 push {fp} 802c: e52db004 push {fp}
8004: e28db000 add fp, sp, #0 8030: e28db000 add fp, sp, #0
8008: e59f3018 ldr r3, [pc, #24] 8034: e59f3018 ldr r3, [pc, #24]
800c: e5933000 ldr r3, [r3] 8038: e5933000 ldr r3, [r3]
8010: e2832001 add r2, r3, #1 danger 803c: e2432001 sub r2, r3, #1
8014: e59f300c ldr r3, [pc, #12] 8040: e59f300c ldr r3, [pc, #12]
8018: e5832000 str r2, [r3] 8044: e5832000 str r2, [r3]
801c: e24bd000 sub sp, fp, #0 8048: e24bd000 sub sp, fp, #0
8020: e49db004 pop {fp} 804c: e49db004 pop {fp}
8024: e12fff1e bx lr 8050: e12fff1e bx lr
8028: 00010070 .word 0x00010070 8054: 00010070 .word 0x00010070

If dec() runs when inc() is at 0x8010, then result of dec() will be lost: it
has copied a into r3.

Dealing with interrupts


Option 1: spin loop to wait (check pending flag)
§ Pro: no latency, no race conditions
§ Con: wasted cycles, no concurrency
Option 2: disable interrupts in critical sections
§ Pro: only small latency, full concurrency
§ Con: critical sections must be small, easy to make mistakes
Option 3: minimize code in interrupt (delay processing to sequential code)
§ Pro: simple code, full concurrency
§ Con: interrupts can be delayed significantly

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Software Architecture

applications

libraries services

operating system

hardware

Operating System
Kernel: lowest level of software
§ Directly accesses hardware
§ Has complete control of system
§ Example: Linux, Windows, OSX
Libraries and services on top of kernel
§ Networking, storage, other utilities
General goal: minimize what's in the kernel
§ Challenge: crossing between kernel and libraries is expensive
§ If abstract requires a lot of crossings, move inside kernel

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Embedded Operating Systems
Many MCUs do not distinguish kernel and user code
§ No hardware memory protection
§ Application code can crash entire system
§ Requires diligence and care in software design
Trend is changing, with CortexM memory protection unit (MPU)
§ Embedded Oses haven't caught up
Embedded OSes have to walk a fine line
§ Provide useful software abstractions for applications
§ Allow applications to break through abstractions when necessary

Key OS responsibility: execution model


How do you write code that responds to interrupts?
How do you write code that runs in the background?
When can code preempt other code?

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Interrupt code
Code in interrupt handler can block entire system (no interrupts handled)
§ Preemptive interrupts are especially challenging (re-use of handler context)
§ Goal: minimize code in direct handler
Use deferred procedure call (interrupt bottom half)
§ Interrupt handler does core work (e.g., pull data out of register into queue)
§ Deferred procedure call executes after interrupt handler returns
§ Interrupts can preempt deferred procedure call/bottom half

Interrupt code
Code in interrupt handler can block entire system (no interrupts handled)
§ Preemptive interrupts are especially challenging (re-use of handler context)
§ Goal: minimize code in direct handler
Use deferred procedure call (interrupt bottom half)
§ Interrupt handler does core work (e.g., pull data out of register into queue)
§ Deferred procedure call executes after interrupt handler returns
§ Interrupts can preempt deferred procedure call/bottom half

interrupts

application application

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Interrupt code
Code in interrupt handler can block entire system (no interrupts handled)
§ Preemptive interrupts are especially challenging (re-use of handler context)
§ Goal: minimize code in direct handler
Use deferred procedure call (interrupt bottom half)
§ Interrupt handler does core work (e.g., pull data out of register into queue)
§ Deferred procedure call executes after interrupt handler returns
§ Interrupts can preempt deferred procedure call/bottom half

a b c interrupts

application a b c application
bottom halves

Background code
Application code: preempted by interrupts and bottom halves
Less time critical (although may still have deadlines)
Option 1: event-driven
§ Function that executes in response to an event (timer, packet reception)
§ Cross-event state stored in global variables
Option 2: threaded
§ Function that never returns: calls functions that block (resume thread on
completion)
§ Cross-event state stored on stack (higher RAM cost)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Example: event-driven

receive_callback(receive_cb);

#define MAX_LEN 128


uint8_t send_buffer[MAX_LEN];

void receive_cb(void* buf, uint8_t len) {


if (!busy) {
uint8_t safe_len= (len > MAX_LEN)? MAX_LEN: len);
memcpy(buf, send_buffer, safe_len);
send(send_buffer, safe_len);
busy = true;
}
}

Example: threaded
#define MAX_LEN 128

void main() {
while (1) {
uint8_t buffer[MAX_LEN];
len = receive(buffer, MAX_LEN);
send(buffer, len);
}
}

Note: packets received while sending are dropped

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


FreeRTOS
Intended for real-time use (has priorities, deadlines, etc.)
Thin loop on top of hardware events
Extremely flexible, supports many chipsets
Allows (expects) you to write your own interrupt handlers
Also supports threads (called "tasks")
§ Every task has a priority, higher is more important (idle task is 0)
§ Tasks scheduled preemptively
§ Interrupts can make tasks runnable

ARM Mbed OS
ARM Mbed OS provides
§ Standard APIs for chip peripherals (SPI, I2C, etc.)
§ Libraries on top of standard APIs
Supports both event-driven and threaded programming
§ Threaded programming has easier power management
§ Can write interrupt handlers, etc.
Generally speaking, APIs are richer and cleaner than FreeRTOS
But, actual Mbed implementations are by vendors so be careful

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Operating Systems Review
Lowest level of software for applications to build on
Define concurrency model, APIs
Event-driven vs. threaded execution

This module
You've learned what embedded systems are and how they differ from traditional
computing systems such as servers, phones, and laptops

You've learned the network and software architectures they typically use and why

You've learned about the technology drivers behind the recent growth of the IoT

You've learned about energy budgets and how to design an embedded system

You've learned about common software techniques and tradeoffs

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


What is an embedded system?

“An embedded system is a computerized system that


is purpose-built for its application.”

Elicia White
Making Embedded Systems, O’Reilly

This has deep implications for how they are designed and why.
Typically, want to minimize cost/maximize lifetime for a given expected workload.
Optimized, custom software that uses as few resources as possible.

IoT: MGC Architecture


eMbedded Gateways Cloud
devices
6lowpan, 3G/4G
ZigBee, Ethernet
ZWave,
Bluetooth, TCP/IP
WiFi,
WirelessHART

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Two Game-Changers

ARM Cortex M series


§ First released 2004
§ Ultra-low power 32-bit processor
§ 8-96kB of RAM, 64-512kB code flash
§ Sleep currents recently dropped <1µA

Bluetooth Low Energy


§ First released in 2006
§ Send a 30 byte packet once per second, last for a year
on a coin cell battery
§ Support was weak until Apple incorporated into
iBeacon, now all major smartphones include it

Computing an energy budget

Many embedded systems are battery-powered


§ Consuming less energy means longer lifetime or fewer recharges
Calculating an energy budget allows you to reason about design tradeoffs
Transition times – high power but no work – can be significant
§ Wake up less often, for longer, to amortize over wake period

E = P s ⋅ ts + P a ⋅ ta + P T ⋅ tT
E = sleep energy + active energy + transition energy

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Software Architecture

applications

libraries services

operating system

hardware

Minimizing Energy Consumption


To minimize sleep energy, put microcontroller into lowest possible state
§ Microcontrollers have different many low-power states and power-saving
features
§ Complex implications to software

To minimize active energy, minimize time peripherals and MCU are active
§ Perform operations in parallel to minimize active time
§ Cluster/batch operations to minimize transition times
§ Minimize clock rate

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


IoT Connectivity and Networking
Ayfer Özgür
Stanford University

Historical Perspective on Wireless Systems


• First Wireless Age: Station to Station (Kilo Scale)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Historical Perspective on Wireless Systems
• First Wireless Age: Station to Station (Kilo Scale)
• Second Wireless Age: Station to People (Mega Scale)

Historical Perspective on Wireless Systems


• First Wireless Age: Station to Station (Kilo Scale)
• Second Wireless Age: Station to People (Mega Scale)
• Third Wireless Age: People to People (Giga Scale)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Historical Perspective on Wireless Systems

1000x increase in connectivity in each cycle.

Historical Perspective on Wireless Systems

Connecting various devices and sensors to each other and the Internet.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Historical Perspective on Wireless Systems

Paradigm shift in principles, technology, systems and applications.

Cost, size, maintenance-free operation critical for scalability.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Eliminating the Battery

Batteries are bulky and relatively expensive, require maintenance.

Energy Harvesting Remotely Powered Devices


• New deployment models and applications.
• True mobility.
• Maintenance-free perpetual operation.

Source:wonderfulenginneering.com

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Communication Under Random Energy Dynamics

energy in energy out

• Energy: • Energy:
• Static • Dynamic
• Deterministic • Random

Communication system design under random energy dynamics.

Massive Multiple Access Networks


Today’s Wireless Systems:
• Moderate system size.
• Large payloads.
• Tightly managed and
synchronized.
• Node identity and message.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Massive Multiple Access Networks
Tomorrow’s IoT Networks:
• Massive number of devices, only
few active at a time.
• Bursty traffic, few bits to transmit.
• Complexity and energy
constrained.
• Node identity may not be relevant.

Source:neoswarm.com

Module Outline
• Energy Harvesting Transmitters for IoT
• Wirelessly Powered Transmitters for IoT
• Massive Multiple Access
• Related Coursework
• Quiz

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Basic Model for Communication

Capacity of the AWGN Channel


The most famous formula (Shannon)

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Capacity of the AWGN Channel
The most famous formula (Shannon)

Operating Regimes:
W SNR ≪ 0 dB Bandwidth-limited
C∝
P/N0 SNR ≫ 0 dB Power-limited

Communication system design is dictated by the operating regime.

Communication Under Random Energy Dynamics

Et: stochastic process known causally at the transmitter and not at the receiver.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Bmax = ∞
Capacity equal to that of a classical AWGN channel with

Bmax = ∞
Capacity equal to that of a classical AWGN channel with

Insights:
• Use standard communication and coding techniques for the AWGN channel.
• Only relevant property in determining capacity is the average energy harvesting rate.

Ref: O. Ozel, S. Ulukus, Achieving AWGN capacity under stochastic energy harvesting, IEEE
Transactions on Information theory, 2012.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Bmax finite
Foremost engineering questions:
• How does the capacity of the energy harvesting AWGN channel
depend on system parameters such as Bmax and Et?
• What are the properties of Et most relevant to capacity? What are
more favorable and less favorable energy profiles?
• Are there different operating regimes where the dependence to Bmax
and Et is qualitatively different?
• For a given Et , how can we “optimally” choose Bmax?
• What is the optimal power control policy?

Capacity for an Energy Harvesting Transmitter

Ref: D. Shaviv, P.M. Nguyen, A. Ozgur, Capacity of the Energy Harvesting Channel with a
Finite Battery, IEEE Transactions on Information theory, 2016.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Capacity for an Energy Harvesting Transmitter

Ref: D. Shaviv, P.M. Nguyen, A. Ozgur, Capacity of the Energy Harvesting Channel with a
Finite Battery, IEEE Transactions on Information theory, 2016.

Correlations in Energy Arrivals

Capacity decreases with coherence time T in general.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Remotely Powered Communication

Two Topologies for Home IoT

Current practice:
• Transfer energy at a constant rate.
• Periodically charge transmitter’s battery.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Exploit Side Information

Charger observes the output of the Charger observes the input to the
channel. channel.

Binary Example
• Charger has no side information:
• Et = 1, ∀t: C∅ = 1 bits/channel use, Γ = 1 unit/channel use.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Binary Example
• Charger has no side information:
• Et = 1, ∀t: C∅ = 1 bits/channel use, Γ = 1 unit/channel use.
• Charger knows the message:
Ø Charge when the transmitter intends to send a 1:
• CM = 1 bits/channel use, Γ = 1/2 units/channel use.

Binary Example
• Charger has no side information:
• Et = 1, ∀t: C∅ = 1 bits/channel use, Γ = 1 unit/channel use.
• Charger knows the message:
Ø Charge when the transmitter intends to send a 1:
• CM = 1 bits/channel use, Γ = 1/2 units/channel use.
• Charger can observe the transmitted signal Xt−1:
Ø Charge when battery is empty:
• CX = 1 bits/channel use, Γ = 1/2 units/channel use.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Remotely Powered Communications

• Charger: Dynamically decide how much energy to transfer to the receiver based on its side
information regarding the transmission (subject to an average power constraint Γ).
• Transmitter: Dynamically adapt its transmission scheme based on its instantaneous battery level.

Remotely Powered Communications

Exploiting side information at the charger can enable performance close to the centralized case.

Ref: D. Shaviv, A. Ozgur, H. Permuter, Capacity of Remotely Powered Communication, IEEE Transactions on Information theory, 2016.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Reservation Systems
frequency and time resources are
tightly allocated across active devices
• LTE, GSM etc.
• Narrowband IoT

Overhead for coordination becomes the bottleneck when the number of


devices is large and payload is small.

Random Access Systems


CSMA, CDMA, Aloha Wifi, Lora, ZigBee, BLE, etc.

• Carrier-sensing is energy-consuming.
• Aloha leads to high collision rates.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Embracing Collisions

Design codes that are resilient up to a given number of collisions.

Node Identification

• On-off keying used for transmission.


• Energy detection at the receiver.
• At most d out of N users active at a time where d ≪ N.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Node Identification

Trivial Solution: t = N.

Group Testing
• N items (soldiers).
• d defective (infected items).
• Figure out the defective group.
• Group items together and apply t tests.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Group Testing

Group testing literature:

t = Θ(d log N)

Collision Resolving Codes via Group Testing

Node identification: assign a single distinct column to each users.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Collision Resolving Codes vis Group Testing

Joint Identification and Information Transmission: assign multiple distinct columns to each user.

Communication vs Computation

How to trade-off communication vs computation.

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED


Communication vs Computation

Compute and communicate at multiple stages.

Related Coursework on Communication

Copyright ⓒ 2017 Stanford University. ALL RIGHTS RESERVED

You might also like