CSE 467S
Embedded Computing Systems
Prof. Chenyang Lu
TAs: Rahav Dor, Bo Li
Embedded
Systems
Ø Any device embedding a computer - but you don’t think of
it as a “computer”
q Smart phones.
q Smart watch.
q Google Glass.
q Digital camera.
q Game console.
q Automobile.
q Airplanes.
q Mars rover.
Ø >95% of microprocessors are used for embedded systems.
2
Embedding
a
Computer
analog
output
analog
actuators
analog
analog
sensors
input
CPU
mem
embedded
computer
3
An5-‐lock
Brake
System
Ø Pumps brakes to reduce skidding à real-time and safety
sensor sensor
brake brake
hydraulic
ABS
pump
brake brake
sensor sensor
4
GM
Super
Cruise
5
Ac5ve
Safety
&
Autonomous
Vehicles
ECU A
Microcontroller 1
Brake
Core 1 Core 2 Controller
Radar Radar Camera
Microcontroller 2
CAN Steering
Core 1 Core 2
FlexRay Bus #1 Controller
Channel B
CAN
Engine
FlexRay ECU B Bus #2 Controller
Channel A
Microcontroller 1
Core 1 Core 2
Transmission
Radar Radar Camera
Microcontroller 2 Controller
Core 1 Core 2
Courtesy:
GM
6
~100
Microprocessors
in
a
Car
Ø 4-bit microcontroller checks seat belt;
Ø microcontrollers run dashboard devices;
Ø 16/32-bit microprocessor controls engine;
Ø Navigation;
Ø Entertainment: DVD, audio, satellite radio…
7
DEPARTMENTS
Cameras
Using the Canon Hack Development Kit
New firmware allows Canon cameras to perform some neat tricks
By DAVID SCHNEIDER / DECEMBER 2010
Ø Canon EOS 3 has three B
ph
microprocessors.
cl
ro
q 32-bit RISC CPU runs pa
ch
autofocus.
ph
m
pr
ha
Ø Hack your Canon PowerShot
be
ca
q Canon Hack Development Kit
ex
th
q [Link]
ha
ca
q Load firmware from your S
memory card.
an
th
q Run scripts to get full control of en
P
your camera!
an
le
th
th
pu
C
Photos: David Schneider
C
DAM NICE PHOTOGRAPHY: These aerial images of White Sands National Monument [top] pr
and Glen Canyon Dam [left] were taken by a Canon SD30 carried on a radio-controlled model C
airplane [right], using CHDK to operate the shutter. ot
br
version for just about any one of the Canon PowerShot series. 8
Qualcomm
2013
CES
Keynote
Ø [Link]
9
Smart
Dust
Ø Processor + Sensors/Actuators + Wireless Interface
Ø Miniature hardware manufactured economically in large numbers
Smart Dust (UCB)
10
Internet
of
Things
Ø [Link]
11
Epic
Core
3V
I/O (some shared)
RAM 10 KB
8 ADC (12 bit)
2 DAC (12 bit)
Flash 48 KB 1 I2C Unique
2.5 x 2.5 cm 1 JTAG hardware ID
1 1-Wire
TI MSP430 2 SPI
2 UART
CC2420 radio
802.15.4 16 Mbit
6LoWPAN/IPv6 Clock 4/8 MHz 8 general, 8 Flash memory
interrupt, and 5
special pin
connectors
Typical
sleep
current
9μA
at
3V,
Radio
acIve
~20mA
12
Shimmer3
Ø Connects via Bluetooth
Ø 24MHz MSP430 CPU
Ø 10 DoF inertial sensing via accelerometer,
gyroscope, magnetometer, and altimeter
Ø Motion processor for on-board 3D
orientation estimation
Ø Expansion modules will include ECG,
EMG, GSR, and others)
13
Structural
Health
Monitoring
Ø >26% of the nation's bridges are either
structurally deficient or functionally
obsolete. [ASCE 2009]
Ø Co-design of sensor networks and
structural engineering algorithms
Ø Damage localization on physical structures
Ø Advantages over centralized approach
q reduce latency by 88%
q x3.4 increase in battery life under an
hourly schedule
G.
Hackmann,
W.
Guo,
G.
Yan,
C.
Lu,
S.
Dyke,
Cyber-‐Physical
Codesign
of
Distributed
Structural
Health
Monitoring
with
Wireless
Sensor
Networks,
ICCPS'10.
G.
Hackmann,
F.
Sun,
N.
Castaneda,
C.
Lu
and
S.
Dyke,
A
HolisIc
Approach
to
Decentralized
Structural
Damage
LocalizaIon
Using
Wireless
Sensor
Networks,
RTSS’08.
14
Process
Monitoring
and
Control
Ø WirelessHART
q Open standard for wireless sensor-
actuator networks for process industries
q Commercial deployment in real-world
environments
Ø Real-time scheduling for WirelessHART
q Mapping to real-time CPU scheduling
q Handle conflicts between wireless
transmissions
Ø General real-time scheduling theory for
wireless sensor-actuator networks
A.
Saifullah,
Y.
Xu,
C.
Lu
and
Y.
Chen,
Real-‐Time
Scheduling
for
WirelessHART
Networks,
RTSS
2010.
A.
Saifullah,
Y.
Xu,
C.
Lu
and
Y.
Chen,
End-‐to-‐End
Delay
Analysis
for
Fixed
Priority
Scheduling
in
WirelessHART
Networks,
RTAS
2011.
15
Clinical
Monitoring
Ø First deployment of clinical monitoring
system using wireless sensor networks.
Ø 7-month clinical trial with 46 patients.
Ø Higher frequency than current practice
q 1 reading/min vs. several readings/day.
Ø Highly reliable network
Ø Developing early detection system of
clinical deterioration
O.
Chipara,
C.
Lu,
T.C.
Bailey
and
G.-‐C.
Roman,
Reliable
Clinical
Monitoring
using
Wireless
Sensor
Networks:
Experience
in
a
Step-‐down
Hospital
Unit,
SenSys’10.
16
Smart
Energy
Ø Rely on communication between utility companies and household devices
Ø Home-Area Networks connect power meters, home appliances, HVAC
q Measure wireless characteristics in real homes (10+ apartments)
q Develop design guidelines and protocols for reliable home area networks
Ø Study spatiotemporal thermal dynamics of buildings
Ø [Link]
17
CPSL
Sensor
Network
Testbed
18
CPSL
Sensor
Network
Testbed
19
Why
are
such
systems
special?
Ø Application specific
q Specialize design for specific application.
q Not a general-purpose computer.
Ø Must worry about both hardware and software
Ø Must worry about non-functional constraints
q Real-time
q Battery life & temperature
q Reliability & safety
q Cost
Just “works” is NOT enough!
20
Snapdragon
S4
Thermal
Comparison
Ø [Link]
thermal-comparison-and-butter-benchmark
21
What
are
you
going
to
learn?
Ø Power Management
Ø Programming and optimization for
q Real-time performance
q Power
q Memory footprint
Ø Real-Time Operating Systems (RTOS)
Ø Real-time scheduling
Ø Wireless sensor networks
22
Readings
Ø Textbook: Computers as Components: Principles of
Embedded Computing System Design (3rd edition), Marilyn
Wolf, Morgan Kaufmann Publishers, 2012.
Ø Additional papers
23
Grading
Ø Midterm exam 25%
Ø Final exam 25%
Ø Project 35%
q TinyOS project 1: 1%
q Proposal 4%
q Midterm demo 5%
q Final demo 25%
Ø Homework 10%
Ø Participation 5%
24
Project
Topics
Ø Application: Develop an interesting application
Ø Experimentation: Evaluate and compare techniques
Ø New ideas
Ø Must be a system project
Ø Available: wireless sensors
25
Bridge
Monitoring
• Monitor vibration of bridge
• Detect and locate damage
• [Link]
26
Follow-‐Me
Music
27
Help
Ø Prof. Lu: Bryan 504
Ø Rahav & Bo: Bryan 502
Ø By appointment
Ø [Link]
q Slides, homework, announcement
Ø Real-world applications of wireless sensor networks:
[Link]
28